ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: ecashin@coe.uga.edu (Ed L. Cashin)
Cc: ntg-context@ntg.nl
Subject: Re: seeking ConTeXt code
Date: 13 Sep 1999 16:33:02 -0400	[thread overview]
Message-ID: <m3d7vmy2kh.fsf@kali.coe.uga.edu> (raw)
In-Reply-To: <37D61A5C.771BF52E@wxs.nl>

Hans Hagen <pragma@wxs.nl> writes:

> Hi Ed,
[Ed wrote:]
> > > >       * quire collation (for booklet-style pagination but without
> > > >                 post-processing)
...
> This concerns \stelarrangerenin or \setuparranging
[Ed wrote:]
> > Is it hard to do?  Basically, I'm interested in taking a document with
> > dynamically-generated context (so I won't know beforehand how many
> > pages there are) and making it have pages ready for double-sided
> > front-and-back printing, as if I ran my LaTeX "[twosided]" document
> > through the psutils' psbook and "psnup -n 2".
> 
> There are two ways to do this: 
> 
> (1) while typesetting
> (2) afterwards
> 
> Actually (2) comes down to (1) where each page is pasted in as a figure.
> This feature is built in texexec: texexec --pdfarrange --paper=a4a5
> --pdf --print=up yourfile.pdf

Just to make sure I'm following you, are you saying that 2 is done
with the command,

    texexec --pdfarrange --paper=a4a5 --pdf --print=up yourfile.pdf

... ?  I tried that; and I'll refer to this method later as the
"--pdfarrange" method.

> Method 1 is the most natural one because there the typesetting is tuned
> to the natural paper size. You pick up a paperformat and map it onto a
> print format. Then you set up the arrangement. The next sample is from
> the manual ( 
> 
> \setuppapersize   [A7][A3]
> \setuparranging   [2*8,rotated,doublesided]
> \setuppagenumber  [alternative=doublesided]
> \setuplayout      [margin=0pt,width=fit]
> \setupbackgrounds [text][text][background=screen]
> \setupcolors      [state=start]
> \setuplayout      [location=middle,marking=color]
> \setuptolerance   [tolerant]
> \setupbodyfont    [6pt]
>
> \starttext
>   \dorecurse{30}{\input tufte \par \input knuth \par}
> \stoptext

I have been playing with this, and it seems to work, but it is has a
much longer execution time compared to, e.g., psbook.

It seems that the "--pdfarrange" method is significantly faster.  Is
that what you'd expect?  

> Now, the main problem is that arrangement takes place in the last
> stage.  This means running with the arrangement commented and then
> run a last one with the arrangement. The reson behind this is that
> otherwise all the references and indexes and lists get spoiled (page
> 5 can be output before page 1).

I haven't been using documents that have references and lists in my
experiments.  Are you saying that the --pdfarrange method will
generate documents with incorrect indices, references, etc.?

> When you use a5 on a4, you can use texexec. Just set up your document
> for a5, and run texexec: 
> 
>   texexec --paper=a5a4 --print=up yourfile 
> 
> will run context untill all refs are sorted out, and then apply a last
> pass doing the reshuffel. 
>
> I can add a feature to texexec (--arrange) that does the 'commenting'
> (sort of), so that one has full controll in the source. I'll give this
> some thought. 

What would be the advantage of the texexec --arrange option versus
putting the pagination commands in the source?

I noticed that a while back Taco Hoekwater posted to the pdftex list a
method that consisted of just directly noodling with the page number
order in the PDF document itself.  You warned that the number of bytes
has to stay the same, but it sounded like it would work.

That wouldn't work in this case, would it?  I'm putting the pages 2
per sheet of paper.

> Concerning the manual, we will start uploading soon on a chapter by
> chapter base. The first 4 chapters are in typesetting stage (chapter 4
> is what you need). 

Whoo!!  That is very good news!

-- 
--Ed Cashin							
  ecashin@coe.uga.edu


  parent reply	other threads:[~1999-09-13 20:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-06  1:13 Ed L. Cashin
1999-09-06 19:26 ` Hans Hagen
1999-09-06 20:59   ` RH 6.0 teTeX (was Re: seeking ConTeXt code) (long) Ed L. Cashin
1999-09-07  7:54     ` Hans Hagen
1999-09-07 14:45       ` Ed L. Cashin
1999-09-08  3:08   ` seeking ConTeXt code Ed L. Cashin
1999-09-08  8:12     ` Hans Hagen
1999-09-09  0:01       ` Ed L. Cashin
1999-09-09  7:23         ` Hans Hagen
1999-09-13 20:33       ` Ed L. Cashin [this message]
1999-09-13 23:29         ` Hans Hagen
1999-09-08  8:35     ` Gilbert van den Dobbelsteen
1999-09-08 10:12       ` Hans Hagen
1999-09-09  8:37         ` Tobias Burnus
1999-09-08 12:11     ` Hans Hagen
1999-09-09  0:38       ` Ed L. Cashin
1999-09-09  7:13         ` Hans Hagen
1999-09-10 15:08           ` Ed L. Cashin
1999-09-10 16:13             ` Hans Hagen
1999-09-09  2:45   ` Ed L. Cashin
1999-09-09  7:04     ` Hans Hagen
1999-09-09  9:35   ` Hans Hagen
1999-09-09  9:37   ` Hans Hagen
1999-09-09 18:11     ` Berend de Boer
1999-09-09 10:05   ` Taco Hoekwater
1999-09-09 10:14   ` Taco Hoekwater
1999-09-09 10:26   ` Taco Hoekwater
1999-09-09 11:04   ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d7vmy2kh.fsf@kali.coe.uga.edu \
    --to=ecashin@coe.uga.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).