diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:11 +0000 |
commit | a19a9bfb764ac906e2e037a0a665676540a73faa (patch) | |
tree | 9b5ae2d20ca0145e3932f8e5068326e5460cebe1 /Master/texmf-dist/tex/latex/listofsymbols | |
parent | c0efaaed3d4dad289ab4fb2cc2d46d29c7f61b69 (diff) |
listofsymbols
git-svn-id: svn://tug.org/texlive/trunk@1047 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/listofsymbols')
-rw-r--r-- | Master/texmf-dist/tex/latex/listofsymbols/listofsymbols.sty | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/listofsymbols/listofsymbols.sty b/Master/texmf-dist/tex/latex/listofsymbols/listofsymbols.sty new file mode 100644 index 00000000000..e26d79c3044 --- /dev/null +++ b/Master/texmf-dist/tex/latex/listofsymbols/listofsymbols.sty @@ -0,0 +1,176 @@ +%% +%% This is file `listofsymbols.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listofsymbols.dtx +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from listofsymbols.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file listofsymbols.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) + +\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{listofsymbols} +\RequirePackage{ifthen} \RequirePackage{calc} \newboolean{b@nomencl} +\newboolean{b@final} \newboolean{b@Final} \newboolean{b@pageno} +\newboolean{b@xspace} +\DeclareOption{nomencl}{\setboolean{b@nomencl}{true}} +\DeclareOption{draft}{\setboolean{b@nomencl}{false} + \setboolean{b@final}{false}\setboolean{b@Final}{false}} +\DeclareOption{final}{\setboolean{b@nomencl}{false} + \setboolean{b@final}{true}\setboolean{b@Final}{false}} +\DeclareOption{Final}{\setboolean{b@nomencl}{false} + \setboolean{b@final}{true}\setboolean{b@Final}{true}} +\DeclareOption{pageno}{\setboolean{b@pageno}{true}} +\DeclareOption{nopageno}{\setboolean{b@pageno}{false}} +\DeclareOption{usexspace}{\setboolean{b@xspace}{true}} +\DeclareOption{noxspace}{\setboolean{b@xspace}{false}} + +\ExecuteOptions{draft,nopageno,usexspace} +\ProcessOptions + +\newlength{\symwidth} +\setlength{\symwidth}{2.5cm} +\newlength{\sympagenowidth} + +\ifthenelse{\boolean{b@nomencl}} + {\RequirePackage{nomencl}}{} +\ifthenelse{\boolean{b@xspace}} + {\RequirePackage{xspace} + \newcommand{\spaceaftersym}{\xspace}} + {\newcommand{\spaceaftersym}{}} +\ifthenelse{\boolean{b@pageno}} + {\settowidth{\sympagenowidth}{9999}} + {\setlength{\sympagenowidth}{0cm}} + +\newcommand{\printsymline}[5] +{\makebox[2.5cm][l]{#2} +\parbox[t]{\textwidth-\symwidth-\sympagenowidth} +{\begin{raggedright}\strut% +\ifthenelse{\boolean{b@final}}{#4}{$\backslash$#3 --- #4}% +\strut\end{raggedright}}% +\ifthenelse{\boolean{b@pageno}}{\hfill #5}{}% +\newline} + +\ifthenelse{\boolean{b@Final}} +{\newcommand{\addsymline}[5]{} +\newcommand{\opensymdef}{} +\newcommand{\closesymdef}{}} +{\newcommand{\opensymdef} +{\newwrite\@sym \immediate\openout\@sym=\jobname.sym +\newwrite\@sub \immediate\openout\@sub=\jobname.sub} +\newcommand{\closesymdef} +{\immediate\closeout\@sym +\immediate\closeout\@sub} +\ifthenelse{\boolean{b@final}} +{\newcommand{\addsymline}[5] +{\ifthenelse{\equal{#4}{}}{} +{\immediate\write#5{\string\printsymline {#1}% +{\string\ensuremath{#2}}% +{\string\texttt{#3}}{#4}% +{\thepage}}}}} +{\newcommand{\addsymline}[5] +{\immediate\write#5{\string\printsymline {#1}% +{\string\ensuremath{#2}}% +{\string\texttt{#3}}{#4}% +{\thepage}}}}} + +\newcommand{\@createsym}[3] +{\expandafter\newcommand\expandafter{\csname#2\endcsname} + {\relax\ensuremath{#3}\spaceaftersym} %similar to formula.sty +\expandafter\newcommand\expandafter{\csname#2doc\endcsname}{#1} +\expandafter\newcommand\expandafter{\csname#2tabdoc\endcsname} + {\ensuremath{#3} & #1}} + +\ifthenelse{\boolean{b@nomencl}} +{\newcommand{\newsym}[3][] +{\@createsym{#1}{#2}{#3} +\ifthenelse{\equal{#1}{}}{}{\nomenclature{\ensuremath{#3}}{#1}}}} +{\newcommand{\newsym}[3][] +{\@createsym{#1}{#2}{#3} +\addsymline{#3}{#3}{#2}{#1}{\@sym}}} + +\newcommand{\@createsub}[3] +{\expandafter\newcommand\expandafter{\csname#2\endcsname} + {\relax\ensuremath{_{#3}}\spaceaftersym} +\expandafter\newcommand\expandafter{\csname#2doc\endcsname}{#1} +\expandafter\newcommand\expandafter{\csname#2tabdoc\endcsname} + {\ensuremath{#3} & #1}} + +\ifthenelse{\boolean{b@nomencl}} +{\newcommand{\newsub}[3][] +{\@createsub{#1}{#2}{#3} +\ifthenelse{\equal{#1}{}}{}{\nomenclature{\ensuremath{#3}}{#1}}}} +{\newcommand{\newsub}[3][] +{\@createsub{#1}{#2}{#3} +\addsymline{}{#3}{#2}{#1}{\@sub}}} + +\newcommand{\subsep}[1][]{{}_{#1}{}} + +\newcommand{\symheadingname}{List of Symbols} +\newcommand{\subheadingname}{List of Subscripts} +\newcommand{\bothheadingname}{Notation} + +\ifthenelse{\boolean{b@final}} +{\newcommand{\symheading} +{\section*{\symheadingname}} +\newcommand{\subheading} +{\section*{\subheadingname}}} +{\newcommand{\symheading} +{\section*{\symheadingname\ (draft)} +\makebox[\symwidth][l]{\bf Symbol}{\bf Description} +\ifthenelse{\boolean{b@pageno}}{\hfill{\bf Defined on page}}{}} +\newcommand{\subheading} +{\section*{\subheadingname\ (draft)} +\makebox[\symwidth][l]{\bf Subscript}{\bf Description} +\ifthenelse{\boolean{b@pageno}}{\hfill{\bf Defined on page}}{}}} + +\ifthenelse{\boolean{b@nomencl}} +{\makeglossary +\renewcommand{\nomname}{\symheadingname} +\setlength{\nomitemsep}{-1\parsep} +\newcommand{\listofsymbols}{\printglossary} +\newcommand{\listofsubscripts}{}} +{\newlength{\old@parskip} +\newlength{\old@parindent} +\newcommand{\listofsymbols}{ + \setlength{\old@parskip}{\parskip} + \setlength{\parskip}{0pt} + \setlength{\old@parindent}{\parindent} + \setlength{\parindent}{0pt} +\symheading\par +\IfFileExists{\jobname.sym}{\@input@{\jobname.sym}}{} + \setlength{\parskip}{\old@parskip} + \setlength{\parindent}{\old@parindent}} +\newcommand{\listofsubscripts}{ + \setlength{\old@parskip}{\parskip} + \setlength{\parskip}{0pt} + \setlength{\old@parindent}{\parindent} + \setlength{\parindent}{0pt} +\subheading\par +\IfFileExists{\jobname.sub}{\@input@{\jobname.sub}}{} + \setlength{\parskip}{\old@parskip} + \setlength{\parindent}{\old@parindent}}} + +\ifthenelse{\boolean{b@nomencl}} +{\newcommand{\listofboth}{\listofsymbols}} +{\newcommand{\listofboth} +{\renewcommand{\symheading}{\subsection*{\symheadingname}} +\renewcommand{\subheading}{\subsection*{\subheadingname}} +\section*{\bothheadingname\ifthenelse{\boolean{b@final}}{}{ (draft)}} +\listofsymbols\listofsubscripts}} + +\endinput +%% +%% End of file `listofsymbols.sty'. |