| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% anysize.sty --- version 1.0 --- Aug 13, 1994 |
| 3 |
% set the paper&margin sizes in \LaTeX2e |
| 4 |
% This style is LaTeX2e-conformant |
| 5 |
% and will not run under ANY older version of LaTeX! |
| 6 |
% idea and first implementation: Michael Salzenberg |
| 7 |
% further programming, documentation and maintainance: |
| 8 |
% Thomas Esser ([email protected]) |
| 9 |
% Dirk Hillbrecht ([email protected]) |
| 10 |
% documentation: anysize.tex/dvi |
| 11 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 12 |
% |
| 13 |
\NeedsTeXFormat{LaTeX2e} |
| 14 |
\ProvidesPackage{anysize}[1994/08/13 setting margin sizes] |
| 15 |
\typeout{document style option `anysize' loaded} |
| 16 |
\typeout{Michael Salzenberg, Thomas Esser, Dirk Hillbrecht} |
| 17 |
\typeout{Version 1.0, Aug 13, 1994} |
| 18 |
% |
| 19 |
\DeclareOption{a4paper} |
| 20 |
{\setlength\paperheight {297mm}% |
| 21 |
\setlength\paperwidth {210mm}} |
| 22 |
\DeclareOption{a5paper} |
| 23 |
{\setlength\paperheight {210mm}% |
| 24 |
\setlength\paperwidth {148mm}} |
| 25 |
\DeclareOption{b5paper} |
| 26 |
{\setlength\paperheight {250mm}% |
| 27 |
\setlength\paperwidth {176mm}} |
| 28 |
\DeclareOption{letterpaper} |
| 29 |
{\setlength\paperheight {11in}% |
| 30 |
\setlength\paperwidth {8.5in}} |
| 31 |
\DeclareOption{legalpaper} |
| 32 |
{\setlength\paperheight {14in}% |
| 33 |
\setlength\paperwidth {8.5in}} |
| 34 |
\DeclareOption{executivepaper} |
| 35 |
{\setlength\paperheight {10.5in}% |
| 36 |
\setlength\paperwidth {7.25in}} |
| 37 |
\DeclareOption{landscape} |
| 38 |
{\setlength\@tempdima {\paperheight}% |
| 39 |
\setlength\paperheight {\paperwidth}% |
| 40 |
\setlength\paperwidth {\@tempdima}} |
| 41 |
% |
| 42 |
% change paragraphe indenting (as in lkurz.dvi) |
| 43 |
\DeclareOption{germanpar} |
| 44 |
{\setlength{\parindent}{0pt}% |
| 45 |
\setlength{\parskip}{5pt plus 2pt minus 1pt}} |
| 46 |
% A4 is default paper size, if there is nothing set in the documentclass-statement |
| 47 |
\ExecuteOptions{a4paper} |
| 48 |
\ProcessOptions |
| 49 |
% standard settings (DIN A4) |
| 50 |
\newdimen\@Leftmargin \@Leftmargin=3.0cm |
| 51 |
\newdimen\@Rightmargin \@Rightmargin=2.0cm |
| 52 |
\newdimen\@Topmargin \@Topmargin=2.0cm |
| 53 |
\newdimen\@Bottommargin \@Bottommargin=2.0cm |
| 54 |
% |
| 55 |
\def\InitLayout{ |
| 56 |
\setlength{\textwidth}{\paperwidth} |
| 57 |
\addtolength{\textwidth}{-\@Leftmargin} |
| 58 |
\addtolength{\textwidth}{-\@Rightmargin} |
| 59 |
\setlength{\textheight}{\paperheight} |
| 60 |
\addtolength{\textheight}{-\@Topmargin} |
| 61 |
\addtolength{\textheight}{-\@Bottommargin} |
| 62 |
\addtolength{\textheight}{-\headheight} |
| 63 |
\addtolength{\textheight}{-\headsep} |
| 64 |
\addtolength{\textheight}{-\footskip} |
| 65 |
\setlength{\oddsidemargin}{\@Leftmargin} |
| 66 |
\addtolength{\oddsidemargin}{-1in} |
| 67 |
\setlength{\evensidemargin}{\@Rightmargin} |
| 68 |
\addtolength{\evensidemargin}{-1in} |
| 69 |
\setlength{\topmargin}{\@Topmargin} |
| 70 |
\addtolength{\topmargin}{-1in} |
| 71 |
} |
| 72 |
% |
| 73 |
\InitLayout |
| 74 |
% |
| 75 |
\def\papersize#1#2{ |
| 76 |
\paperwidth=#2 |
| 77 |
\paperheight=#1 |
| 78 |
\InitLayout |
| 79 |
} |
| 80 |
% |
| 81 |
\def\marginsize#1#2#3#4{ |
| 82 |
\@Leftmargin=#1 |
| 83 |
\@Rightmargin=#2 |
| 84 |
\@Topmargin=#3 |
| 85 |
\@Bottommargin=#4 |
| 86 |
\InitLayout |
| 87 |
} |
| 88 |
% |
| 89 |
\endinput |