]> mj.ucw.cz Git - ucwmac.git/blobdiff - ucwmac.tex
ucw-ofs: \nofontmessages, please
[ucwmac.git] / ucwmac.tex
index 61052ca79ee44a4d2a750f8fb575ef0ca061b575..86dc5e5cc55840e3fa799645cfb0eef5ef855b72 100644 (file)
@@ -1,6 +1,6 @@
 % The UCW Macro Collection (a successor of mjmac.tex)
-% Written by Martin Mares <mj@ucw.cz> in 2010 and placed into public domain
-% -------------------------------------------------------------------------
+% Written by Martin Mares <mj@ucw.cz> in 2010--2013 and placed into public domain
+% -------------------------------------------------------------------------------
 
 %%% Prolog %%%
 
@@ -15,6 +15,7 @@
 \ifx\pdfoutput\undefined
 \else\ifnum\pdfoutput>0
        \pdftrue
+       \pdfpkresolution=600    % Provide a reasonable default
 \fi\fi
 
 %%% Page size and margins %%%
@@ -40,6 +41,8 @@
        \voffset=\topmargin
        \advance\voffset by -1truein
        \ifpdf
+               \pdfhorigin=1truein
+               \pdfvorigin=1truein
                \pdfpagewidth=\pagewidth
                \pdfpageheight=\pageheight
        \fi
@@ -86,8 +89,8 @@
 
 % Set all dimensions of a given box register to zero
 \def\smashbox#1{\ht#1=0pt \dp#1=0pt \wd#1=0pt}
-\def\smashedhbox#1{{\setbox0=\hbox{#1}\smashbox0\box0}}
-\def\smashedvbox#1{{\setbox0=\vbox{#1}\smashbox0\box0}}
+\long\def\smashedhbox#1{{\setbox0=\hbox{#1}\smashbox0\box0}}
+\long\def\smashedvbox#1{{\setbox0=\vbox{#1}\smashbox0\box0}}
 
 % Variants of \llap and \rlap working equally on both sides and/or vertically
 \def\hlap#1{\hbox to 0pt{\hss #1\hss}}
 \long\def\placeat#1#2#3{\smashedhbox{\hskip #1\lower #2\hbox{#3}}}
 
 % Like \vbox, but with reference point in the upper left corner
-\def\vhang#1{\vtop{\hrule height 0pt\relax #1}}
+\long\def\vhang#1{\vtop{\hrule height 0pt\relax #1}}
 
 % Like \vhang, but respecting interline skips
-\def\vhanglines#1{\vtop{\hbox to 0pt{}#1}}
+\long\def\vhanglines#1{\vtop{\hbox to 0pt{}#1}}
 
 % Crosshair with reference point in its center
 \def\crosshair#1{\clap{\vrule height 0.2pt width #1}\clap{\vrule height #1 width 0.2pt}}
 % and underlays, which are zero-size vboxes positioned absolutely in the
 % front / in the back of the normal material. Also, there are global
 % versions of both which are not reset after every page.
-\def\addlay#1#2{\setbox#1=\vbox{\ifvbox#1\box#1\fi\smashedvbox{#2}}}
+\def\addlay#1#2{\setbox#1=\vbox{\ifvbox#1\box#1\fi\nointerlineskip\smashedvbox{#2}}}
 \def\pageunderlay{\addlay\pageunderlays}
 \def\pageoverlay{\addlay\pageoverlays}
 \def\commonunderlay{\addlay\commonoverlays}