[XeTeX] centering layout with geometry package

Daniel Greenhoe dgreenhoe at gmail.com
Fri Nov 25 23:52:02 CET 2011


Hello Ulrike,
On Sat, Nov 26, 2011 at 12:46 AM, Ulrike Fischer <news3 at nililand.de> wrote:

I like your solution. But it seems it does not compile on my system.
In particular, when I tried to compile using xelatex, it did not like
\makeatletter (begin{document} no found) and \Gm. Is my system somehow
different from yours?

Dan

On Sat, Nov 26, 2011 at 12:46 AM, Ulrike Fischer <news3 at nililand.de> wrote:
> Am Fri, 25 Nov 2011 10:06:27 +0800 schrieb Daniel Greenhoe:
>
>> Using the geometry package, is there any way to automatically (without
>> using layouthoffset and layoutvoffset) to center a layout area on a
>> physical page?
>
> I don't see an explicit option, but it is not difficult to calculate
> the offset automatically:
>
> \documentclass{book}
> \setlength{\parskip}{0mm}%
> \setlength{\parindent}{0mm}%
> \usepackage{geometry}
> \makeatletter
> \geometry{
>  xetex,truedimen,paper=a4paper,
>  twoside=false,
>  ignoreall,
>  layoutheight=200mm,layoutwidth=100mm,
>  margin=10mm,
>  nomarginpar,noheadfoot,
>  showframe,showcrop,
>  layouthoffset=\dimexpr0.5\paperwidth-0.5\Gm at layoutwidth,
>  layoutvoffset=\dimexpr0.5\paperheight-0.5\Gm at layoutheight
>  }
>  \makeatother
> \begin{document}%
> abc
> \end{document}
>
> --
> Ulrike Fischer
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>



More information about the XeTeX mailing list