summaryrefslogtreecommitdiff
path: root/Master/texmf/dvips
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-06-02 23:04:09 +0000
committerKarl Berry <karl@freefriends.org>2007-06-02 23:04:09 +0000
commit3605fab59cdc1afbbce026262462f94b95e65571 (patch)
treefa6f9c6acb8116afeb678419fd5dc969ad9ea919 /Master/texmf/dvips
parentf7abbe11ae8b67804ec79e82c1ae107392b325e0 (diff)
use where operator for both setpagedevice and letter/a4
git-svn-id: svn://tug.org/texlive/trunk@4407 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/dvips')
-rw-r--r--Master/texmf/dvips/config/config.ps42
1 files changed, 30 insertions, 12 deletions
diff --git a/Master/texmf/dvips/config/config.ps b/Master/texmf/dvips/config/config.ps
index 8e398dcb091..fa85a2934a1 100644
--- a/Master/texmf/dvips/config/config.ps
+++ b/Master/texmf/dvips/config/config.ps
@@ -44,42 +44,60 @@ Z0
% Partially download Type 1 fonts by default. Only reason not to do
% this is if you encounter bugs. (Please report them to
-% @email{tex-k@@mail.tug.org} if you do.)
+% @email{tex-k@tug.org} if you do.)
j
% This shows how to add your own map file.
% Remove the comment and adjust the name:
% p +myfonts.map
-% 0 0 595 842 is the right bounding box that most applications expect
-% for A4. Since dvips always rounds up, choose something slightly smaller.
+% If we have setpagedevice, use that.
+% else if we have the a4 resp. letter operator, use that.
+% else do nothing to set the page size.
+%
+% In the past, the a4size and letterSize definitions did not set the
+% page size, but we want to set it if we can so that ps2pdf can work
+% properly. Here, a4 and a4size, and letter and letterSize, are
+% identical, and we prefer the a4/letter names -- texconfig uses them.
+
+% 0 0 595 842 is the right bounding box that applications expect
+% for A4. Since dvips always rounds up, choose something slightly
+% smaller for our paper size.
@ a4 209.9mm 297.04mm
@+ ! %%DocumentPaperSizes: a4
@+ %%BeginPaperSize: a4
-@+ << /PageSize [595 842] >> setpagedevice
+@+ /setpagedevice where
+@+ { pop << /PageSize [595 842] >> setpagedevice }
+@+ { /a4 where { pop a4 } if }
+@+ ifelse
@+ %%EndPaperSize
@ letter 8.5in 11in
@+ ! %%DocumentPaperSizes: Letter
@+ %%BeginPaperSize: Letter
-@+ << /PageSize [612 792] >> setpagedevice
+@+ /setpagedevice where
+@+ { pop << /PageSize [612 792] >> setpagedevice }
+@+ { /letter where { pop letter } if }
+@+ ifelse
@+ %%EndPaperSize
-% these used to be the default paper sizes used, and they did not
-% execute any page size operator, but now it seems there is no reason
-% not to use setpagedevice.
-%
@ a4size 209.9mm 297.04mm
-@+ %%BeginPaperSize: a4
@+ ! %%DocumentPaperSizes: a4
-@+ << /PageSize [595 842] >> setpagedevice
+@+ %%BeginPaperSize: a4
+@+ /setpagedevice where
+@+ { pop << /PageSize [595 842] >> setpagedevice }
+@+ { /a4 where { pop a4 } if }
+@+ ifelse
@+ %%EndPaperSize
@ letterSize 8.5in 11in
@+ ! %%DocumentPaperSizes: Letter
@+ %%BeginPaperSize: Letter
-@+ << /PageSize [612 792] >> setpagedevice
+@+ /setpagedevice where
+@+ { pop << /PageSize [612 792] >> setpagedevice }
+@+ { /letter where { pop letter } if }
+@+ ifelse
@+ %%EndPaperSize
@ halfexecutive 133.35mm 184.15mm