LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Paul Thompson <[log in to unmask]>
Fri, 8 Feb 2008 09:43:36 -0800
text/plain (5 kB) , text/html (8 kB)
Ha! I do this in newlfm.  What I do is specify page dimensions in a register.  During shipout, after shipping out the old page, I bring the new dimensions in and substitute for the old.

I need to do this because, in newlfm, I set up letters.  Page One of the letter can have a top margin of 5 cm to accommodate a figure or special feature pertaining to a letterhead letter.  On Page Two, however, I don't want that large margin.  I want a smaller margin, specified in a different manner.
Here is my hacked output page, which is used within newlfm (L 4781-4862 of newlfm.ltx V 8.4)

  \showdim{New page - before shipout}%
  \begingroup%           % the \endgroup is put in by \aftergroup
    \let \protect \noexpand
\txa{Before shipout...}
  \showdim{New page - immediately before shipout}
    \shipout \vbox{%
      \aftergroup \endgroup
      \aftergroup \set@typeset@protect% correct? or just restore by ending the group
        \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
        \else \let\@thehead\@evenhead
          \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
\txa{Before normalsfcodes}
      \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
      \vskip \topmargin
    \moveright\@themargin \vbox {%
      \setbox\@tempboxa \vbox to\headheight{%
        }%                        %% 22 Feb 87
      \dp\@tempboxa \z@
      \vskip \headsep
      \baselineskip \footskip
\txa{After shipout}
\showdim{New page - before reset}
\if@repth \global\textheight \@rep@th \global\@repthfalse \fi
\global \@colht \textheight
\if@repth \global\textheight \@rep@th     \global\@repthfalse \fi
\if@reptw \global\textwidth \@rep@tw      \global\@reptwfalse \fi
\if@repom \global\oddsidemargin \@rep@om  \global\@repomfalse \fi
\if@repem \global\evensidemargin \@rep@em \global\@repemfalse \fi
\if@repcs \global\columnsep \@rep@cs      \global\@repcsfalse \fi
\if@reptm \global\topmargin \@rep@tm      \global\@reptmfalse   
\txa{Fixing tm} \fi
\if@rephh \global\headheight \@rep@hh     \global\@rephhfalse \fi
\if@rephs \global\headsep \@rep@hs        \global\@rephsfalse \fi
\if@repfs \global\footskip \@rep@fs       \global\@repfsfalse \fi
\showdim{New page - after reset}

In this code \txa is a conditional listing tool, showdim shows dimensions

\if@dim@reset - newif to reset dimensions
\if@repth - if replace textheight - new value is \@rep@th - reset if  to false

Some kind of protected mechanism is used to place values into \@rep@th

Paul Thompson 
Div Biostatistics, Washington University, St. Louis

----- Original Message ----
From: Lars Hellström <[log in to unmask]>
To: [log in to unmask]
Sent: Thursday, February 7, 2008 8:23:10 AM
Subject: Re: Internal and external page setup control

13 jan 2008 kl. 19.41 skrev Frank Mittelbach:
> I'm having a bit of trouble to find a good way to specify internal or
> external
> page setup control. In LaTeX2e this concept only exists in some 
> rudimentary
> form, i.e., it is possible to influence that page style as far as 
> running
> headings are concerned by placing a \pagestyle or \thispagestyle 
> command in
> the source but that's about all that is available.
> What I'm looking for for the new output routine is to be able to 
> change, for
> example, the area specifications for the current or the following 
> pages. The
> tricky part is: how should this be specified and when should it act?
> If it works like \thispagestyle, i.e., is intended to act on the 
> "current"
> page then this might result in the following problem:
>     * Some such directive would be picked up when gathering material 
> and would
>       change, say, which float areas are allowed on the current page.
> But then
>       adding floats to these areas the point with the directive might
> get
>       pushed out of the current page (since each float takes away 
> space from
>       the galley). As a result all the placements done may no longer
>       valid.

Maybe a stupid question (however any reply might be better than no 
reply), but would it help to use \marks for communicating this kind of 
settings to the output routine?

Parts of what you've written seems to indicate there is the kind of 
sensitivity to position in vertical material that marks would provide, 
but OTOH grepping in xpackages/xor/ doesn't turn up anything to 
indicate that marks are being used for anything but running head 
contents and the like.

Lars Hellström