[OS X TeX] Page origin problem with TeXLive and dvips
Richard Koch
koch at math.uoregon.edu
Wed Jan 31 16:28:54 EST 2007
Folks,
I apologize for this very technical discussion on our mailing list.
I'll explain my current understanding of the problem and propose a
slight MacTeX change to fix it. If experts want to object, now is the
time.
Consider Bruno's example, repeated at the end of this message. If
MacTeX configures paper size using "texconfig-sys paper a4", then
this example produces different output under pdftex and under "tex
and ghostscript." Typesetting with "tex and ghostscript" produces
text about 2/3 of an inch too high. On the other hand, if MacTeX
configures paper size as above and then fixes config.ps by adding the
command "texconfig-sys dvips paper a4", then both methods give the
same result.
From now on, typeset with "tex and ghostscript".
Experiment 1: If we compare the output postscript files, we find that
the only difference is that the "good" file has an extra postscript
command "a4" missing in the "bad" file.
Experiment 2: The problem only occurs with a4 size paper. The output
postscript files differ in a similar way using letter paper, but the
difference causes no change in the final result.
Experiment 3: Changing distiller from the ghostscript distiller to
Apple's /usr/bin/pstopdf makes no difference
Experiment 4: If we use the "bad" configuration, but change TeXShop
preferences by adding
--extradvipsopts "-t a4"
to both "TeX + dvips + distiller" preferences in the second column,
the problem goes away.
By now, experts on this list have dissected the texconfig script and
the config.ps file, and consulted the Dvips manual . The above
experiments are exactly what we would expect from these
investigations. In short
1) the Dvips manual warns that not all postscript printers
understand "a4", so inserting "a4" in the postscript output
creates nonconforming code
2) on the other hand, Apple's distiller and the ghostscript
distiller need to know the paper size to produce correct results, so
the missing postscript "a4" command causes them to assume letter paper
3) the extra dvips option for simpdftex adds this "a4" command back
So now we face a choice. Should MacTeX install a completely vanilla
TeXLive, including the standard TeXLive paper configuration? In that
case, users with a4 paper may need to fix the problem themselves by
calling "texconfig-sys dvips paper a4" or else modifying simpdftex
preferences. The advantage is that we stick with a "default TeXLive"
and get conforming postscript recommended by the Dvips manual. The
disadvantage is that we need to educate users who typeset with "tex
and ghostscript". Another disadvantage is that Gerben uses texconfig-
sys dvips paper a4", so gwTeX and TeXLive would be configured
differently.
These arguments convince me that we should use "texconfig-sys paper
a4" followed by "texconfig-sys dvis paper a4", and let those few
users who worry about nonconforming postscript code reconfigure.
By the way, it is now clear that this is not a TeXLive mistake. Faced
with a difficult choice, the TeXLive folks went one way. I believe
that the special circumstances of the Mac community (and in
particular the fact that we almost never print by sending a
postscript file directly to the printer) suggest that we should use a
different default configuration.
Comments?
Dick Koch
koch at math.uoregon.edu
PS: Roberto Avanzi sent an interesting message as I was writing this,
but Bruno conveniently answered. Bruno's reply explains that
Roberto's new problem isn't related to the problem discussed above.
\documentclass[a4paper]{article}
% Set text width
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
% Set text height
\setlength{\topmargin}{0pt}
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\topskip}
\addtolength{\textheight}{-\footskip}
\divide\textheight by\baselineskip
\newcounter{tempcounter}
\setcounter{tempcounter}{\textheight}
\setlength{\textheight}{\value{tempcounter}\baselineskip}
\addtolength{\textheight}{\topskip}
% Let the fun begin
\begin{document}
Sample text.
\end{document}
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list