[XeTeX] Synching PDF paper size with typesetting size
Karljurgen Feuerherm
kfeuerherm at wlu.ca
Sat Nov 5 22:14:35 CET 2011
Yes, thanks, I see. I starting doing something similar earlier today.
It is true, of course, that one may *not* want B5 pdf when the page is
B5 (say to allow for trim), so forcing the two to be identical wouldn't
be the thing to do either...
K
>>> On Sat, Nov 5, 2011 at 4:55 PM, in message
<4EB5A2B1.6060409 at Rhul.Ac.Uk>,
"Philip TAYLOR (Webmaster, Ret'd)" <P.Taylor at Rhul.Ac.Uk> wrote:
>
> Karljurgen Feuerherm wrote:
>
>> Hmm. Is there not an integrated solution, set one thing to do it
both
> places?
>
> Well, specifying a given constant in exactly one place
> is certainly a cornerstone of rigorous and defensive
> programming, so I for one am all in favour of such
> solutions. Here, by way of example, is the preamble
> of a document on which I am currently working -- you will
> see that every key dimension is specified in one place
> and one place only. I don't pretend for one second that
> it addresses your particular needs, but it does show that
> "one constant, one definition" is not difficult to achieve.
>
> Philip Taylor
> --------
> % !TeX program = xetex
>
> \newdimen \innermargin
> \newdimen \outermargin
> \newdimen \uppermargin
> \newdimen \lowermargin
> \newdimen \cropwidth
> \newdimen \cropheight
> \newdimen \cropmark
> \newdimen \cropmitre
> \newdimen \Knuthoffset
>
> \pdfpagewidth = 210 mm
> \pdfpageheight = 297mm
> \cropwidth = 190 mm
> \cropheight = 250 mm
> \cropmark = 1 cm
> \cropmitre = 0.2 cm
> \innermargin = 1 in
> \outermargin = 1.5 in
> \uppermargin = 1 in
> \lowermargin = 1 in
> \Knuthoffset = 1 in
>
> \def \onehalf {0.5}
>
> \hoffset = \pdfpagewidth
> \advance \hoffset by -\cropwidth
> \hoffset = \onehalf \hoffset
> \advance \hoffset by \innermargin
> \advance \hoffset by -\Knuthoffset
>
> \voffset = \pdfpageheight
> \advance \voffset by -\cropheight
> \voffset = \onehalf \voffset
> \advance \voffset by \uppermargin
> \advance \voffset by -\Knuthoffset
>
> \hsize = \cropwidth
> \advance \hsize by -\innermargin
> \advance \hsize by -\outermargin
>
> \vsize = \cropheight
> \advance \vsize by -\uppermargin
> \advance \vsize by -\lowermargin
>
> \input cropmarks
> \topcropmark = \uppermargin plus \cropmark minus -\cropmitre
> \bottomcropmark = \cropheight plus \cropmark minus -\cropmitre
> \advance \bottomcropmark by -\uppermargin
> \leftcropmark = \innermargin plus \cropmark minus -\cropmitre
> \rightcropmark = \cropwidth plus \cropmark minus -\cropmitre
> \advance \rightcropmark by -\innermargin
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
More information about the XeTeX
mailing list