% \changes{v1.01}{1995/05/02}{Date added to \cs{NeedsTeXFormat}} % \iffalse %% File: prelim2e.dtx Copyright (C) 1996 Martin Schr\"oder % %\NeedsTeXFormat{LaTeX2e}[1995/12/01] %\ProvidesPackage{prelim2e} % [1996/01/01 v1.10 prelim2e Package (MS)] % %<*driver> \NeedsTeXFormat{LaTeX2e}[1995/12/01] \documentclass{ltxdoc} \usepackage[time]{prelim2e} \GetFileInfo{prelim2e.sty} \setcounter{IndexColumns}{2} \EnableCrossrefs \CodelineIndex \RecordChanges \setcounter{IndexColumns}{2} \setlength{\IndexMin}{40ex} \setlength{\columnseprule}{.4pt} \AtBeginDocument{\addtocontents{toc}{\protect\begin{multicols}{2}}} \AtEndDocument{\addtocontents{toc}{\protect\end{multicols}}} \OnlyDescription % comment out for implementation details % \OldMakeIndex % use if your MakeIndex is pre-v2.9 \begin{document} \DocInput{prelim2e.dtx} % \PrintIndex\PrintChanges % Make sure that the index is not printed twice % (ltxdoc.cfg might have a second \PrintIndex command) % \let\PrintChanges\relax % \let\PrintIndex\relax \end{document} % % % Copyright (C) 1996 by Martin Schr\"oder. All rights reserved. % % IMPORTANT NOTICE: % % You are not allowed to change this file. You may however copy % this file to a file with a different name and then change the % copy if you obey the restrictions on file changes described in % everyshi.ins. % % You are NOT ALLOWED to distribute this file alone. You are NOT % ALLOWED to take money for the distribution or use of this file % (or a changed version) except for a nominal charge for copying % etc. % % You are allowed to distribute this file under the condition that % it is distributed together with all files mentioned in % printtim.ins. % % If you receive only some of these files from someone, complain! % % However, if these files are distributed by established suppliers % as part of a complete TeX distribution, and the structure of the % distribution would make it difficult to distribute the whole set % of files, *those parties* are allowed to distribute only some of % the files provided that it is made clear that the user will get % a complete distribution-set upon request to that supplier (not % me). Notice that this permission is not granted to the end % user. % % % For error reports in case of UNCHANGED versions see everyshi.ins % % \fi % % \CheckSum{109} % %% \CharacterTable %% {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 %% 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 %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% %% \iffalse meta-comment %% =================================================================== %% @LaTeX-package-file{ %% author = {Martin Schr\"oder}, %% version = "1.10", %% date = "1 January 1996", %% filename = "prelim2e.sty", %% address = {Martin Schr\"oder %% Friedrich-Humbert-Stra\ss{}e 124 %% D-28759 Bremen}, %% telephone = "++49-421-628813", %% email = "MS@Dream.HB.North.DE (INTERNET)", %% codetable = "ISO/ASCII", %% keywords = "LaTeX2e, preliminary versions, versions", %% dependences = "everyshi, scrtime", %% supported = "yes", %% docstring = "LaTeX package which allows the marking of %% preliminary versions of a document" %% . %% } %% =================================================================== %% \fi % % \renewcommand*{\PrelimWords}{^^A % \package{prelim2e} package -- % Version \fileversion{} -- % Documentation \LaTeX{}ed^^A % } % % \changes{v1.00}{1995/01/26}{New} % % \newcommand*{\option}[1]{\textnormal{\sffamily#1}} % \newcommand*{\package}[1]{\textnormal{\sffamily#1}} % % \IndexPrologue{^^A % \section*{\indexname}^^A % \markboth{\indexname}{\indexname}^^A % Numbers written in \emph{italic} refer to the page where the % corresponding entry is described, the ones % \underline{underlined} to the definition, the rest to the places % where the entry is used.} % % \pagestyle{headings} % % % ^^A ----------------------------- % % \title{\unskip % The \package{prelim2e} package^^A % \thanks{^^A % The version number of this file is \fileversion, % last revised \filedate.}^^A % } % \author{Martin Schr\"oder\\[0.5ex] % \normalsize Friedrich-Humbert-Stra\ss{}e 124\\ % \normalsize D-28759 Bremen\\ % \normalsize MS@Dream.HB.North.DE (INTERNET)} % \date{\filedate} % \maketitle % % ^^A ----------------------------- % % % \begin{abstract} % This package allows the marking of (preliminary) versions of a % document on the output. % \end{abstract} % % ^^A ----------------------------- % % \tableofcontents % % ^^A ----------------------------- % % \section{Introduction} % ^^A % This package allows the marking of (preliminary) versions of a % document. % This is done using the command \cs{PrelimText}, whose expansion % is added \emph{below the footer} of every page of a document (look % at the bottom of this page for an example). % % ^^A ----------------------------- % % \section{Usage} % ^^A % Simply using this package via % \mbox{\cs{usepackage\{}\package{prelim2e}\texttt{\}}} produces a % text in the form of ``Preliminary version -- \today''. % % \DescribeMacro{\PrelimText} % \DescribeMacro{\PrelimWords} % The text is produced by the commands \cs{PrelimText} and % \cs{PrelimWords}, which can be changed via \cs{renewcommand*} or by % using options at the \cs{usepackage} command (see % section~\ref{sec:options}). % % The footer for this documentation was produced by changing % \cs{PrelimWords} to %\begin{verbatim} %\renewcommand*{\PrelimWords}{% % \textsf{prelim2e} package -- % Version \fileversion{} -- % Documentation \LaTeX{}ed% % } %\end{verbatim} % % % ^^A ----------------------------- % % \section{Options} % \label{sec:options} % ^^A % The package has the following options: % \nopagebreak % \begin{description} % \item[\normalfont\option{draft}] % If this option is used a text appears below the normal % pagebody. % It is the default. % \item[\normalfont\option{final}] % If this option is used \package{prelim2e} produces no text. % \item[\normalfont\option{english}] % This sets the text to ``Preliminary version''. % It is the default. % \item[\normalfont\option{german}] % This sets the text to ``Vorl\"aufige Version''. % It does not use the \package{german} or \package{babel} package. % \item[\normalfont\option{time}] % \changes{v1.10}{1996/01/01}{\option{time} option added} % This adds the time at the beginning of the current \LaTeX{} % to the text. % The time is produced using the \package{scrtime} package. % \end{description} % All other options are passed to \package{scrtime} if the \option{time} % option is selected. % % % ^^A ----------------------------- % % \section{Required packages} % ^^A % The package requires the following packages: % \begin{description} % \item[\normalfont\package{everyshi}] % It is used to implement the setting of the text below the normal % pagebody. % \item[\normalfont\package{scrtime}] % \changes{v1.10}{1996/01/01}{\package{scrtime} instead of % \package{printtim}} % It is used to typeset the current time and is needed if the % \option{time} option is selected. % \end{description} % % % ^^A ----------------------------- % % \section{Putting more things at the bottom} % ^^A % Another package you might like to use with \package{prelim2e} is % \package{vrsion}. % This allows the definition and maintenance of a version number like % 3.14 \emph{within \LaTeX}, which can be put at the bottom of every % page using \package{prelime2e}. % % % ^^A ----------------------------- % % \StopEventually{} % % % ^^A ----------------------------- % % \section{The implementation} % % \begin{macrocode} %<*package> % \end{macrocode} % % % ^^A ----------------------------- % % \subsection{Initial Code} % ^^A % \begin{macro}{\if@prelim@draft} % \cs{if@prelim@draft} is used to flag the use of the \option{draft} % or \option{final} option. % \begin{macrocode} \newif\if@prelim@draft % \end{macrocode} % \end{macro} % % \begin{macro}{\if@prelim@time} % \changes{v1.10}{1996/01/01}{new} % \cs{if@prelim@time} is used to flag the use of the \option{time} % option. % \begin{macrocode} \newif\if@prelim@time % \end{macrocode} % \end{macro} % % \begin{macro}{\PrelimWords} % \cs{PrelimWords} holds the language-dependend text used in % \cs{PrelimText} % \begin{macrocode} \newcommand*{\PrelimWords}{} % \end{macrocode} % \end{macro} % % % ^^A ----------------------------- % % \subsection{Declaration of options} % % ^^A ----------------------------- % % % \subsubsection{\option{draft} option} % ^^A % The \option{draft} and \option{final} option control the behavior % of \package{prelim2e}: Only if \option{final} is used in % \cs{documentclass} or % \mbox{\cs{usepackage\{}\package{prelim2e}\texttt{\}}} text is % produced. % \begin{macrocode} \DeclareOption{draft}{\@prelim@drafttrue} \DeclareOption{final}{\@prelim@draftfalse} % \end{macrocode} % % % ^^A ----------------------------- % % \subsubsection{Language options} % ^^A % \option{english} and \option{german} control the content of % \cs{PrelimWords}. % \begin{macrocode} \DeclareOption{english}{% \renewcommand*{\PrelimWords}{Preliminary version}} \DeclareOption{german}{% \renewcommand*{\PrelimWords}{Vorl\"aufige Version}} % \end{macrocode} % % % ^^A ----------------------------- % % \subsubsection{\option{time}} % ^^A % \changes{v1.10}{1996/01/01}{\option{time} option added} % \option{time} controls the output of the current time at % \cs{PrelimWords}. % \begin{macrocode} \DeclareOption{time}{\@prelim@timetrue} % \end{macrocode} % % % ^^A ----------------------------- % % \subsubsection{Other options} % ^^A % \changes{v1.10}{1996/01/01}{\cs{DeclareOption*} added} % All unused options are passed to \package{scrtime} if the \option{time} % option is selected. % \begin{macrocode} \DeclareOption*{% \if@prelim@time \PassOptionsToPackage{\CurrentOption}{scrtime}% \fi } % \end{macrocode} % % % ^^A ----------------------------- % % \subsection{Executing options} % ^^A % The default options are \option{draft} and \option{english}. % \begin{macrocode} \ExecuteOptions{draft,english} \ProcessOptions\relax % \end{macrocode} % % % ^^A ----------------------------- % % \subsection{Loading packages} % ^^A % We need the \package{everyshi} package---and \package{scrtime}, if the % \option{time} option is specified. % \begin{macrocode} \RequirePackage{everyshi}[1995/01/25] \if@prelim@time \RequirePackage{scrtime} \fi % \end{macrocode} % % % ^^A ----------------------------- % % \subsection{Producing the text} % ^^A % \begin{macro}{\PrelimText} % \changes{v1.10}{1996/01/01}{\cs{thistime} instead of \cs{PrintTime}} % \cs{PrelimText} produces the text which is put below the page. % It can be changed via \cs{renewcommand*}. % The style of the text is controlled by \cs{PrelimTextStyle}. % We first have to reset the style and size, otherwise the settings in % effect at the point of text where \cs{ouput} is called would be used. % \begin{macrocode} \newcommand*{\PrelimText}{% \textnormal{% \footnotesize% \PrelimTextStyle% \PrelimWords{} -- \today \if@prelim@time \ -- \thistime \fi }% } % \end{macrocode} % \end{macro} % % \begin{macro}{\PrelimTextStyle} % \cs{PrelimTextStyle} controls the style of the text produced by % \cs{PrelimText}. % It's default is empty. % \begin{macrocode} \newcommand*{\PrelimTextStyle}{} % \end{macrocode} % \end{macro} % % % ^^A ----------------------------- % % \subsection{Putting the text below the page} % ^^A % We put the text below the page via \cs{EveryShipout} provided by % the \package{everyshi} package. % This is done by \cs{@Prelim@EveryShipout}. % % \begin{macro}{\@Prelim@EveryShipout} % \changes{v1.10}{1996/01/01}{\cs{hbox to}$\rightarrow$\cs{hb@xt@}} % \cs{@Prelim@EveryShipout} puts the text produced by \cs{PrelimText} % below the page. % To do this we modify \cs{box255}: We append a \cs{vbox} with height % and depth of 0pt and the width of \cs{box255} which contains a % \cs{hbox} with the width of \cs{box255} in which \cs{PrelimText} % is centered. % \begin{macrocode} \newcommand{\@Prelim@EveryShipout}{ \bgroup % \end{macrocode} % First we save the dimensions of \cs{box255}: height, width and depth; % and calculate the total height of \cs{box255}. % \begin{macrocode} \dimen\z@=\wd\@cclv \dimen\@ne=\ht\@cclv \dimen\tw@=\dp\@cclv \dimen\thr@@=\dimen1 \advance\dimen\thr@@ by \dimen\tw@ % \end{macrocode} % Then we set \cs{box255}: % A \cs{vbox} to the total height of \cs{box255}. % In this a \cs{hbox} to the width of \cs{box255} is included, in which % \cs{box255} is set. % \begin{macrocode} \global\setbox\@cclv\vbox to \dimen\thr@@{% \hb@xt@\dimen\z@{% \box\@cclv% \hss% }% % \end{macrocode} % To this we append the text produced by \cs{PrelimText}. % It is put in a \cs{vbox} to 0pt in which a \cs{hbox} to the width of % \cs{box255} is included, in which \cs{PrelimText} is set. % We have to reset \cs{protect} because it is set to \cs{noexpand} by % the output routine. % \begin{macrocode} \vbox to \z@{% \hb@xt@\dimen\z@{% \let\protect\relax \hfill\PrelimText\hfill% }% \vss% }% \vss% }% % \end{macrocode} % Finally we set the dimensions of \cs{box255} to the values they had % before \cs{@Prelim@EveryShipout}. % \begin{macrocode} \wd\@cclv=\dimen\z@ \ht\@cclv=\dimen\@ne \dp\@cclv=\dimen\tw@ \egroup } % \end{macrocode} % \end{macro} % % % ^^A ----------------------------- % % \subsection{Tieing \package{prelim2e} into the system} % ^^A % \cs{@Prelim@EveryShipout} is tied into the system via % \cs{EveryShipout}. % But only if the \option{draft} option is used. % \begin{macrocode} \if@prelim@draft \EveryShipout{\@Prelim@EveryShipout} \fi % \end{macrocode} % % \begin{macrocode} % % \end{macrocode} % % % ^^A ----------------------------- % % \section{Acknowledgements} % ^^A % The idea of this package is based on \texttt{prelim.sty} for % \LaTeX2.09 by Robert Tolksdorf. % It provides nearly the same functionality as \package{prelim2e}, but % in a very dirty way: it uses a modified output routine and does not % work with \LaTeXe. % % As usual Rebecca Stiels improved the quality of this documentation. % If you need a translator from English or Fran\c{c}ais to German, send % her an e-mail to \texttt{Rebecca@Andurg.HB.North.DE}. % And if you need a \TeX{}nician or computer scientist, contact \emph{me}: % I'm looking for a job. % % ^^A ----------------------------- % % \Finale