dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

pdflayout.sty (1326B)


      1 % Copyright (C) 2007-2013  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 of the License, or
      8 % (at your option) 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.  If not, see <https://www.gnu.org/licenses/>.
     17 
     18 % This file defines `\pdflayout':
     19 %  - \pdflayout=(0) is A4 portrait,
     20 %  - \pdflayout=(1) is letter (US) portrait,
     21 %  - \pdflayout=(0l) is A4 landscape.
     22 %  - \pdflayout=(1l) is letter (US) landscape,
     23 
     24 \input ifpdf.sty
     25 
     26 \ifpdf
     27   \def\pdflayout=(#1#2){
     28     \if0#1 % A4
     29       \pdfpagewidth=21cm
     30       \pdfpageheight=29.7cm
     31     \else\if1#1 % Letter
     32       \pdfpagewidth=8.5in
     33       \pdfpageheight=11in
     34       \letterpaper=1
     35     \fi\fi
     36     \if l#2 % Landscape
     37       \edef\oldwidth{\the\pdfpagewidth}
     38       \pdfpagewidth=\pdfpageheight
     39       \pdfpageheight=\oldwidth
     40     \fi
     41   }
     42 \else
     43   \def\pdflayout=(#1#2){}
     44 \fi