summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/config/pdftexmagfix.tex
blob: ef550974a9af72233e5f653c9bfbc9a064455e67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% $Id$
% pdftex \magnification fix by Heiko Oberdiek and Ian Hutchinson, 2007.
% See http://silas.psfc.mit.edu/pdftexpatch/ for background.
% Public domain.
% 
% This file is input from pdftex.ini and pdfetex.ini.
% 
\ifx\pdfoutput\undefined \else
  \ifx\pdfoutput\relax \else
    \catcode`@=11
    \def\m@g{% replace plain.tex's definition, but start the same:
      \mag\count@
      \hsize6.5truein\vsize8.9truein\dimen\footins8truein
      % And add these commands to fix the pdf sizes to be in true units.
      \ppdfmag@fix\pdfhorigin   \ppdfmag@fix\pdfvorigin
      \ppdfmag@fix\pdfpagewidth \ppdfmag@fix\pdfpageheight
    }%
    \def\ppdfmag@fix#1{#1=\expandafter\ppdfconvert@truept\the#1\relax}%
    %
    \begingroup
      \catcode`P=12
      \catcode`T=12
      \lowercase{%
    \endgroup
    \def\ppdfconvert@truept#1PT{#1truept}%
      }%
    \catcode`@=12
  \fi
\fi
%
% Here's a simple test file, from Ian:
%\magnification \magstep5
%\hoffset -1 truein  \voffset -1 truein
%\parindent 0pt  The top
%\end
% "The top" should come out truly in the upper-left corner.