Debian Codegraph @

texmf-dist/source/latex/listofsymbols/listofsymbols.dtx

raw
1 % \title{The \verb|listofsymbols.sty| package (v0.2)}
2 % \author{Stefan Spreng}
3 % \date{August 2003}
4 % \maketitle
5 %
6 %\newcommand{\ar}[1]{{\sl #1}}
7 %\setlength{\parindent}{0cm}
8 %\setlength{\parskip}{1.5ex plus0.5ex minus0.3ex}
9 %
10 %\begin{abstract}
11 % \verb|listofsymbols| provides commands to (a) automatically create a list of
12 % symbols (also called notation or nomenclature) and (b)
13 % handle symbols logically, i.e. use a command that is expanded to the
14 % desired output rather than `hardcoding' the output into the text.
15 %
16 % This helps to ensure consistency throughout the text, especially if
17 % there is a chance that symbols will be changed at some stage.
18 % Additionally, you can keep all definitions of symbols in a separate file.
19 %
20 % This package is more or less a combination of what the packages
21 % \verb|nomencl.sty| and \verb|formula.sty| do. The concept of
22 % creating the list of symbols, though, is different from the way
23 % \verb|nomencl.sty| does it.
24 %\end{abstract}
25 %
26 %\tableofcontents
27 %
28 %\newpage
29 %
30 %\section{User Interface}
31 %
32 %\subsection{Options}
33 %
34 %\begin{description}
35 %\item[draft] Default.
36 %\item[final] Removes the macronames from the lists. Symbols that are
37 % not used in the document are omitted from the List of Symbols and
38 % from the List of Subscripts.
39 %\item[Final] Similar to \verb|final|. The difference is that the
40 % \verb|.sym| and \verb|.sub| files are not changed any more. Use this
41 % mode when your document is ready and you have sorted the \verb|.sym|
42 % and \verb|.sub| files manually.
43 %\item[nomencl] Typesetting the list of symbols with the package
44 % \verb|nomencl| (symbols and subscripts are in one list). With this
45 % option, the macros described in this documentation call the
46 % appropriate commands that \verb|nomencl.sty| provides. See the
47 % documentation of \verb|nomencl.sty| for details of the layout.
48 %\item[nopageno] Default.
49 %\item[pageno] Inserts the number of the page on which a symbol or
50 % subscript is defined.
51 %\item[usexspace] Default. Uses the package \verb|xspace| to insert an
52 % `intelligent' space after the commands.
53 %\item[noxspace] Do not load package \verb|xspace|. In this case a
54 % command must by followed by a backslash and a space if you want a
55 % space in the output (This is the LaTeX standard).
56 %\end{description}
57 %
58 %You can use only one of the options \verb|draft|, \verb|final|,
59 %\verb|Final| or \verb|nomencl| and only one of the options
60 %\verb|nopageno| or \verb|pageno|.
61 %
62 %\subsection{Macros}
63 %
64 %\DescribeMacro{\opensymdef} \DescribeMacro{\closeymdef} All
65 %\verb|\newsym| and \verb|\newsub| commands must be between the commands
66 %\verb|\opensymdef| and \verb|\closesymdef|. A \verb|\listofsymbols| or a
67 %\verb|\listofsubscripts| must be outside the region enclosed by these
68 %commands. Otherwise you will get errors. See section
69 %\ref{sec:examples} for examples.
70 %
71 %\DescribeMacro{\newsym}
72 %The macro \verb|\newsym| assigns the desired output of a symbol or
73 %variable to a macro which can thereafter be used like any other macro.
74 %\verb|\newsym| takes one optional argument and two mandatory arguments.
75 %\begin{quote}
76 %\verb|\newsym[| \ar{description} \verb|]{| \ar{macroname} \verb|}{| \ar{output} \verb|}|
77 %\end{quote}
78 %The optional argument is the description that will appear in the list of symbols.
79 %The first mandatory argument is the name of the macro and the second mandatory
80 %argument is the desired output. Note that the definition of \verb|\newsym| includes
81 %\ar{output} in a \verb|\ensuremath{}| command.
82 %If there is no \ar{description} then the symbol is included in the list of symbols in
83 %\verb|draft| mode, but not in \verb|final| mode.
84 %
85 %Examples can be found in section \ref{sec:examples}.
86 %You will probably notice that all the macros start with \verb|sym|. That's because
87 %I think that this makes it easier to distinguish between symbols and other
88 %macros you define in a document. Personally, I use a \verb|y| and an
89 %\verb|s| as the first characters to indicate that a command is a symbol or
90 %a subscript, it's shorter \ldots
91 %
92 %The description of a macro can be accessed with \verb|doc| appended to
93 %the macroname. A string that can be used inside a \verb|tabular|
94 %environment can be obtained by appending \verb|tabdoc| to the
95 %command. If \verb|tabdoc| is appended, then the macro expands to\\
96 %\ar{output}\verb| & |\ar{description}
97 %
98 %Example:
99 %\begin{verbatim}
100 %\newsym[Energy]{symE}{E}
101 %The symbol \symE means \symEdoc
102
103 %\begin{tabular}{ll}
104 %Symbol&Description\\
105 %\symEtabdoc\\
106 %\end{tabular}
107 %\end{verbatim}
108 %
109 %
110 %\DescribeMacro{\newsub}
111 %The macro \verb|\newsub| creates a subscript much in the same way as \verb|\newsym|
112 %creates a symbol. The syntax is
113 %\begin{quote}
114 %\verb|\newsub[| \ar{description} \verb|]{| \ar{subscriptname} \verb|}{| \ar{output} \verb|}|
115 %\end{quote}
116 %
117 %\DescribeMacro{\subsep}
118 %The macro \verb|\subsep| separates two subscripts and thus avoids a
119 %LaTeX error. Its syntax is
120 %\begin{quote}
121 %\verb|\subsep[| \ar{separator} \verb|]|
122 %\end{quote}
123 %By default, the \ar{separator} is empty, i.e. the second subscript
124 %simply follows the first one.
125 %
126 %If you want to use a subscript after a symbol that does not have a
127 %subscript yet, simply put if after the symbol,
128 %e.g. \verb|\symx\suby|. If the symbol already has a subscript, you
129 %have to put a \verb|\subsep| in front of the subscript. In regular
130 %text, you should enclose such a
131 %construct with \verb|$|'s to avoid space between the symbol and the
132 %subscript.
133 %
134 %Example:
135 %
136 %\begin{verbatim}
137 %\newsym{symx}{x}
138 %\newsym{syma}{a_b}
139 %\newsub{suby}{y}
140 %\newsub{subz}{z}
141 %
142 %Usage: $\symx\suby$
143 %Or: $\symx\suby\subsep\subz$
144 %Finally: $\symx\suby\subsep[,]\subz$
145 %
146 %In an equation:
147 %\[ \symx\suby = \syma\subsep[,]\suby \]
148 %\end{verbatim}
149 %
150 %\DescribeMacro{\listofsymbols}
151 %The command \verb|\listofsymbols| generates a list of the symbols,
152 %that were created with \verb|\newsym|. The symbols are not sorted. You
153 %have to do that manually by sorting the lines in the \verb|.sym| and
154 %\verb|.sub| files, for example with an editor or a
155 %spreadsheet. Once you have sorted the symbols and do not want to have
156 %the files changed any more, use the \verb|Final| mode. Before using
157 %the \verb|Final| mode, you must compile the document at least once in
158 %\verb|final| mode to get the proper \verb|.sym| and \verb|.sub|
159 %files.
160 %
161 %A typical sequence would be
162 %
163 %\begin{itemize}
164 %\item Compile in \verb|draft| mode (as often as you want)
165 %\item Compile in \verb|final| mode (at least once)
166 %\item Sort and edit the \verb|.sym| and \verb|.sub| files
167 %\item Compile in \verb|Final| mode (as often as you want). If you add
168 % new symbol or subscript definitions now, they will not appear in the
169 % list of symbols or subscripts. If you use \verb|draft| or
170 % \verb|final| mode now, the edited version of the \verb|.sym| and
171 % \verb|.sub| files will be overwritten.
172 %\end{itemize}
173 %
174 %Note that the command \verb|\listofsymbols| {\bf must} be outside the
175 %region that is enclosed by the \verb|\opensymdef| and
176 %\verb|\closesymdef| commands.
177 %
178 %In \verb|draft| mode, which is the default, the names of the macros
179 %are inlcuded in the lists. That makes it easier to keept track of the
180 %macro names and the corresponding output. The number of times the symbol
181 %was used in the document is given in parentheses. Symbols that do not have a
182 %\ar{description} are included in the list as well.
183 %
184 %In \verb|final| mode, the macro-names disappear. Symbols without a
185 %\ar{description} (or an empty \ar{description}) and symbols that are not
186 %used in the document are not included in the list. This allows you to keep
187 %all the symbols you normally need in a separate file that contains only
188 %\verb|\newsym| and \verb|\newsub| commands. This file can be included in
189 %the main file, e.g. with \verb|\include| or \verb|\input|. See the
190 %\verb|.log| file for information which symbols have been omitted from
191 %the lists.
192 %
193 %The \verb|Final| mode is similar to \verb|final|. The difference is
194 %that the \verb|.sym| and \verb|.sub| files are not changed. Use this
195 %mode when your document is ready and you have sorted the \verb|.sym|
196 %and \verb|.sub| files manually. The first pair of braces after the
197 %\verb|\printsymline| in a line of
198 %the \verb|.sym| and \verb|.sub| files is not used by
199 %\verb|listofsymbols|. You can use it for example to help the sorting
200 %process.
201 %
202 %Example: It is valid to change the line\\
203 %\verb|\printsymline{\ell}{\ell}{syml}{Length}{1}|\\
204 %manually into\\
205 %\verb|\printsymline{l}{\ell}{syml}{Length}{1}|
206 %
207 %In \verb|nomencl| mode the glossary has to be generated manually, for example by entering\\
208 %\verb| makeindex| \ar{filename}\verb|.glo -s nomencl.ist -o| \ar{filename}\verb|.gls|\\
209 %at the command line. Read the documentation of the \verb|nomencl|
210 %package for more information.
211 %
212 %\DescribeMacro{\symwidth}
213 %The length \verb|\symwidth| is the space reserved for the
214 %symbol on the left side of each line and is by default set to 2.5\,cm.
215 %If you have long symbols you may have to change that, for example with\\
216 %\verb| \setlength{\symwidth}{3cm}|.
217 %
218 %\DescribeMacro{\listofsubscripts}
219 %Similar to \verb|\listofsymbols|, but for the subscripts obviously.
220 %
221 %\DescribeMacro{\listofboth}
222 %Creates both a list of symbols and a list of subscripts with the heading
223 %`Notation' above them.
224 %
225 %\DescribeMacro{\symheadingname}
226 %\DescribeMacro{\subheadingname}
227 %\DescribeMacro{\bothheadingname}
228 %The headings of the lists are stored in \verb|\symheadingname| and
229 %\verb|\subheadingname| and \verb|\bothheadingname|. In order to
230 %change it you can use for example\\
231 %\verb| \renewcommand{\symheadingname}{| \ar{New Heading} \verb|}|
232 %
233 %\DescribeMacro{\markasused}
234 %\DescribeMacro{\markasunused}
235 %If you want to decide yourself whether a symbol or subscript should be
236 %included in the lists, you can issue a \verb|\markasused| or
237 %\verb|\markasunused| command. A \verb|\markasunused| command should
238 %occur after the last call of the macro.
239 %
240 %Note that \verb|\markasused| works
241 %only if the description of a symbol or subscript is not empty (why
242 %would one want to have a symbol without a description in the list of
243 %symbols?). If, for some reason, you want such a symbol to be in the
244 %list of symbols, change its description in the \verb|\newsym| command
245 %to something invisible, e.g. a space.
246
247 %Syntax:
248 %\begin{quote}
249 %\verb| \markasused {| \ar{macroname} \verb|}|\\
250 %\verb| \markasunused {| \ar{macroname} \verb|}|
251 %\end{quote}
252 %Note that \ar{macroname} must be given without the backslash.
253 %
254 %\DescribeMacro{\dontmarkasused}
255 %If you want to get the output of a symbol without changing the ``used''-flag,
256 %you can use the command \verb|\dontmarkasused|.
257 %This is for example useful if you want to use a symbol in the description of
258 %another symbol. In this case you have to insert
259 %a \verb|\noexpand| command before the macro \verb|\dontmarkasused|.
260 %
261 %Syntax:
262 %\begin{quote}
263 %\verb| \dontmarkasused {| \ar{macroname} \verb|}|
264 %\end{quote}
265 %Note that \ar{macroname} must be given without the backslash.
266
267 %Example:
268 %
269 %\begin{verbatim}
270 %\opensymdef
271 % \newsym{syma}{a}
272 % \newsym[Derivative of \noexpand\dontmarkasused{syma}]{symda}{\syma '}
273 %\closesymdef
274 %\end{verbatim}
275 %
276 %\DescribeMacro{\losstring}
277 %If the output of a symbol or subscript contains macros
278 %and they are not at the very beginning of the definition, then you have to
279 %insert a \verb|\losstring| command in front of the macro.
280 %
281 %Example:
282 %
283 %\begin{verbatim}
284 %\opensymdef
285 % \newsym{symA}{a}
286 % \newsym{symB}{\overline{\losstring\syma}}
287 % \newsym{symC}{\overline{\losstring\overline{\losstring\syma}}}
288 %\closesymdef
289 %\end{verbatim}
290 %
291 %
292 %\newpage
293 %\section{Examples}
294 %\label{sec:examples}
295 %
296 %These examples are supposed to illustrate the implications of
297 %\verb|opensymdef| and \verb|closesymdef|.
298 %
299 %\subsection{Example 1}
300 %
301 %Here, the definitions are in the preamble
302 %
303 %\begin{verbatim}
304 %\documentclass{article}
305 %\usepackage{listofsymbols}
306 %
307 %\opensymdef
308 % \newsym[Energy]{symE}{E}
309 % \newsym[Mass]{symm}{m}
310 % \newsym[Speed of light]{symc}{c}
311 %\closesymdef
312 %
313 %\begin{document}
314 % \[\symE=\symm \symc^2\]
315 %
316 % where \symE is the energy \ldots
317 %
318 % \listofsymbols
319 %\end{document}
320 %\end{verbatim}
321 %
322 %\hrulefill \ Output:\ \hrulefill
323 %
324 %\[E=m\ c^2\]
325 %
326 %where $E$ is the energy \ldots\\
327 %
328 %{\Large\bf List of Symbols (draft)}
329 %
330 %\makebox[2.5cm][l]{{\bf Symbol}}{\bf Description}\\
331 %\makebox[2.5cm][l]{$E$}\verb|\symE| -- Energy (yes)\\
332 %\makebox[2.5cm][l]{$m$}\verb|\symm| -- Mass (yes)\\
333 %\makebox[2.5cm][l]{$c$}\verb|\symc| -- Speed of light (yes)
334 %
335 %\rule{\textwidth}{0.2pt}
336 %
337 %
338 %\subsection{Example 2}
339 %
340 %Here, the list of symbols is at the end of the document and the
341 %definitions are in the body.
342 %
343 %\begin{verbatim}
344 %\documentclass{article}
345 %\usepackage{listofsymbols}
346 %
347 %\begin{document}
348 % \opensymdef
349 % \newsym[Energy]{symE}{E}
350 % \newsym[Mass]{symm}{m}
351 % \newsym[Speed of light]{symc}{c}
352 %
353 % \[\symE=\symm \symc^2\]
354 %
355 % where \symE is the energy \ldots
356 %
357 % \closesymdef
358 % \listofsymbols
359 %\end{document}
360 %\end{verbatim}
361 %
362 %
363 %\subsection{Example 3}
364 %
365 %Now, the list of symbols is before the definitions.
366 %
367 %\begin{verbatim}
368 %\documentclass{article}
369 %\usepackage{listofsymbols}
370 %
371 %\begin{document}
372 % \listofsymbols
373 % \opensymdef
374 % \newsym[Energy]{symE}{E}
375 % \newsym[Mass]{symm}{m}
376 % \newsym[Speed of light]{symc}{c}
377 %
378 % \[\symE=\symm \symc^2\]
379 %
380 % where \symE is the energy \ldots
381 %
382 % \closesymdef
383 %\end{document}
384 %\end{verbatim}
385 %
386 %\section{Contact}
387 %
388 %If you have suggestions how this package can be improved, let me know:
389 %
390 %e-mail: \verb|[email protected]|
391 %
392 %\section{The Code}
393 % \begin{macrocode}
394 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{listofsymbols}
395 \RequirePackage{ifthen} \RequirePackage{calc} \newboolean{b@nomencl}
396 \newboolean{b@final} \newboolean{b@Final} \newboolean{b@pageno}
397 \newboolean{b@xspace}
398 \DeclareOption{nomencl}{\setboolean{b@nomencl}{true}}
399 \DeclareOption{draft}{\setboolean{b@nomencl}{false}
400 \setboolean{b@final}{false}\setboolean{b@Final}{false}}
401 \DeclareOption{final}{\setboolean{b@nomencl}{false}
402 \setboolean{b@final}{true}\setboolean{b@Final}{false}}
403 \DeclareOption{Final}{\setboolean{b@nomencl}{false}
404 \setboolean{b@final}{true}\setboolean{b@Final}{true}}
405 \DeclareOption{pageno}{\setboolean{b@pageno}{true}}
406 \DeclareOption{nopageno}{\setboolean{b@pageno}{false}}
407 \DeclareOption{usexspace}{\setboolean{b@xspace}{true}}
408 \DeclareOption{noxspace}{\setboolean{b@xspace}{false}}
409
410 \ExecuteOptions{draft,nopageno,usexspace}
411 \ProcessOptions
412
413 \newlength{\symindent}
414 %equal to second argument of \l@figure and \l@table:
415 \setlength{\symindent}{1.5em}
416 \newlength{\symwidth}
417 \setlength{\symwidth}{2.5cm}
418 \newlength{\sympagenowidth}
419
420 \ifthenelse{\boolean{b@nomencl}}
421 {\RequirePackage{nomencl}}{}
422 \ifthenelse{\boolean{b@xspace}}
423 {\RequirePackage{xspace}
424 \newcommand{\spaceaftersym}{\xspace}}
425 {\newcommand{\spaceaftersym}{}}
426 \ifthenelse{\boolean{b@pageno}}
427 {\settowidth{\sympagenowidth}{9999}}
428 {\setlength{\sympagenowidth}{0cm}}
429
430 %#1: sortkey
431 %#2: symbol
432 %#3: macroname
433 %#4: description
434 %#5: page number
435 \newcommand{\printsymline}[5]
436 {\expandafter\providecommand\expandafter{\csname#3include\endcsname}{no}
437 \ifthenelse{\boolean{b@final}
438 \AND\(\expandafter\equal{\csname #3include\endcsname}{no}\OR\equal{#4}{}\)}
439 {\PackageInfo{listofsymbols}{symbol/subscript #3 has no or empty
440 description or is not used: omitted}}
441 {\hspace*{\symindent}\makebox[\symwidth][l]{\ensuremath{#2}}%
442 \parbox[t]{\textwidth-\symwidth-\sympagenowidth-16pt}
443 {\begin{raggedright}\strut%
444 \ifthenelse{\boolean{b@final}} {#4}%
445 {$\backslash$\texttt{#3} --- #4 (\csname #3include\endcsname)}%
446 \strut\end{raggedright}}%
447 \ifthenelse{\boolean{b@pageno}}{\hfill #5}{}%
448 \newline}}
449
450 \newcommand{\losstring}{}
451
452 %#1: sortkey
453 %#2: symbol
454 %#3: macroname
455 %#4: description
456 %#5: filehandle
457 \ifthenelse{\boolean{b@Final}}
458 {\newcommand{\addsymline}[5]{}
459 \newcommand{\opensymdef}{}
460 \newcommand{\closesymdef}{}}
461 {\newcommand{\opensymdef}
462 {\newwrite\@sym \immediate\openout\@sym=\jobname.sym
463 \newwrite\@sub \immediate\openout\@sub=\jobname.sub}
464 \newcommand{\closesymdef}
465 {\immediate\closeout\@sym
466 \immediate\closeout\@sub}
467 \newcommand{\addsymline}[5]
468 {\renewcommand{\losstring}{\string}
469 \immediate\write#5{\string\printsymline{\string#1}%
470 {\string#2}{\string#3}{#4}{\thepage}}
471 \renewcommand{\losstring}{}}}
472
473 %#1: description
474 %#2: macroname
475 %#3: symbol
476 \newcommand{\@createsym}[3]
477 {\expandafter\newcommand\expandafter{\csname#2\endcsname}
478 {\relax\ensuremath{#3}\spaceaftersym%
479 \expandafter\protected@xdef\csname#2isused\endcsname {yes}} %evntl. gdef
480 \expandafter\newcommand\expandafter{\csname#2doc\endcsname}{#1}
481 \expandafter\newcommand\expandafter{\csname#2tabdoc\endcsname}
482 {\ensuremath{#3} & #1}
483 \expandafter\newcommand\expandafter{\csname#2isused\endcsname}{no}}
484
485 %#1: description
486 %#2: macroname
487 %#3: symbol
488 \ifthenelse{\boolean{b@nomencl}}
489 {\newcommand{\newsym}[3][]
490 {\@createsym{#1}{#2}{#3}
491 \ifthenelse{\equal{#1}{}}{}{\nomenclature{\ensuremath{#3}}{#1}}}}
492 {\newcommand{\newsym}[3][]
493 {\@createsym{#1}{#2}{#3}
494 \addsymline{#3}{#3}{#2}{#1}{\@sym}}}
495
496 %#1: description
497 %#2: macroname
498 %#3: symbol
499 \newcommand{\@createsub}[3]
500 {\expandafter\newcommand\expandafter{\csname#2\endcsname}
501 {\relax\ensuremath{_{#3}}\spaceaftersym%
502 \expandafter\protected@xdef\csname#2isused\endcsname {yes}}
503 \expandafter\newcommand\expandafter{\csname#2doc\endcsname}{#1}
504 \expandafter\newcommand\expandafter{\csname#2tabdoc\endcsname}
505 {\ensuremath{#3} & #1}
506 \expandafter\newcommand\expandafter{\csname#2isused\endcsname}{no}}
507
508 %#1: description
509 %#2: macroname
510 %#3: symbol
511 \ifthenelse{\boolean{b@nomencl}}
512 {\newcommand{\newsub}[3][]
513 {\@createsub{#1}{#2}{#3}
514 \ifthenelse{\equal{#1}{}}{}{\nomenclature{\ensuremath{#3}}{#1}}}}
515 {\newcommand{\newsub}[3][]
516 {\@createsub{#1}{#2}{#3}
517 \addsymline{#3}{#3}{#2}{#1}{\@sub}}}
518
519 \newcommand{\subsep}[1][]{\ensuremath{{}_{#1}{}}}
520
521 \newcommand{\symheadingname}{List of Symbols}
522
523 \newcommand{\subheadingname}{List of Subscripts}
524
525 \newcommand{\bothheadingname}{Notation}
526
527 \ifthenelse{\boolean{b@final}}
528 {\newcommand{\symheading}
529 {\section*{\symheadingname}}
530 \newcommand{\subheading}
531 {\section*{\subheadingname}}}
532 {\newcommand{\symheading}
533 {\section*{\symheadingname\ (draft)}
534 \makebox[\symwidth+\symindent][l]{\bf Symbol}{\bf Description}
535 \ifthenelse{\boolean{b@pageno}}{\hfill{\bf Defined on page}}{}}
536 \newcommand{\subheading}
537 {\section*{\subheadingname\ (draft)}
538 \makebox[\symwidth+\symindent][l]{\bf Subscript}{\bf Description}
539 \ifthenelse{\boolean{b@pageno}}{\hfill{\bf Defined on page}}{}}}
540
541 \ifthenelse{\boolean{b@nomencl}}
542 {\makeglossary
543 \renewcommand{\nomname}{\symheadingname}
544 \setlength{\nomitemsep}{-1\parsep}
545 \newcommand{\listofsymbols}{\printglossary}
546 \newcommand{\listofsubscripts}{}}
547 {\newlength{\old@parskip}
548 \newlength{\old@parindent}
549 \newcommand{\listofsymbols} {
550 \setlength{\old@parskip}{\parskip}
551 \setlength{\parskip}{0pt}
552 \setlength{\old@parindent}{\parindent}
553 \setlength{\parindent}{0pt}
554 \symheading\par
555 \makeatletter
556 \IfFileExists{\jobname.syc}{\@input@{\jobname.syc}}{}
557 \IfFileExists{\jobname.sym}{\@input@{\jobname.sym}}{}
558 \makeatother
559 \setlength{\parskip}{\old@parskip}
560 \setlength{\parindent}{\old@parindent}}
561 \newcommand{\listofsubscripts} {
562 \setlength{\old@parskip}{\parskip}
563 \setlength{\parskip}{0pt}
564 \setlength{\old@parindent}{\parindent}
565 \setlength{\parindent}{0pt}
566 \subheading\par
567 \makeatletter
568 \IfFileExists{\jobname.suc}{\@input@{\jobname.suc}}{}
569 \IfFileExists{\jobname.sub}{\@input@{\jobname.sub}}{}
570 \makeatother
571 \setlength{\parskip}{\old@parskip}
572 \setlength{\parindent}{\old@parindent}}}
573
574 \ifthenelse{\boolean{b@nomencl}}
575 {\newcommand{\listofboth}{\listofsymbols}}
576 {\newcommand{\listofboth}
577 {\renewcommand{\symheading}{\subsection*{\symheadingname}}
578 \renewcommand{\subheading}{\subsection*{\subheadingname}}
579 \section*{\bothheadingname\ifthenelse{\boolean{b@final}}{}{ (draft)}}
580 \listofsymbols\listofsubscripts}}
581
582 \newcommand{\markasunused}[1]
583 {\expandafter\protected@xdef\csname#1isused\endcsname {no}}
584
585 \newcommand{\markasused}[1]
586 {\expandafter\protected@xdef\csname#1isused\endcsname {yes}}
587
588 \newcommand{\los@temp}{}
589
590 \newcommand{\dontmarkasused}[1]
591 {\protected@xdef\los@temp{\csname#1isused\endcsname}
592 \csname#1\endcsname%
593 \expandafter\protected@xdef\csname#1isused\endcsname{\los@temp}}
594
595 \AtEndDocument{
596 \renewcommand{\printsymline}[5]
597 {\immediate\write\@syc{\string\newcommand%
598 {\expandafter\string\csname #3include\endcsname}%
599 {\csname #3isused\endcsname}}}
600 \newwrite\@syc \immediate\openout\@syc=\jobname.syc
601 \IfFileExists{\jobname.sym}{\@input@{\jobname.sym}}{}
602 \immediate\closeout\@syc
603 \renewcommand{\printsymline}[5]
604 {\immediate\write\@suc{\string\newcommand%
605 {\expandafter\string\csname #3include\endcsname}%
606 {\csname #3isused\endcsname}}}
607 \newwrite\@suc \immediate\openout\@suc=\jobname.suc
608 \IfFileExists{\jobname.sym}{\@input@{\jobname.sub}}{}
609 \immediate\closeout\@suc}
610
611 \endinput
612 % \end{macrocode}