Debian Codegraph @

texmf-dist/tex/plain/fixpdfmag/fixpdfmag.tex

raw
1 % fixpdfmag.tex
2 % Author: Javier Bezos, 2007
3 %
4 % This is Public Domain. You are free to use, copy, modify,
5 % distribute or whatever you want without restrictions. It is
6 % unsupported, so please, do not contact the author, just
7 % modify the file.
8 %
9 % Unfortunately, pdftex has changed recently its behaviour and
10 % now the page size is affected by \magnification, usually not a
11 % wanted effect. It has been proposed to modify Plain TeX when
12 % used with pdftex, by making a few changes in the pdftex.ini
13 % file, but many people do not know or simply do not want to
14 % modify Plain TeX or a custom made format. This file provides
15 % an alternative which requires to modify the documents, as
16 % the following example illustrates:
17 %
18 % \magnification3000
19 % \input fixpdfmag % <- after \magnification
20 %
21 % Hello
22 % \bye
23 %
24 % If you are using a custom page size, it is preserved,
25 % as it just converts pt units to truept ones.
26
27 \ifx\pdfpageheight\undefined\else
28 \begingroup
29 \catcode`\@=11
30 \global\pdfpageheight\expandafter\getf@ctor\the\pdfpageheight truept
31 \global\pdfpagewidth\expandafter\getf@ctor\the\pdfpagewidth truept
32 \global\pdfhorigin\expandafter\getf@ctor\the\pdfhorigin truept
33 \global\pdfvorigin\expandafter\getf@ctor\the\pdfvorigin truept
34 \endgroup
35 \fi
36 \endinput