ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* early endinput
@ 2001-02-14 14:11 Han The Thanh
  2001-02-14 15:23 ` S2P development
  2001-02-14 15:24 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Han The Thanh @ 2001-02-14 14:11 UTC (permalink / raw)


Hi all,

I have a long document, which includes several files, each corrseponds to a
part of the document. I wish to produce only a few first pages of each, but
don't want to touch them at all. Is there an easy way to do it in context?

Thanks,
Thanh


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: early endinput
  2001-02-14 14:11 early endinput Han The Thanh
@ 2001-02-14 15:23 ` S2P development
  2001-02-14 16:01   ` Hans Hagen
  2001-02-14 15:24 ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: S2P development @ 2001-02-14 15:23 UTC (permalink / raw)


Han The Thanh wrote:
> 
> Hi all,
> 
> I have a long document, which includes several files, each corrseponds to a
> part of the document. I wish to produce only a few first pages of each, but
> don't want to touch them at all. Is there an easy way to do it in context?

Not sure, but this *might* work:

\everypar{\ifnum \inputlineno > 500 \endinput \fi}

Taco


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: early endinput
  2001-02-14 14:11 early endinput Han The Thanh
  2001-02-14 15:23 ` S2P development
@ 2001-02-14 15:24 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-02-14 15:24 UTC (permalink / raw)
  Cc: ntg-context

At 03:11 PM 2/14/01 +0100, you wrote:
>Hi all,
>
>I have a long document, which includes several files, each corrseponds to a
>part of the document. I wish to produce only a few first pages of each, but
>don't want to touch them at all. Is there an easy way to do it in context?

\appendtoks \CheckThanhsPages \to \everypar

\def\CheckThanhsPages%
  {\doglobal\increment\ThanhsCounter
   \ifnum\ThanhsCounter=10 \page \endinput \fi}

\def\LoadThanhsFile#1%
  {\doglobal\newcounter\ThanhsCounter
   \readfile{#1}{}{}}

\LoadThanhsFile {xx.tex}
\LoadThanhsFile {yy.tex}

cross your fingers that grouping works ok, so an alternative may be: 

\setuphead[chapter][after=\CheckThansPages]

instead of the par. 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: early endinput
  2001-02-14 15:23 ` S2P development
@ 2001-02-14 16:01   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2001-02-14 16:01 UTC (permalink / raw)
  Cc: ntg-context

At 04:23 PM 2/14/01 +0100, S2P development wrote:
>Han The Thanh wrote:
>> 
>> Hi all,
>> 
>> I have a long document, which includes several files, each corrseponds to a
>> part of the document. I wish to produce only a few first pages of each, but
>> don't want to touch them at all. Is there an easy way to do it in context?
>
>Not sure, but this *might* work:
>
>\everypar{\ifnum \inputlineno > 500 \endinput \fi}

I think so, but better is to append to \everypar

\appendtoks ... \to \everypar

or to use 

\EveryPar{...}

Hans 
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-02-14 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-14 14:11 early endinput Han The Thanh
2001-02-14 15:23 ` S2P development
2001-02-14 16:01   ` Hans Hagen
2001-02-14 15:24 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).