]> code.delx.au - gnu-emacs/blob - etc/refcards/pdflayout.sty
Merge from emacs--rel--22
[gnu-emacs] / etc / refcards / pdflayout.sty
1 % Copyright (C) 2007, 2008 Free Software Foundation, Inc.
2
3 % This file is part of GNU Emacs.
4
5 % GNU Emacs is free software; you can redistribute it and/or modify
6 % it under the terms of the GNU General Public License as published by
7 % the Free Software Foundation; either version 3, or (at your option)
8 % any later version.
9
10 % GNU Emacs is distributed in the hope that it will be useful,
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 % GNU General Public License for more details.
14
15 % You should have received a copy of the GNU General Public License
16 % along with GNU Emacs; see the file COPYING. If not, write to
17 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 % Boston, MA 02110-1301, USA.
19
20 % This file defines `\pdflayout':
21 % - \pdflayout=(0) is A4 portrait,
22 % - \pdflayout=(1) is letter (US) portrait,
23 % - \pdflayout=(0l) is A4 landscape.
24 % - \pdflayout=(1l) is letter (US) landscape,
25
26 \input ifpdf.sty
27
28 \ifpdf
29 \def\pdflayout=(#1#2){
30 \if0#1 % A4
31 \pdfpagewidth=21cm
32 \pdfpageheight=29.7cm
33 \else\if1#1 % Letter
34 \pdfpagewidth=8.5in
35 \pdfpageheight=11in
36 \fi\fi
37 \if l#2 % Landscape
38 \edef\oldwidth{\the\pdfpagewidth}
39 \pdfpagewidth=\pdfpageheight
40 \pdfpageheight=\oldwidth
41 \fi
42 }
43 \else
44 \def\pdflayout=(#1#2){}
45 \fi
46
47 % archtag: 63c938a5-cc78-4964-962d-603c90d34afc
48
49 % arch-tag: 3464d27c-1439-473a-bc47-a7c501e8c156