1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
% typearea.sty -- by Frank Neukam (01 Dec 1993)
\newif\if@hincl
\def\headincludeon{\@hincltrue}
\def\headincludeoff{\@hinclfalse}
\@hinclfalse
\newif\if@fincl
\def\footincludeon{\@fincltrue}
\def\footincludeoff{\@finclfalse}
\@finclfalse
\newdimen\paperwidth
\newdimen\paperheight
\newdimen\ta@bcor
\newcount\ta@div
\newdimen\ta@hblk
\newdimen\ta@vblk
\newdimen\ta@temp
\paperwidth 210mm
\paperheight 297mm
\def\typearea{\@ifnextchar [{\@typearea}{\@typearea[0mm]}}
\def\@typearea[#1]#2{
\normalsize
\ta@bcor #1
\ta@div=#2
\ta@hblk \paperwidth
\advance \ta@hblk by -\ta@bcor
\divide\ta@hblk by \ta@div
\oddsidemargin -1in
\evensidemargin -1in
\if@twoside
\advance\oddsidemargin by \ta@hblk
\advance\oddsidemargin by \ta@bcor
\advance\evensidemargin by 2\ta@hblk
\else
\advance\oddsidemargin by 1.5\ta@hblk
\advance\oddsidemargin by \ta@bcor
\evensidemargin\oddsidemargin
\fi
\textwidth \paperwidth
\advance\textwidth by -\ta@bcor
\advance\textwidth by -3\ta@hblk
\headheight 15pt
\headsep 1.5\baselineskip
\footskip 3.5\baselineskip
\ta@vblk \paperheight
\divide\ta@vblk by \ta@div
\ta@temp \paperheight
\advance\ta@temp by -3\ta@vblk
\if@hincl
\advance\ta@temp by -\headheight
\advance\ta@temp by -\headsep
\fi
\if@fincl
\advance\ta@temp by -\footskip
\fi
\textheight \topskip
\@whiledim\textheight<\ta@temp
\do{\advance\textheight by \baselineskip}
\topmargin \ta@vblk
\advance\topmargin by -1in
\if@hincl \else
\advance\topmargin by -\headheight
\advance\topmargin by -\headsep
\fi
\if@twoside
\marginparwidth 1.5\ta@hblk
\else
\marginparwidth \ta@hblk
\fi
\marginparsep 1cc
\marginparpush 0.45\baselineskip}
\def\areaset{\@ifnextchar [{\@areaset}{\@areaset[0mm]}}
\def\@areaset[#1]#2#3{
\normalsize
\ta@bcor #1
\textwidth #2
\textheight #3
\ta@hblk \paperwidth
\advance\ta@hblk by -\ta@bcor
\advance\ta@hblk by -\textwidth
\divide\ta@hblk by 3
\oddsidemargin -1in
\evensidemargin -1in
\if@twoside
\advance\oddsidemargin by \ta@hblk
\advance\oddsidemargin by \ta@bcor
\advance\evensidemargin by 2\ta@hblk
\else
\advance\oddsidemargin by 1.5\ta@hblk
\advance\oddsidemargin by \ta@bcor
\evensidemargin\oddsidemargin
\fi
\headheight 15pt
\headsep 1.5\baselineskip
\footskip 3.5\baselineskip
\ta@vblk \paperheight
\advance\ta@vblk by -\textheight
\divide\ta@vblk by 3
\if@hincl
\advance\textheight by -\headheight
\advance\textheight by -\headsep
\fi
\if@fincl
\advance\textheight by -\footskip
\fi
\topmargin \ta@vblk
\advance\topmargin by -1in
\if@hincl \else
\advance\topmargin by -\headheight
\advance\topmargin by -\headsep
\fi
\if@twoside
\marginparwidth 1.5\ta@hblk
\else
\marginparwidth \ta@hblk
\fi
\marginparsep 1cc
\marginparpush 0.45\baselineskip}
\ifcase \@ptsize\relax \typearea{8} \or \typearea{10} \or \typearea{12} \fi
|