\newcommand{\tmaddonversiondate}{1995/07/26}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{atttmaddon}[\tmaddonversiondate Misc TM addon macros]
%
%
% Changes: (by tla)
% 89-Feb-01 add tmnotice
% 89-Feb-27 change draftmark to add date/time option;
% contributed by Dennis DeBruler
% 89-Feb-28 added \hhmm and \hhmm*
% 89-Aug-04 added simpleheadandfoot pagestyle
% 89-Aug-24 added varhline (var width hlines)
% 89-Dec-13 moved \@cite redef here from tm.sty
% 90-May-30 fixed markdraft to add bottommark even if
% propietary level not set
% 90-Jul-05 added inlinelist environment
% 90-Aug-27 changed UNIX tm notice
% 91-Feb-25 corrected spelling of propr notice USL
% 91-May-02 added numenum to force arabic numbered lists
% 91-May-17 removed right indent from the added enumerations
% 91-May-28 added symbol for cents.
% 91-Jun-05 added typed caption to override float type
% this is for generated TeX where type may not
% be known when float begun.
% 91-Jul-02 changed the implementation of the enums to use
% the standard enum levels and simply override
% the label defs
%
% 95-Jul-26 (HWT) converted to LateX2e
%
% various extensions to LaTeX used by tm and related styles
%
% raise citations like footnotes
%
\newif\ifraisedcite%raises citations [1] above line
\newcommand{\raisedcitations}{\raisedcitetrue}
\newcommand{\noraisedcitations}{\raisedcitefalse}
\raisedcitations% default
\def\@cite#1#2{%
\ifraisedcite\raisebox{3pt}{\footnotesize [{#1\if@tempswa , #2\fi}]}
\else [{#1\if@tempswa , #2\fi}]\fi}
%
% Additional enumeration styles: Roman roman Alph alph num(arabic)
%
\newcount\nextenumdepth
%
\newenvironment{Romanenum}{%
\nextenumdepth\@enumdepth
\advance\nextenumdepth by1
\@namedef{labelenum\romannumeral\the\nextenumdepth}%
{\Roman{enum\romannumeral\the\nextenumdepth}.}%
\@namedef{theenum\romannumeral\the\nextenumdepth}%
{\Roman{enum\romannumeral\the\nextenumdepth}}%
\begin{enumerate}%
}{\end{enumerate}}
\newenvironment{romanenum}{%
\nextenumdepth\@enumdepth
\advance\nextenumdepth by1
\@namedef{labelenum\romannumeral\the\nextenumdepth}%
{\roman{enum\romannumeral\the\nextenumdepth}.}%
\@namedef{theenum\romannumeral\the\nextenumdepth}%
{\roman{enum\romannumeral\the\nextenumdepth}}%
\begin{enumerate}%
}{\end{enumerate}}
\newenvironment{Alphenum}{%
\nextenumdepth\@enumdepth
\advance\nextenumdepth by1
\@namedef{labelenum\romannumeral\the\nextenumdepth}%
{\Alph{enum\romannumeral\the\nextenumdepth}.}%
\@namedef{theenum\romannumeral\the\nextenumdepth}%
{\Alph{enum\romannumeral\the\nextenumdepth}}%
\begin{enumerate}%
}{\end{enumerate}}
\newenvironment{alphenum}{%
\nextenumdepth\@enumdepth
\advance\nextenumdepth by1
\@namedef{labelenum\romannumeral\the\nextenumdepth}%
{\alph{enum\romannumeral\the\nextenumdepth}.}%
\@namedef{theenum\romannumeral\the\nextenumdepth}%
{\alph{enum\romannumeral\the\nextenumdepth}}%
\begin{enumerate}%
}{\end{enumerate}}
\newenvironment{numenum}{%
\nextenumdepth\@enumdepth
\advance\nextenumdepth by1
\@namedef{labelenum\romannumeral\the\nextenumdepth}%
{\arabic{enum\romannumeral\the\nextenumdepth}.}%
\@namedef{theenum\romannumeral\the\nextenumdepth}%
{\arabic{enum\romannumeral\the\nextenumdepth}}%
\begin{enumerate}%
}{\end{enumerate}}
%
% new macros
%
\newcommand{\bottommark}{}
\newcommand{\markbottom}[1]{\def\bottommark{#1}}
% draft mark macros
\newsavebox{\draftmarkL}
\newsavebox{\draftmarkR}
\sbox{\draftmarkL}{\vtop{}}
\sbox{\draftmarkR}{\vtop{}}
\newcount\hh % TIME OF DAY by Nelson Beebe in texhax.86.002
\newcount\mm
\def\hhmm{\mm=\time%
\hh=\time%
\divide\hh by 60%
\divide\mm by 60%
\multiply\mm by 60%
\mm=-\mm%
\advance\mm by \time%
\@ifstar{\number\hh:\ifnum\mm<10{}0\fi\number\mm}%
{\ifnum\hh>12\relax\advance\hh by-12\fi\relax%
\number\hh:\ifnum\mm<10{}0\fi\number\mm
}}
\newcommand{\markdraft}{%
\@ifstar
{\sbox{\draftmarkL}%
{\vbox to 48pt
{\baselineskip 12pt%
\rlap{\textit{DRAFT}}
\rlap{\textit{\today}}
\rlap{\textit{\hhmm*}}
\vfil
}%
}%
\sbox{\draftmarkR}%
{\vbox to 48pt
{\baselineskip 12pt%
\llap{\textit{DRAFT}}
\llap{\textit{\today}}
\llap{\textit{\hhmm*}}
\vfil
}%
}%
\makeproprietarymark{}{}{}{}
}
{\sbox{\draftmarkL}%
{\vbox to 48pt
{\baselineskip 12pt%
\rlap{\textit{DRAFT}}
\vfil
}%
}%
\sbox{\draftmarkR}%
{\vbox to 48pt
{\baselineskip 12pt%
\llap{\textit{DRAFT}}
\vfil
}%
}%
\makeproprietarymark{}{}{}{}}}
%
% new list style called labeled -- similar to itemize but the label is
% set left justified in the label region and it takes the leftmargin
% as a parameter. For example:
%
% label The item. If it is continued onto a second line, the
% continuation is indented as the first to leftmargin.
%
\def\labeledlabel#1{#1\hfil}
\def\labeled#1{\list{}{\leftmargin#1
\labelwidth\leftmargin\advance\labelwidth-\labelsep
\let\makelabel\labeledlabel}}
\let\endlabeled=\endlist
%
% new page styles like myhead but with a centered foot \bottommark
%
\newcommand{\tm@privatemark}{%
\if V\proprietarylevel{\hbox{}\hfill\textbf{PRIVATE}\hfill}%
\else{}%
\fi}
\def\ps@simpleheadandfoot{%
\let\@mkboth\@gobbletwo
\def\@oddhead{\hbox{}%
\if V\proprietarylevel{\hfill\textbf{PRIVATE}\hfill}%
\else{}\hfil
\fi
\rmfamily - \thepage\ -\hfil}%
\def\@oddfoot{\hbox{}\hfill \bottommark\hfill}%
\def\@evenhead{\hbox{}\hfil \rmfamily - \thepage\ -%
\if V\proprietarylevel{\hfill\textbf{PRIVATE}\hfill}%
\else{}\hfil\hbox{}%
\fi}%
\def\@evenfoot{\hbox{}\hfill \bottommark\hfill}%
\let\sectionmark\@gobble
\let\subsectionmark\@gobble
}
%
\def\ps@headandfoot{%
\let\@mkboth\@gobbletwo
\def\@oddhead{\hbox{}%
\if V\proprietarylevel{\hfill\textbf{PRIVATE}\hfill}%
\else\textsl{\rightmark}\hfil
\fi
\textrm{\thepage}}%
\def\@oddfoot{\hbox{}\hfill \bottommark\hfill}%
\def\@evenhead{\textrm{\thepage}%
\if V\proprietarylevel{\hfill\textbf{PRIVATE}\hfill}%
\else\hfil\textsl{\leftmark}\hbox{}%
\fi}%
\def\@evenfoot{\hbox{}\hfill \bottommark\hfill}%
\let\sectionmark\@gobble
\let\subsectionmark\@gobble
}
%
% new page style without headers but with a centered foot \bottommark
%
\def\ps@onlyfoot{%
\let\@mkboth\@gobbletwo
\def\@oddhead{\tm@privatemark}%
\def\@oddfoot{\hbox{}\hfill \bottommark\hfill}%
\def\@evenhead{\tm@privatemark}%
\def\@evenfoot{\hbox{}\hfill \bottommark\hfill}%
\let\sectionmark\@gobble
\let\subsectionmark\@gobble
}
%
%
% AT&T proprietary markings
%
\newsavebox{\tm@propmark}
\newsavebox{\tm@bottommark}
\newcommand{\makeproprietarymark}[4]{%
\sbox{\tm@propmark}{\vbox{\baselineskip 12pt%
\hbox to 3.5in{\hfil #1\hfil}%
\hbox to 3.5in{\hfil #2\hfil}%
\hbox to 3.5in{\hfil #3\hfil}%
\hbox to 3.5in{\hfil #4\hfil}}}%
\sbox{\tm@bottommark}{%
\hbox to \textwidth{\usebox{\draftmarkL}\hfil\usebox{\tm@propmark}%
\hfil\usebox{\draftmarkR}}}%
\def\bottommark{\usebox{\tm@bottommark}}%
\footskip60pt}
\newcommand{\proprietarylevel}{N}
\newcommand{\markprivate}{%
\gdef\proprietarylevel{V}%
\makeproprietarymark{}%
{\textbf{PRIVATE}}{}{}}
\newcommand{\markproprietary}{%
\gdef\proprietarylevel{P}%
\makeproprietarymark
{\textit{AT\&T -- PROPRIETARY}}%
{Use pursuant to Company Instructions}{}{}}%
\newcommand{\markrestricted}{%
\gdef\proprietarylevel{R}%
\makeproprietarymark
{\textit{AT\&T -- PROPRIETARY (RESTRICTED)}}%
{Solely for authorized persons}%
{having a need to know pursuant}%
{to Company Instructions}
\itdsrestrict}
\newcommand{\markregistered}{%
\gdef\proprietarylevel{G}%
\makeproprietarymark%
{\textit{AT\&T -- PROPRIETARY (REGISTERED)}}%
{Solely for authorized persons}%
{having a need to know and}%
{subject to cover sheet instructions}
\itdsrestrict}
\newcommand{\marknone}{%
\gdef\proprietarylevel{N}%
\makeproprietarymark{}{}{}{}}
%
\newcommand{\markedfootnote}[2]{{\def\thefootnote{#1}\footnote[1]{#2}}}
\newcommand{\tm@no}{no}
\newcommand{\unixfootnoteprinted}{no}
\newcommand{\UNIX}{%
UNIX%
\ifx\unixfootnoteprinted\tm@no%
\newbox\regbox
\setbox\regbox=\hbox{\@regmark}%
\markedfootnote{\copy\regbox}{UNIX is a registered trademark of
UNIX System Laboratories, Inc.}%
\gdef\unixfootnoteprinted{yes}%
\fi}
\newcommand{\boxit}[1]{\vbox{\hrule\hbox{\vrule\kern3pt
\vbox{\kern3pt\hbox{#1}\kern3pt}\kern3pt\vrule}\hrule}}
\newcommand{\@regmark}{{\ooalign
{\hfil\raise.07ex\hbox{\tiny R}\hfil\crcr{\scriptsize\mathhexbox20D}}}}
\newcommand{\regmark}{\raise1ex\hbox{\@regmark}}
\newbox\regbox
\setbox\regbox=\hbox{\@regmark}
\newcommand{\regnotice}[1]{%
\markedfootnote{\copy\regbox}{#1}}
\newcommand{\tm}{\raise5pt\hbox{{\rm\tiny TM}}}
\newbox\tmbox
\setbox\tmbox=\hbox{\tm}
\newcommand{\tmnotice}[1]{%
\setbox\tmbox=\hbox{{\rm\tiny TM}}%
\markedfootnote{\copy\tmbox}{#1}}%
\newcommand{\cents}{\hbox{\rm\rlap/c}}
%
% for tabular environment -- allows variable hline width
% \hline will not tolerate a change to \arrayrulewidth just before it
\def\varhline#1{\noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
\@tempa\@xhline}
%
% ``list'' environment that does NOT use a display but puts list in
% line in the paragraph. CANNOT BE NESTED
%
% Currently leaves space before `;' (bad) and after last item though
% one often wants to end sentence there and so add a `.' without a space
% How can I keep from adding space at end of item???
%
\newcount\@inlineitemnum\@inlineitemnum=0
\def\inlinelist{\gdef\@newinlinelist{Y}%
\begingroup\def\item{\if Y\@newinlinelist{\gdef\@newinlinelist{N}}%
\else{}\fi% inter item punctuation such as `;' could go here but it
% is difficult to supress the space before it; one must
% end each item with a %, and one may not want the same
% punctuation for each list so let's let the user add own
% punctuation at end of each item. Logic left in to show
% how punctuation can be added.
\advance\@inlineitemnum by1 (\the\@inlineitemnum )\ }}
\def\endinlinelist{\endgroup}
\newcommand{\typedcaption}[1]{\refstepcounter{#1} \@dblarg{\@caption{#1}}}
|