[tex-k] Re: Possible bug in pdfetexk (re \hoffset)?
Heiko Oberdiek
oberdiek at uni-freiburg.de
Fri Jan 27 20:09:34 CET 2006
On Fri, Jan 27, 2006 at 06:17:16PM +0000, Philip TAYLOR wrote:
> Dear all -- The following preamble produces a correctly
> centered letter using TeX, but PdfTeX appears to offset
> everything by about 1,5 em (see commented-out \advance
> at-end). A sample document follows.
>
> Philip Taylor
> --------
> % letter-macros
>
> \def \from {\leftskip = 0 pt plus 1 fill \parskip = 0 ex \obeylines}
> \def \to {\rightskip = 0 pt plus 1 fill \parskip = 0 ex \obeylines}
> \def \body {}
> \def \blockquote {\vskip \parskip \leftskip = 3 em \rightskip = 0 ex
> plus 1 fill \parskip = 0 ex \obeylines}
> \def \signature {\vskip 3\parskip}
>
% pdfTeX also knows \pdfhorigin and \pdfvorigin
% In my teTeX installation the values are set during generating
% the format files in pdftexconfig.tex:
% \pdfhorigin=1 true in
% \pdfvorigin=1 true in
% \showthe\pdfhorigin = 72.26999pt
> \magnification \magstep 1
% Now the values of \pdfhorigin, pdfvorigin need to be
% reassigned, see below
> \parindent = 0 em
> \parskip = 3 ex
>
> \hsize = 210 true mm
> \vsize = 297 true mm
>
\input ifpdf.sty
% it sets \ifpdf for detecting pdfTeX in pdf mode
> \begingroup
> \hoffset= 1 true in
> \voffset = 1 true in
> \globaldefs = 1
\ifpdf
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
% now the value is 60.22462pt (same as \hoffset = 1 true in).
> \pdfpagewidth = \hsize
> \pdfpageheight = \vsize
\fi
> \advance \hsize by -2\hoffset
> \advance \vsize by -2\voffset
> \endgroup
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the tex-k
mailing list