% \iffalse meta-comment
%
% Author: Peter Wilson (CUA and NIST)
%
% This system is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%
% \fi
% \CheckSum{5227}
%% \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 \~}
%
% \def\fileversion{v1.0}
% \def\filedate{1996/03/29}
% \title{\LaTeX{} files for typesetting ISO Standards\thanks{This
% file has version number \fileversion, last revised
% \filedate.}}
%
% \author{%
% Peter Wilson\\
% Catholic University of America and NIST\\
% {\tt pwilson@cme.nist.gov}
% }
% \date{\filedate}
% \maketitle
% \tableofcontents
%
% \StopEventually{}
%
% \section{Introduction}
%
% These files are intended for the typesetting of documents
% according to the rules for ISO international standards.
%
% Document layout is according to the specifications in
% ISO Directives. Unfortunately these Directives do not
% completely define the document layout, leaving several
% aspects open to interpretation by the document editor
% and re-interpretation by the ISO editorial board.
% The following specifications are a re-implementation of the
% \LaTeX\ macros that have
% been used for the production of camera ready copy for
% the ISO~10303 standard, the initial release of which consisted
% of twelve parts. ISO headquarters in Geneva have not objected to
% the typographical conventions embodied in these macros.
%
% Macros are provided both for users of \LaTeX 2e and \LaTeX\ v2.09.
%
% \section{The {\sc docstrip} modules}
%
% The following modules are used in the implementation to direct
% {\sc docstrip} in generating the external files:
% \begin{center}
% \begin{tabular}{ll}
% iso & produce the iso documentclass\\
% 9pt & produce the class option for 9pt\\
% 10pt & produce the class option for 10pt\\
% 11pt & produce the class option for 11pt\\
% rot & produce the isorot package\\
% isone & produce the iso documentstyle\\
% 9ptne & produce the style option for 9pt\\
% 10ptne & produce the style option for 10pt\\
% 11ptne & produce the style option for 11pt\\
% rotne & produce the isorot style file\\
% fwd1 & produce the file isofwdbp.tex \\
% inc & produce the askinc style file \\
% xtab & produce the xtabne style file \\
% driver & produce a documentation driver file \\
% \end{tabular}
% \end{center}
%
% \subsection{A driver for this document}
%
% The next bit of code contains the documentation driver file for
% \LaTeX, i.e., the file that will produce the documentation you are
% currently reading. It will be extracted from this file by the
% {\sc docstrip} program.
%
% \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
% \end{macrocode}
%
% We don't want everything to appear in the index
% \begin{macrocode}
\DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
\DoNotIndex{\@centercr,\@cite}
\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
\DoNotIndex{\@input,\@ixpt,\@m}
\DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint}
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
\DoNotIndex{\advance,\Alph,\alph}
\DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
\DoNotIndex{\bullet}
\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
\DoNotIndex{\fbox}
\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
\DoNotIndex{\input}
\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
\DoNotIndex{\NeedsTeXFormat,\newdimen}
\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
\DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman}
\DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength}
\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
\DoNotIndex{\wd,\xiipt,\year,\z@}
% \end{macrocode}
% We do want an index, using linenumbers, and update information
% \begin{macrocode}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
% \end{macrocode}
% We use so many \file{docstrip} modules that we set the
% \texttt{StandardModuleDepth} counter to 1.
% \begin{macrocode}
\setcounter{StandardModuleDepth}{1}
% \end{macrocode}
% Some commonly used abbreviations
% \begin{macrocode}
\newcommand*{\Lopt}[1]{\textsf {#1}} % typeset an option
\newcommand*{\file}[1]{\texttt {#1}} % typeset a file
\newcommand*{\Lcount}[1]{\textsl {\small#1}} % typeset a counter
\newcommand*{\pstyle}[1]{\textsl {#1}} % typeset a pagestyle
\newcommand*{\Lenv}[1]{\texttt {#1}} % typeset an environment
% \end{macrocode}
% We also want the full details.
% \begin{macrocode}
\begin{document}
\DocInput{isoe.dtx}
\PrintIndex
\PrintChanges
\end{document}
%
% \end{macrocode}
%
%
%
%
%
% \section{Identification}
%
% The iso document class can only be used with \LaTeX 2e, so we make
% sure that an appropriate message is displayed when another \TeX\
% format is used.
% \begin{macrocode}
%\NeedsTeXFormat{LaTeX2e}
% \end{macrocode}
%
% Announce the name, option files and version for \LaTeX 2e files:
% \begin{macrocode}
%\ProvidesClass{isov1}[1996/03/29 v1.0 LaTeX ISO document class]
%<9pt>\ProvidesFile{iso9.clo}[1995/05/31 v1.0 ISO class size option]
%<10pt>\ProvidesFile{iso10.clo}[1995/05/31 v1.0 ISO class size option]
%<11pt>\ProvidesFile{iso11.clo}[1995/05/31 v1.0 ISO class size option]
%\ProvidesPackage{isrot1}[1995/05/31 v1.0 rotation package]
% \end{macrocode}
%
% These files are for use with \LaTeX\ v2.09:
% \begin{macrocode}
%\typeout{isonev1.sty [1996/03/29 v1.0 LaTeX 2.09 ISO document style]}
%<9ptne>\typeout{iso9.sty [1995/05/31 v1.0 ISO documentstyle size option]}
%<10ptne>\typeout{iso10.sty [1995/05/31 v1.0 ISO documentstyle size option]}
%<11ptne>\typeout{iso11.sty [1995/05/31 v1.0 ISO documentstyle size option]}
%\typeout{isrotne1.sty [1995/05/31 v1.0 LaTeX 2.09 rotation package]}
% \end{macrocode}
%
% These files can be used with either version of \LaTeX, so we
% make sure that \LaTeX 2e code is only processed by \LaTeX 2e.
% \begin{macrocode}
%<*inc>
\ifx\documentclass\undefined
\else
\ProvidesPackage{askincv1}%
[1995/05/31 Interactive include package]
\fi
\typeout{askincv1.sty [1995/05/31 Interactive include package]}
%
%<*fwd1>
\typeout{isofwdbp.tex [1995/05/31 ISO Foreword boilerplate]}
%
%<*xtab>
\ifx\documentclass\undefined
\else
\ProvidesPackage{xtabv1}%
[1996/03/29 v1.0 Extended ISO supertabular package]
\fi
\typeout{xtabv1.sty [1996/03/29 v1.0 Extended ISO supertabular package]}
%
% \end{macrocode}
%
% \section{Initial Code}
%
% \begin{macrocode}
%<*iso|isone>
% \end{macrocode}
%
% In this part we define a few commands that are used later on.
%
% \begin{macrocode}
%<*isone>
% \end{macrocode}
% The following macros appear to be defined in the 2e kernel but
% not in v2.09. We need them. We use def instead of newcommand
% just in case a v2.09 document is processed in compatibility
% mode.
%
% \begin{macro}{\@plus}
% \begin{macro}{\@minus}
% Save some string space.
% \begin{macrocode}
\def\@plus{plus}
\def\@minus{minus}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\on@line}
% \begin{macrocode}
\ifnum\inputlineno=\m@ne
\let\on@line\empty
\else
\def\on@line{ on input line \the\inputlineno}
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rem@pt}
% Utility macro to assist in removing `pt' string. It's too complicated for
% me to understand it yet.
% \begin{macrocode}
\begingroup
\catcode`P=12
\catcode`T=12
\lowercase{
\def\x{\def\rem@pt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}
\expandafter\endgroup\x
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\strip@pt}
% Call this to strip `pt' from a dimension like |\strip@pt\dim|
% \begin{macrocode}
\def\strip@pt{\expandafter\rem@pt\the}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\p@}
% \begin{macro}{\z@}
% |%%%%\newdim\p@ \p@=1pt % saves macro time and space|
%
% |%%%%\newdim\z@ \z@=0pt % can be used both for 0 and 0pt|
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
%
% \end{macrocode}
%
% Now we can continue with both 2e and 2.09 macros.
%
% \begin{macro}{\@ptsize}
% This control sequence is used to store the second digit of the
% pointsize we are typesetting in. So, normally, it's value is one
% of 0, 1 or 2.
% \begin{macrocode}
\newcommand{\@ptsize}{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\if@restonecol}
% When the document has to be printed in two columns, we sometimes
% have to temporarily switch to one column. This switch is used to
% remember to switch back.
% \begin{macrocode}
\newif\if@restonecol
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\isostringsequal}
% \begin{macro}{\isoemptystring}
% The command |\isostringsequal| is based on code in Stephan von
% Bechtolsheim {\em \TeX\ in Practice}, vol III page 334.
% It enables the definition of specific commands for testing whether
% two strings are equal.
% \begin{macrocode}
\def\isostringsequal #1#2{%
TT\fi
\edef\@is@str@ngsequali{#1}%
\edef\@is@str@ngsequalii{#2}%
\ifx\@is@str@ngsequali\@is@str@ngsequalii}
% \end{macrocode}
% Now we define the |\isoemptystring| command for use in testing
% for an empty parameter.
% \begin{macrocode}
\def\isoemptystring #1{%
TT\fi
\if\isostringsequal{#1}{}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\fillline}
% This command draws a horizontal line across the page.
% \begin{macrocode}
\newcommand{\fillline}{\mbox{}\hrulefill\mbox{}}
% \end{macrocode}
% \end{macro}
%
% \section{Declaration of Options}
%
%
% \subsection{Setting Paper Sizes}
%
% The variables |\paperwidth| and |\paperheight| should reflect the
% physical paper size after trimming. For desk printer output this
% is usually the real paper size since there is no post-processing.
% We assume that the document will only be printed on either ISO
% standard A4 paper (option \Lopt{a4paper}) or on the most common
% of the US paper sizes (option \Lopt{letterpaper}).
%
% Option \Lopt{a4paper} will be the default.
%
% \begin{macro}{\if@us}
% A flag for the paper size option.
% \begin{macrocode}
\newif\if@us\@usfalse
% \end{macrocode}
% \end{macro}
% Declare the paper size options.
% \begin{macrocode}
%<*iso>
\DeclareOption{a4paper}
{\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{letterpaper}
{\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}%
\@ustrue}
%
%<*isone>
\def\ds@a4paper{\@usfalse}
\def\ds@letterpaper{\@ustrue}
%
% \end{macrocode}
%
% \subsection{Choosing the type size}
%
% The type size options are handled by defining |\@ptsize| to contain
% the last digit of the size in question and branching on |\ifcase|
% statements. This is done for historical reasons to stay compatible
% with other packages that use the |\@ptsize| variable to select
% special actions. It makes the declarations of size options less
% than 10pt difficult, although one can probably use \texttt{9}
% assuming that a class will not define both
% \Lopt{9pt} and \Lopt{19pt} options.
%
% Option \Lopt{11pt} will be the default.
%
% \begin{macrocode}
%<*iso>
\renewcommand{\@ptsize}{1}
\DeclareOption{9pt}{\renewcommand{\@ptsize}{9}}
\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
%
%<*isone>
\def\@ptsize{1}
\@namedef{ds@11pt}{\def\@ptsize{1}}
\@namedef{ds@10pt}{\def\@ptsize{0}}
\@namedef{ds@9pt}{\def\@ptsize{9}}
%
% \end{macrocode}
%
%
% \subsection{Two-side or one-side printing}
%
% For two-sided printing we use the switch |\if@twoside|. In
% addition we have to set the |\if@mparswitch| to get any margin
% paragraphs into the outside margin. In this class we always
% use two-sided printing with marginal notes on the outside.
% \begin{macro}{\if@twoside}
% \begin{macro}{\if@mparswitch}
% \begin{macrocode}
\@twosidetrue \@mparswitchtrue
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Sect option}
%
% The default is to prohibit sections in an ISO document.
% This option enables use of the |\section| command.
% \begin{macro}{\if@usesect}
% We use a flag for remembering if the option has been selected.
% \begin{macrocode}
\newif\if@usesect\@usesectfalse
%\DeclareOption{sect}{\@usesecttrue}
%\def\ds@sect{\@usesecttrue}
% \end{macrocode}
% \end{macro}
%
%
%
% \subsection{Twocolumn printing}
%
% Two-column and one-column printing is again realized via a switch
% which is defined in the kernel. The default is single column printing.
%
% \begin{macro}{\if@twocolumn}
% \begin{macrocode}
%<*iso>
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
%
%<*isone>
\def\ds@onecolumn{\@twocolumnfalse}
\def\ds@twocolumn{\@twocolumntrue}
%
% \end{macrocode}
% \end{macro}
%
% \subsection{Is, Dis and Otherdoc options}
%
% The default is to assume that an ISO standard in preparation is to be printed.
% The \Lopt{is} option declares that an International Standard (IS)
% is to be printed.
% The \Lopt{dis} option declares that a Draft International Standard
% (DIS) is to be printed. The \Lopt{otherdoc} option indicates that
% the document is not intended to become an ISO standard (e.g., is
% an internal report).
% \begin{macro}{\ifisst@ndard}
% \begin{macro}{\ifdisst@ndard}
% \begin{macro}{\if@therd@c}
% We use flags for remembering which option is in effect.
% \begin{macrocode}
\newif\ifisst@ndard\isst@ndardfalse
\newif\ifdisst@ndard\disst@ndardfalse
\newif\if@therd@c\@therd@cfalse
% \end{macrocode}
% Now declare the options (including an \Lopt{is} option just for
% comleteness).
% \begin{macrocode}
%<*iso>
\DeclareOption{is}{\isst@ndardtrue \disst@ndardfalse \@therd@cfalse}
\DeclareOption{dis}{\isst@ndardfalse \disst@ndardtrue \@therd@cfalse}
\DeclareOption{otherdoc}{\isst@ndardfalse \disst@ndardfalse \@therd@ctrue}
%
%<*isone>
\def\ds@is{\isst@ndardtrue \disst@ndardfalse \@therd@cfalse}
\def\ds@dis{\isst@ndardfalse \disst@ndardtrue \@therd@cfalse}
\def\ds@otherdoc{\isst@ndardfalse \disst@ndardfalse \@therd@ctrue}
%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Copyright option}
%
% The default is not to print ISO copyright notices. This option
% enables copyright notice printing. As usual, we employ a flag.
% \begin{macro}{\ifc@pyright}
% \begin{macrocode}
\newif\ifc@pyright\c@pyrightfalse
%<*iso>
\DeclareOption{copyright}{\c@pyrighttrue}
\DeclareOption{notcopyright}{\c@pyrightfalse}
%
%<*isone>
\def\ds@copyright{\c@pyrighttrue}
\def\ds@notcopyright{\c@pyrightfalse}
%
% \end{macrocode}
% \end{macro}
%
% \subsection{Draft option}
%
% If the user requests \Lopt{draft} we show any overfull boxes,
% marginal notes are allowed, and any copyright notices are not
% printed. For symmetry, we also define a \Lopt{final} option
% which is the default.
% \begin{macro}{\ifdr@ftd@c}
% \begin{macrocode}
\newif\ifdr@ftd@c\dr@ftd@cfalse
\setlength{\overfullrule}{\z@}
%<*iso>
\DeclareOption{final}{\setlength{\overfullrule}{\z@}
\dr@ftd@cfalse}
\DeclareOption{draft}{\setlength\overfullrule{5pt}%
\c@pyrightfalse%
\dr@ftd@ctrue}
%
%<*isone>
\def\ds@final{\setlength{\overfullrule}{\z@}
\dr@ftd@cfalse}
\def\ds@draft{\setlength\overfullrule{5pt}%
\c@pyrightfalse%
\dr@ftd@ctrue}
%
% \end{macrocode}
% \end{macro}
%
% \section{Executing Options}
%
% Here we execute the default options to initialize certain
% variables. Note that the document class isoe always uses two
% sided printing.
% \begin{macrocode}
%\ExecuteOptions{notcopyright,final,a4paper,11pt,onecolumn}
%\@options
% \end{macrocode}
%
% The |\ProcessOptions| command causes the execution of the code
% for every option \Lopt{FOO}
% which is declared and for which the user typed
% the \Lopt{FOO} option in his
% |\documentclass| command. For every option \Lopt{BAR} he typed,
% which is not declared, the option is assumed to be a global option.
% All options will be passed as document options to any
% |\usepackage| command in the document preamble.
% \begin{macrocode}
%\ProcessOptions
% \end{macrocode}
% Now that all the options have been executed we can load the
% chosen class option file that contains all size dependent code.
% \begin{macrocode}
%<*iso>
\ifnum\@ptsize < \tw@
\input{iso1\@ptsize.clo}
\else
\input{iso\@ptsize.clo}
\fi
%
%<*isone>
\ifnum\@ptsize < \tw@
\input{iso1\@ptsize.sty}
\else
\input{iso\@ptsize.sty}
\fi
%
%
% \end{macrocode}
%
% \section{Loading Packages}
%
% This class file does not load additional packages.
%
%
% \section{Document Layout}
% \label{sec:maincode}
%
% In this section we are finally dealing with the nasty typographical
% details.
%
% \subsection{Fonts}
%
% \LaTeX\ offers the user commands to change the size of the font,
% relative to the `main' size. Each relative size changing command
% |\size| executes the command
% |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
%
% \begin{description}
% \item[\meta{font-size}] The absolute size of the font to use from
% now on.
%
% \item[\meta{baselineskip}] The normal value of |\baselineskip|
% for the size of the font selected. (The actual value will be
% |\baselinestretch| * \meta{baselineskip}.)
% \end{description}
%
% A number of commands, defined in the \LaTeX\ kernel, shorten the
% following definitions and are used throughout. They are:
% \begin{center}
% \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
% \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
% \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
% \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
% ...
% \end{tabular}
% \end{center}
%
% \begin{macro}{\normalsize}
% \begin{macro}{\@normalsize}
%
% The user level command for the main size is |\normalsize|.
% Internally \LaTeX\ uses |\@normalsize| when it refers to the
% main size. |\@normalsize| will be defined to work like
% |\normalsize| if the latter is redefined from its default
% definition (that just issues an error message). Otherwise
% |\@normalsize| simply selects a 9pt/11pt size.
%
% The |\normalsize| macro also sets new values for\\
% |\abovedisplayskip|, |\abovedisplayshortskip| and
% |\belowdisplayshortskip|.
%
% \begin{macrocode}
%<*9pt|10pt|11pt|9ptne|10ptne|11ptne>
%<9ptne|10ptne|11ptne>\def\baselinestretch{1}
%<9pt|10pt|11pt>\renewcommand{\normalsize}{%
%<9ptne|10ptne|11ptne>\def\@normalsize{%
%<*9pt|9ptne>
%<9pt> \@setfontsize\normalsize\@ixpt\@xpt
%<9ptne> \@setsize\normalsize{10\p@}\ixpt\@ixpt
\abovedisplayskip 9\p@ \@plus 2\p@ \@minus 4.5\p@
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 5.5\p@ \@plus 2.5\p@ \@minus 3\p@
%9pt|9ptne>
%<*10pt|10ptne>
%<10pt> \@setfontsize\normalsize\@xpt\@xiipt
%<10ptne> \@setsize\normalsize{12\p@}\xpt\@xpt
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
%10pt|10ptne>
%<*11pt|11ptne>
%<11pt> \@setfontsize\normalsize\@xipt{13.6}%
%<11ptne> \@setsize\normalsize{13.6\p@}\xipt\@xipt%
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
%11pt|11ptne>
% \end{macrocode}
% The |\belowdisplayskip| is always equal to the
% |\abovedisplayskip|. The parameters of the first level list are
% always given by |\@listI|.
% \begin{macrocode}
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
% \end{macrocode}
%
% We initially choose the normalsize font.
% \begin{macrocode}
\normalsize
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\small}
% This is similar to |\normalsize|.
% \begin{macrocode}
\newcommand{\small}{%
%<*9pt|9ptne>
%<9pt> \@setfontsize\small\@viiipt{9}
%<9ptne> \@setsize\small{9\p@}\viiipt\@viiipt
\abovedisplayskip 6\p@ \@plus 2\p@ \@minus 4\p@
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 2\p@ \@plus 2\p@ \@minus 2\p@
\parsep 1\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
%9pt|9ptne>
%<*10pt|10ptne>
%<10pt> \@setfontsize\small\@ixpt{11}%
%<10ptne> \@setsize\small{11\p@}\ixpt\@ixpt%
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
\abovedisplayshortskip \z@ \@plus2\p@
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 4\p@ \@plus2\p@ \@minus2\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
%10pt|10ptne>
%<*11pt|11ptne>
%<11pt> \@setfontsize\small\@xpt\@xiipt
%<11ptne> \@setsize\small{12\p@}\xpt\@xpt
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\def\@listi{\leftmargin\leftmargini
\topsep 6\p@ \@plus2\p@ \@minus2\p@
\parsep 3\p@ \@plus2\p@ \@minus\p@
\itemsep \parsep}%
%11pt|11ptne>
\belowdisplayskip \abovedisplayskip
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footnotesize}
% This is the same as |\small|.
% \begin{macrocode}
\newcommand{\footnotesize}{%
%<*9pt|9ptne>
%<9pt> \@setfontsize\footnotesize\@viiipt{9}
%<9ptne> \@setsize\footnotesize{9\p@}\viiipt\@viiipt
\abovedisplayskip 6\p@ \@plus 2\p@ \@minus 4\p@
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 2\p@ \@plus 2\p@ \@minus 2\p@
\parsep 1\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
%9pt|9ptne>
%<*10pt|10ptne>
%<10pt> \@setfontsize\footnotesize\@viiipt{9.5}%
%<10ptne> \@setsize\footnotesize{9.5\p@}\viiipt\@viiipt%
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
\abovedisplayshortskip \z@ \@plus\p@
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 3\p@ \@plus\p@ \@minus\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
%10pt|10ptne>
%<*11pt|11ptne>
%<11pt> \@setfontsize\footnotesize\@ixpt{11}%
%<11ptne> \@setsize\footnotesize{11\p@}\ixpt\@ixpt
\abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
\abovedisplayshortskip \z@ \@plus\p@
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 4\p@ \@plus2\p@ \@minus2\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
%11pt|11ptne>
\belowdisplayskip \abovedisplayskip
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\scriptsize}
% \begin{macro}{\tiny}
% \begin{macro}{\large}
% \begin{macro}{\Large}
% \begin{macro}{\LARGE}
% \begin{macro}{\huge}
% \begin{macro}{\Huge}
% These are all much simpler than the previous macros, they just
% select a new fontsize, but leave the parameters for displays and
% lists alone.
% \begin{macrocode}
%<*9pt>
\newcommand{\tiny}{\@setfontsize\tiny\@vpt{6}}
\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt{8}}
\newcommand{\large}{\@setfontsize\large\@xpt{11}}
\newcommand{\Large}{\@setfontsize\Large\@xipt{12}}
\newcommand{\LARGE}{\@setfontsize\LARGE\@xivpt{18}}
\newcommand{\huge}{\@setfontsize\huge\@xviipt{22}}
\newcommand{\Huge}{\@setfontsize\Huge\@xxpt{25}}
%9pt>
%<*9ptne>
\newcommand{\tiny}{\@setsize\tiny{6\p@}\vpt\@vpt}
\newcommand{\scriptsize}{\@setsize\scriptsize{8\p@}\viipt\@viipt}
\newcommand{\large}{\@setsize\large{11\p@}\xpt\@xpt}
\newcommand{\Large}{\@setsize\Large{12\p@}\xipt\@xipt}
\newcommand{\LARGE}{\@setsize\LARGE{18\p@}\xivpt\@xivpt}
\newcommand{\huge}{\@setsize\huge{22\p@}\xviipt\@xviipt}
\newcommand{\Huge}{\@setsize\Huge{25\p@}\xxpt\@xxpt}
%9ptne>
%<*10pt>
\newcommand{\tiny}{\@setfontsize\tiny\@vipt{7}}
\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9}}
\newcommand{\large}{\@setfontsize\large\@xipt{12}}
\newcommand{\Large}{\@setfontsize\Large\@xiipt{14}}
\newcommand{\LARGE}{\@setfontsize\LARGE\@xivpt{18}}
\newcommand{\huge}{\@setfontsize\huge\@xviipt{22}}
\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
%10pt>
%<*10ptne>
\newcommand{\tiny}{\@setsize\tiny{7\p@}\vipt\@vipt}
\newcommand{\scriptsize}{\@setsize\scriptsize{9\p@}\viiipt\@viiipt}
\newcommand{\large}{\@setsize\large{12\p@}\xipt\@xipt}
\newcommand{\Large}{\@setsize\Large{14\p@}\xiipt\@xiipt}
\newcommand{\LARGE}{\@setsize\LARGE{18\p@}\xivpt\@xivpt}
\newcommand{\huge}{\@setsize\huge{22\p@}\xviipt\@xviipt}
\newcommand{\Huge}{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
%10ptne>
%<*11pt>
\newcommand{\tiny}{\@setfontsize\tiny\@vipt{7}}
\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9}}
\newcommand{\large}{\@setfontsize\large\@xiipt{14}}
\newcommand{\Large}{\@setfontsize\Large\@xivpt{18}}
\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{22}}
\newcommand{\huge}{\@setfontsize\huge\@xxpt{25}}
\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
%11pt>
%<*11ptne>
\newcommand{\tiny}{\@setsize\tiny{7\p@}\vipt\@vipt}
\newcommand{\scriptsize}{\@setsize\scriptsize{9\p@}\viiipt\@viiipt}
\newcommand{\large}{\@setsize\large{14\p@}\xiipt\@xiipt}
\newcommand{\Large}{\@setsize\Large{18\p@}\xivpt\@xivpt}
\newcommand{\LARGE}{\@setsize\LARGE{22\p@}\xviipt\@xviipt}
\newcommand{\huge}{\@setsize\huge{25\p@}\xxpt\@xxpt}
\newcommand{\Huge}{\@setsize\Huge{30\p@}\xxvpt\@xxvpt}
%11ptne>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\Gfont}
% \begin{macro}{\Tfont}
% \begin{macro}{\Cfont}
% \begin{macro}{\Nfont}
% \begin{macro}{\Efont}
% Define the font sizes for headings, captions, etc.
% |\Gfont| is the normal size font for general text.
% |\Tfont| is for the title of the standard.
% |\Cfont| is for clause and subheadings.
% |\Nfont| is for notes and examples.
% |\Efont| is for code in typewriter font.
% \begin{macrocode}
\newcommand{\Gfont}{\normalsize}
\newcommand{\Nfont}{\small}
\newcommand{\Efont}{\small}
%<*9pt|9ptne>
\newcommand{\Tfont}{\huge}
\newcommand{\Cfont}{\Large}
%9pt|9ptne>
%<*10pt|10ptne>
\newcommand{\Tfont}{\huge}
\newcommand{\Cfont}{\LARGE}
%10pt|10ptne>
%<*11pt|11ptne>
\newcommand{\Tfont}{\LARGE}
\newcommand{\Cfont}{\Large}
%11pt|11ptne>
%9pt|10pt|11pt|9ptne|10ptne|11ptne>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
% \subsection{Paragraphing}
%
% \begin{macro}{\lineskip}
% \begin{macro}{\normallineskip}
% These parameters control \TeX's behaviour when two lines tend to
% come too close together.
% \begin{macrocode}
%<*iso|isone>
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\baselinestretch}
% This is used as a multiplier for |\baselineskip|. The default is
% to {\em not\/} stretch the baselines.
% \begin{macrocode}
\renewcommand{\baselinestretch}{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\parskip}
% \begin{macro}{\parindent}
% |\parskip| gives extra vertical space between paragraphs and
% |\parindent| is the width of the paragraph indentation.
% \begin{macrocode}
\setlength\parskip{1ex}
\setlength\parindent{\z@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@lowpenalty}
% \begin{macro}{\@medpenalty}
% \begin{macro}{\@highpenalty}%
% The commands |\nopagebreak| and |\nolinebreak| put in penalties
% to discourage these breaks at the point they are put in.
% They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
% dependent on their argument.
% \begin{macrocode}
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\clubpenalty}
% \begin{macro}{\widowpenalty}
% These penalties are use to discourage club and widow lines.
% Because we use their default values we only show them here,
% commented out.
% \begin{macrocode}
% \clubpenalty 150
% \widowpenalty 150
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\displaywidowpenalty}
% \begin{macro}{\predisplaypenalty}
% \begin{macro}{\postdisplaypenalty}
% Discourage (but not so much) widows in front of a math display
% and forbid breaking directly in front of a display. Allow break
% after a display without a penalty. Again the default values are
% used, therefore we only show them here.
% \begin{macrocode}
% \displaywidowpenalty 50
% \predisplaypenalty 10000
% \postdisplaypenalty 0
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\interlinepenalty}
% Allow the breaking of a page in the middle of a paragraph.
% \begin{macrocode}
% \interlinepenalty 0
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\brokenpenalty}
% We allow the breaking of a page after a hyphenated line.
% \begin{macrocode}
% \brokenpenalty 100
% \end{macrocode}
% \end{macro}
%
%
%
%
% \subsection{Page Layout}
%
% All margin dimensions are measured from a point one inch from the
% top and lefthand side of the page.
%
% \subsubsection{Vertical spacing}
%
% \begin{macro}{\headheight}
% \begin{macro}{\headsep}
% \begin{macro}{\topskip}
% The |\headheight| is the height of the box that will contain the
% running head. The |\headsep| is the distance between the bottom
% of the running head and the top of the text. The |\topskip| is the
% |\baselineskip| for the first line on a page;
% \LaTeX's output routine will not work properly if it has the
% value 0pt, so do not do that!
% \begin{macrocode}
\setlength\headheight{11\p@}
\setlength\headsep{10mm}
%
%<9pt|9ptne>\setlength\topskip{9\p@}
%<10pt|10ptne>\setlength\topskip{10\p@}
%<11pt|11ptne>\setlength\topskip{11\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\footskip}
% The distance from the baseline of the box which contains the
% running footer to the baseline of last line of text is controlled
% by the |\footskip|.
% \begin{macrocode}
%<*iso|isone>
\setlength\footskip{11mm}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\maxdepth}
% \begin{macro}{\@maxdepth}
% The \TeX\ primitive register |\maxdepth| has a function that is
% similar to that of |\topskip|. The register |\@maxdepth| should
% always contain a copy of |\maxdepth|. In both plain \TeX\ and
% \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
% native \LaTeX 2e mode we let the value depend on the typesize. We
% set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
% 1.5$. As it happens, in these classes |\topskip| is equal to the
% typesize, therefor we set |\maxdepth| to half the value of
% |\topskip|.
% \begin{macrocode}
%\setlength\maxdepth{.5\topskip}
%\setlength\maxdepth{4\p@}
\setlength\@maxdepth\maxdepth
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{The dimension of text}
%
% \begin{macro}{\textwidth}
% \begin{macro}{\textheight}
% \begin{macro}{\columnsep}
% The width and height of the text which are fixed in this class.
% Also, the gutter width when in two column mode.
%
% \begin{macrocode}
\setlength\textwidth{160mm}
\setlength\textheight{221.5mm}
\setlength\columnsep{10mm}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
% \subsubsection{Margins}
%
% \begin{macro}{\topmargin}
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\evensidemargin}
% \begin{macro}{\marginparwidth}
% \begin{macro}{\marginparsep}
% \begin{macro}{\marginparpush}
% The margins are fixed in this class.
% \begin{macrocode}
\setlength\topmargin{0mm}
\setlength\oddsidemargin{0mm}
\setlength\evensidemargin{0mm}
\setlength\marginparwidth{0pt}
\setlength\marginparsep{0pt}
\setlength\marginparpush{0pt}
% \end{macrocode}
% However, some of the options can change these values. The \Lopt{draft}
% option allows marginal notes.
% \begin{macrocode}
\ifdr@ftd@c
\setlength\marginparwidth{20mm}
\setlength\marginparsep{0.5mm}
\fi
% \end{macrocode}
% The \Lopt{letterpaper} option rearranges the text block on the page,
% trying to center it both vertically and horizontally.
% \begin{macrocode}
\if@us
\setlength\topmargin{-9.4mm}
\setlength\oddsidemargin{1.55mm}
\setlength\evensidemargin{1.55mm}
\typeout{ }
\typeout{*********************************************************}
\typeout{* Warning: You have used the letterpage option. *********}
\typeout{* This will not be acceptable as ISO camera ready copy. *}
\typeout{*********************************************************}
\typeout{ }
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
% \subsubsection{Footnotes}
%
% \begin{macro}{\footnotesep}
% |\footnotesep| is the height of the strut placed at the beginning
% of every footnote.
% \begin{macrocode}
\setlength\footnotesep{12\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\footins}
% |\skip\footins| is the space between the last line of the main
% text and the top of the first footnote.
% \begin{macrocode}
\setlength{\skip\footins}{6\p@ \@plus 2\p@ \@minus 2\p@}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Float placement parameters}
%
% All float parameters are given default values in the \LaTeX 2e
% kernel. For this reason counters only need to be set with
% |\setcounter| and other parameters are set using |\renewcommand|.
%
% \paragraph{Limits for the placement of floating objects}
%
% \begin{macro}{\c@topnumber}
% The \Lcount{topnumber} counter holds the maximum number of
% floats that can appear on the top of a text page.
% \begin{macrocode}
\setcounter{topnumber}{2}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\topfraction}
% This indicates the maximum part of a text page that can be
% occupied by floats at the top.
% \begin{macrocode}
%\renewcommand{\topfraction}{.7}
%\def\topfraction{.7}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@bottomnumber}
% The \Lcount{bottomnumber} counter holds the maximum number of
% floats that can appear on the bottom of a text page.
% \begin{macrocode}
\setcounter{bottomnumber}{1}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bottomfraction}
% This indicates the maximum part of a text page that can be
% occupied by floats at the bottom.
% \begin{macrocode}
%\renewcommand{\bottomfraction}{.3}
%\def\bottomfraction{.3}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@totalnumber}
% This indicates the maximum number of floats that can appear on
% any text page.
% \begin{macrocode}
\setcounter{totalnumber}{3}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textfraction}
% This indicates the minimum part of a text page that has to be
% occupied by text.
% \begin{macrocode}
%\renewcommand{\textfraction}{.2}
%\def\textfraction{.2}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\floatpagefraction}
% This indicates the minimum part of a page that has to be
% occupied by floating objects before a `float page' is produced.
% \begin{macrocode}
%\renewcommand{\floatpagefraction}{.5}
%\def\floatpagefraction{.5}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@dbltopnumber}
% The \Lcount{dbltopnumber} counter holds the maximum number of
% two column floats that can appear on the top of a two column text
% page.
% \begin{macrocode}
\setcounter{dbltopnumber}{2}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dbltopfraction}
% This indicates the maximum part of a two column text page that
% can be occupied by two column floats at the top.
% \begin{macrocode}
%\renewcommand{\dbltopfraction}{.7}
%\def\dbltopfraction{.7}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dblfloatpagefraction}
% This indicates the minimum part of a page that has to be
% occupied by two column wide floating objects before a `float
% page' is produced.
% \begin{macrocode}
%\renewcommand{\dblfloatpagefraction}{.5}
%\def\dblfloatpagefraction{.5}
% \end{macrocode}
% \end{macro}
%
% \paragraph{Floats on a text page}
%
% \begin{macro}{\floatsep}
% \begin{macro}{\textfloatsep}
% \begin{macro}{\intextsep}
% When a floating object is placed on a page with text, these
% parameters control the separation between the float and the other
% objects on the page. These parameters are used for both
% one-column mode and single-column floats in two-column mode.
%
% |\floatsep| is the space between adjacent floats that are moved
% to the top or bottom of the text page.
%
% |\textfloatsep| is the space between the main text and floats
% at the top or bottom of the page.
%
% |\intextsep| is the space between in-text floats and the text.
% \begin{macrocode}
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\dblfloatsep}
% \begin{macro}{\dbltextfloatsep}
% When floating objects that span the whole |\textwidth| are placed
% on a text page when we are in twocolumn mode the separation
% between the float and the text is controlled by |\dblfloatsep|
% and |\dbltextfloatsep|.
%
% |\dblfloatsep| is the space between adjacent floats that are moved
% to the top or bottom of the text page.
%
% |\dbltextfloatsep| is the space between the main text and floats
% at the top or bottom of the page.
%
% \begin{macrocode}
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \paragraph{Floats on their own page or column}
%
% \begin{macro}{\@fptop}
% \begin{macro}{\@fpsep}
% \begin{macro}{\@fpbot}
% When floating objects are placed on separate pages the layout of
% such pages is controlled by these parameters. At the top of the
% page |\@fptop| amount of stretchable whitespace is inserted, at
% the bottom of the page we get an |\@fpbot| amount of stretchable
% whitespace. Between adjacent floats the |\@fpsep| is inserted.
%
% These parameters are used for the placement of floating objects
% in one column mode, or in single column floats in two column
% mode.
%
% Note that at least one of the two parameters |\@fptop| and
% |\@fpbot| should contain a |plus ...fil| to allow filling the
% remaining empty space.
% \begin{macrocode}
\setlength\@fptop{0\p@ \@plus 1fil}
\setlength\@fpsep{8\p@ \@plus 2fil}
\setlength\@fpbot{0\p@ \@plus 1fil}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@dblfptop}
% \begin{macro}{\@dblfpsep}
% \begin{macro}{\@dblfpbot}
% Double column floats in two column mode are handled with similar
% parameters.
% \begin{macrocode}
\setlength\@dblfptop{0\p@ \@plus 1fil}
\setlength\@dblfpsep{8\p@ \@plus 2fil}
\setlength\@dblfpbot{0\p@ \@plus 1fil}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Page Styles}
%
% The page style \pstyle{foo} is defined by defining the command
% |\ps@foo|. This command should make only local definitions.
% There should be no stray spaces in the definition, since they
% could lead to mysterious extra spaces in the output.
%
% \begin{macro}{\@evenhead}
% \begin{macro}{\@oddhead}
% \begin{macro}{\@evenfoot}
% \begin{macro}{\@oddfoot}
% The |\ps@...| command defines the macros |\@oddhead|,
% |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
% heads and feet---e.g., |\@oddhead| is the macro to produce the
% contents of the heading box for odd-numbered pages. It is called
% inside an |\hbox| of width |\textwidth|.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Marking conventions}
%
% To make headings determined by the sectioning commands, the page
% style defines the commands |\chaptermark|, |\sectionmark|,
% \ldots,\\
% where |\chaptermark{|\meta{TEXT}|}| is called by
% |\chapter| to set a mark, and so on.
%
% The |\...mark| commands and the |\...head| macros are defined
% with the help of the following macros. (All the |\...mark|
% commands should be initialized to no-ops.)
%
% \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
% of marks, a `left' and a `right' mark, using the following
% commands:
% \begin{flushleft}
% |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: Adds both marks.
%
% |\markright{|\meta{RIGHT}|}|: Adds a `right' mark.
%
% |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
% or |\@evenfoot| macros, it gets the current `left'
% mark. |\leftmark| works like \TeX's |\botmark|
% command.
%
% |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
% or |\@evenfoot| macros, it gets the current
% `right' mark. |\rightmark| works like \TeX's
% |\firstmark| command.
% \end{flushleft}
%
% The marking commands work reasonably well for right marks
% `numbered within' left marks--e.g., the left mark is changed by a
% |\chapter| command and the right mark is changed by a |\section|
% command. However, it does produce somewhat anomalous results if
% two |\markboth|'s occur on the same page.
%
%
% Commands like |\tableofcontents| that should set the marks in some
% page styles use a |\@mkboth| command, which is |\let| by the
% pagestyle command (|\ps@...|) to |\markboth| for setting the
% heading or to |\@gobbletwo| to do nothing.
%
%
% \begin{macrocode}
% %%%\mark{{}{}} % Initializes TeX's marks <--- can vanish
%\mark{{}{}}
% \end{macrocode}
%
% \begin{macro}{\standard}
% \begin{macro}{\yearofedition}
% \begin{macro}{\languageofedition}
% These commands are to be used in the document preamble. They
% are used to specify the identification of the standard,
% the year of the standard and the language of the standard.
% For example, for a DIS printed in 1995 in English:
% \begin{verbatim}
% \standard{ISO/DIS 10303-321}
% \yearofedition{1995}
% \languageofedition{(E)}
% \end{verbatim}
% \begin{macro}{\thestandard}
% \begin{macro}{\thesyear}
% \begin{macro}{\theslanguage}
% \begin{macro}{\@runninghead}
% |\thestandard| and |\thesyear| hold the number and year of the
% standard being documented. |\theslanguage| holds the ISO
% identification of the publication language; note that
% this must include parentheses around the code letter.
% \begin{macrocode}
\gdef\thestandard{}
\gdef\thesyear{}
\gdef\theslanguage{}
\def\standard#1{\gdef\thestandard{#1}}
\def\yearofedition#1{\gdef\thesyear{#1}}
\def\languageofedition#1{\gdef\theslanguage{#1}}
% \end{macrocode}
% |\@runninghead| contains the document identification text for
% the running head. Its value depends on the \Lopt{otherdoc} option.
% \begin{macrocode}
\if@therd@c
% \end{macrocode}
% This is not intended to be a standard, so just use |\thestandard| text.
% \begin{macrocode}
\newcommand{\@runninghead}{\thestandard}
\else
% \end{macrocode}
% It is either a DIS or an IS, so the year and language are
% required as well; note the colon.
% \begin{macrocode}
\newcommand{\@runninghead}{\thestandard:\thesyear\theslanguage}
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\copyrighthead}
%
% |\copyrighthead| contains the text for a copyright mark
% in a heading.
% However, it should be blank if the document is not copyrighted.
% \begin{macrocode}
\ifdr@ftd@c
\c@pyrightfalse
\fi
\ifc@pyright
\newcommand{\copyrighthead}%
{\mbox{\copyright {\sc \copyrightname}}}
\else
\newcommand{\copyrighthead}{}
\fi
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Defining the page styles}
%
% The pagestyles \pstyle{empty} and \pstyle{plain} are defined
% in \file{latex.dtx}.
%
% \begin{macro}{\ps@headings}
% \pstyle{headings} is the typical pagestyle throughout the document.
% The header
% consists of a copyright notice and the identification of the
% standard. The footer has the page number at the outer edge.
% \begin{macrocode}
\newcommand{\ps@headings}{%
\def\@oddhead{\copyrighthead\hfil{\bf\@runninghead}}%
\def\@evenhead{{\bf\@runninghead}\hfil\copyrighthead}%
\def\@oddfoot{\hfil\thepage}%
\def\@evenfoot{\thepage\hfil}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@startpage}
% The \pstyle{startpage} page style is similar to \pstyle{headings}
% but without a copyright notice.
% \begin{macrocode}
\newcommand{\ps@startpage}{%
\def\@oddhead{\hfil{\bf\@runninghead}}%
\def\@evenhead{{\bf\@runninghead}\hfil}%
\def\@oddfoot{\hfil\thepage}%
\def\@evenfoot{\thepage\hfil}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ps@nohead}
% Pagestyle \pstyle{nohead} has no headers or footers.
% \begin{macrocode}
\newcommand{\ps@nohead}{%
\def\@oddhead{}%
\def\@evenhead{}%
\def\@oddfoot{}%
\def\@evenfoot{}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rectoisotitlehead}
% \begin{macro}{\versoisotitlehead}
% \begin{macro}{\ps@isotitlehead}
%
% \pstyle{isotitlehead} is a special pagestyle for the title page of
% a standard. |\rectoisotitlehead| and |\versoisotitlehead|
% contain the relevent texts.
% \begin{macrocode}
\newcommand{\rectoisotitlehead}{%
\fillline\vspace{0.1\baselineskip}\linebreak%
% {\bfseries \uppercase{\ISname}}
% \mbox{ \ifc@pyright \copyright \fi {\scshape \copyrightname}}
% \hfil {\bfseries \@runninghead}%
% {\bf \uppercase{\ISname}}
% \mbox{ \ifc@pyright \copyright \fi {\sc \copyrightname}}
% \hfil {\bf \@runninghead}%
\vspace{-0.5\baselineskip}\linebreak\fillline}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\versoisotitlehead}{%
\fillline\vspace{0.1\baselineskip}\linebreak%
% {\bfseries \@runninghead} \hfil
% {\bfseries \uppercase{\ISname}}
% \mbox{ \ifc@pyright \copyright \fi {\scshape \copyrightname}}
% {\bf \@runninghead} \hfil
% {\bf \uppercase{\ISname}}
% \mbox{ \ifc@pyright \copyright \fi {\sc \copyrightname}}
\vspace{-0.5\baselineskip}\linebreak\fillline}
% \end{macrocode}
%
% \begin{macrocode}
\def\ps@isotitlehead{%
\def\@oddhead{\parbox{\textwidth}{\protect\rectoisotitlehead}}%
\def\@evenhead{\parbox{\textwidth}{\protect\versoisotitlehead}}%
\def\@oddfoot{\hfil\thepage}%
\def\@evenfoot{\thepage\hfil}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \section{Document Markup}
%
% \subsection{The title}
%
% In this class the |\title| command is somewhat different to that
% in the standard classes.
% \begin{macro}{\title}
% \begin{macro}{\thetitle}
% \begin{macro}{\introelement}
% \begin{macro}{\mainelement}
% \begin{macro}{\compelement}
% The command |\title{|\meta{intro}|}{|\meta{main}|}{|\meta{comp}|}|
% produces a macro |\thetitle| which is used when generating the
% first normative clause.
%
% First define a default |\thetitle|.
% \begin{macrocode}
\gdef\thetitle{}
% \end{macrocode}
% Define the elements to be used in the title.
% \begin{macrocode}
\newcommand{\introelement}[1]{\if\isoemptystring{#1}\else {#1 ---\\}\fi}
\newcommand{\mainelement}[1]{\if\isoemptystring{#1}\else {#1 ---\\}\fi}
\newcommand{\compelement}[1]{\if\isoemptystring{#1}\else {#1 \\ }\fi}
% \end{macrocode}
% The |\title| command starts a new page with arabic numbering and
% initialises the counters. It also uses the |isotitlehead|.
% \begin{macrocode}
\renewcommand{\title}[3]{%
\clearpage\pagenumbering{arabic}%
\setcounter{section}{0}\setcounter{clause}{0}%
\if@therd@c \else %
\protect\thispagestyle{isotitlehead}
\fi
% \gdef\thetitle{{\Tfont\bfseries \introelement{#1} %
% \gdef\thetitle{{\Tfont\bf \introelement{#1} %
\mainelement{#2} %
\compelement{#3}}}
\if@twocolumn
\twocolumn[\vbox to 35mm{\thetitle}]
\else
\vbox to 35mm{\thetitle}
\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Sections and Clauses}
%
% \subsubsection{Building blocks} The definitions in this part of the
% class file make use of two internal macros, |\@startsection| and
% |\secdef|. To understand
% what is going on here, we describe their syntax.
%
% The macro |\@startsection| has 6 required arguments, optionally
% followed by a $*$, an optional argument and a required argument:
%
% |\@startsection|\meta{name}\meta{level}\meta{indent}^^A
% \meta{beforeskip}\meta{afterskip}\meta{style}
% optional *\\
% \null\hphantom{\bslash @startsection}^^A
% |[|\meta{altheading}|]|\meta{heading}
%
% It is a generic command to start a section, the arguments have
% the following meaning:
%
% \begin{description}
% \item[\meta{name}] The name of the user level command, e.g.,
% `section'.
% \item[\meta{level}] A number, denoting the depth of the section
% -- e.g., chapter=1, section = 2, etc. A section number
% will be printed if and only if \meta{level} $<=$ the value
% of the \Lcount{secnumdepth} counter.
% \item[\meta{indent}] The indentation of the heading from the left
% margin
% \item[\meta{beforeskip}] The absolute value of this argument
% gives the skip to leave above the heading. If it is
% negative, then the paragraph indent of the text following
% the heading is suppressed.
% \item[\meta{afterskip}] If positive, this gives the skip to leave
% below the heading, else it gives the skip to leave to the
% right of a run-in heading.
% \item[\meta{style}] Commands to set the style of the heading.
% \item[$*$] When this is missing the heading is numbered and the
% corresponding counter is incremented.
% \item[\meta{altheading}] Gives an alternative heading to use in
% the table of contents and in the running heads. This should
% be present when the $*$ form is used.
% \item[\meta{heading}] The heading of the new section.
% \end{description}
% A sectioning command is normally defined to |\@startsection| and
% its first six arguments.
%
% The macro |\secdef| can be used when a sectioning command is
% defined without using |\@startsection|. It has two arguments:
%
% |\secdef|\meta{unstarcmds}\meta{starcmds}
%
% \begin{description}
% \item[\meta{unstarcmds}] Used for the normal form of the
% sectioning command.
% \item[\meta{starcmds}] Used for the $*$-form of the
% sectioning command.
% \end{description}
%
% You can use |\secdef| as follows:
% \begin{verbatim}
% \def\chapter { ... \secdef \CMDA \CMDB }
% \def\CMDA [#1]#2{ ... } % Command to define
% % \chapter[...]{...}
% \def\CMDB #1{ ... } % Command to define
% % \chapter*{...}
% \end{verbatim}
%
% \subsubsection{Overview}
%
% ISO terminology uses `clause' instead of the typical terms for
% subdivisions in a document, although they do use the term `section'.
% Accordingly, we have defined new terms for the document sectioning
% commands. We also use the shorthand `ss' for `subsub', and so on.
%
% \begin{center}
% \begin{tabular}{ll}\hline
% \LaTeX\ & ISO \\ \hline
% part & section \\
% chapter & clause \\
% section & sclause \\
% subsection & ssclause \\
% subsubsection & sssclause \\
% paragraph & ssssclause \\
% subparagraph & sssssclause \\ \hline
% \end{tabular}
% \end{center}
%
% We also provide `annex' commands, which are equivalent to a `clause'
% command.
%
%
% \subsubsection{Define Counters}
%
% \begin{macro}{\c@secnumdepth}
% The value of the counter \Lcount{secnumdepth} gives the depth of
% the highest-level sectioning command that is to produce section
% numbers.
% \begin{macrocode}
\setcounter{secnumdepth}{6}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@annex}
% \begin{macro}{\c@section}
% \begin{macro}{\c@clause}
% \begin{macro}{\c@sclause}
% \begin{macro}{\c@ssclause}
% \begin{macro}{\c@sssclause}
% \begin{macro}{\c@ssssclause}
% \begin{macro}{\c@sssssclause}
% These counters are used for the sectioning numbers. The macro\\
% |\newcounter{|\meta{newctr}|}[|\meta{oldctr}|]|\\
% defines\meta{newctr} to be a counter, which is reset to zero when
% counter \meta{oldctr} is stepped. Counter \meta{oldctr} must
% already be defined.
%
% \begin{macrocode}
\newcounter{annex}
\newcounter{section}
% \end{macrocode}
% If the \Lopt{sect} option has been chosen, clauses get reset by
% sections, otherwise a clause is the highest level document division.
% \begin{macrocode}
\if@usesect
\newcounter{clause}[section]
\else
\newcounter{clause}
\fi
\newcounter{sclause}[clause]
\newcounter{ssclause}[sclause]
\newcounter{sssclause}[ssclause]
\newcounter{ssssclause}[sssclause]
\newcounter{sssssclause}[ssssclause]
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\theannex}
% \begin{macro}{\thesection}
% \begin{macro}{\theclause}
% \begin{macro}{\thesclause}
% \begin{macro}{\thessclause}
% \begin{macro}{\thesssclause}
% \begin{macro}{\thessssclause}
% \begin{macro}{\thesssssclause}
% For any counter \Lcount{CTR}, |\theCTR| is a macro that defines
% the printed version of counter \Lcount{CTR}. It is defined in
% terms of the following macros:
%
% |\arabic{|\Lcount{COUNTER}|}| prints the value of
% \Lcount{COUNTER} as an arabic numeral.
%
% |\roman{|\Lcount{COUNTER}|}| prints the value of
% \Lcount{COUNTER} as a lowercase roman numeral.
%
% |\Roman{|\Lcount{COUNTER}|}| prints the value of
% \Lcount{COUNTER} as an uppercase roman numeral.
%
% |\alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
% as a lowercase letter: $1 =$~a, $2 =$~ b, etc.
%
% |\Alph{|\Lcount{COUNTER}|}| prints the value of \Lcount{COUNTER}
% as an uppercase letter: $1 =$~A, $2 =$~B, etc.
%
% \begin{macrocode}
\renewcommand{\theannex}{\Alph{annex}}
\if@usesect
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\theclause}{\thesection.\arabic{clause}}
\else
\renewcommand{\theclause}{\arabic{clause}}
\fi
\renewcommand{\thesclause}{\theclause.\arabic{sclause}}
\renewcommand{\thessclause}{\thesclause.\arabic{ssclause}}
\renewcommand{\thesssclause}{\thessclause.\arabic{sssclause}}
\renewcommand{\thessssclause}{\thesssclause.\arabic{ssssclause}}
\renewcommand{\thesssssclause}{\thessssclause.\arabic{sssssclause}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \subsubsection{Sections}
%
% The command to start a new section of our document.
%
% \begin{macro}{\section}
% We only permit sections with the \Lopt{sect} option.
% \begin{macrocode}
\if@usesect
\newcommand{\section}{\par
\addvspace{5ex}
\@afterindentfalse
\secdef\@sec\@ssec}
\else
\newcommand{\section}[1]{}
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sec}
% \begin{macro}{\@ssec}
% These commands are used to typeset the section heading for the
% normal and starred versions of the |\section| command. The section
% title is centered and all but the first section starts a new page.
%
% |\@sec| processes the unstarred version of the |\section|.
% \begin{macrocode}
\def\@sec[#1]#2{\refstepcounter{section}%
\def\secmark{\begin{center}%
% {\Cfont\bfseries \sectionname~\thesection\space : #2}%
% {\Cfont\bf \sectionname~\thesection\space : #2}%
\end{center}\par\nobreak\addvspace{5ex}}%
\def\sectoc{\tocskip{\tocentryskip}\addcontentsline{toc}{section}%
{\sectionname~\thesection\space : \hspace{1em}#1}}%
\ifnum\value{section}>1\clearpage\fi%
\sectoc%
% \secmark%
\if@twocolumn
\twocolumn[\secmark]
\else
\secmark
\fi
\typeout{Section: #2}}
% \end{macrocode}
% |\@ssec| process the starred version of the |\section|.
% \begin{macrocode}
\def\@ssec#1{%
\def\secmark{\begin{center}%
% {\Cfont\bfseries #1}%
% {\Cfont\bf #1}%
\par\addvspace{5ex}\end{center}}%
% \ifone@column\newpage\secmark\else%
% \if@verride\newpage\secmark\else%
% \twocolumn[\secmark]\fi\fi%
% \tocskip{\tocentryskip}%
% \addcontentsline{toc}{section}{#1}
\ifnum\value{section}>1\clearpage\fi%
\if@twocolumn
\twocolumn[\secmark]
\else
\secmark
\fi
\typeout{Section: #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \subsubsection{Clauses}
%
% \begin{macro}{\clause}
%
% This is very similar to the |\section| command.
% \begin{macrocode}
\newcommand{\clause}{\par
\addvspace{5ex}
\@afterindentfalse
\secdef\@clause\@sclause}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@clause}
% \begin{macro}{\@sclause}
% These are the commands that actually do the processing of the
% |\clause| command.
%
% The |\@clause| command process the unstarred version.
% \begin{macrocode}
\def\@clause[#1]#2{\refstepcounter{clause}
\tocskip{\tocentryskip}
\addcontentsline{toc}{clause}{\theclause\hspace{1em}#1}
% {\Cfont\bfseries \theclause\space\space #2}%
% {\Cfont\bf \theclause\space\space #2}%
\par\nobreak\addvspace{5ex}
\typeout{Clause: #2}}
% \end{macrocode}
% The |\@sclause| command process the starred version. At one time this should
% have been added to the table of contents.
% \begin{macrocode}
\def\@sclause#1{%
% \tocskip{\tocentryskip}
% \addcontentsline{toc}{clause}{#1}
% {\Cfont\bfseries #1}%
% {\Cfont\bf #1}%
\par\nobreak\addvspace{5ex}
\typeout{Clause: #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Lower level headings}
%
% These commands all make use of |\@startsection|. They also
% reinitialize the note counter.
% \begin{macro}{\sclause}
% \begin{macro}{\ssclause}
% \begin{macro}{\sssclause}
% \begin{macro}{\ssssclause}
% \begin{macro}{\sssssclause}
% \begin{macrocode}
\newcommand{\sclause}{\setcounter{note}{0}
\@startsection{sclause}{2}%
{\z@}%
{2.5ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
% {\Cfont\bfseries}}
% {\Cfont\bf}}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\ssclause}{\setcounter{note}{0}
\@startsection{ssclause}{3}%
{\z@}%
{2.5ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
% {\Cfont\bfseries}}
% {\Cfont\bf}}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\sssclause}{\setcounter{note}{0}
\@startsection{sssclause}{4}%
{\z@}%
{2.5ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
% {\Cfont\bfseries}}
% {\Cfont\bf}}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\ssssclause}{\setcounter{note}{0}
\@startsection{ssssclause}{5}%
{\z@}%
{2.5ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
% {\Cfont\bfseries}}
% {\Cfont\bf}}
% \end{macrocode}
%
% \begin{macrocode}
\newcommand{\sssssclause}{\setcounter{note}{0}
\@startsection{sssssclause}{6}%
{\z@}%
{2.5ex \@plus 1ex \@minus .2ex}%
{1.5ex \@plus .2ex}%
% {\Cfont\bfseries}}
% {\Cfont\bf}}
% \end{macrocode}
% Preloaded definitions.
% \begin{macrocode}
\def\clausemark#1{}
\def\sclausemark#1{}
\def\ssclausemark#1{}
\def\sssclausemark#1{}
\def\ssssclausemark#1{}
\def\sssssclausemark#1{}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Annexes}
%
% \begin{macro}{\@nnex}
% As an annex command has to do quite a lot, we define the internal
% |\@nnex| command as a worker. It has to:
% \begin{itemize}
% \item clear the page
% \item reset the table and figure counters to zero
% \item redefine the |\thefigure| and the |\thetable| to precede them
% with the annex letter
% \item reset the |sclause| counter to zero
% \item test for annexes I and O since these are not allowed by ISO.
% \end{itemize}
% \begin{macrocode}
\newcommand{\@nnex}[2]{%
\clearpage
% \end{macrocode}
% Reset the counters and test for illegal annex numbering
% \begin{macrocode}
\setcounter{table}{0}
\setcounter{figure}{0}
\setcounter{sclause}{0}
\refstepcounter{annex}
\ifnum\value{annex}=9 \refstepcounter{annex}\fi
\ifnum\value{annex}=15 \refstepcounter{annex}\fi
% \end{macrocode}
% Reset the numbering scheme when first called.
% \begin{macrocode}
\ifnum\value{annex}=1
\tocskip{\tocentryskip}
\addtocontents{toc}{\string\hbox\space to\string\textwidth%
% {\string\bfseries\space \listannexname\string\hfil}}
% {\string\bf\space \listannexname\string\hfil}}
\renewcommand{\clause}{%
\typeout{clause commands are not allowed after starting Annexes}}
\renewcommand{\thesclause}{\theannex.\arabic{sclause}}
\renewcommand{\thetable}{\theannex.\arabic{table}}
\renewcommand{\thefigure}{\theannex.\arabic{figure}}
\fi
% \end{macrocode}
% Add to the toc and print the annex number centered.
% \begin{macrocode}
\addcontentsline{toc}{clause}{\ifnum2>\c@secnumdepth \else
\protect\numberline{\theannex}\fi #1}
\begin{center}%
% {\Cfont{\bfseries \annexname~\theannex}}\\
% {\Cfont{\bf \annexname~\theannex}}\\
#2
\end{center}
\vskip 0.5\baselineskip}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\infannex}
% \begin{macro}{\normannex}
% \begin{macro}{\repannex}
% Three kinds of annexes are provided. |\infannex| is an informative
% annex and |\normannex| is a normative annex. Just to round things
% out, |\repannex| is neither of these.
%
% All the titles are centered, together with the kind of annex.
%
% Here is the informative annex command.
% \begin{macrocode}
\newcommand{\infannex}[1]{\@nnex{#1}%
{\lowercase{(\informativename)}}%
% \begin{center} {\Cfont\bfseries #1} \end{center}\vskip\baselineskip
% \begin{center} {\Cfont\bf #1} \end{center}\vskip\baselineskip
\typeout{Informative annex: #1}}
% \end{macrocode}
% Here is the normative annex command.
% \begin{macrocode}
\newcommand{\normannex}[1]{\@nnex{#1}%
{\lowercase{(\normativename)}}%
% \begin{center} {\Cfont\bfseries #1} \end{center}\vskip\baselineskip
% \begin{center} {\Cfont\bf #1} \end{center}\vskip\baselineskip
\typeout{Normative annex: #1}}
% \end{macrocode}
% Here is the other annex command.
% \begin{macrocode}
\newcommand{\repannex}[1]{\@nnex{#1}{}%
% \begin{center} {\Cfont\bfseries #1} \end{center}\vskip\baselineskip
% \begin{center} {\Cfont\bf #1} \end{center}\vskip\baselineskip
\typeout{Annex: #1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Lists}
%
% \subsubsection{General List Parameters}
%
% The following commands are used to set the default values for the list
% environment's parameters. See the \LaTeX{} manual for an explanation
% of the meanings of the parameters. Defaults for the list
% environment are set as follows. First, |\rightmargin|,
% |\listparindent| and |\itemindent| are set to 0pt. Then, for a Kth
% level list, the command |\@listK| is called, where `K' denotes `i',
% '`i', ... , `vi'. (I.e., |\@listiii| is called for a third-level
% list.) By convention, |\@listK| should set |\leftmargin| to
% |\leftmarginK|.
%
% \begin{macro}{\leftmargin}
% \begin{macro}{\leftmargini}
% \begin{macro}{\leftmarginii}
% \begin{macro}{\leftmarginiii}
% \begin{macro}{\leftmarginiv}
% \begin{macro}{\leftmarginv}
% \begin{macro}{\leftmarginvi}
% For efficiency, level-one list's values are defined at top level, and
% |\@listi| is defined to set only |\leftmargin|.
%
% \begin{macrocode}
\setlength\leftmargini {1.5em}
\setlength\leftmarginii {1.5em}
\setlength\leftmarginiii {1.5em}
\setlength\leftmarginiv {1.5em}
\setlength\leftmarginv {1.5em}
\setlength\leftmarginvi {1.5em}
% \end{macrocode}
% Here we set the top level leftmargin.
% \begin{macrocode}
\setlength\leftmargin {\leftmargini}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelsep}
% \begin{macro}{\labelwidth}
% |\labelsep| is the distance between the label and the text of an
% item; |\labelwidth| is the width of the label.
% \begin{macrocode}
\setlength\labelsep {1em}
\setlength\labelwidth{\z@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\partopsep}
% When the user leaves a blank line before the environment an extra
% vertical space of |\partopsep| is inserted, in addition to
% |\parskip| and |\topsep|.
% \begin{macrocode}
\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@beginparpenalty}
% \begin{macro}{\@endparpenalty}
% These penalties are inserted before and after a list or paragraph
% environment. They are set to a bonus value to encourage page
% breaking at these points.
% \begin{macro}{\@itempenalty}
% This penalty is inserted between list items.
% \begin{macrocode}
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@listI}
% \begin{macro}{\@listi}
% |\@listI| defines top level and |\@listi| values of
% |\leftmargin|, |\parsep|, |\topsep|, and |\itemsep|
%
% \begin{macrocode}
\def\@listI{\leftmargin\leftmargini
\parsep\baselineskip
\topsep 0\p@ \@plus1\p@ \@minus1\p@
\itemsep0\p@ \@plus1\p@ \@minus1\p@}
\let\@listi\@listI
% \end{macrocode}
% We have to initialise these parameters.
% \begin{macrocode}
\@listi
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@listii}
% \begin{macro}{\@listiii}
% \begin{macro}{\@listiv}
% \begin{macro}{\@listv}
% \begin{macro}{\@listvi}
% Here are the same macros for the lower level lists.
% \begin{macrocode}
\def\@listii {\leftmargin\leftmarginii
\itemindent\leftmarginii}
\def\@listiii{\leftmargin\leftmarginiii
\itemindent\leftmarginiii}
\def\@listiv {\leftmargin\leftmarginiv
\itemindent\leftmarginiv}
\def\@listv {\leftmargin\leftmarginv
\itemindent\leftmarginv}
\def\@listvi {\leftmargin\leftmarginvi
\itemindent\leftmarginvi}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Enumerate}
%
% ISO only requires two levels of enumeration labelled `a)' and
% `1)'. We include a third level, labelled `i)', just in case.
% ISO has printed ISO 10303:1994 which includes all three levels
% defined here.
% The enumerate environment uses three counters: \Lcount{enumi},
% \Lcount{enumii} and \Lcount{enumiii}, where
% \Lcount{enumN} controls the numbering of the Nth level
% enumeration.
%
% \begin{macro}{\theenumi}
% \begin{macro}{\theenumii}
% \begin{macro}{\theenumiii}
% The counters are already defined in \file{latex.dtx}, but their
% representation is changed here.
%
% \begin{macrocode}
\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\theenumii}{\arabic{enumii}}
\renewcommand{\theenumiii}{\roman{enumiii}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\labelenumi}
% \begin{macro}{\labelenumii}
% \begin{macro}{\labelenumiii}
% The label for each item is generated by the commands\\
% |\labelenumi| \ldots\ |\labelenumiv|.
% \begin{macrocode}
\newcommand{\labelenumi}{\theenumi)}
\newcommand{\labelenumii}{\theenumii)}
\newcommand{\labelenumiii}{\theenumiii)}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\p@enumii}
% \begin{macro}{\p@enumiii}
% The expansion of |\p@enumN||\theenumN| defines the output of a
% |\ref| command when referencing an item of the Nth level of an
% enumerated list.
% \begin{macrocode}
\renewcommand{\p@enumii}{\theenumi}
\renewcommand{\p@enumiii}{\p@enumii\theenumii}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{environment}{enumerate}
% We modify the default |enumerate| environment to take account
% of only having three levels.
% \begin{macrocode}
\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
\advance\@enumdepth \@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}
\list{\csname label\@enumctr\endcsname}{\usecounter
{\@enumctr}\def\makelabel##1{##1}}\fi}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Itemize}
%
% ISO only requires one level labelled with a dash. We provide
% three levels, which have been used in ISO 10303:1994.
%
% \begin{macro}{\labelitemi}
% \begin{macro}{\labelitemii}
% \begin{macro}{\labelitemiii}
% Itemization is controlled by three commands: |\labelitemi|,
% |\labelitemii|, and |\labelitemiii|, which define
% the labels of the various itemization levels: the symbols used are
% bold en-dash, bullet, and asterisk.
%
% \begin{macrocode}
%\newcommand{\labelitemi}{{\normalfont\bfseries --}}
%\newcommand{\labelitemi}{{\bf --}}
\newcommand{\labelitemii}{$\m@th\bullet$}
\newcommand{\labelitemiii}{$\m@th\ast$}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{itemize}
% We modify the default |itemize| environment to take account
% of only having three levels.
% \begin{macrocode}
\def\itemize{\ifnum \@itemdepth >3 \@toodeep\else
\advance\@itemdepth \@ne
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
\list{\csname\@itemitem\endcsname}%
{\labelwidth\z@\def\makelabel##1{##1}}\fi}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Description}
%
% \begin{environment}{description}
% The description environment is defined here -- while the default itemize
% and enumerate environments are defined in \file{latex.dtx}.
%
% \begin{macrocode}
\newenvironment{description}%
{\list{}{\labelwidth\z@ \itemindent 0.5em \labelsep 0.5em
\let\makelabel\descriptionlabel}}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\descriptionlabel}
% To change the formatting of the label, you must redefine
% |\descriptionlabel|. Note that the label includes a colon.
%
% \begin{macrocode}
%\newcommand*{\descriptionlabel}[1]{\normalfont\bfseries #1:\hfill}
%\def\descriptionlabel#1{{\bf #1:\hfill}}
% \end{macrocode}
% \end{macro}
%
% \subsection{Defining new environments}
%
%
% \subsubsection{Quotation}
%
% This is not required by ISO, but we leave it in anyway.
% \begin{environment}{quotation}
% The quotation environment is defined by making clever use of
% the list environment's parameters. The lines in the environment
% are set smaller than |\textwidth|. The first line of a paragraph
% inside this environment is indented.
%
% \begin{macrocode}
\newenvironment{quotation}%
{\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item[]}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Quote}
%
% This is also not an ISO requirement, but leave it in anyway.
%
% \begin{environment}{quote}
% The quote environment is like the quotation environment except
% that paragraphs are not indented.
%
% \begin{macrocode}
\newenvironment{quote}%
{\list{}{\rightmargin\leftmargin}%
\item[]}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Theorem}
%
% This document class does not define it's own theorem environments,
% the defaults, supplied by \file{latex.dtx} are available.
%
% \subsubsection{Notes}
%
% ISO requires that information which is essential to the
% understanding of a standard but which is not a requirement
% is to be given in the form of a note. There are three
% styles of note:
% \begin{enumerate}
% \item isolated notes which are marked NOTE - 1, NOTE - 2, etc.
% \item a local grouping of notes marked \\
% NOTES \\
% 1 - \ldots \\
% 2 - \ldots
% \item an isolated note that is not numbered because it is
% the only one in that (sub-) clause of the document.
% \end{enumerate}
%
% \begin{macro}{\ifinfloat}
% \begin{macro}{\ifintable}
% Special consideration has to be given when notes appear within a float.
% \begin{macrocode}
\newif\ifinfloat\infloatfalse
\newif\ifintable\intablefalse
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\c@note}
% \begin{macro}{\c@floatnote}
% \begin{macro}{\thenote}
% \begin{macro}{\thefloatnote}
% Define note counters, where the counter \Lcount{note} for body
% notes gets reset within each new clause and notes
% within floats have their own numbering scheme via \L{floatnote}.
% \begin{macrocode}
\newcounter{note}[clause]
\renewcommand{\thenote}{\arabic{note}}
\newcounter{floatnote}
\renewcommand{\thefloatnote}{\arabic{floatnote}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\oldlabelsep}
% \begin{macro}{\notelabel}
% Labeling of notes (and examples).
% \begin{macrocode}
\newdimen\oldlabelsep
\newcommand{\notelabel}[1]{{#1\hfill}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{environment}{notes}
% This environment produces a fixed heading followed by a
% numbered list. The environment is defined in terms of a general list.
%
% Use as:
% \begin{verbatim}
% \begin{notes}
% \begin{note}Text of first note ... \end{note}
% \begin{note}Text of second note ... \end{note}
% \end{notes}
% \end{verbatim}
%
% \begin{macro}{\ifinnotes}
% A flag that is set when we are in the |notes| environment.
% \begin{macrocode}
\newif\ifinnotes\innotesfalse
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\newenvironment{notes}{\list{}%
% \end{macrocode}
% adjust the list parameters depending on where the environment appears.
% \begin{macrocode}
{\ifintable \leftmargin 0em \else \leftmargin 2em\fi
\itemindent 0.5em \labelwidth 0em
\labelsep 0.5em \listparindent 0em
\let\makelabel\notelabel}
% \end{macrocode}
% Print the header.
% \begin{macrocode}
\innotestrue
\Nfont\item[\notesname]\mbox{}\nopagebreak[2]}%
% \end{macrocode}
% Finish off the environment.
% \begin{macrocode}
{\innotesfalse\endlist}
% \end{macrocode}
% \end{environment}
%
%
% \begin{environment}{anote}
% An isolated un-numbered note.
% \begin{macrocode}
\newenvironment{anote}{\list{}{%
\itemindent 0.5em
\ifintable \leftmargin 0em \else \leftmargin 2em \fi
\labelwidth 0em \labelsep 0.5em \listparindent 0em}
\Nfont\item[\notename~--]}{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{note}
% A numbered note.
% \begin{macrocode}
\newenvironment{note}{\list{}{%
% \end{macrocode}
% Use the appropriate counter: normally \Lcount{note} but
% \Lcount{floatnote} when in a floating environment.
% \begin{macrocode}
\ifinfloat
\refstepcounter{floatnote}
\let\thenote\thefloatnote
\else
\refstepcounter{note}
\fi
% \end{macrocode}
% Adjust margins acoording to surrounding environment
% \begin{macrocode}
\ifinnotes
\itemindent 0.5em \leftmargin 0em
\labelwidth 0em \labelsep 0.5em \listparindent 0em
\else
\itemindent 0.5em \leftmargin 2em
\labelwidth 0em \labelsep 0.5em \listparindent 0em
\fi}
\ifinnotes
\Nfont\item[\thenote~--]
\else
\Nfont\item[\notename~\thenote~--]
\fi}{\endlist}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Examples}
%
% ISO Directives part 3 has no rules on how to display an example of
% use but it does use examples itself; these examples are displayed
% in a format similar to notes.
%
% We provide two styles of example:
% \begin{enumerate}
% \item isolated examples which are marked EXAMPLE - 1, EXAMPLE - 2, etc.
% \item a local grouping of examples marked \\
% EXAMPLES \\
% 1 - \ldots \\
% 2 - \ldots
% \end{enumerate}
%
% Implementation is very similar to that for notes.
%
% \begin{macro}{\c@example}
% \begin{macro}{\theexample}
% Define example counter. Example numbering is continuous
% throughout the document.
% \begin{macrocode}
\newcounter{example}
\renewcommand{\theexample}{\arabic{example}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ifinexamples}
% A flag that is set when we are in the |examples| environment.
% \begin{macrocode}
\newif\ifinexamples\inexamplesfalse
% \end{macrocode}
% \end{macro}
%
%
% \begin{environment}{examples}
% This environment produces a fixed heading followed by a
% numbered list. The environment is defined in terms of a general list.
%
% Use as:
% \begin{verbatim}
% \begin{examples}
% \begin{example}Text of first ...\end{example}
% \begin{example}Text of second ... \end{example}
% \end{examples}
% \end{verbatim}
%
% \begin{macrocode}
\newenvironment{examples}{\list{}%
{\leftmargin 2em
\itemindent 0.5em \labelwidth 0em
\labelsep 0.5em \listparindent 0em
\let\makelabel\notelabel}
\inexamplestrue
\Nfont\item[\examplesname]\mbox{}\nopagebreak[2]}%
{\inexamplesfalse\endlist}
% \end{macrocode}
% \end{environment}
%
%
% \begin{environment}{example}
% Like the |note| environment.
% \begin{macrocode}
\newenvironment{example}{\list{}{%
\refstepcounter{example}
\ifinexamples
\itemindent 0.5em \leftmargin 0em
\labelwidth 0em \labelsep 0.5em \listparindent 0em
\else
\itemindent 0.5em \leftmargin 2em
\labelwidth 0em \labelsep 0.5em \listparindent 0em
\fi}
\ifinexamples
\Nfont\item[\theexample~--]
\else
\Nfont\item[\examplename~\theexample~--]
\fi}{\endlist}
% \end{macrocode}
% \end{environment}
%
% \subsubsection{Listing of references}
%
% ISO has three kinds of literature references, broken into two
% categories. The categories are normative and informative
% references. Within the normative category, references are
% to either published or `unpublished' standards (IS or DIS
% in ISO terminology).
%
% \begin{environment}{nreferences}
%
% The |nreferences| environment is for listing normative
% references. It is implemented as a list.
%
% \begin{macro}{\nreferencelabel}
% Labelling of normative references.
% \begin{macrocode}
\newcommand{\nreferencelabel}[1]{#1,\hfill}
% \end{macrocode}
% \end{macro}
% Define the environment. It is used as:
% \begin{verbatim}
% \begin{nreferences}
% \isref{id}{published standard title}
% \disref{id}{unpublished standard title}
% ....
% \end{nreferences}
% \end{verbatim}
% \begin{macrocode}
\newenvironment{nreferences}{\list{}%
{\leftmargin 0pt \itemindent 0.5em
\labelwidth\z@ \labelsep 0.5em
\let\makelabel\nreferencelabel}}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\isref}
% This is a two parameter command for printing a normative reference to
% a published standard.
% \begin{macrocode}
%\newcommand{\isref}[2]{\item[#1]{\itshape #2}}
%\newcommand{\isref}[2]{\item[#1]{\it #2}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\disref}
% This is a two parameter command for printing a normative reference to
% an unpublished standard. ISO requires that each unpublished standard
% should be footnoted as `unpublished'. Awkwardly, only one footnote
% is permitted. This means we have to fiddle with the footnote counter.
% \begin{macro}{\c@discount}
% \begin{macro}{\ifd@is}
% A counter for footnoting DIS references and a flag to tell if there
% are any.
% \begin{macrocode}
\newcounter{discount}
\newif\ifd@is\d@isfalse
% \end{macrocode}
% \end{macro}
% \end{macro}
% Now define the |\disref| command.
% \begin{macrocode}
\newcommand{\disref}[2]{\begingroup
\ifd@is
% \end{macrocode}
% This is not the first call to |\disref|, so just footnotemark the entry
% \begin{macrocode}
% {\item[#1\protect\@footnotemark]{\itshape #2}}
% {\item[#1\protect\@footnotemark]{\it #2}}
\else
% \end{macrocode}
% This is the first call, so we have to make the footnote
% \begin{macrocode}
\addtocounter{footnote}{1}
\setcounter{discount}{\value{footnote}}
\xdef\@thefnmark{\thediscount)}
% \item[#1\protect\@footnotemark]{\itshape #2}%
% \item[#1\protect\@footnotemark]{\it #2}%
\footnotetext[\value{discount}]{\tbpname}
\d@istrue
\fi
\endgroup\d@istrue}
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{references}
%
% The |references| environment is for listing informative
% references. It is implemented as a list.
%
% \begin{macro}{\c@infrefctr}
% \begin{macro}{\p@infrefctr}
% \begin{macro}{\theinfrefctr}
% \begin{macro}{\labelinfref}
% Informative references are labelled with a number enclosed in
% square brackets.
%
% In the body of the text, a reference to an informatively
% listed document |n| has to be printed as |[n]|. Use the
% standard \LaTeX\ |\label| command and the|\bref| command for this.
% \begin{macrocode}
\newcounter{infrefctr}
\renewcommand{\p@infrefctr}{}
\renewcommand{\theinfrefctr}{\arabic{infrefctr}}
\newcommand{\labelinfref}{[\arabic{infrefctr}]}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% Define the environment. It is used as:
% \begin{verbatim}
% \begin{references}
% \reference{authors}{title}{publisher and date}
% ....
% \end{references}
% \end{verbatim}
% \begin{macrocode}
\newenvironment{references}{\list{\labelinfref}{\usecounter{infrefctr}
\leftmargin 0pt \itemindent 0.5em
\labelwidth\z@ \labelsep 0.5em}}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\reference}
% This is a three parameter command for printing an informatively
% listed reference document. \\
% |\reference{|\meta{authors}|}{|\meta{title}|}{|\meta{publisher and date}|}|
% \begin{macrocode}
%\newcommand{\reference}[3]{\item {#1} {{\itshape #2}} {#3}}
%\newcommand{\reference}[3]{\item {#1} {{\it #2}} {#3}}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Listing of definitions}
%
% One element of an ISO standard is the listing of definitions
% of terms.
%
% \begin{environment}{olddefinitions}
% The |olddefinitions| environment is for listing terms which
% have been defined in some other standard. It is defined
% in terms of the |itemize| environment.
% \begin{macrocode}
\newenvironment{olddefinitions}%
{\begin{itemize}}%
{\end{itemize}}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\olddefinition}
% Within an |olddefinitions| environment each term is specified by
% the \\
% |\olddefinition{|\meta{phrase}|}{|\meta{optional text}|}|
% command. In fact, though, the second parameter is ignored and
% is only there for compatibility reasons.
% \begin{macrocode}
\long\def\olddefinition#1#2{\item #1}
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{definitions}
% Terms being defined within the current document are listed within
% the |definitions| environment. ISO requires that each definition
% be sequentially numbered within the clause in which it is defined.
% This numbering is as though the definition formed a sub-clause.
% \begin{macro}{\c@defmark}
% A counter for labeling a definition.
% \begin{macrocode}
\newcounter{defmark}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\definitionlabel}
% The label for a definitions list.
% \begin{macrocode}
\newcommand{\definitionlabel}[1]{%
% {\bfseries{\refstepcounter{defmark}\thedefmark} #1:}}
% {\bf{\refstepcounter{defmark}\thedefmark} #1:}}
% \end{macrocode}
% \end{macro}
% Now we define the |definitions| list environment.
% \begin{macrocode}
\newenvironment{definitions}{\list{}%
{\leftmargin 0pt \labelwidth 0pt
\itemindent 0.5em \labelsep 0.5em
\let\makelabel\definitionlabel
% \end{macrocode}
% The form of the label counter depends on which clause level
% it appears in.
% \begin{macrocode}
\ifnum\value{sclause}=0
\def\thedefmark{\theclause.\arabic{defmark}}
\else
\def\thedefmark{\thesclause.\arabic{defmark}}
\fi}}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\definition}
% Within a |definitions| environment the command
% |\definition{|\meta{phrase}|}{|\meta{definition text}|}|
% is used to specify and define each term.
% \begin{macrocode}
\long\def\definition#1#2{\item[#1] #2 %
% \end{macrocode}
% Add the definition to the table of contents at the appropriate level.
% \begin{macrocode}
\ifnum\value{sclause}=0
\addcontentsline{toc}{sclause}{%
\protect\numberline{\thedefmark}{#1}}
\else
\addcontentsline{toc}{ssclause}{%
\protect\numberline{\thedefmark}{#1}}
\fi}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Listing of symbols and abbreviations}
%
% Another possible element in a standard is the listing of symbols
% and abbreviations. This is similar to the |definitions|
% listing, except that terms are not treated as clauses.
%
% \begin{environment}{symbols}
% \begin{macro}{\symbollabel}
% \begin{macrocode}
\newcommand{\symbollabel}[1]{{#1 \hfill}}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\newenvironment{symbols}{\list{}%
{\itemindent 0em \leftmargin 8em
\labelsep 1em \labelwidth 5em
\let\makelabel\symbollabel}}%
{\endlist}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\symbol}
% Within a |symbols| environment the command
% |\symbol{|\meta{symbol}|}{|\meta{meaning}|}|
% is used to specify and explain each symbol or abbreviation.
% \begin{macrocode}
\long\def\symbol#1#2{\item[#1] #2}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Listing of scope items}
%
% Another possible element in a standard is the listing of
% items that are within the scope; conversely, listing
% of items that are out of scope may also be useful.
%
% \begin{environment}{inscope}
% \begin{environment}{outofscope}
% We define synonyms for the |itemize| list environment, and
% initiate the lists with some boilerplate. Use as, for example:
% \begin{verbatim}
% \begin{inscope}{international standard}
% \item ...
% \item ...
% \end{inscope}
% \end{verbatim}
% \begin{macrocode}
\newenvironment{inscope}[1]{%
\inscopename #1:
\begin{itemize}}%
{\end{itemize}}
\newenvironment{outofscope}[1]{%
\outofscopename #1:
\begin{itemize}}%
{\end{itemize}}
% \end{macrocode}
% \end{environment}
% \end{environment}
%
%
% \subsection{Setting parameters for existing environments}
%
% \subsubsection{Array and tabular}
%
% \begin{macro}{\arraycolsep}
% The columns in an array environment are separated by
% 2|\arraycolsep|.
% \begin{macrocode}
\setlength\arraycolsep{4\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tabcolsep}
% The columns in an tabular environment are separated by
% 2|\tabcolsep|.
% \begin{macrocode}
\setlength\tabcolsep{4\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\arrayrulewidth}
% The width of rules in the array and tabular environments is given
% by\\ |\arrayrulewidth|.
% \begin{macrocode}
\setlength\arrayrulewidth{.4\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\doublerulesep}
% The space between adjacent rules in the array and tabular
% environments is given by |\doublerulesep|.
% \begin{macrocode}
\setlength\doublerulesep{2\p@}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Tabbing}
%
% \begin{macro}{\tabbingsep}
% This controls the space that the |\'| command puts in. (See
% \LaTeX{} manual for an explanation.)
% \begin{macrocode}
\setlength\tabbingsep{\labelsep}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Minipage}
%
% \begin{macro}{\@minipagerestore}
% The macro |\@minipagerestore| is called upon entry to a minipage
% environment to set up things that are to be handled differently
% inside a minipage environment. In the current styles, it does
% nothing.
% \end{macro}
%
% \begin{macro}{\@mpfootins}
% Minipages have their own footnotes; |\skip||\@mpfootins| plays
% same r\^ole for footnotes in a minipage as |\skip||\footins| does
% for ordinary footnotes.
%
% \begin{macrocode}
\skip\@mpfootins = \skip\footins
% \end{macrocode}
% \end{macro}
%
% \subsubsection{Framed boxes}
%
% \begin{macro}{\fboxsep}
% The space left by |\fbox| and |\framebox| between the box and the
% text in it.
% \begin{macro}{\fboxrule}
% The width of the rules in the box made by |\fbox| and |\framebox|.
% \begin{macrocode}
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Equation and eqnarray}
%
% |equation| and |eqnarray| counters are not required by ISO, and
% the equations are to be left-justified. The default is for the
% left-hand side of equations to be flushleft.
% \begin{macro}{\theequation}
% The equation counter will be reset at beginning of a new chapter
% and the equation number will be prefixed by the chapter number.
%
% This code must follow the |\chapter| definition, or more exactly
% the definition of the chapter counter.
% \begin{macrocode}
\renewcommand{\theequation}{\arabic{equation}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\jot}
% |\jot| is the extra space added between lines of an eqnarray
% environment. The default value is used.
% \begin{macrocode}
% \setlength\jot{3pt}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@eqnnum}
% The macro |\@eqnnum| defines how equation numbers are to appear in
% equations. Again the default is used.
%
% \begin{macrocode}
% \def\@eqnnum{(\theequation)}
% \end{macrocode}
% \end{macro}
%
% \subsection{Floating objects}
%
% The file \file{latex.dtx} only defines a number of tools with
% which floating objects can be defined. This is done in the
% document class. It needs to define the following macros for each
% floating object of type \texttt{TYPE} (e.g., \texttt{TYPE} =
% figure).
%
% \begin{description}
% \item[\texttt{\bslash fps@TYPE}]
% The default placement specifier for floats of type
% \texttt{TYPE}.
%
% \item[\texttt{\bslash ftype@TYPE}]
% The type number for floats of type \texttt{TYPE}. Each
% \texttt{TYPE} has associated a unique positive \texttt
% {TYPE} number, which is a power of two. E.g., figures might
% have type number 1, tables type number 2, programs type
% number 4, etc.
%
% \item[\texttt{\bslash ext@TYPE}]
% The file extension indicating the file on which the contents
% list for float type \texttt{TYPE} is stored. For example,
% |\ext@figure| = `lof'.
%
% \item[\texttt{\bslash fnum@TYPE}]
% A macro to generate the figure number for a caption. For
% example, |\fnum@TYPE| == `Figure |\thefigure|'.
%
% \item[\texttt{\bslash @makecaption}{\meta{num}}{\meta{text}}]
% A macro to make a caption, with \meta{num} the value produced
% by |\fnum@...| and \meta{text} the text of the caption. It
% can assume it's in a |\parbox| of the appropriate width.
% This will be used for \emph{all} floating objects.
%
% \end{description}
%
% The actual environment that implements a floating object such as
% a figure is defined using the macros |\@float| and |\end@float|,
% which are defined in \file{latex.dtx}.
%
% An environment that implements a single column floating object is
% started with |\@float{|\texttt{TYPE}|}[|\meta{placement}|]| of type
% \texttt{TYPE} with \meta{placement} as the placement specifier.
% The default value of \meta{PLACEMENT} is defined by |\fps@TYPE|.
%
% The environment is ended by |\end@float|. E.g., |\figure| ==
% |\@float|{figure}, |\endfigure| == |\end@float|.
%
% \subsubsection{Figure}
%
% Here is the implementation of the figure environment.
%
% \begin{macro}{\c@figure}
% First we have to allocate a counter to number the figures. In this
% class figures are numbered sequentially.
% \begin{macrocode}
\newcounter{figure}
\renewcommand{\thefigure}{\@arabic\c@figure}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fps@figure}
% \begin{macro}{\ftype@figure}
% \begin{macro}{\ext@figure}
% \begin{macro}{\fnum@figure}
% Here are the parameters for the floating objects of type `figure'.
% \begin{macrocode}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\iffigs}
% We define a flag to tell whether the document contains any figures.
% Elsewhere a flag, |\ifinfloat|, is defined to tell if we are in a float.
% \begin{macrocode}
\newif\iffigs\figsfalse
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{figure}
% \begin{environment}{figure*}
% And the definition of the actual environment. The form with the
% |*| is used for double column figures.
% \begin{macrocode}
\newenvironment{figure}{%
% \end{macrocode}
% We have to set a flag and do some work to deal with ISO
% requirements for the table of contents.
% \begin{macrocode}
\iffigs\else\figstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\setfigs{%
\string\floatlist{\listfigurename}{lof}}}
\fi
\fi
% \end{macrocode}
% Now deal with the possibility that the float may contain notes.
% \begin{macrocode}
\infloattrue\setcounter{floatnote}{0}
\@float{figure}}%
% \end{macrocode}
% At the end of the environment we are no longer in a float.
% \begin{macrocode}
{\end@float\infloatfalse}
% \end{macrocode}
% The starred version is similar.
% \begin{macrocode}
\newenvironment{figure*}{%
\iffigs\else\figstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\setfigs{%
\string\floatlist{\listfigurename}{lof}}}
\fi
\fi
\infloattrue\setcounter{floatnote}{0}
\@dblfloat{figure}}%
{\end@dblfloat\infloatfalse}
% \end{macrocode}
% \end{environment}
% \end{environment}
%
% \subsubsection{Table}
%
% Here is the implementation of the table environment. It is very
% much the same as the figure environment, the additional complication
% being that we have to flag that we are in a table, as well as
% being in a float.
%
% \begin{macro}{\c@table}
% First we have to allocate a counter to number the tables. In this
% class tables are numbered sequentially.
% \begin{macrocode}
\newcounter{table}
\renewcommand{\thetable}{\@arabic\c@table}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fps@table}
% \begin{macro}{\ftype@table}
% \begin{macro}{\ext@table}
% \begin{macro}{\fnum@table}
% Here are the parameters for the floating objects of type `table'.
% \begin{macrocode}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\iftabs}
% We define a flag to tell whether the document contains any tables.
% Elsewhere a flag, |\ifinfloat|, is defined to tell if we are in a float.
% \begin{macrocode}
\newif\iftabs\tabsfalse
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{table}
% \begin{environment}{table*}
% And the definition of the actual environment. The form with the
% |*| is used for double column tables.
% \begin{macrocode}
\newenvironment{table}{%
\iftabs\else\tabstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\settabs{%
\string\floatlist{\listtablename}{lot}}}
\fi
\fi
\infloattrue\intabletrue\setcounter{floatnote}{0}
\@float{table}}%
{\end@float\infloatfalse\intablefalse}
% \end{macrocode}
% The starred version is similar.
% \begin{macrocode}
\newenvironment{table*}{%
\iftabs\else\tabstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\settabs{%
\string\floatlist{\listtablename}{lot}}}
\fi
\fi
\infloattrue\intabletrue\setcounter{floatnote}{0}
\@dblfloat{table}}%
{\end@dblfloat\infloatfalse\intablefalse}
% \end{macrocode}
% \end{environment}
% \end{environment}
%
% \subsubsection{A bottom float}
%
% We define an additional float environment. Unless something
% additional is done, this will not be listed in the table
% of contents.
%
% \begin{macro}{\c@bottomfloat}
% \begin{macro}{\thebottomfloat}
% First we have to allocate a counter to number the float.
% \begin{macrocode}
\newcounter{bottomfloat}
\renewcommand{\thebottomfloat}{\@arabic\c@bottomfloat}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\fps@bottomfloat}
% \begin{macro}{\ftype@bottomfloat}
% \begin{macro}{\ext@bottomfloat}
% \begin{macro}{\fnum@bottomfloat}
% Here are the parameters for the floating objects of type `bottomfloat'.
% \begin{macrocode}
\def\fps@bottomfloat{b}
\def\ftype@bottomfloat{4}
\def\ext@bottomfloat{lbf}
\def\fnum@bottomfloat{\thebottomfloat}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{bottomfloat}
% \begin{environment}{bottomfloat*}
% And the definition of the actual environment. The form with the
% |*| is used for double column floats.
% \begin{macrocode}
\newenvironment{bottomfloat}%
{\@float{bottomfloat}}%
{\end@float}
\newenvironment{bottomfloat*}%
{\@dblfloat{bottomfloat}}%
{\end@dblfloat}
% \end{macrocode}
% \end{environment}
% \end{environment}
%
%
% \subsubsection{Captions}
%
% \begin{macro}{\@makecaption}
% The |\caption| command calls |\@makecaption| to format the
% caption of floating objects. It gets two arguments,
% \meta{number}, the number of the floating object and \meta{text},
% the text of the caption. Usually \meta{number} contains a string
% such as `Figure 3.2'. The macro can assume it is called inside a
% |\parbox| of right width, with |\normalsize|.
%
% \begin{macro}{\abovecaptionskip}
% \begin{macro}{\belowcaptionskip}
% These lengths contain the amount of white space to leave above
% and below the caption.
% \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{10\p@}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% The definition of this macro is |\long| in order to allow more
% then one paragraph in a caption.
% \begin{macrocode}
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
% \end{macrocode}
% We want to see if the caption fits on one line on the page,
% therefore we first typeset it in a temporary box.
% \begin{macrocode}
% \sbox\@tempboxa{{\bfseries #1 -- #2}}%
% \sbox\@tempboxa{{\bf #1 -- #2}}%
% \end{macrocode}
% We can the measure its width. It that is larger than the current
% |\hsize| we typeset the caption as a centered paragraph.
% \begin{macrocode}
\ifdim \wd\@tempboxa >\hsize
% {\centering {\bfseries #1 -- #2}\par}
% {\centering {\bf #1 -- #2}\par}
% \end{macrocode}
% If the caption fits, we center it. Because this uses an |\hbox|
% directly in vertical mode, it does not execute the |\everypar|
% tokens; the only thing that could be needed here is resetting the
% `minipage flag' so we do this explicitly.
% \begin{macrocode}
\else
\global \@minipagefalse
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\contcaption}
% The |\contcaption| command can be used to put a `continuation'
% caption into a float. It neither increments the float number
% nor makes any entry in the toc listings.
%
% It is called as
% |\contcaption{|\meta{continued/concluded}|}{|\meta{optional text}|}|
% \begin{macrocode}
\newcommand{\contcaption}{\@contcaption\@captype}
% \end{macrocode}
% \begin{macro}{\@contcaption}
% This does the work for us.
% \begin{macrocode}
\long\def\@contcaption#1#2{%
\begingroup
\@parboxrestore
\normalsize
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #2}\par
\endgroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \subsection{Font changing}
%
% Here we supply the declarative font changing commands that were
% common in \LaTeX\ version 2.09 and earlier. These commands work
% in text mode \emph{and} in math mode. They are provided for
% compatibility, but one should start using the |\text...| and
% |\math...| commands instead. These commands are defined using
% |\DeclareTextFontCommand|, a command with three arguments: the
% user command to be defined; \LaTeX\ commands to execute in text
% mode and \LaTeX\ commands to execute in math mode.
%
% \begin{macrocode}
%<*iso>
% \end{macrocode}
%
% \begin{macro}{\rm}
% \begin{macro}{\tt}
% \begin{macro}{\sf}
%
% The commands to change the family. When in compatibility mode we
% select the `default' font first, to get \LaTeX2.09 behviour.
% \begin{macrocode}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\bf}
% The command to change to the bold series. One should use
% |\mdseries| to explicitly switch back to medium series.
% \begin{macrocode}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\sl}
% \begin{macro}{\it}
% \begin{macro}{\sc}
%
% And the commands to change the shape of the font. The slanted and
% small caps shapes are not available by default as math alphabets,
% so those changes do nothing in math mode. However, we do warn the
% user that the selection will not have any effect.One should use
% |\upshape| to explicitly change back to the upright shape.
% \begin{macrocode}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cal}
% \begin{macro}{\mit}
%
% The commands |\cal| and |\mit| should only be used in math mode,
% outside math mode they have no effect. Currently the New Font
% Selection Scheme defines these commands to generate warning
% messages. Therefore we have to define them `by hand'.
% \begin{macrocode}
\DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
\DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macrocode}
%
% \end{macrocode}
%
% \section{Cross Referencing}
%
% \subsection{Label referencing}
%
% \begin{macro}{\aref}
% \begin{macro}{\bref}
% \begin{macro}{\cref}
% \begin{macro}{\eref}
% \begin{macro}{\fref}
% \begin{macro}{\tref}
% Named references to labeled elements. |\bref{|\meta{label id}|}| is
% a reference to a labeled informative bibliographic element (similar
% to the standard \LaTeX\ |\cite| command. The others are to named
% elements of the document.
% \begin{macrocode}
\newcommand{\aref}[1]{\annexrefname~\ref{#1}}
\newcommand{\bref}[1]{[\ref{#1}]}
\newcommand{\cref}[1]{\clauserefname~\ref{#1}}
\newcommand{\eref}[1]{\examplerefname~\ref{#1}}
\newcommand{\fref}[1]{\figurerefname~\ref{#1}}
\newcommand{\tref}[1]{\tablerefname~\ref{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Table of Contents, etc.}
%
% A |\section| command writes a
% |\contentsline{section}{|\meta{title}|}{|\meta{page}|}| command
% on the \file{.toc} file, where \meta{title} contains the
% contents of the entry and \meta{page} is the page number. If
% sections are being numbered, then \meta{title} will be of the
% form |\numberline{|\meta{num}|}{|\meta{heading}|}| where
% \meta{num} is the number produced by |\thesection|. Other
% sectioning commands work similarly.
%
% A |\caption| command in a `figure' environment writes
%
% |\contentsline{figure}{\numberline{|\meta{num}|}{|%
% \meta{caption}|}}{|\meta{page}|}|
%
% on the .\file{lof} file, where \meta{num} is the number produced
% by |\thefigure| and \meta{caption} is the figure caption. It
% works similarly for a `table' environment.
%
% The command |\contentsline{|\meta{name}|}| expands to
% |\l@|\meta{name}. So, to specify the table of contents, we must
% define |\l@chapter|, |\l@section|, |\l@subsection|, ... ; to
% specify the list of figures, we must define |\l@figure|; and so
% on. Most of these can be defined with the |\@dottedtocline|
% command, which works as follows.
%
% |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A
% \meta{numwidth}|}{|^^A
% \meta{title}|}{|\meta{page}|}|
%
% \begin{description}
% \item[\meta{level}] An entry is produced only if\meta{ level}
% $<=$ value of the \Lcount{tocdepth} counter. Note,
% |\chapter| is level 0, |\section| is level 1, etc.
% \item[\meta{indent}] The indentation from the outer left margin
% of the start of the contents line.
% \item[\meta{numwidth}] The width of a box in which the section
% number is to go, if \meta{title} includes a |\numberline|
% command.
% \end{description}
%
% \begin{macro}{\@pnumwidth}
% \begin{macro}{\@tocrmarg}
% \begin{macro}{\@dotsep}
% This command uses the following three parameters, which are set
% with a |\newcommand| (so em's can be used to make them depend upon
% the font).
% \begin{description}
% \item[\texttt{\bslash @pnumwidth}] The width of a box in which the
% page number is put.
% \item[\texttt{\bslash @tocrmarg}] The right margin for multiple
% line entries. One wants |\@tocrmarg| $\ge$ |\@pnumwidth|
% \item[\texttt{\bslash @dotsep}] Separation between dots, in mu
% units. Should be defined as a number like 2 or 1.7
% \end{description}
%
% \begin{macrocode}
\newcommand{\@pnumwidth}{1.55em}
\newcommand{\@tocrmarg} {2.55em}
\newcommand{\@dotsep}{4.5}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\tocentryskip}
% \begin{macro}{\tocbaseline}
% \begin{macro}{\tocskip}
% We define two lengths and a utility command.
% \begin{macrocode}
\newlength{\tocentryskip} \setlength{\tocentryskip}{1em}
\newlength{\tocbaseline} \setlength{\tocbaseline}{20pt}
\newcommand{\tocskip}[1]{%
\addtocontents{toc}{\protect\vspace{#1}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsubsection{Table of Contents}
%
% \begin{macro}{\tableofcontents}
% This macro is used to request that \LaTeX{} produces a table of
% contents. In this class the tables of
% contents, figures etc. are always set in single-column style.
%
% \changes{v1}{1995/05/31}{Added `page' above page numbers in
% table of contents.}
% \begin{macrocode}
\newcommand{\tableofcontents}{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
% \end{macrocode}
% If the document is copyrighted, then the copyright notice is
% placed at the foot of the first page of the toc.
% \begin{macrocode}
\ifc@pyright\@copyrighttext\fi
% \end{macrocode}
% Set the title for the toc, which must start on page (ii) of the
% document. The actual table of contents is made by calling
% |\@starttoc{toc}|.
% \begin{macrocode}
% \hbox to \textwidth{{\normalsize\bfseries \contentsname}\hfil\pagename}
% \hbox to \textwidth{{\normalsize\bf \contentsname}\hfil\pagename}
\setcounter{page}{2}
\begingroup
\parskip\z@
\@starttoc{toc}
\endgroup
% \end{macrocode}
% Finish by restoring two column mode if necessary.
% \begin{macrocode}
\if@restonecol\twocolumn\fi}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
% \end{macrocode}
%
% Each sectioning command needs an additional macro to format its
% entry in the table of contents, as described above. In this class
% the formatting depends on whether or not the |sect| option
% is used.
% \begin{macro}{\l@section}
% \begin{macro}{\l@clause}
% \begin{macro}{\l@sclause}
% \begin{macro}{\l@ssclause}
% \begin{macro}{\l@sssclause}
% \begin{macro}{\l@ssssclause}
% \begin{macro}{\l@sssssclause}
% First the default specifications.
% \begin{macrocode}
\newcommand{\l@clause}{\@dottedtocline{1}{0em}{2.3em}}
\newcommand{\l@sclause}{\@dottedtocline{2}{1.5em}{3.2em}}
\newcommand{\l@ssclause}{\@dottedtocline{3}{3em}{4.1em}}
\newcommand{\l@sssclause}{\@dottedtocline{4}{4.5em}{5em}}
\newcommand{\l@ssssclause}{\@dottedtocline{5}{6em}{5.9em}}
\newcommand{\l@sssssclause}{\@dottedtocline{6}{7.5em}{6.8em}}
% \end{macrocode}
% The addition required by the |sect| option.
% \begin{macrocode}
\if@usesect
\newcommand{\l@section}{\@dottedtocline{0}{0em}{2.3em}}
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% In this class lists of floats are made to appear as though they
% were an integral part of the table of contents. Further, headings
% are only printed if there is at least one float of the given kind
% in the body of the document.
%
% \begin{macro}{\floatlist}
% For print a heading for a list of floats.
% \begin{macrocode}
\newcommand{\floatlist}[2]{%
\vspace \tocentryskip
% \hbox to \textwidth{\bfseries #1\hfil}
% \hbox to \textwidth{\bf #1\hfil}
\tocskip{\tocentryskip}
\begingroup
\parskip\z@ \baselineskip\tocbaseline
\@starttoc{#2}
\endgroup}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{List of figures}
%
%
% \begin{macro}{\iffigs}
% A flag for figure floats.
% \begin{macrocode}
\newif\iffigs\figsfalse
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listoffigures}
% This macro is used to request that \LaTeX{} produces a list of
% figures.
%
% \begin{macrocode}
\newcommand{\listoffigures}{%
\ifx\undefined\setfigs\else\setfigs\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\l@figure}
% This macro produces an entry in the list of figures.
% \begin{macrocode}
\newcommand{\l@figure}{\@dottedtocline{1}{0em}{2.3em}}
% \end{macrocode}
% \end{macro}
%
% \subsubsection{List of tables}
%
% \begin{macro}{\iftabs}
% A flag for table floats.
% \begin{macrocode}
\newif\iftabs\tabsfalse
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listoftables}
% This macro is used to request that \LaTeX{} produces a list of
% tables. It is very similar to |\listoffigures|.
%
% \begin{macrocode}
\newcommand{\listoftables}{%
\ifx\undefined\settabs\else\settabs\fi}
% \end{macrocode}
%
% \begin{macro}{\l@table}
% This macro produces an entry in the list of tables.
% \begin{macrocode}
\let\l@table\l@figure
% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
%
% \subsection{Bibliography}
%
% This class does not implement a bibliography. The |references|
% environment is defined instead.
%
% \subsection{The index}
%
% \begin{environment}{theindex}
% The environment `theindex' can be used for indices. It makes an
% index with one column, with each entry a separate paragraph. At
% the user level the commands |\item|, |\subitem| and |\subsubitem|
% are used to produce index entries of various levels. When a new
% letter of the alphabet is encountered an amount of |\indexspace|
% white space can be added.
%
% ISO requires that an index, if present, must be the last element
% in the document.
%
%
% \begin{macrocode}
\newenvironment{theindex}{%
\clearpage
\tocskip{\tocentryskip}
\addcontentsline{toc}{index}{\indexname}
\columnseprule \z@
% \onecolumn{\Cfont\bfseries \indexname}\vskip\baselineskip
% \onecolumn{\Cfont\bf \indexname}\vskip\baselineskip
\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}{%
\clearpage}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\l@index}
% Format the index entry in the table of contents.
% \begin{macrocode}
\newcommand{\l@index}{\@dottedtocline{1}{0em}{0pt}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@idxitem}
% \begin{macro}{\subitem}
% \begin{macro}{\subsubitem}
% Thsee macros are used to format the entries in the index.
% \begin{macrocode}
\newcommand{\@idxitem} {\par\hangindent 40\p@}
\newcommand{\subitem} {\par\hangindent 40\p@ \hspace*{20\p@}}
\newcommand{\subsubitem}{\par\hangindent 40\p@ \hspace*{30\p@}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\indexspace}
% The amount of white space that is inserted between `letter
% blocks' in the index.
% \begin{macrocode}
\newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
% \end{macrocode}
% \end{macro}
%
% The program GenIndex, written for processing ISO documents,
% takes an \file{.idx} file and converts it to a |theindex| format.
% The following are the formatting commands output by GenIndex.
%
% \begin{macro}{\indexfill}
% \begin{macro}{\sindexfill}
% \begin{macro}{\ssindexfill}
% Thse define the format of leaders between the (sub-) topic and
% the page number. ISO requires a dotted line between each index
% entry and the page number.
% \begin{macrocode}
\newcommand{\indexfill}{\dotfill}
\newcommand{\sindexfill}{\dotfill}
\newcommand{\ssindexfill}{\dotfill}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\indexsee}
% \begin{macro}{\indexseealso}
% These format entries of type `see \ldots' and `see also \ldots'.
% \begin{macrocode}
\newcommand{\indexsee}[1]{\par \hspace*{2em} {\em see} #1}
\newcommand{\indexseealso}[1]{\par \hspace*{2em} {\em see also} #1}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\alphaindexspace}
% \begin{macro}{\otherindexspace}
% These format the space between each alphabetic block of entries,
% and correspondingly for entries that begin with an analpahbetic
% character. ISO requires no additional spacing.
%
% These commands take one parameter, intended to be the
% (letter) heading for the next block of entries. For example,
% we could have defined:
% \begin{verbatim}
% \newcommand{\alphaindexspace}[1]{\indexspace
% {\bfseries #1}}
% \end{verbatim}
% for printing a vertical space and a bold heading.
% \begin{macrocode}
\newcommand{\alphaindexspace}[1]{}
\newcommand{\otherindexspace}[1]{}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Footnotes}
%
% \begin{macro}{\footnoterule}
% Usually, footnotes are separated from the main body of the text
% by a small rule. This rule is drawn by the macro |\footnoterule|.
% We have to make sure that the rule takes no vertical space (see
% \file{plain.tex}) so we compensate for the natural heigth of the
% rule of 0.4pt by adding the right amount of vertical skip.
%
% To prevent the rule from colliding with the footnote we first add
% a little negative vertical skip, then we put the rule and make
% sure we end up at the same point where we begun this operation.
% \begin{macrocode}
\renewcommand{\footnoterule}{%
\kern-3\p@
\hrule width .4\columnwidth
\kern 2.6\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\c@footnote}
% Footnotes are numbered sequentially throughout the document.
% ISO requires footnotes to be a superscripted arabic numeral
% with a right parenthesis. The counter is predefined.
% \begin{macrocode}
% \newcounter{footnote}
\renewcommand{\thefootnote}{\arabic{footnote})}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefntext}
% The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
% to produce the actual footnote. The macro gets the text of the
% footnote as its argument and should use |\@thefnmark| as the mark
% of the footnote. The macro |\@makefntext|is called when
% effectively inside a |\parbox| of width |\columnwidth| (i.e.,
% with |\hsize| = |\columnwidth|).
%
% An example of what can be achieved is given by the following piece
% of \TeX\ code.
% \begin{verbatim}
% \long\def\@makefntext#1{%
% \@setpar{\@@par
% \@tempdima = \hsize
% \advance\@tempdima-10pt
% \parshape \@ne 10pt \@tempdima}%
% \par
% \parindent 1em\noindent
% \hbox to \z@{\hss\@makefnmark}#1}
% \end{verbatim}
% The effect of this definition is that all lines of the footnote
% are indented by 10pt, while the first line of a new paragraph is
% indented by 1em. To change these dimensions, just substitute the
% desired value for `10pt' (in both places) or `1em'. The mark is
% flushright against the footnote.
%
% In this document class we use a simpler macro, in which the
% footnote text is set like an ordinary text paragraph, with no
% indentation except on the first line of a paragraph, and the
% first line of the footnote. Thus, all the macro must do is set
% |\parindent| to the appropriate value for succeeding paragraphs
% and put the proper indentation before the mark.
%
%
% \begin{macrocode}
\long\def\@makefntext#1{%
\parindent 1em%
\noindent
\hbox to 1.8em{\hss\@makefnmark}#1}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@makefnmark}
% The footnote markers that are printed in the text to point to the
% footnotes should be produced by the macro |\@makefnmark|. We use
% the default definition for it.
% \begin{macrocode}
%\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
% \end{macrocode}
% \end{macro}
%
%
% \section{Version control tools}
%
% When preparing an international standard the document goes through
% several iterations. In particular it may change due to international
% ballot comments. The commands provided may be used to identify
% changes made to a document during its life cycle.
%
% \subsection{Print control}
%
% Members of the development group often need to see the changes
% between document versions, while the general public does not.
% \begin{macro}{\ifchangemarks}
% This controls the appearence of the version controls defined
% below.
% \begin{macrocode}
\newif\ifchangemarks\changemarksfalse
% \end{macrocode}
% The version controls only work properly when the |draft| option
% is in effect. Also, the command |\changemarkstrue| must be
% put in the document preamble.
% \end{macro}
%
% \begin{macro}{\v@rid}
% This acts as an alias for |\marginpar| when both |changemarks| is
% true and the |draft| option is in effect, otherwise it throws
% away its two arguments.
% \begin{macrocode}
\newcommand{\v@rid}[2]{%
\ifchangemarks
\ifdr@ftd@c
\marginpar[#1]{#2}
\fi\fi}
% \end{macrocode}
% \end{macro}
%
% \subsection{Change marking}
%
% The following commands flag changes in the typeset document. Each of
% the commands takes one parameter which is intended to be a
% `change number' for tracking purposes. Some also take a text
% parameter which is the changed text.
%
% \begin{macro}{\editorial}
% |\editorial{|\meta{change id}|}|
% Places the \meta{change id} in the document to indicate an editorial
% change.
% \begin{macrocode}
\newcommand{\editorial}[1]{%
\ifchangemarks
\v@rid{\small\hfill$^{#1}$ED}%
{\small ED$^{#1}$\hfill}
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\added}
% |\added{|\meta{text}|}{|\meta{change id}|}|
% Flags the additional \meta{text} with the \meta{change id}.
% \begin{macrocode}
\long\def\added#1#2{%
\ifchangemarks
\v@rid{\small\hfill$^{#2}\Rightarrow$}%
{\small $\Leftarrow^{#2}$\hfill}
{\em #1}
\else
#1
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\deleted}
% |\deleted{|\meta{change id}|}|
% Places the \meta{change id} in the document to indicate that
% some text has been deleted.
% \begin{macrocode}
\newcommand{\deleted}[1]{%
\ifchangemarks
\v@rid{\small\hfill$^{#1}\Leftarrow$}%
{\small $\Rightarrow^{#1}$\hfill}
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\moved}
% |\moved{|\meta{text}|}{|\meta{change id}|}|
% Flags the moved \meta{text} with the \meta{change id}.
% \begin{macrocode}
\long\def\moved#1#2{%
\ifchangemarks
\v@rid{\small\hfill$^{#2}\Leftrightarrow$}%
{\small $\Leftrightarrow^{#2}$\hfill}
{\em #1}
\else
#1
\fi}
% \end{macrocode}
% \end{macro}
%
% \section{Structure and boilerplate}
%
% ISO standard documents have certain required elements and boilerplate.
%
% \subsection{Structural elements}
%
% \begin{environment}{foreword}
% The |foreword| environment initializes the front matter for a standard
% and starts an unnumbered foreword clause. To ensure that the
% front matter is set in single column we use an environment.
% \begin{macrocode}
\newenvironment{foreword}{%
%% \@verridetrue
\tableofcontents
\listoffigures
\listoftables
\clearpage
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\clause*{\forewordname}}%
%% {\@verridefalse}
{\if@restonecol\twocolumn\fi}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\@copyrighttext}
% This command sets up the copyright notice on the first page of
% the table of contents. The text is set in a |bottomfloat|
% environment.
% \begin{macrocode}
\newcommand{\@copyrighttext}{%
\begin{bottomfloat}[b]
\copyrightnotice
\end{bottomfloat}}
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{introduction}
% Starts a new unnumbered introduction clause, the body of which is set
% in single column, so we use an environment.
% \begin{macrocode}
\newenvironment{introduction}{%
%% \@verridetrue
\clearpage
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\clause*{\introductionname}}%
%% {\@verridefalse}
{\if@restonecol\twocolumn\fi}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\scopeclause}
% Starts a new numbered scope clause
% \begin{macrocode}
\newcommand{\scopeclause}{\clause{\scopename}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\normrefsclause}
% Starts a new numbered normative references clause.
% \begin{macrocode}
\newcommand{\normrefsclause}{\clause{\normrefsname}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\defclause}
% \begin{macro}{\defsymabbclause}
% \begin{macro}{\defsymclause}
% \begin{macro}{\defabbclause}
% \begin{macro}{\symabbclause}
% These macros start new clauses for definitions, symbols and abbreviations.
% ISO allows these to be grouped in various ways, depending on the
% amount of material in the respective categories.
% \begin{macrocode}
\newcommand{\defclause}{\clause{\defname}}
\newcommand{\defsymabbclause}{\clause{\defsymabbname}}
\newcommand{\defsymclause}{\clause{\defsymname}}
\newcommand{\defabbclause}{\clause{\defabbname}}
\newcommand{\symabbclause}{\clause{\symabbname}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}
% This macro starts a clause `Fundamental concepts and assumptions'.
% The actual title is given by the value of |\fcandaname|.
% \begin{macrocode}
\newcommand{\fcandaclause}{\clause{\fcandaname}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bibannex}
% This macro starts an informative bibliography annex.
%
% \begin{macrocode}
\newcommand{\bibannex}{\infannex{\bibname}}
% \end{macrocode}
% \end{macro}
%
% \subsection{Boilerplate}
%
% ISO defines the wording of certain textual elements within a
% standard.
%
% This class has been prepared for standard documents in the
% English language. The boilerplate text commands must be
% redefined for other languages.
%
% \begin{macro}{\copyrightnotice}
% The required English text of the copyright notice.
% \begin{macrocode}
\newcommand{\copyrightnotice}{%
\copyright\quad \copyrightname\quad \thesyear\newline
All rights reserved. Unless otherwise specified, no part of
this publication may be reproduced or utilized in any form or
by any means, electronic or mechanical, including photocopying
and microfilm, without permission in writing from the
publisher.
%\makebox[\textwidth][r]{%
%ISO/IEC Copyright Office $\bullet$ Case Postale 56 $\bullet$
%CH-1211 Gen{\`e}ve 20 $\bullet$ Switzerland}
\vspace{\baselineskip}\newline
\hspace*{1em} International Organization for Standardization\newline
\hspace*{1em} Case Postale 56 -- CH-2111 Gen{\`e}ve 20 - Switzerland
% \end{macrocode}
% For an IS, need a blank line and place of printing
% \begin{macrocode}
\ifisst@ndard \ifc@pyright
\vspace{\baselineskip}\newline\noindent
Printed in Switzerland
\fi\fi
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fwdbp}
%
% The prescribed text of the initial paragraphs in a Foreword.
% \begin{macrocode}
\newcommand{\fwdbp}{\input{isofwdbp}}
% \end{macrocode}
%
% The following is the text contained in the file \file{isofwdbp.tex}.
% \begin{macrocode}
%
%<*fwd1>
%% isofwdbp.tex Boilerplate for introduction to Foreword clause
%
The International Organization for Standardization (ISO) is a worldwide
federation of national standards bodies (ISO member bodies). The work
of preparing International Standards is normally carried out through
ISO technical committees. Each member body interested in a subject for
which a technical committee has been established has the right to be
represented on that committee. International organizations,
governmental and non-governmental, in liaison with ISO, also take part
in the work. ISO collaborates closely with the International
Electrotechnical Commission (IEC) on all matters of electrotechnical
standardization.
Draft International Standards adopted by technical committees are
circulated to the member bodies for voting. Publication as an
International Standard requires approval by at least 75\% of the member
bodies casting a vote.
%
%<*iso|isone>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\normrefbp}
% The required text for the introduction
% of the normative references clause. Use as:
% |\normrefbp{|\meta{standard identifier}|}|
% \begin{macrocode}
\newcommand{\normrefbp}[1]{%
The following standards contain provisions which, through
reference in this text, constitute provisions of this #1.
At the time of publication, the editions indicated were
valid. All standards are subject to revision, and parties
to agreements based on this #1
are encouraged to investigate the possibility of applying
the most recent editions of the standards indicated below.
Members of IEC and ISO maintain registers of currently
valid International Standards.
}
% \end{macrocode}
% \end{macro}
%
%
% \section{Initialization}
%
% \subsection{Words and phrases}
%
% \begin{macro}{\annexname}
% \begin{macro}{\bibname}
% \begin{macro}{\contentsname}
% \begin{macro}{\defname}
% \begin{macro}{\defabbname}
% \begin{macro}{\defsymname}
% \begin{macro}{\defsymabbname}
% \begin{macro}{\fcandaname}
% \begin{macro}{\forewordname}
% \begin{macro}{\indexname}
% \begin{macro}{\informativename}
% \begin{macro}{\introductionname}
% \begin{macro}{\normativename}
% \begin{macro}{\normrefsname}
% \begin{macro}{\scopename}
% \begin{macro}{\sectionname}
% \begin{macro}{\symabbname}
% This document class is for documents prepared in the English language.
% To prepare a version for another language, various English words
% and phrases must
% be replaced. The English elements that require replacement are
% defined below in command names.
%
% This list is for titles of document sections.
%
% \begin{macrocode}
\newcommand{\annexname}{Annex}
\newcommand{\bibname}{Bibliography}
\newcommand{\contentsname}{Contents}
\newcommand{\defname}{Definitions}
\newcommand{\defabbname}{Definitions and abbreviations}
\newcommand{\defsymname}{Definitions and symbols}
\newcommand{\defsymabbname}{Definitions, symbols and abbreviations}
\newcommand{\fcandaname}{Fundamental concepts and assumptions}
\newcommand{\forewordname}{Foreword}
\newcommand{\indexname}{Index}
\newcommand{\informativename}{informative}
\newcommand{\introductionname}{Introduction}
\newcommand{\normativename}{normative}
\newcommand{\normrefsname}{Normative references}
\newcommand{\scopename}{Scope}
\newcommand{\sectionname}{Section}
\newcommand{\symabbname}{Symbols and abbreviations}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\copyrightname}
% \begin{macro}{\examplename}
% \begin{macro}{\examplesname}
% \begin{macro}{\figurename}
% \begin{macro}{\inscopename}
% \begin{macro}{\ISname}
% \begin{macro}{\listannexname}
% \begin{macro}{\listfigurename}
% \begin{macro}{\listtablename}
% \begin{macro}{\notename}
% \begin{macro}{\notesname}
% \begin{macro}{\outofscopename}
% \begin{macro}{\pagename}
% \begin{macro}{\tablename}
% \begin{macro}{\tbpname}
%
% These are the names and phrases used for general elements.
%
% \begin{macrocode}
\newcommand{\copyrightname}{ISO}
\newcommand{\examplename}{EXAMPLE}
\newcommand{\examplesname}{EXAMPLES}
\newcommand{\figurename}{Figure}
\newcommand{\inscopename}{The following are within the scope of this }
\newcommand{\ISname}{INTERNATIONAL STANDARD}
\newcommand{\listannexname}{Annexes}
\newcommand{\listfigurename}{Figures}
\newcommand{\listtablename}{Tables}
\newcommand{\notename}{NOTE}
\newcommand{\notesname}{NOTES}
\newcommand{\outofscopename}{The following are outside the scope of this }
\newcommand{\pagename}{Page}
\newcommand{\tablename}{Table}
\newcommand{\tbpname}{To be published.}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\annexrefname}
% \begin{macro}{\clauserefname}
% \begin{macro}{\examplerefname}
% \begin{macro}{\figurerefname}
% \begin{macro}{\tablerefname}
% These are the names for referenced document elements. Except when
% starting a sentence, references to document elements start with
% a lower case letter.
% \begin{macrocode}
\newcommand{\annexrefname}{annex}
\newcommand{\clauserefname}{clause}
\newcommand{\examplerefname}{example}
\newcommand{\figurerefname}{figure}
\newcommand{\tablerefname}{table}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\abstractname}
% \begin{macro}{\appendixname}
% \begin{macro}{\chaptername}
% \begin{macro}{\partname}
% \begin{macro}{\refname}
% These names are used in the standard \LaTeX\ classes but are not
% applicable in this class. We just make them null.
% \begin{macrocode}
\newcommand{\abstractname}{}
\newcommand{\appendixname}{}
\newcommand{\chaptername}{}
\newcommand{\partname}{}
\newcommand{\refname}{}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Date}
%
% \begin{macro}{\today}
% This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
% to provide the date of the \LaTeX-run.
% \begin{macrocode}
\newcommand{\today}{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
% \end{macrocode}
% \end{macro}
%
% \subsection{Two column mode}
%
% \begin{macro}{\columnsep}
% This gives the distance between two columns in two column mode.
% \begin{macrocode}
\setlength\columnsep{10\p@}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\columnseprule}
% This gives the width of the rule between two columns in two
% column mode. We have no visible rule.
% \begin{macrocode}
\setlength\columnseprule{0\p@}
% \end{macrocode}
% \end{macro}
%
% \subsection{The page style}
% We use the page style \pstyle{headings} by
% default and start with roman numbering for the
% front matter, this being reset to arabic by the title
% or first main matter section/clause.
% \begin{macrocode}
\pagestyle{headings}
\pagenumbering{roman}
% \end{macrocode}
% We set the sectional counters to zero and the |tocdepth| to
% one (clauses only listed).
% \begin{macrocode}
\if@usesect\setcounter{section}{0}\fi
\setcounter{clause}{0}
\setcounter{annex}{0}
\setcounter{tocdepth}{1}
% \end{macrocode}
%
% \subsection{Single or double sided printing}
%
%
% Whe do not try to make each page as long as all the others, even
% though it is two-side printing.
% \begin{macrocode}
\@twosidetrue
\raggedbottom
% \end{macrocode}
% When the \Lopt{twocolumn} option was specified we call
% |\twocolumn| to activate this mode. We try to make each column as
% long as the others, but call |sloppy| to make our life easier.
% \begin{macrocode}
%%<*iso>
\if@twocolumn
\twocolumn
\sloppy
\flushbottom
% \end{macrocode}
% Normally we call |\onecolumn| to initiate typesetting in one
% column.
% \begin{macrocode}
\else
\onecolumn
\fi
%%
%
% \end{macrocode}
%
% \section{The askinc package}
%
% This package provides an interactive `include' facility. It was developed
% by Phil Spiby.
% \begin{macrocode}
%<*inc>
% \end{macrocode}
%
% \begin{macro}{\infile}
% The |\infile{|\meta{file name}|}| command is a cross between the
% |\input| and |\include| commands. When this package is used, at
% runtime the user is asked to interactively specify a comma-seperated
% list of the names of |\infile|d files that are to be processed. In
% this sense it acts like the |\include| and |\includeonly| pair of
% commands. If no list is entered at the terminal (by hitting the
% \meta{RETURN} key) then all |\infile|d files are processed. In this
% sense it acts like the |\input| command. However, like the |\include|
% command, an |\infile|d file cannot contain any other |\infile|d file.
%
% \begin{macro}{temp}
% Define a counter \Lcount{temp} for general use within the include files.
% This is required to ensure that the contents of |\incfiles| is
% used and not |\incfiles| the string.
% \begin{macrocode}
\newcounter{temp}
% \end{macrocode}
% \end{macro}
% Now for the rest of the definition.
% \begin{macrocode}
\def\readinclude#1\endread{\gdef\myincludeonly{\includeonly{#1}}}
\long\def\stripspace#1 \nextspace{#1}
\typeout{Which files do you want processing ?}
\message{enter names (separated by commas) or for all.}
\message{}\global\read-1 to\incfiles
\if\incfiles\par\let\infile\input
\else\let\infile\include
\edef\incfiles{\expandafter\stripspace\incfiles\nextspace}
\expandafter\readinclude\incfiles\endread\myincludeonly\fi
% \end{macrocode}
% \end{macro}
%
% The end of the askinc package.
% \begin{macrocode}
%
% \end{macrocode}
%
%
%
% \section{The ISOROT package and ISOROTNE style}
%
% The \file{isorot} package provides a specialization of the \file{rotating}
% package
% for use within ISO standard documents. The principal modifications
% relate to the table and figure environments. The original \file{rotating}
% package was developed by
% Sebastian Rahtz and Leonor Barroca\footnote{Sebastian Rahtz and Leonor
% Barroca, {\em A style option for rotated objects in TeX,} TUGboat, 13, 2,
% pp 156--180, July 1992.}.
%
% The \file{isorotne} style provides the same capabilities for \LaTeX v2.09
% users. This essentially replaces all \LaTeX 2e facilities from \file{rotating}
% by generic ones, and includes the relevent package sources within the one
% file.
%
% \begin{macrocode}
%<*rot|rotne>
% \end{macrocode}
%
% For the \file{isorot} package most of the work is done by the
% \file{graphics} package, so make sure it is loaded. Also, David
% Carlisle's \file{lscape} package is required for landscaping some
% pages or long wide tables.
% \begin{macrocode}
%<*rot>
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{graphics}
\RequirePackage{lscape}
%
% \end{macrocode}
%
% The \file{isorotne} package requires some macros that are in the
% 2e kernel but not the 2.09 kernel.
% \begin{macrocode}
%<*rotne>
% \end{macrocode}
% \begin{macro}{\color@begingroup}
% \begin{macro}{\color@endgroup}
% \begin{macro}{\color@setgroup}
% \begin{macro}{\normalcolor}
% \begin{macro}{\color@hbox}
% \begin{macro}{\color@vbox}
% \begin{macro}{\color@endbox}
% These are normally no-ops (but are redefined by the \file{color} package).
% \begin{macrocode}
\let\color@begingroup\relax
\let\color@endgroup\relax
\let\color@setgroup\relax
\let\normalcolor\relax
\let\color@hbox\relax
\let\color@vbox\relax
\let\color@endbox\relax
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{environment}{lrbox}
% A new 2e environment form of |\sbox|. (This is why the color stuff is
% needed.)
% \begin{macrocode}
\def\lrbox#1{%
\edef\reserved@a{%
\endgroup
\setbox#1\hbox{%
\begingroup\aftergroup}%
\def\noexpand\@currenvir{\@currenvir}%
\def\noexpand\@currenvline{\on@line}}%
\reserved@a
\@endpefalse
\color@setgroup
\ignorespaces}
\def\endlrbox{\unskip\color@endgroup}
% \end{macrocode}
% \end{environment}
%
% \begin{macrocode}
%
% \end{macrocode}
%
% The \file{rotating} package has some options. We define some additional
% macros to enable these to be expressed as commands.
%
% \begin{macro}{\if@rot@twoside}
% \begin{macro}{\figuresleft}
% \begin{macro}{\figuresright}
% \begin{macro}{\ifcl@ckwise}
% \begin{macro}{\clockwise}
% \begin{macro}{\counterclockwise}
% \begin{macrocode}
\newif\if@rot@twoside
\newcommand{\figuresleft}{%
\@rot@twosidefalse
\def\rot@LR{0}%
}
\newcommand{\figuresright}{%
\@rot@twosidefalse
\def\rot@LR{-1}%
}
\newif\ifcl@ckwise
\newcommand{\clockwise}{%
\cl@ckwisetrue
}
\newcommand{\counterclockwise}{%
\cl@ckwisefalse
}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Drivers}
%
% Rotation is not done within \TeX\ but by the device drivers via |\special|
% commands appropriate for each driver.
%
% \begin{macrocode}
%<*rot>
\PassOptionsToPackage{dvips}{graphics}
\def\rotdriver#1{%
\message{The .dvi file is to be processed by the #1 driver.}
\typeout{Change rotdriver in the source accordingly if you do not have this.}
\makeatletter\input{#1.def}\makeatother}
%
% \end{macrocode}
%
% \begin{macrocode}
%<*rotne>
% \end{macrocode}
%
% Life is much more difficult for the \file{isorotne} style as we have to
% include 2.09 runnable source that the \file{isorot} package gets for free.
%
% \begin{macro}{\Grot@start}
% \begin{macro}{\Grot@end}
% The commands |\Grot@start| and |\Grot@end| are defined which assume
% that the macro |\Grot@angle| contains the rotation angle. First
% set these to do nothing, just in case the user calls for an unsupported
% driver.
% \begin{macrocode}
\def\Grot@start{}
\def\Grot@end{}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\Grot@count}
% A counter for the DVITOPS driver.
% \begin{macrocode}
\newcount\Dvitops@count
\Dvitops@count=\@ne
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listrotdrivers}
% Writes out the list of currently available rotdrivers.
% \begin{macrocode}
\newcommand{\listrotdrivers}{%
\typeout{If you do not have this driver then change rotdriver in your source.}
\typeout{Available rotdrivers are:}
\typeout{ \space\space dvips, dvipsone, dvitops, pctexps, pubps, textures}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rotdriver}
% The command |\rotdriver{|\meta{driver}|}| must be put in the preamble,
% where \meta{driver} is the identification of one of the drivers that
% support rotation.
% \begin{macrocode}
\newcommand{\rotdriver}[1]{%
% \end{macrocode}
% Put the argument into an uppercase string
% \begin{macrocode}
\bgroup\edef\next{\def\noexpand\tempa{#1}}%
\uppercase\expandafter{\next}%
% \end{macrocode}
% \begin{macro}{\ISOROTSTD}
% \begin{macro}{\DVIPS}
% \begin{macro}{\DVIPSONE}
% \begin{macro}{\DVITOPS}
% \begin{macro}{\PCTEXPS}
% \begin{macro}{\PUBPS}
% \begin{macro}{\TEXTURES}
% These are the currently supported drivers that can cope with rotations.
% The code for the drivers has been taken from
% \file{drivers.dtx}\footnote{Version v2.6, revised 1994/12/12.} by
% Sebastian Rahtz and David Carlisle.
%
% The |isorotstd| driver is included against the (improbable) time
% when there might be one `standard' driver, or at least all the
% |\special| code for rotations might be common.
% \begin{macrocode}
\def\ISOROTSTD{ISOROTSTD}
\def\DVIPS{DVIPS}
\def\DVIPSONE{DVIPSONE}
\def\DVITOPS{DVITOPS}
\def\PCTEXPS{PCTEXPS}
\def\PUBPS{PUBPS}
\def\TEXTURES{TEXTURES}
% \end{macrocode}
% Later we will use a case statement for picking the proper code. Define
% a numeric code for each driver.
% \begin{macrocode}
\global\chardef\rot@driver=0
\ifx\tempa\ISOROTSTD
\global\chardef\rot@driver=1\fi
\ifx\tempa\DVIPS
\global\chardef\rot@driver=2\fi
\ifx\tempa\DVIPSONE
\global\chardef\rot@driver=3\fi
\ifx\tempa\DVITOPS
\global\chardef\rot@driver=4\fi
\ifx\tempa\PCTEXPS
\global\chardef\rot@driver=5\fi
\ifx\tempa\PUBPS
\global\chardef\rot@driver=6\fi
\ifx\tempa\TEXTURES
\global\chardef\rot@driver=7\fi
\egroup
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% Now define the particulars for each driver. \\
% {\bf Case 0:} We should not be here!
% \begin{macrocode}
\ifcase\rot@driver % case 0
\message{WARNING *** unknown driver --- no rotation.} \listrotdrivers
% \end{macrocode}
% {\bf Case 1: ISOROTSTD} Not yet available.
% \begin{macrocode}
\or % case 1: ISOROTSTD
\message{WARNING *** isorotstd driver not available yet --- no rotation.}
\listrotdrivers
% \end{macrocode}
% {\bf Case 2: DVIPS} For Tom Rokicki's {\em dvips} driver. Has been tested
% with version 5.518 of July 1993.
% \begin{macrocode}
\or % case 2: DVIPS
\typeout{Rotdriver set to dvips.} \listrotdrivers
\def\Grot@start{%
\special{ps: gsave currentpoint
currentpoint translate \Grot@angle\space neg
rotate neg exch neg exch translate}}
\def\Grot@end{%
\special{ps: currentpoint grestore moveto}}
% \end{macrocode}
% {\bf Case 3: DVIPSONE} For Y\&Y's {\em dvipsone}.
% \begin{macrocode}
\or % case 3: DVIPSONE
\typeout{Rotdriver set to dvipsone.} \listrotdrivers
\def\Grot@start{%
\special{ps: gsave currentpoint
currentpoint translate \Grot@angle\space
rotate neg exch neg exch translate}}
\def\Grot@end{%
\special{ps: currentpoint grestore moveto}}
% \end{macrocode}
% {\bf Case 4: DVITOPS} For James Clark's {\em dvitops}.
% \begin{macrocode}
\or % case 4: DVITOPS
\typeout{Rotdriver set to dvitops.} \listrotdrivers
\def\Grot@start{%
\special{dvitops: origin
rot\the\@tempdima}%
\special{dvitops: begin rot\the\Dvitops@count}}%
\def\Grot@end{%
\special{dvitops: end}%
\special{dvitops: rotate rot\the\Dvips@count \space
\Grot@angle}%
\global\advance\Dvitops@count by\@ne}
% \end{macrocode}
% {\bf Case 5: PCTEXPS} For Personal TeX's PC PTI Laser/PS. Information
% supplied by Lance Carnes and Tao Wang ||.
% \begin{macrocode}
\or % case 5: PCTEXPS
\typeout{Rotdriver set to pctexps.} \listrotdrivers
\def\Grot@start{%
\special{ps:: gsave currentpoint
currentpoint translate \Grot@angle\space
rotate neg exch neg exch translate}}
\def\Grot@end{%
\special{ps:: currentpoint grestore moveto}}
% \end{macrocode}
% {\bf Case 6: PUBPS} For Arbortext's {\em pubps}. Interestingly I note
% that my original (circa 1991) code for this used |ps::| but the code
% has been modified to |ps:|.
% \begin{macrocode}
\or % case 6: PUBPS
\typeout{Rotdriver set to pubps.} \listrotdrivers
\def\Grot@start{%
\special{ps: gsave currentpoint
currentpoint translate \Grot@angle\space
rotate neg exch neg exch translate}}
\def\Grot@end{%
\special{ps: currentpoint grestore moveto}}
% \end{macrocode}
% {\bf Case 7: TEXTURES} For Blue Sky's {\em Textures}. This code is liable
% to change as there is ongoing work to produce a new version of Textures.
% \begin{macrocode}
\or % case 7: TEXTURES
\typeout{Rotdriver set to textures.} \listrotdrivers
\def\Grot@start{%
\special{postscript
0 0 transform
grestore
matrix currentmatrix
3 1 roll
itransform
dup 3 -1 roll
dup 4 1 roll exch
translate
\Grot@angle\space neg rotate
neg exch neg exch translate
gsave}}
\def\Grot@end{\special{postscript grestore setmatrix gsave}}
% \end{macrocode}
% {\bf Case unknown:} We should not have got here!
% \begin{macrocode}
\else
\message{WARNING *** unknown driver --- no rotation.} \listrotdrivers
\fi
}
% \end{macrocode}
% \end{macro}
% Set up a default driver (use DVIPS as it appears the most popular).
% \begin{macrocode}
\rotdriver{DVIPS}
% \end{macrocode}
%
% \subsection{Box rotation}
%
% The following code has been taken from the Graphics package
% \file{graphics.dtx}\footnote{Version v0.6c, last revised 1994/12/15.}
% by D.P. Carlisle and S.P.Q. Rahtz.
%
% \begin{macro}{\Grot@height}
% \begin{macro}{\Grot@depth}
% \begin{macro}{\Grot@right}
% \begin{macro}{\Grot@left}
% \begin{macro}{\Grot@h}
% \begin{macro}{\Grot@d}
% \begin{macro}{\Grot@r}
% \begin{macro}{\Grot@l}
% \begin{macro}{\Grot@x}
% \begin{macro}{\Grot@y}
% Some registers are needed to store some sizes and angles.
% Local registers are re-used (see the Graphics package documentation).
% \begin{macrocode}
\let\Grot@height\@ovxx
\let\Grot@depth\@ovdy
\let\Grot@right\@ovdx
\let\Grot@left\@ovyy
\let\Grot@h\@xdim
\let\Grot@d\@ydim
\let\Grot@r\@ovri
\let\Grot@l\@ovro
\let\Grot@x\@linelen
\let\Grot@y\@dashdim
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\rotatebox}
% The rotation angle is specified by parameter |#1| and the box to be
% rotated by |#2|. In the standard interface the center of rotation
% is $(0,0)$. Finally |\Grot@box| is called to rotate the box.
%
% |\rotatebox{|\meta{degrees}|}{|\meta{text}|}| rotates \meta{text}
% by \meta{degrees} anticlockwise. The rotation is about the left hand
% end of the baseline of \meta{text}.
% \begin{macrocode}
\def\rotatebox#1#2{%
\Grot@setangle{#1}%
\setbox\z@\hbox{{#2}}%
\Grot@x\z@
\Grot@y\z@
\Grot@box}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Grot@setangle}
% \begin{macro}{\Grot@setnegangle}
% \begin{macro}{\Grot@angle}
% These set the internal macro |\Grot@angle| used by |\Grot@box|.
% |\Grot@setangle| is the `standard' definition from the \file{graphics}
% package.
% \begin{macrocode}
\def\Grot@setangle#1{\edef\Grot@angle{#1}}
% \end{macrocode}
% |\Grot@setnegangle| sets |\Grot@angle| to be the negative of its input
% parameter. We use this for changing rotation direction.
% \begin{macrocode}
%
\def\Grot@setnegangle#1{%
\dimen@#1\p@
\dimen@-\dimen@
\edef\Grot@angle{\strip@pt\dimen@}}
%<*rotne>
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% We need to know the size of the enclosing rectangle of a rotated box.
% Two macros are used for calculating coordinate positions. (See Graphics
% documentation for details.)
%
% \begin{macro}{\Grot@Px}
% Calculate the x coordinate of a point after rotation. The new x
% coordinate is parameter |#1| and the original point coordinates
% are parameters |#2| and |#3|.
% \begin{macrocode}
\def\Grot@Px#1#2#3{%
#1\Grot@cos#2%
\advance#1-\Grot@sin#3}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Grot@Py}
% Similarly for the y coordinate.
% \begin{macrocode}
\def\Grot@Py#1#2#3{%
#1\Grot@sin#2%
\advance#1\Grot@cos#3}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Grot@box}
% Rotates |\box0| through |\Grot@angle| degrees anticlockwise.
%
% For details, consult the documentation.
%
% \begin{macrocode}
\def\Grot@box{%
\begingroup
\CalculateSin\Grot@angle
\CalculateCos\Grot@angle
\edef\Grot@sin{\UseSin\Grot@angle}%
\edef\Grot@cos{\UseCos\Grot@angle}%
\Grot@r\wd\z@ \advance\Grot@r-\Grot@x
\Grot@l\z@ \advance\Grot@l-\Grot@x
\Grot@h\ht\z@ \advance\Grot@h-\Grot@y
\Grot@d-\dp\z@ \advance\Grot@d-\Grot@y
\ifdim\Grot@sin\p@>\z@
\ifdim\Grot@cos\p@>\z@
\Grot@Py\Grot@height \Grot@r\Grot@h
\Grot@Px\Grot@right \Grot@r\Grot@d
\Grot@Px\Grot@left \Grot@l\Grot@h
\Grot@Py\Grot@depth \Grot@l\Grot@d
\else
\Grot@Py\Grot@height \Grot@r\Grot@d
\Grot@Px\Grot@right \Grot@l\Grot@d
\Grot@Px\Grot@left \Grot@r\Grot@h
\Grot@Py\Grot@depth \Grot@l\Grot@h
\fi
\else
\ifdim\Grot@cos\p@<\z@
\Grot@Py\Grot@height \Grot@l\Grot@d
\Grot@Px\Grot@right \Grot@l\Grot@h
\Grot@Px\Grot@left \Grot@r\Grot@d
\Grot@Py\Grot@depth \Grot@r\Grot@h
\else
\Grot@Py\Grot@height \Grot@l\Grot@h
\Grot@Px\Grot@right \Grot@r\Grot@h
\Grot@Px\Grot@left \Grot@l\Grot@d
\Grot@Py\Grot@depth \Grot@r\Grot@d
\fi
\fi
\advance\Grot@height\Grot@y
\advance\Grot@depth\Grot@y
\Grot@Px\dimen@ \Grot@x\Grot@y
\Grot@Py\dimen@ii \Grot@x\Grot@y
\dimen@-\dimen@ \advance\dimen@-\Grot@left
\dimen@ii-\dimen@ii \advance\dimen@ii\Grot@y
\setbox\z@\hbox{%
\kern\dimen@
\raise\dimen@ii\hbox{\Grot@start\box\z@\Grot@end}}%
\ht\z@\Grot@height
\dp\z@-\Grot@depth
\advance\Grot@right-\Grot@left\wd\z@\Grot@right
\leavevmode\box\z@
\endgroup}
% \end{macrocode}
% \end{macro}
%
% \subsection{Landscape environment}
%
% The \file{lscape} package by David Carlisle provides a landscape
% environment which prints the enclosed pages in landscape rather
% than portrait. For 2.09 this package does not work, so we provide
% for the functionality here. The following code is taken from
% the \file{lscape} package.\footnote{Version 3.0, last revised
% 1994/10/05.}
%
% \begin{environment}{landscape}
% \begin{macrocode}
\let\LS@makecol=\@makecol
\let\LS@makefcolumn=\@makefcolumn
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
\def\landscape{%
\clearpage
\begingroup
\vsize=\textwidth
\hsize=\textheight
\linewidth=\hsize
\columnwidth=\hsize
\@colroom=\vsize
\textheight=\vsize
\@colht=\vsize
\def\@makecol{\LS@makecol\LS@rot}%
\def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
\def\endlandscape{%
\clearpage
\endgroup
\global\@colht=\textheight
\global\vsize=\textheight
\global\@colroom=\textheight}
% \end{macrocode}
% \end{environment}
%
% \subsection{Turn and rotation environments}
%
% Much of the code is taken from the
% \file{rotating.dtx}\footnote{Version v2.9, last revised 1995/04/07.}
% package file by Leonor Barroca, but some is hacked for 2.09 users.
%
% \begin{macro}{\r@tfl@t}
% \begin{macrocode}
%
\newcount\r@tfl@t
\r@tfl@t0
% \end{macrocode}
% \end{macro}
% Sideways floats take up the whole page. They can be rotated so that
% the bottom of the float is on the left or the right; the default
% is to always turn to the right. If the main document uses the
% \Lopt{twoside} option then the floats are rotated according to the
% page number (requiring at least two passes through \LaTeX). The
% \Lopt{figuresleft} and \Lopt{figuresright} `options' will ensure
% a constant rotation direction when \Lopt{twoside} is in effect.
%
% \begin{macrocode}
\if@twoside
\@rot@twosidetrue
\else
\@rot@twosidefalse
\fi
% \end{macrocode}
%
% \begin{macro}{\rotatedirection}
% For setting rotation direction for positive angle. The |\rotatedirection|
% command is provided for backwards compatibility.
% \begin{macrocode}
\newcommand{\rotatedirection}[1]{%
\def\@tempa{#1}\def\@tempb{clockwise}%
\ifx\@temp\@tempb
\cl@ckwisetrue
\else
\cl@ckwisefalse
\fi}
% \end{macrocode}
% \end{macro}
%
% Set default to be \Lopt{clockwise} rotation for positive angles,
% and \Lopt{figuresright} to make all bottoms of sideways floats
% to be at the righthand edge of the paper.
% \begin{macrocode}
\clockwise
\figuresright
% \end{macrocode}
%
% \begin{environment}{sideways}
% The |sideways| environment rotates its contents through the fixed
% angle of 90 degrees counterclockwise.
% \begin{macrocode}
\def\sideways{%
\Grot@setangle{90}%
\setbox\z@\hbox\bgroup\ignorespaces}
\def\endsideways{%
\unskip\egroup
\Grot@x\z@
\Grot@y\z@
\Grot@box
}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{turn}
% The |turn| environment rotates its contents through the given
% angle, leaving the appropriate space.
% \begin{macrocode}
\def\turn#1{%
\ifcl@ckwise
\Grot@setnegangle{#1}
\else
\Grot@setangle{#1}
\fi
\setbox\z@\hbox\bgroup\ignorespaces}
\def\endturn{%
\unskip\egroup
\Grot@x\z@
\Grot@y\z@
\Grot@box
}
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{rotate}
% The |rotate| environment rotates its contents through the given
% angle, leaving no space.
% \begin{macrocode}
\def\rotate#1{%
\ifcl@ckwise
\Grot@setnegangle{#1}
\else
\Grot@setangle{#1}
\fi
\setbox\z@\hbox\bgroup\ignorespaces}
\def\endrotate{%
\unskip\egroup
\Grot@x\z@
\Grot@y\z@
\wd0\z@\dp0\z@\ht0\z@
\Grot@box
}
% \end{macrocode}
% \end{environment}
%
% \begin{macro}{\turnbox}
% A macro version of the |rotate| environment.
%
% |\turnbox{|\meta{degrees}|}{|\meta{text}|}|
% \begin{macrocode}
\def\turnbox#1#2{%
\ifcl@ckwise
\Grot@setnegangle{#1}
\else
\Grot@setangle{#1}
\fi
\setbox\z@\hbox{{#2}}%
\Grot@x\z@
\Grot@y\z@
\wd0\z@\dp0\z@\ht0\z@
\Grot@box
}
% \end{macrocode}
% \end{macro}
%
% \subsection{Sideways figures and tables}
%
% First, a generalized |rotfloat| environment.
% \begin{macro}{\rot@float@box}
% \begin{macro}{\@rotfloat}
% \begin{macro}{\@xrotfloat}
% \begin{macrocode}
\newsavebox\rot@float@box
\def\@rotfloat#1{%
\@ifnextchar[%
{\@xrotfloat{#1}}%
{\edef\@tempa{\noexpand\@xrotfloat{#1}[\csname fps@#1\endcsname]}\@tempa}%
}
\def\@xrotfloat#1[#2]{%
\@float{#1}[#2]%
\begin{lrbox}\rot@float@box
\begin{minipage}\textheight
}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\end@rotfloat}
%
% \begin{macrocode}
\def\end@rotfloat{%
\end{minipage}\end{lrbox}%
\global\advance\r@tfl@t by 1
\label{RF\the\r@tfl@t}%
\message{Adding sideways float with its bottom on the}%
\def\R@@page{\pageref{RF\the\r@fl@t}}%
\wd\rot@float@box\z@
\ht\rot@float@box\z@
\dp\rot@float@box\z@
\vbox to \textheight{%
\if@rot@twoside
\def\R@@page{\pageref{RF\the\r@tfl@t}}%
\else
\let\R@@page\rot@LR
\fi
\ifodd\R@@page
\message{right}%
\vfill
\centerline{\rotatebox{90}{\box\rot@float@box}}%
\else
\message{left}%
\centerline{\rotatebox{-90}{\box\rot@float@box}}%
\vfill
\fi
}%
\end@float
}
% \end{macrocode}
% \end{macro}
%
%
% The following definitions implement the iso-specific stuff.
% First the implementation of the sidewaysfigure environment.
%
% \begin{environment}{sidewaysfigure}
% Use |\def| instead of |\...environment| in order to be OK for both
% redefining the \file{rotating} environment and creating a new 2.09
% environment.
% \begin{macrocode}
\def\sidewaysfigure{%
\iffigs\else\figstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\setfigs{%
\string\floatlist{\listfigurename}{lof}}}
\fi
\fi
\infloattrue\setcounter{floatnote}{0}
\@rotfloat{figure}}
\def\endsidewaysfigure{\end@rotfloat\infloatfalse}
% \end{macrocode}
% \end{environment}
%
% The sidewaystable is similar.
% \begin{environment}{sidewaystable}
% This requires redefinition to take account of the ISO peculiarities.
% \begin{macrocode}
\def\sidewaystable{%
\iftabs\else\tabstrue
\if@filesw \immediate\write\@mainaux{%
\string\gdef\string\settabs{%
\string\floatlist{\listtablename}{lot}}}
\fi
\fi
\infloattrue\intabletrue\setcounter{floatnote}{0}
\@rotfloat{table}}
\def\endsidewaystable{\end@rotfloat\infloatfalse\intablefalse}
% \end{macrocode}
% \end{environment}
%
% \subsection{Rotated captions}
%
% \begin{macro}{\rotcaption}
% \begin{macro}{\@rotcaption}
% This inserts a caption rotated through 90 degrees. The code, which is
% essentially a copy of the normal |\caption| code, is defined
% in the \file{rotation} package.
% \begin{macrocode}
\def\rotcaption{\refstepcounter\@captype\@dblarg{\@rotcaption\@captype}}
\long\def\@rotcaption#1[#2]#3{%
\addcontentsline{\csname ext@#1\endcsname}{#1}{%
\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
\par
\begingroup
\@parboxrestore
\normalsize
\@makerotcaption{\csname fnum@#1\endcsname}{#3}%
\endgroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@makerotcaption}
% The workhorse for rotated captions.
% \begin{macrocode}
\long\def\@makerotcaption#1#2{%
\hspace{\abovecaptionskip}
\setbox\@tempboxa\hbox{{\bf #1 -- #2}}%
\ifdim \wd\@tempboxa > .8\vsize
\rotatebox{90}{%
\begin{minipage}{.8\textheight}{\centering{\bf #1 -- #2}\par}\end{minipage}%
}\par
\else%
\rotatebox{90}{\box\@tempboxa}%
\fi
\hspace{\belowcaptionskip}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\controtcaption}
% A rotated continuation caption.
% \begin{macrocode}
\newcommand{\controtcaption}{\@controtcaption\@captype}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@controtcaption}
% The worker for a rotated continuation caption.
% \begin{macrocode}
\long\def\@controtcaption#1#2{%
\begingroup
\@parboxrestore
\normalsize
\@makerotcaption{\csname fnum@#1\endcsname}{\ignorespaces #2}\par
\endgroup}
% \end{macrocode}
% \end{macro}
%
% The end of the common stuff and the end of the \file{isorot} package.
% \begin{macrocode}
%
% \end{macrocode}
%
%
% \begin{macrocode}
%<*rotne>
% \end{macrocode}
%
%
% \subsection{Trigonometry functions}
%
% {\em The following is the contents of the \file{trig} package written by
% David Carlisle. The code and explanations are from \file{trig.dtx}
% version 1.08, dated 1994/10/16. The original file should be consulted
% for a full explanation.}
%
%
% These macros implement the trigonometric functions, sin, cos and tan.
% In each case two commands are defined. For instance the command
% |\CalculateSin{33}| may be isued at some point, and then anywhere
% later in the document, the command |\UseSin{33}| will return the
% decimal expansion of $\sin(33^\circ)$.
%
% The arguments to these macros do not have to be whole numbers,
% although in the case of whole numbers, \LaTeX\ or plain \TeX\ counters
% may be used. In \TeX{}Book syntax, arguments must be of type:
% \meta{optional signs}\meta{factor}
%
% Some other examples are:\\
% |\CalculateSin{22.5}|, |\UseTan{\value{mycounter}}|,
% |\UseCos{\count@}|.
%
% Note that unlike the psfig macros, these save all previously
% computed values. This could easily be changed, but I thought that in
% many applications one would want many instances of the
% same value. (eg rotating all the headings of a table by the
% \emph{same} amount).
%
% Some useful constants for converting between degrees and radians.
% $$\frac{\pi}{180}\simeq\frac{355}{113\times180}=\frac{71}{4068}$$
% \begin{macrocode}
\chardef\nin@ty=90
\chardef\@clxx=180
\chardef\@lxxi=71
\mathchardef\@mmmmlxviii=4068
% \end{macrocode}
%
% The approximation to $\sin$.
% \begin{eqnarray*}
% \sin(x)& \simeq& x - (1/3!)x^3 + (1/5!)x^5 - (1/7!)x^7 + (1/9!)x^9\\
% &\simeq&\frac{((((7!/9!x^2-7!/7!)x^2+7!/5!)x^2 +7!/3!)x^2+7!/1!)x}
% {7!}\\
% &=&\frac{((((1/72x^2-1)x^2+42)x^2 +840)x^2+5040)x}
% {5040}
% \end{eqnarray*}
%
% \begin{macrocode}
\chardef\@coeffz=72
%\chardef\@coefa=1
\chardef\@coefb=42
\mathchardef\@coefc=840
\mathchardef\@coefd=5040
% \end{macrocode}
%
% \begin{macrocode}
{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}}
\def\TG@rem@pt#1{\expandafter\noPT\the#1\space}
% \end{macrocode}
%
% \begin{macrocode}
\def\TG@term#1{%
\dimen@\@tempb\dimen@
\advance\dimen@ #1\p@}
% \end{macrocode}
%
% \begin{macrocode}
\def\TG@series{%
\dimen@\@lxxi\dimen@
\divide \dimen@ \@mmmmlxviii
\edef\@tempa{\TG@rem@pt\dimen@}%
\dimen@\@tempa\dimen@
\edef\@tempb{\TG@rem@pt\dimen@}%
\divide\dimen@\@coeffz
\advance\dimen@\m@ne\p@
\TG@term\@coefb
\TG@term{-\@coefc}%
\TG@term\@coefd
\dimen@\@tempa\dimen@
\divide\dimen@ \@coefd}
% \end{macrocode}
%
% \begin{macrocode}
\def\CalculateSin#1{{%
\expandafter\ifx\csname sin(\number#1)\endcsname\relax
\dimen@=#1\p@\TG@@sin
\expandafter\xdef\csname sin(\number#1)\endcsname
{\TG@rem@pt\dimen@}%
\fi}}
% \end{macrocode}
%
% \begin{macrocode}
\def\CalculateCos#1{{%
\expandafter\ifx\csname cos(\number#1)\endcsname\relax
\dimen@=\nin@ty\p@
\advance\dimen@-#1\p@
\TG@@sin
\expandafter\xdef\csname cos(\number#1)\endcsname
{\TG@rem@pt\dimen@}%
\fi}}
% \end{macrocode}
%
% \begin{macrocode}
\def\TG@reduce#1#2{%
\dimen@#1#2\nin@ty\p@
\advance\dimen@#2-\@clxx\p@
\dimen@-\dimen@
\TG@@sin}
% \end{macrocode}
%
% \begin{macrocode}
\def\TG@@sin{%
\ifdim\TG@reduce>+%
\else\ifdim\TG@reduce<-%
\else\TG@series\fi\fi}%
% \end{macrocode}
%
% \begin{macrocode}
\def\UseSin#1{\csname sin(\number#1)\endcsname}
\def\UseCos#1{\csname cos(\number#1)\endcsname}
% \end{macrocode}
%
% \begin{macrocode}
\chardef\z@num\z@
\expandafter\let\csname sin(0)\endcsname\z@num
\expandafter\let\csname cos(0)\endcsname\@ne
\expandafter\let\csname sin(90)\endcsname\@ne
\expandafter\let\csname cos(90)\endcsname\z@num
\expandafter\let\csname sin(-90)\endcsname\m@ne
\expandafter\let\csname cos(-90)\endcsname\z@num
\expandafter\let\csname sin(180)\endcsname\z@num
\expandafter\let\csname cos(180)\endcsname\m@ne
% \end{macrocode}
%
% This is accurate to 4 decimal places for angles up to
% $50^\circ$, after that the accuracy tails off, giving
% 57.47894 instead of 57.2900 for $89^\circ$.
% \begin{macrocode}
\def\CalculateTan#1{{%
\expandafter\ifx\csname tan(\number#1)\endcsname\relax
\CalculateSin{#1}%
\CalculateCos{#1}%
\@tempdima\UseCos{#1}\p@
\divide\@tempdima\@iv
\@tempdimb\UseSin{#1}\p@
\@tempdimb\two@fourteen\@tempdimb
\divide\@tempdimb\@tempdima
\expandafter\xdef\csname tan(\number#1)\endcsname
{\TG@rem@pt\@tempdimb}%
\fi}}
% \end{macrocode}
%
% \begin{macrocode}
\def\UseTan#1{\csname tan(\number#1)\endcsname}
% \end{macrocode}
%
% \begin{macrocode}
\mathchardef\two@fourteen=16384
\chardef\@iv=4
% \end{macrocode}
%
% \begin{macrocode}
\expandafter\def\csname tan(90)\endcsname{\errmessage{Infinite tan !}}
\expandafter\let\csname tan(-90)\expandafter\endcsname
\csname tan(90)\endcsname
% \end{macrocode}
%
%
% The end of this package.
% \begin{macrocode}
%
% \end{macrocode}
%
% \section{The XTAB package}
%
% These provide an extension to the \file{supertabular} package
% written by Johannes Braams and Theo
% Jurriens.\footnote{\texttt{supertabular.sty}, version 3.7c, 16 October 1995.}
%
% The major portion of the following documentation is taken from
% \file{supertabular.doc}. The extension provided here enables the
% heading on the table on the last page to differ from those on earlier
% pages of the table. The implementation of the extension is based
% on ideas in David Carlisle's \file{longtable} package.
%
% The first 2e version of this imported much of the code from the
% supertabular package but I found that this did not work well because
% there were incompatible coded versions of supertabular. (Both had
% been obtained from CTAN at the same time but the teTeX version
% was 3.7b while the latest was 3.7c.) I have to make the assumption
% that other users will not have 3.7c, so include all the code here.
% \begin{macrocode}
%<*xtab>
% \end{macrocode}
%
% \begin{macro}{\if@topcaption}
% \begin{macro}{\topcaption}
% \begin{macro}{\bottomcaption}
% The user-commands |\topcaption| and |\bottomcaption| set the
% boolean |@topcaption| to determine where to put the
% tablecaption. The default is to put the caption on the top of
% the table
% \begin{macrocode}
\newif\if@topcaption \@topcaptiontrue
\def\topcaption{\@topcaptiontrue\tablecaption}
\def\bottomcaption{\@topcaptionfalse\tablecaption}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\tablecaption}
% \begin{macro}{\@xtablecaption}
% This command has to function exactly like |\caption| does except
% it has to store its argument (and the optional argument) for
% later processing \emph{within} the supertabular environment.
%
% \begin{macrocode}
\long\def\tablecaption{%
\refstepcounter{table} \@dblarg{\@xtablecaption}}
\long\def\@xtablecaption[#1]#2{%
\long\gdef\@process@tablecaption{\@stcaption{table}[#1]{#2}}}
\global\let\@process@tablecaption\relax
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ifstar}
% This switch is used in the internal macros to remember which
% kind of environment was started.
% \begin{macrocode}
\newif\ifstar
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tabularwidth}
% For the \Lenv{supertabular*} environment it is necessary to
% store the intended width of the tabular.
% \begin{macrocode}
\newdimen\tabularwidth
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@stcaption}
% This is a redefinition of LaTeX's |\@caption|, |\@makecaption| is
% called within a group so as not to return to |\normalsize|
% globally. also a fix is made for the `feature' of the
% |\@makecaption| of \file{article.sty} and friends that a caption ALWAYS
% gets a |\vskip 10pt| at the top and NONE at the bottom. If a user
% wants to precede his table with a caption this results in a
% collision.
%
%
% \begin{macrocode}
\long\def\@stcaption#1[#2]#3{\par%
% \end{macrocode}
% For ISO use we need to make sure that the .lot file is set up
% \begin{macrocode}
\iftabs\else\tabstrue
\if@filesw\immediate\write\@mainaux{%
\string\gdef\string\settabs{%
\string\floatlist{\listtablename}{lot}}}
\fi
\fi
% \end{macrocode}
% Now back to the original code.
% In the ISO styles, for which this extension is designed, the default
% is to put a skip both before and after a caption (in any case, top captions
% on tables look bad if there is no skip after the caption!). So, I have
% modified the skips below.
% \begin{macrocode}
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}
\begingroup
\@parboxrestore
\normalsize
%% \if@topcaption \vskip -10pt \fi
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
%% \if@topcaption \vskip 10pt \fi
\if@topcaption \vskip -10pt \fi
\endgroup}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tablehead}
% \begin{macro}{\tablefirsthead}
%
% |\tablehead| activates the new tabular |\cr| commands.
% \begin{macrocode}
\newcommand\tablehead[1]{\gdef\@tablehead{#1}}
\tablehead{}
\newcommand\tablefirsthead[1]{\gdef\@table@first@head{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\c@PWSTtable}
% \begin{macro}{\PWSToldpages}
% \begin{macro}{\PWSTcurpage}
% \begin{macro}{\PWSTtempc}
% These are counters for the supertabular extension. \Lcount{c@PWSTtable}
% counts the number of supertabulars in case one or more are not captioned.
% \Lcount{PWSToldpages} is a counter holding the number of pages that a
% supertabular uses, and \Lcount{PWSTcurpage} counts the current number
% of suoertabular pages processed. \Lcount{PWSTtempc} is a scratch
% counter.
% \begin{macrocode}
\newcounter{PWSTtable}
\newcount\PWSToldpages
\newcount\PWSTcurpage
\newcount\PWSTtempc
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\tablelasthead}
% \begin{macro}{\@table@last@head}
% \begin{macro}{\notablelasthead}
% |\tablelasthead| is the user command to specify the heading for
% the last page of a supertabular. The command |\notablelasthead|
% switches off the last heading. This has to be used if a last headed
% table precedes one that does not have a special last head.
% \begin{macrocode}
\newcommand{\tablelasthead}[1]{\gdef\@table@last@head{#1}}
\newcommand{\notablelasthead}{\let\@table@last@head\relax}
% \end{macrocode}
% Now initialize these commands.
% \begin{macrocode}
\tablelasthead{}
\notablelasthead
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\tabletail}
% \begin{macro}{\tablelasttail}
% |\tabletail| is the user command to specify the appearance of
% the bottom of each tabular on a page. Special treatment is
% given to the end of the supertabular via the |\tablelasttail|
% command.
%
% If the user uses an extra amount of tabular-data (like
% |\multicolumn|) in |\tabletail| \TeX\ starts looping because of
% the definition of |\nextline|. So make |\\| act like just a |\cr|
% inside this tail to prevent the loop. Save and restore the value
% of |\\|
%
% \begin{macrocode}
\newcommand\tabletail[1]{%
\gdef\@tabletail{%
\noalign{%
\global\let\@savcr=\\
\global\let\\=\cr}%
#1%
\noalign{\global\let\\=\@savcr}}}
\tabletail{}
\newcommand\tablelasttail[1]{\gdef\@table@last@tail{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sttraceon}
% \begin{macro}{\sttraceoff}
% The original supertabular included a tracing mechanism to
% follow the decisions supertabular made about page breaking.
% This is now only used as a debugging mechanism for the
% extension.
%
% \begin{macrocode}
\newif\if@st@trace
\newcommand\sttraceon{\@st@tracetrue}
\newcommand\sttraceoff{\@st@tracefalse}
\newif\if@st@trace
% \end{macrocode}
% The default is to turn tracing off
% \begin{macrocode}
\sttraceoff
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@sttrace}
% A macro that gets the trace message as its argument
% \begin{macrocode}
\newcommand\@sttrace[1]{\if@st@trace\typeout{ST trace: #1}\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\page@left}
% This register holds the estimate of the amount of space left over
% on the current page. This is used in the decision when to start a
% new page.
% \begin{macrocode}
\newdimen\page@left
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\newdimen\actsize % actual pagesize
\newdimen\@tailht % height of table tail (if any)
\newdimen\parboxheight % height plus depth of a parbox-argument
\newdimen\addspace % stores the value of \\[#1]
\newdimen\midlineheight % estimated size of a normal line
\newdimen\pargcorrection % to set page height tolerance if p-arg
\newdimen\computedimens % computation variable
\newbox\tabparbox
% \end{macrocode}
%
% \begin{macro}{\@stabularcr}
% \begin{macro}{\@sxtabularcr}
% These are redefinitions of |\@tabularcr| and |\@xtabularcr|. This
% is needed to include |\nextline| in the definition of
% |\@xtabularcr|.
%
% All redefined macros have names that are similar to the original
% names, except with a leading 's'
% \begin{macrocode}
\def\@stabularcr{{\ifnum0=`}\fi\@ifstar{\@sxtabularcr}{\@sxtabularcr}}
\def\@sxtabularcr{%
\@ifnextchar[{\@sargtabularcr}{\ifnum0=`{\fi}\cr\nextline}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@sargtabularcr}
% \begin{macrocode}
\def\@sargtabularcr[#1]{%
\ifnum0=`{\fi}%
\ifdim #1>\z@
\unskip\@sxargarraycr{#1}
\else
\@syargarraycr{#1}%
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sxargarraycr}
% In this case we need to copy the value of the optional argument
% of |\\| in our private register |\addspace|.
% \begin{macrocode}
\def\@sxargarraycr#1{%
\@tempdima #1\advance\@tempdima \dp \@arstrutbox
\vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr
\noalign{\global\addspace=#1}\nextline}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@syargarraycr}
% Here we need to insert |\nextline|
% \begin{macrocode}
\def\@syargarraycr#1{\cr\noalign{\vskip #1\global\addspace=#1}\nextline}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sstartpbox}
% The macros that deal with parbox columns need to be redefined,
% because we need to know the size of the parbox. Also the maximum
% size of the tabular on this page is shrunk somewhat.
% \begin{macrocode}
\def\@sstartpbox#1{%
\global\advance\page@left by -\pargcorrection
\global\pargcorrection=0pt
% \end{macrocode}
% To achieve our goal we need to save the text in box.
% \begin{macrocode}
\setbox\tabparbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sastartpbox}
% \begin{macrocode}
\def\@sastartpbox#1{%
\bgroup\hsize#1%
\global\advance\page@left by -\pargcorrection
\global\pargcorrection=0pt
\setbox\tabparbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@sendpbox}
% \begin{macro}{\@saendpbox}
% \begin{macrocode}
\def\@sendpbox{%
\unskip\strut\par\egroup
\computedimens=\ht\tabparbox
\advance\computedimens by \dp\tabparbox
\ifnum\parboxheight<\computedimens
\global\parboxheight=\computedimens
\fi
\computedimens=\z@
\box\tabparbox\hfil}
\def\@saendpbox{%
\unskip\strut\par\egroup
\computedimens=\ht\tabparbox
\advance\computedimens by \dp\tabparbox
\ifnum\parboxheight<\computedimens
\global\parboxheight=\computedimens
\fi
\computedimens=\z@
\unvbox\tabparbox\egroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\calmidlineheight}
% Estimates the height of normal line taking |\arraystretch| into
% account.
% \begin{macrocode}
\def\calmidlineheight{%
\midlineheight=\arraystretch \baslineskp
\global\advance\midlineheight by 1\p@
% \@sttrace{Average line height:\the\midlineheight}%
\global\pargcorrection=4\midlineheight
% \@sttrace{Correction for p columns: \the\pargcorrection}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@calfirstpageht}
% Estimates the space left on the current page and decides whether
% the tabular can be started on this page or on a new page.
% \begin{macrocode}
\def\@calfirstpageht{%
% \@sttrace{Calculating height of tabular on first page}
% \end{macrocode}
% The \TeX\ register |\pagetotal| contains the height of the page
% sofar, the \LaTeX\ register |\@colroom| contains the height of
% the column.
% \begin{macrocode}
\global\actsize\pagetotal
\global\page@left\@colroom
% \@sttrace{pagetotal = \the\pagetotal;
% page@left = \the\page@left}%
% \end{macrocode}
% When we are in twocolumn mode \TeX\ may still be collecting
% material for the first column although there seems to be no space
% left. In this case we have to check against two times |\page@left|.
% \begin{macrocode}
\if@twocolumn
% \@sttrace{two column mode}%
\if@firstcolumn
% \@sttrace{First column}%
\ifnum\actsize > \page@left
\global\maxsize=2\page@left
\ifnum\actsize > \page@left
\newpage\@calnextpageht
\@sttrace{starting new page}%
\else
% \end{macrocode}
% In this case we're in the second column, so we have to compensate
% for the material in the first column.
% \begin{macrocode}
\@sttrace{Second column}%
\global\advance\page@left -\actsize
\global\advance\page@left -\@colroom
\fi
\fi
\fi
\else
% \end{macrocode}
% In one column mode there is a simple decision.
% \begin{macrocode}
\@sttrace{one column mode}%
\ifnum\actsize > \page@left
\@sttrace{starting new page}%
\newpage\@calnextpageht
% \end{macrocode}
% When we are not starting a new page subtract the size of the
% material already on it from the available space.
% \begin{macrocode}
\else
\global\advance\page@left by -\actsize
\global\actsize\z@
\fi
\fi
% \end{macrocode}
% To decide when to start a new page, we need to know the vertical
% size of the tail of the table.
% \begin{macrocode}
\ifx\empty\@tabletail
\@tailht=\z@
\else
\setbox\@tempboxa=\vbox{\@arrayparboxrestore%
\expandafter\tabular\expandafter{\tableformat}
\@tabletail\endtabular}
\@tailht=\ht\@tempboxa\advance\@tailht\dp\@tempboxa
\fi
% \end{macrocode}
% We add the average height of a line to this because when we
% decide to continue the tabular we need to have enough space left
% for one line an the tail.
% \begin{macrocode}
\advance\@tailht by \midlineheight
% \@sttrace{Height of tail: \the\@tailht}
% \@sttrace{Maximum height of tabular: \the\page@left}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@calnextpageht}
% This calculates the maximum height of the tabular on all
% subsequent pages of the supertabular environment. The correction
% for parbox columns is somewhat smaller then on the first page of
% the environment
% \begin{macrocode}
\def\@calnextpageht{%
% \@sttrace{Calculating height of tabular on next page}
\global\page@left\@colroom
\global\pargcorrection=2\midlineheight
% \@sttrace{Correction for p columns: \the\pargcorrection}%
\global\actsize=\z@
% \@sttrace{Maximum height of tabular: \the\page@left}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\x@supertabular}
% The body of the beginning of both environments is stored in a
% single macro as the code is shared.
% If the caption should come at the top we insert it here.
%
% This macro has been modified as part of the supertabular extension.
% \begin{macrocode}
\def\x@supertabular{%
% \end{macrocode}
% At the end of processing each supertabular (see later) the number pf
% pages consumed by the supertabular is written to the \file{.aux} file.
% At the start of a supertabular, after incrementing the number of
% supertabulars processed, the prior number of pages are read from
% the file. These are stored in \Lcount{PWSToldpages}.
% \begin{macrocode}
\global\advance\c@PWSTtable\@ne
\global\expandafter\let\expandafter\PWSTtempc
\csname PWST@\romannumeral\c@PWSTtable\endcsname
% \end{macrocode}
% We have to take account of the fact that there might be no entry in
% the \file{.aux} file, and hence the oldpages number might not be set.
% (I'm sure that there must be a more elegant way of doing this, but
% it works.)
% \begin{macrocode}
\ifx\PWSTtempc\relax
\@sttrace{Table \the\c@PWSTtable: PWSTtempc = relax}
\PWSToldpages=\@ne
\else
\PWSToldpages=\PWSTtempc
\fi
% \end{macrocode}
% Set the current page counter to unity.
% \begin{macrocode}
\@sttrace{Table \the\c@PWSTtable: oldpages set to \the\PWSToldpages}
\PWSTcurpage=\@ne
% \end{macrocode}
%
% Now we return to the original supertabular.
%
% \begin{macrocode}
\if@topcaption \@process@tablecaption \fi
% \end{macrocode}
% Save the original definition of |\\|.
% \begin{macrocode}
\global\let\@oldcr=\\
% \end{macrocode}
% Save the current value of |\baselineskip|, as we need it in the
% calculation of the average height of a line.
% \begin{macrocode}
\def\baslineskp{\baselineskip}%
\calmidlineheight
\@calfirstpageht
% \end{macrocode}
% We have to check whether \texttt{array.sty} was loaded, because
% some of the internal macros have different names.
% \begin{macrocode}
\ifx\undefined\@classix
% \end{macrocode}
% Save old |\@tabularcr| and insert the definition of
% |\@stabularcr|.
% \begin{macrocode}
\let\@@tabularcr\@tabularcr
\let\@tabularcr\@stabularcr
% \end{macrocode}
% Activate the new parbox algorithm.
% \begin{macrocode}
\let\@@startpbox=\@sstartpbox
\let\@@endpbox=\@sendpbox
\else
% \end{macrocode}
% When \texttt{array.sty} was loaded things are a bit different.
% \begin{macrocode}
\let\@@tabularcr\@arraycr
\let\@arraycr\@stabularcr
\let\org@startpbox=\@startpbox
\let\org@endpbox=\@endpbox
\let\@startpbox=\@sastartpbox
\let\@endpbox=\@saendpbox
\fi
% \end{macrocode}
%
% Moved the check for the use of |\tablefirsthead| to before the start of
% the tabular environment in order to make the |\futurelet| inside |\hline|
% do its work correctly (15.02.91)
%
% Check if the head of the table should be different for the first
% and subsequent pages.
% \begin{macrocode}
\ifx\@table@first@head\undefined
\let\@@tablehead=\@tablehead
\else
\let\@@tablehead=\@table@first@head
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\supertabular}
% We start by looking for an optional argument, which will be duly
% ignored as it seems to make no sense to try to align a multipage
% table in the middle...
% \begin{macrocode}
\def\supertabular{%
\@ifnextchar[{\@supertabular}%]
{\@supertabular[]}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@supertabular}
% We can now save the preamble of the tabular in a macro.
% \begin{macrocode}
\def\@supertabular[#1]#2{%
\def\tableformat{#2}
% \@sttrace{Starting a new supertabular}
% \end{macrocode}
% Then remember that this is not a \textsf{supertabular*}
% environment.
% \begin{macrocode}
\global\starfalse
% \end{macrocode}
% Most of the following code is shared between the
% \Lenv{supertabbular} and \Lenv{supertabular*} environments. So to
% avoid duplication it is stored in a macro.
% \begin{macrocode}
\x@supertabular
% \end{macrocode}
% Finally start a normal \textsf{tabular} environment.
% \begin{macrocode}
\expandafter\tabular\expandafter{\tableformat}
\@@tablehead}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\supertabular*}
% We start by looking for the optional argument of the tabular
% environment.
% \begin{macrocode}
\@namedef{supertabular*}#1{%
\@ifnextchar[{\@nameuse{@supertabular*}{#1}}%
{\@nameuse{@supertabular*}{#1}[]}%]
}
% \end{macrocode}
% We start by saving the intended width and the preamble of the
% \textsf{tabular*}.
% \begin{macrocode}
\@namedef{@supertabular*}#1[#2]#3{%
% \@sttrace{Starting a new supertabular*}
\def\tableformat{#3}
\tabularwidth=#1\relax
\global\startrue
% \end{macrocode}
% Now we can call the common code for both environments.
% \begin{macrocode}
\x@supertabular
% \end{macrocode}
% And we can start a normal \textsf{tabular*} environment.
% \begin{macrocode}
\expandafter\csname tabular*\expandafter\endcsname
\expandafter{\expandafter\tabularwidth\expandafter}%
\expandafter{\tableformat}%
\@@tablehead}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endsupertabular}
% \begin{macro}{\endsupertabular*}
% This closes both environments.
%
% For the extension, this macro has been modified to write out
% to the \file{.aux} file the
% number of pages used for the supertabular.
% \begin{macrocode}
\def\endsupertabular{%
\ifx\@table@last@tail\undefined
\@tabletail
\else
\@table@last@tail
\fi
\csname endtabular\ifstar*\fi\endcsname
% \end{macrocode}
% Restore the original definition of |\@tabularcr|
% \begin{macrocode}
\ifx\undefined\@classix
\let\@tabularcr\@@tabularcr
\else
\let\@arraycr\@@tabularcr
\let\@startpbox=\org@startpbox
\let\@endpbox=\org@endpbox
\fi
% \end{macrocode}
% Check if we have to insert a caption and restore to default
% behaviour of putting captions at the top.
% \begin{macrocode}
\if@topcaption
\else
\@process@tablecaption
\@topcaptiontrue
\fi
% \end{macrocode}
%
% Restore the meaning of |\\| to the one it had before the start
% of this environment. Also re-initialize some control-sequences
%
% \begin{macrocode}
\global\let\\=\@oldcr
\let\@table@first@head\undefined
\let\@table@last@tail\undefined
\global\let\@process@tablecaption\relax
% \end{macrocode}
% Now write to the \file{.aux} file. What gets written is
% |\PWST@vi{4}|, assuming that the value of \Lcount{c@PWSTtable} is 6
% and the value of \Lcount{PWSTcurpage} is 4.
% \begin{macrocode}
\if@filesw\immediate\write\@auxout%
{\gdef\string\PWST@\romannumeral\c@PWSTtable{\the\PWSTcurpage}}
\@sttrace{Table \the\c@PWSTtable: wrote curpage \the\PWSTcurpage}
\fi
% \@sttrace{Ended a supertabular\ifstar*\fi}
}
% \end{macrocode}
%
% The definition of the ending of the \Lenv{supertabular*}
% environment is simple:
% \begin{macrocode}
\expandafter\let\csname endsupertabular*\endcsname\endsupertabular
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\nextline}
% This macro is called by each |\\| inside the tabular environment.
% It updates the estimate of the amount of space left on the
% current page and starts a new page if necessary.
% \begin{macrocode}
\def\nextline{%
\noalign{%
\ifnum\parboxheight<\midlineheight
% \end{macrocode}
% If there is a non-empty line, but an empty parbox, then
% |\parboxheight| might be non-zero, but too small thereby breaking
% the algorithm. Therefore we estimate the height of the line to be
% |\midlineheight| in this case.
% \begin{macrocode}
\global\advance\page@left -\midlineheight
% \end{macrocode}
% |\addspace| is the value of the optional argument of |\\|.
% \begin{macrocode}
\global\advance\page@left -\addspace
\else
% \end{macrocode}
% When the parbox was not empty we take into account its height
% (plus a bit extra).
% \begin{macrocode}
% \@sttrace{Added par box with height \the\parboxheight}%
\global\advance\page@left -\parboxheight
\global\advance\page@left -0.1\parboxheight
\global\parboxheight\z@
\fi
\global\addspace=\z@
% \@sttrace{Space left for tabular: \the\page@left}
}
% \end{macrocode}
% When there is not enough space left we start a new page.
% \begin{macrocode}
\ifnum\page@left<\@tailht
\st@newpage
\else
% \end{macrocode}
%
% This line is necessary because the tablehead has to be inserted
% *after* the |\if\else\fi|-clause. For this purpose |\st@next| is
% used. In the middle of tableprocessing it shoud be an *empty*
% macro (*not* |\relax|). (15.2.91)
% \begin{macrocode}
\noalign{\global\let\st@next\@empty}%
\fi\st@next}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\st@newpage}
% This macro performs the actions necessary to start a new page.
%
% This macro is also modified for the extension to supertabluar.
%
% \begin{macrocode}
\def\st@newpage{%
% \noalign{\@sttrace{Starting new page, writing tail}}
% \end{macrocode}
% Output |\tabletail|, close the tabular environment, output all
% material and start a fresh new page.
% \begin{macrocode}
\@tabletail
\ifstar
\csname endtabular*\endcsname
\else
\endtabular
\fi
% \if@twocolumn
% \if@firstcolumn
% \newpage\@calnextpageht
% \global\actsize=\z@
% \else
% \newpage\@calnextpageht
% \fi
% \else
\newpage\@calnextpageht
% \fi
\let\st@next\@tablehead
% \@sttrace{writing head}
% \end{macrocode}
% This is the extension code. The current page counter is incremented
% and it is checked against the old page counter to see if this is
% the last page of this supertabular. If it is, and there are more than
% one pages and the last table heading has been specified,
% then the heading is set to |\@table@last@head|
% \begin{macrocode}
\global\advance\PWSTcurpage\@ne
\@sttrace{Table \the\c@PWSTtable: curpage (\the\PWSTcurpage),
oldpages (\the\PWSToldpages)}
\ifnum\PWSTcurpage=\PWSToldpages
\ifnum\PWSTcurpage>\@ne
\ifx\@table@last@head\relax
\let\st@next\@tablehead
\else
\let\st@next\@table@last@head
\fi
\fi
\fi
% \end{macrocode}
% Now we are back to the original supertabular code.
% \begin{macrocode}
\ifstar
\expandafter\csname tabular*\expandafter\endcsname
\expandafter{\expandafter\tabularwidth\expandafter}%
\expandafter{\tableformat}%
\else
\expandafter\tabular\expandafter{\tableformat}%
\fi}
% \end{macrocode}
% \end{macro}
%
% The end of this package
% \begin{macrocode}
%
% \end{macrocode}
%
%
% \Finale
%
\endinput