You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.5 KiB

  1. %%
  2. %% This is file `prelim2e.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% prelim2e.dtx (with options: `package')
  8. %%
  9. %% Copyright (C) 1995..2009 by Martin Schroeder.
  10. %%
  11. %% This file is part of the Prelim2e package
  12. %% -----------------------------------------
  13. %%
  14. %% This work may be distributed and/or modified under the
  15. %% conditions of the LaTeX Project Public License, either version 1.3
  16. %% of this license or (at your option) any later version.
  17. %% The latest version of this license is in
  18. %% http://www.latex-project.org/lppl.txt
  19. %% and version 1.3 or later is part of all distributions of LaTeX
  20. %% version 2005/12/01 or later.
  21. %%
  22. %% This work has the LPPL maintenance status `maintained'.
  23. %%
  24. %% The Current Maintainer of this work is Martin Schroeder.
  25. %%
  26. %% This work consists of the files prelim2e.dtx and prelim2e.ins
  27. %% and the derived file prelim2e.sty.
  28. %%
  29. \NeedsTeXFormat{LaTeX2e}[1995/12/01]
  30. \ProvidesPackage{prelim2e}
  31. [2009/05/29 v1.3 prelim2e Package (MS)]
  32. %% \CharacterTable
  33. %% {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
  34. %% 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
  35. %% Digits \0\1\2\3\4\5\6\7\8\9
  36. %% Exclamation \! Double quote \" Hash (number) \#
  37. %% Dollar \$ Percent \% Ampersand \&
  38. %% Acute accent \' Left paren \( Right paren \)
  39. %% Asterisk \* Plus \+ Comma \,
  40. %% Minus \- Point \. Solidus \/
  41. %% Colon \: Semicolon \; Less than \<
  42. %% Equals \= Greater than \> Question mark \?
  43. %% Commercial at \@ Left bracket \[ Backslash \\
  44. %% Right bracket \] Circumflex \^ Underscore \_
  45. %% Grave accent \` Left brace \{ Vertical bar \|
  46. %% Right brace \} Tilde \~}
  47. %%
  48. %% \iffalse meta-comment
  49. %% ===================================================================
  50. %% @LaTeX-package-file{
  51. %% author = {Martin Schr\"oder},
  52. %% version = "1.3",
  53. %% date = "29 May 2009",
  54. %% filename = "prelim2e.sty",
  55. %% address = {Martin Schr\"oder
  56. %% Barmer Stra\"se 14
  57. %% 44137 Dortmund
  58. %% Germany},
  59. %% telephone = "+49-231-1206574",
  60. %% email = "martin@oneiros.de",
  61. %% docstring = "LaTeX package which allows the marking of
  62. %% preliminary versions of a document."
  63. %% }
  64. %% ===================================================================
  65. %% \fi
  66. \newif\if@prelim@draft
  67. \newif\if@prelim@time
  68. \newif\if@prelim@scrtime
  69. \newcommand{\PrelimWords}{}
  70. \DeclareOption{draft}{\@prelim@drafttrue}
  71. \DeclareOption{final}{\@prelim@draftfalse}
  72. \DeclareOption{danish}{%
  73. \renewcommand{\PrelimWords}{Forel\o{}big version}}
  74. \DeclareOption{english}{%
  75. \renewcommand{\PrelimWords}{Preliminary version}}
  76. \DeclareOption{french}{%
  77. \renewcommand{\PrelimWords}{Version pr\'eliminaire}}
  78. \DeclareOption{german}{%
  79. \renewcommand{\PrelimWords}{Vorl\"aufige Version}}
  80. \DeclareOption{italian}{%
  81. \renewcommand{\PrelimWords}{Versione preliminare}}
  82. \DeclareOption{norsk}{%
  83. \renewcommand{\PrelimWords}{Forel\o{}pig versjon}}
  84. \DeclareOption{time}{\@prelim@timetrue}
  85. \DeclareOption{scrtime}{\@prelim@scrtimetrue\@prelim@timetrue}
  86. \DeclareOption*{%
  87. \if@prelim@scrtime
  88. \PassOptionsToPackage{\CurrentOption}{scrtime}%
  89. \fi
  90. }
  91. \ExecuteOptions{draft,english}
  92. \ProcessOptions\relax
  93. \RequirePackage{everyshi}[1995/01/25]
  94. \if@prelim@scrtime
  95. \RequirePackage{scrtime}
  96. \fi
  97. \newcommand{\PrelimText}{%
  98. \textnormal{%
  99. \footnotesize
  100. \PrelimTextStyle
  101. \PrelimWords{} -- \today
  102. \if@prelim@time
  103. \ -- \thistime
  104. \fi
  105. }%
  106. }
  107. \newcommand{\PrelimTextStyle}{}
  108. \newcommand{\@Prelim@EveryShipout}{%
  109. \bgroup
  110. \dimen\z@=\wd\@cclv
  111. \dimen\@ne=\ht\@cclv
  112. \dimen\tw@=\dp\@cclv
  113. \dimen\thr@@=\dimen1
  114. \advance\dimen\thr@@ by \dimen\tw@
  115. \global\setbox\@cclv\vbox to \dimen\thr@@{%
  116. \hb@xt@\dimen\z@{%
  117. \box\@cclv%
  118. \hss
  119. }%
  120. \vbox to \z@{%
  121. \hb@xt@\dimen\z@{%
  122. \let\protect\relax
  123. \hfill\PrelimText\hfill
  124. }%
  125. \vss
  126. }%
  127. \vss
  128. }%
  129. \wd\@cclv=\dimen\z@
  130. \ht\@cclv=\dimen\@ne
  131. \dp\@cclv=\dimen\tw@
  132. \egroup
  133. }
  134. \if@prelim@draft
  135. \EveryShipout{\@Prelim@EveryShipout}
  136. \fi
  137. \endinput
  138. %%
  139. %% End of file `prelim2e.sty'.