mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
Set the right page size in the PDF output.
This commit is contained in:
parent
d5d473fd5c
commit
ba1700c7bb
1 changed files with 5 additions and 7 deletions
|
@ -24,6 +24,8 @@
|
||||||
\let\py@LinkColor=\NavyBlue
|
\let\py@LinkColor=\NavyBlue
|
||||||
\let\py@NormalColor=\Black
|
\let\py@NormalColor=\Black
|
||||||
\pdfcompresslevel=9
|
\pdfcompresslevel=9
|
||||||
|
\pdfpagewidth=\paperwidth % page width of PDF output
|
||||||
|
\pdfpageheight=\paperheight % page height of PDF output
|
||||||
%
|
%
|
||||||
% Pad the number with '0' to 3 digits wide so no page name is a prefix
|
% Pad the number with '0' to 3 digits wide so no page name is a prefix
|
||||||
% of any other.
|
% of any other.
|
||||||
|
@ -45,10 +47,6 @@
|
||||||
\pdfendlink%
|
\pdfendlink%
|
||||||
}{#3}%
|
}{#3}%
|
||||||
}
|
}
|
||||||
%
|
|
||||||
% This is supposed to build the "outline" view of the document; it seems
|
|
||||||
% quite fragile. The breakages are the same as in the ToC.
|
|
||||||
%
|
|
||||||
\AtEndDocument{
|
\AtEndDocument{
|
||||||
\InputIfFileExists{\jobname.bkm}{\pdfcatalog{/PageMode /UseOutlines}}{}
|
\InputIfFileExists{\jobname.bkm}{\pdfcatalog{/PageMode /UseOutlines}}{}
|
||||||
}
|
}
|
||||||
|
@ -62,9 +60,9 @@
|
||||||
\py@OldLabel{#1}%
|
\py@OldLabel{#1}%
|
||||||
\py@target{label-#1}%
|
\py@target{label-#1}%
|
||||||
}
|
}
|
||||||
% This stuff adds a page# destination to every PDF page, where # has
|
% This stuff adds a page# destination to every PDF page, where # is three
|
||||||
% the same formatting as the displayed page number. This doesn't really
|
% digits wide, padded with leading zeros. This doesn't really help with
|
||||||
% help with the frontmatter, but does fine with the body.
|
% the frontmatter, but does fine with the body.
|
||||||
%
|
%
|
||||||
% This is *heavily* based on the hyperref package.
|
% This is *heavily* based on the hyperref package.
|
||||||
%
|
%
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue