a4.sty 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. %%
  2. %% This is file `a4.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% a4.dtx (with options: `package')
  8. %%
  9. %% Copyright (C) 1994-1996 Nederlandstalige TeX Gebruikersgroep.
  10. %% All rights reserved.
  11. %% For additional copyright information see further down in this file.
  12. %%
  13. %% This file is part of the NTG document classes distribution
  14. %% ----------------------------------------------------------
  15. %%
  16. %% This file is distributed in the hope that it will be useful,
  17. %% but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  19. %%
  20. %%
  21. %% IMPORTANT NOTICE:
  22. %%
  23. %% For error reports in case of UNCHANGED versions see readme file.
  24. %%
  25. %% Please do not request updates from us directly. Distribution is
  26. %% done through Mail-Servers and TeX organizations.
  27. %%
  28. %% You are not allowed to change this file.
  29. %%
  30. %% You are allowed to distribute this file under the condition that
  31. %% it is distributed together with all files mentioned in 00readme.txt.
  32. %%
  33. %% If you receive only some of these files from someone, complain!
  34. %%
  35. %% You are NOT ALLOWED to distribute this file alone. You are NOT
  36. %% ALLOWED to take money for the distribution or use of either this
  37. %% file or a changed version, except for a nominal charge for copying
  38. %% etc.
  39. \ifx\ProvidesPackage\undefined
  40. \def\ProvidesPackage#1[#2 #3 #4]{%
  41. \wlog{LaTeX Package `#1' #3 <#2> #4}}
  42. \fi
  43. \ProvidesPackage{a4}
  44. [1995/09/25 v1.2e A4 based page layout]
  45. \ifx\documentclass\undefined
  46. \else
  47. \DeclareOption{widemargins}{\WideMargins}
  48. \fi
  49. \topmargin 0pt
  50. \ifcase \@ptsize
  51. \textheight 53\baselineskip
  52. \or
  53. \textheight 46\baselineskip
  54. \or
  55. \textheight 42\baselineskip
  56. \fi
  57. \advance\textheight by \topskip
  58. \ifcase \@ptsize
  59. \textwidth 5.00in
  60. \marginparwidth 1.00in
  61. \if@twoside
  62. \oddsidemargin 0.55in
  63. \evensidemargin 0.75in
  64. \else
  65. \oddsidemargin 0.55in
  66. \evensidemargin 0.55in
  67. \fi
  68. \or
  69. \textwidth 5.20in
  70. \marginparwidth 1.00in
  71. \if@twoside
  72. \oddsidemargin 0.45in
  73. \evensidemargin 0.65in
  74. \else
  75. \oddsidemargin 0.45in
  76. \evensidemargin 0.45in
  77. \fi
  78. \or
  79. \textwidth 5.70in
  80. \marginparwidth 0.80in
  81. \if@twoside
  82. \oddsidemargin 0.20in
  83. \evensidemargin 0.40in
  84. \else
  85. \oddsidemargin 0.20in
  86. \evensidemargin 0.20in
  87. \fi
  88. \fi
  89. \def\WideMargins{%
  90. \newdimen\ExtraWidth
  91. \ifcase \@ptsize
  92. \ExtraWidth = 0.5in
  93. \@widemargins
  94. \or
  95. \ExtraWidth = 0.5in
  96. \@widemargins
  97. \or
  98. \ExtraWidth = 0.7in
  99. \@widemargins
  100. \fi\let\WideMargins\relax\let\@widemargins\relax}
  101. {\def\do{\noexpand\do\noexpand}
  102. \xdef\@preamblecmds{\@preamblecmds \do\WideMargins}
  103. }
  104. \def\@widemargins{%
  105. \global\advance\textwidth by -\ExtraWidth
  106. \global\advance\marginparwidth by \ExtraWidth
  107. \if@twoside
  108. \tw@sidedwidemargins
  109. \else
  110. \@nesidedwidemargins
  111. \fi}
  112. \def\tw@sidedwidemargins{%
  113. \if@reversemargin
  114. \@tempdima=\evensidemargin
  115. \advance\@tempdima by -\oddsidemargin
  116. \advance\oddsidemargin by \ExtraWidth
  117. \advance\oddsidemargin by \@tempdima
  118. \advance\evensidemargin by -\@tempdima
  119. \else
  120. \advance\evensidemargin by \ExtraWidth
  121. \fi}
  122. \def\@nesidedwidemargins{%
  123. \if@reversemargin
  124. \advance\oddsidemargin by \ExtraWidth
  125. \advance\evensidemargin by \ExtraWidth
  126. \fi}
  127. \ifx\documentclass\undefined
  128. \else
  129. \ProcessOptions
  130. \fi
  131. %% \CharacterTable
  132. %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  133. %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  134. %% Digits \0\1\2\3\4\5\6\7\8\9
  135. %% Exclamation \! Double quote \" Hash (number) \#
  136. %% Dollar \$ Percent \% Ampersand \&
  137. %% Acute accent \' Left paren \( Right paren \)
  138. %% Asterisk \* Plus \+ Comma \,
  139. %% Minus \- Point \. Solidus \/
  140. %% Colon \: Semicolon \; Less than \<
  141. %% Equals \= Greater than \> Question mark \?
  142. %% Commercial at \@ Left bracket \[ Backslash \\
  143. %% Right bracket \] Circumflex \^ Underscore \_
  144. %% Grave accent \` Left brace \{ Vertical bar \|
  145. %% Right brace \} Tilde \~}
  146. %%
  147. \endinput
  148. %%
  149. %% End of file `a4.sty'.