-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnomencl.dtx
1728 lines (1721 loc) · 64.5 KB
/
nomencl.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \iffalse
% File nomencl.dtx
% Copyright 1996-2021 Boris Veytsman, Bernd Shandl, Lee Netherton, CV
% Radhakrishnan, Brian Elmegaard
%
%
% Documentation and documented source code for the nomencl package.
%
% See the README file for instructions.
%
% This file can be redistributed and/or modified under the terms
% of the LaTeX Project Public License distributed from CTAN
% archives in the directory macros/latex/base/lppl.txt; either
% version 1.2 of the license, or (at your option) any later version.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Boris Veytsman,
%
%
%
%<*dtx>
\ProvidesFile{nomencl.dtx}%
%</dtx>
%<package>\ProvidesPackage{nomencl}%
%<driver>\ProvidesFile{nomencl.drv}%
%<*package|driver>
% \fi
% \ProvidesFile{nomencl.dtx}%
[2021/11/10 v5.6 Nomenclature package]
%
% \iffalse
%</package|driver>
%<*driver>
\documentclass[11pt]{ltxdoc}%
\RequirePackage{fancyvrb}%
\RequirePackage{hypdoc}%
\RequirePackage[nocfg]{nomencl}%
\hypersetup{%
hyperindex=true,
colorlinks=true,
linkcolor=blue,
anchorcolor=blue,
citecolor=blue,
filecolor=blue,
menucolor=blue,
pagecolor=blue,
urlcolor=blue,
bookmarksnumbered=true,
pdftitle={Documentation for the nomencl Package},
pdfauthor={Boris Veytsman, Bernd Schandl, Lee Netherton, CV
Radhakrishnan},
pdfsubject={Provides nomenclature automation in LaTeX},
pdfkeywords={nomenclature latex generation symbol list}
}%
%% Comment out the next line if you want the documentation for the source code.
%%\OnlyDescription
\AtBeginDocument{\RecordChanges}
\AtEndDocument{\addcontentsline{toc}{section}{Change Log}\PrintChanges}
%% Uncomment the next two lines for a command index.
%% See also the instructions above (in nomencl.drv).
\AtBeginDocument{\CodelineIndex}
\AtEndDocument{\setcounter{IndexColumns}{2}\addcontentsline{toc}{section}{Index}\PrintIndex}
\begin{document}
\DocInput{nomencl.dtx}
\end{document}
%</driver>
% \fi
%
%
% \changes{v2.2 (1996/11/25)}{1996/11/25}{Last version released by
% Boris Veytsman}
% \changes{v2.5 (1999/03/13)}{1999/03/02}{Complete rewrite of the
% package and the documentation}
% \changes{v2.6 (1999/04/02)}{1999/04/01}{Use \cs{GetFileInfo}}
% \changes{v2.7a (1999/07/07)}{1999/07/07}{Merged \texttt{licence.txt}
% into \texttt{README}}
% \changes{v2.8 (1999/09/09)}{1999/09/09}{Email changed}
% \changes{v3.0 (2000/03/05)}{2000/03/05}{WWW address changed}
% \changes{v3.1 (2000/09/15)}{2000/09/15}{Do not read cfg file in
% documentation}
% \changes{v3.1 (2000/09/15)}{2000/09/15}{WWW address changed (again)}
% \changes{v3.1b (2001/09/30)}{2001/09/30}{WWW address changed (again)}
% \changes{v3.1c (2001/10/02)}{2001/10/02}{Minor documentation changes}
% \changes{v4.0 (2005/03/31)}{2005/03/31}{Improved compatibility with other
% Glossary/MakeIndex packages. Added option to insert Nomenclature into toc.
% Amended documentation accordingly.}
% \changes{v4.1 (2005/04/27)}{2005/04/27}{Improvements to the documentation,
% including hyperref support}
% \changes{v5.0}{2018/12/28}{Rewrote documentation}
% \changes{v5.2}{2019/05/05}{New options: tocbasic, notocbasic}
%
% \GetFileInfo{nomencl.dtx}
%
%
% \MakeShortVerb{\|}
% \setlength{\hfuzz}{8pt}
% \newcommand{\MakeIndex}{\textsl{MakeIndex}}
% \newcommand{\xindy}{\mbox{\normalfont\textbf{\textsf{x\kern-0.7pt%
% \shortstack{{\scriptsize$\circ$}\\[-2pt]\i}\kern-1pt ndy}}}}
% \let\package\textsf
% \let\tab\indent
% \let\example=\figure
% \let\endexample=\endfigure
%
% \title{\package{nomencl}:
% A Package to Create a Nomenclature}
% \author{Boris Veytsman\and
% Bernd Schandl\and
% Lee Netherton\and CV Radhakrishnan\and
% Brian Elmegaard\end{tabular}\\
% \begin{center}with contributions by\end{center}\begin{tabular}[t]{c}
% Stefan Pinnow\and
% Patrick Egan\and
% Rasmus Solmer Eriksen\and
% Andrea Kern\and
% Christian Faulhammer}
% \date{Package version \fileversion\ of \filedate}
% \maketitle
% \tableofcontents
% \listoffigures
% \clearpage
%
%
%
% \section{Introduction}
% How often did you try to understand a theorem in a book, but just
% couldn't figure out what all those strange symbols were all about? The
% \package{nomencl} package should help authors format a nomenclature.
% It uses the powerful capabilities of the \MakeIndex\ program to generate
% such a list automatically using information provided by the author
% throughout the text.
%
%
%\subsection{History}
%\label{sec:history}
%
% This package was written by Boris Veytsman for his paper in AiCHE in
% 1996. It was improved by Bernd Schandl,
% Lee Netherton, CV Radhakrishnan, and
% Brian Elmegaard up to 2006. In 2006 a version of \package{nomencl}
% for table-like nomenclature lists was released by Brian Elmegaard as
% \package{nomentbl}.
%
% In 2018 Boris Veytsman took over the package, and merged the
% \package{nomentbl} fork back. He also changed some code, trying to
% keep the compatibility with the older \package{nomencl} and
% \package{nomentbl}.
%
% \subsection{Important Notes for Users of Previous Versions}
%
% An update to the \package{nomencl} package has included some major
% changes to some of the commands. In particular, the |\makeglossary|
% and |\printglossary| commands have now been renamed to
% |\makenomenclature| and |\printnomenclature| respectively. The
% reason for this change is to increase the package's compatibility
% with other MakeIndex using packages. With this increased
% compatibility, users will be able to have nomenclatures, glossaries
% and indexes all in one document.
%
% There is a compatibility option that will allow you to still use
% your |\makeglossary| and |\printglossary| commands (see section
% \ref{sec:options}), but it is advised that you change your
% |\|\ldots|glossary| commands to the new |\|\ldots|nomenclature|
% commands in your \LaTeX\ files. For more information
% on the compatibility mode see section \ref{sec:compatibility}.
%
% \section{Usage}
%
% \subsection{The Basics}
%
% The creation of the nomenclature list is very similar to the creation of
% an index~\cite[App.~A]{lamp:late:1994}. You need to:
% \begin{itemize}
% \item Put |\usepackage[|\meta{options}|]{nomencl}| in the preamble of
% your document.
% \item \DescribeMacro{\makenomenclature}
% Put |\makenomenclature| in the preamble of your document.
% \item \DescribeMacro{\nomenclature}
% Issue the |\nomenclature| command (see Section~\ref{sec:Main-Command})
% for each symbol you want to have included in the nomenclature list.
% The best place for this command is immediately after you introduce
% the symbol for the first time.
% \item \DescribeMacro{\printnomenclature}
% Put |\printnomenclature| at the place you want to have your
% nomenclature list.
% \end{itemize}
%
% Now put your file through \LaTeX. The command |\makenomenclature| will
% instruct \LaTeX\ to open the nomenclature file \meta{filename}|.nlo|
% corresponding to your \LaTeX\ file \meta{filename}|.tex| and to
% write the information from your |\nomenclature| commands to this file.
%
% \changes{v2.7 (1999/05/14)}{1999/05/11}{Mention need to change quote
% character for German users}
% The next step is to invoke \MakeIndex. You should instruct
% \MakeIndex\ to use \meta{filename}|.nlo| as your input file,
% use |nomencl.ist| as your style
% file
% and write output to the file \meta{filename}|.nls|.
% How to do this depends on your implementation of \MakeIndex. For
% most UNIX implementations you should write something like
% \begin{center}
% |makeindex| \meta{filename}|.nlo -s nomencl.ist -o|
% \meta{filename}|.nls|
% \end{center}
%
%
%
% Now you have the file \meta{filename}|.nls| that contains your
% nomenclature list properly ordered. The last step is to invoke
% \LaTeX\ on your master file \meta{filename}|.tex| once more. It will
% input your |.nls| file and process it accordingly to the current
% options. That's all!
%
%
% \subsection{The Main Command}
% \label{sec:Main-Command}
%
% \DescribeMacro{\nomenclature}
% The main command of the \package{nomencl} package has the following
% syntax:
% \begin{center}
% |\nomenclature[|\meta{prefix}|]{|\meta{symbol}|}{|\meta{description}|}|
% \end{center}
% where \meta{prefix} is used for fine tuning the sort order,
% \meta{symbol} is the symbol you want to describe and \meta{description}
% is the actual description. The sortkey will be \meta{prefix}\meta{symbol},
% where \meta{prefix} is either the one from the optional argument or, if no
% optional argument was given, the default \meta{prefix} which may be empty.
% See Section~\ref{sec:sort} to make sense of this.
%
% Put this command immediately after the equation or text that
% introduces \meta{symbol}. Usually it is a good idea to avoid a space
% or an unquoted newline just in front of the |\nomenclature| command.
% Put a |%| at the end of the preceding line if necessary.
% Don't forget to enclose math in \meta{symbol} in |$| signs.
%
% Let's have a look at a simple example. If your input file looks like
% the one in Figure~\ref{fig:simple} then your nomenclature should
% look like Figure~\ref{fig:simple.out}.
%
% \begin{example}
% \begin{macrocode}
%<*sample01.tex>
\documentclass{article}
\usepackage[nocfg]{nomencl}
\makenomenclature
\begin{document}
\section*{Main equations}
\begin{equation}
a=\frac{N}{A}
\end{equation}%
\nomenclature{$a$}{The number of angels per unit area\nomrefeq}%
\nomenclature{$N$}{The number of angels per needle point\nomrefpage}%
\nomenclature{$A$}{The area of the needle point}%
The equation $\sigma = m a$%
\nomenclature{$\sigma$}{The total mass of angels per unit area\nomrefeqpage}%
\nomenclature{$m$}{The mass of one angel}
follows easily.
\eqdeclaration{32}
\printnomenclature
\end{document}
%</sample01.tex>
% \end{macrocode}
% \caption{Input for the simple example}
% \label{fig:simple}
% \end{example}
% \begin{example}
%\begin{thenomenclature}
%\nomgroup{A}
% \item [{$\sigma$}]\begingroup The total mass of angels per unit area\nomrefeqpage\nomeqref {1}\nompageref{1}
% \item [{$A$}]\begingroup The area of the needle point\nomeqref {1}\nompageref{1}
% \item [{$a$}]\begingroup The number of angels per unit area\nomrefeq\nomeqref {1}\nompageref{1}
% \item [{$m$}]\begingroup The mass of one angel\nomeqref {1}\nompageref{1}
% \item [{$N$}]\begingroup The number of angels per needle point\nomrefpage\nomeqref {1}\nompageref{1}
%\end{thenomenclature}
% \caption{The typeset output for the simple example}
% \label{fig:simple.out}
% \end{example}
%
% Note the necessary quoting of newlines to suppress spurious spaces.
%
% \changes{v2.6b (1999/04/10)}{1999/04/08}{Documentation change concerning line
% breaks between arguments}
% Due to the way \cs{nomenclature} scans its arguments you don't need to
% \cs{protect} any macros, but you also must not have any character in front
% of the first or between the
% first and the second argument, especially no line break (even with a |%|). So
%\begin{verbatim}
% \nomenclature{$x$}%
% {Description}
%\end{verbatim}
% does \emph{not} work. You can have have line breaks in the argument, but
% also no |%|.
%
% Note that |nomentbl| option described in Section~\ref{sec:nomentbl}
% changes the syntax of this command.
%
% \subsection{Package Options}
% \label{sec:options}
%
% The \package{nomencl} package has the following options:
% \begin{description}
% \item[refeq] The phrase ``, see equation (\meta{eq})'' is appended to
% every entry in the nomenclature where \meta{eq} is the number of the
% last equation in front of the corresponding command |\nomenclature|.
% \item[norefeq] No equation reference is printed. (default)
% \item[refpage] The phrase ``, page \meta{page}'' is appended to
% every entry in the nomenclature where \meta{page} is the number of the
% page on which the corresponding command |\nomenclature| appeared.
% \item[norefpage] No page reference is printed. (default)
% \item[prefix] Every sort key is preceded by the letter ``a'' (changeable);
% see Sections~\ref{sec:sort} and Section~\ref{sec:grouping} to
% learn why this might make sense. (default)
% \item[noprefix] No prefix is used.
% \changes{v5.0}{2018/12/28}{New options |stdsubgroups| and |nostdsubgroups|}
% \item[stdsubgroups] Use standard subgroups in nomenclature, see
% Section~\ref{sec:grouping}.
% \item[nostdsubgroups] Do not use standard subgroups in nomenclature, see
% Section~\ref{sec:grouping} (default).
% \changes{v3.0 (2000/03/05)}{2000/03/05}{New options
% \texttt{cfg}/\texttt{nocfg}}
% \item[cfg] A configuration file, by default, |nomencl.cfg| is
% loaded, if it exists (default). The variant |cfg=FILENAME| uses the
% configuration |FILENAME| instead of |nomencl.cfg|. This is used in
% the examples in the package documentation.
% \item[nocfg] The configuration file is not loaded.
% \item[intoc] Inserts the nomenclature in the Table of Contents.
% \item[notintoc] No entry for the nomenclature in the Table of Contents. (default)
% \item[tocbasic] Use \textsl{tocbasic} package from KOMA script
% bundle for TOC handling (default)
% \item[notocbasic] Do not use \textsl{tocbasic} package from KOMA
% script. You may need this option if \textsl{tocbasic} conflicts
% with other packages like \textsl{pgfopts}.
% \item[compatible] Run in compatibility mode. Older tex files may
% need this option selected to be able to compile. In the latest
% version of \package{nomencl} the commands |\makeglossary| and
% |\printglossary| were replaced with |\makenomenclature| and
% |\printnomenclature|. Selecting this option will redefine the old
% commands, but will lose the compatibility with other glossary
% packages.
% \item[noncompatible] Do not run in compatibility mode. (default)
% \item[nomentbl] Print nomenclature in the |nomentbl| style, see
% Section~\ref{sec:nomentbl}.
% \item[nonomentbl] Do not print nomenclature in the |nomentbl| style, see
% Section~\ref{sec:nomentbl} (default).
% \item[\hspace{-\labelsep}]
% \textbf{catalan, croatian, danish, english, french, german, italian,
% norwegian-bokmaal, norwegian-nynorsk, polish,
% portuguese, russian, slovene, spanish, ukrainian}
% The reference texts and the nomenclature title will appear in the
% corresponding language. Note that in order to use Russian or Ukrainian,
% you have to have Cyrillic fonts installed and you might need a replacement
% for \MakeIndex, e.\,g.~\xindy. Please help me out with other
% languages. (default: english)
% \end{description}
%
%
% \subsection{Referencing}
%
% \DescribeMacro{\nomrefeq}\DescribeMacro{\nomrefpage}%
% \DescribeMacro{\nomrefeqpage}%
% \DescribeMacro{\nomnorefeq}\DescribeMacro{\nomnorefpage}%
% \DescribeMacro{\nomnorefeqpage}%
% As explained in Section~\ref{sec:options}, you can turn referencing to
% equations and pages on/off globally using the package options. But sometimes
% you might want to change the referencing behavior for single entries. The
% following six macros can be used inside a |\nomenclature| macro:
% |\nomrefeq|, |\nomnorefeq|, |\nomrefpage|, |\nomnorefpage|, |\nomrefeqpage|,
% |\nomnorefeqpage|.
% The first four work similarly to the package options, only local to the
% entry; the last two are shortcuts, so saying |\nomrefeqpage| is equivalent
% to |\nomrefeq\nomrefpage|.
%
% If we changed the relevant parts of the last example as shown in
% Figure~\ref{fig:reference} then the nomenclature should look like
% Figure~\ref{fig:reference.out}.
%
% \begin{example}
%\begin{verbatim}
% \begin{equation}
% a=\frac{N}{A}
% \end{equation}%
% \nomenclature{$a$}{The number of angels per unit area\nomrefeqpage}%
% \nomenclature{$N$}{The number of angels per needle point\nomrefeq}%
% \nomenclature{$A$}{The area of the needle point\nomrefeq\nomrefpage}%
% The equation $\sigma = m a$%
% \nomenclature{$\sigma$}{The total mass of angels per unit area}%
% \nomenclature{$m$}{The mass of one angel\nomrefpage}
% follows easily.
% \printnomenclature
% \end{document}
%\end{verbatim}
% \caption{Explicit references}
% \label{fig:reference}
% \end{example}
% \begin{example}
% \begin{thenomenclature}
% \nomgroup{A}
% \item [$\sigma$]\begingroup The total mass of angels per unit area\nomeqref {1}
% \nompageref{1}
% \item [$A$]\begingroup The area of the needle point\nomrefeq\nomrefpage\nomeqref {1}
% \nompageref{1}
% \item [$a$]\begingroup The number of angels per unit area\nomrefeqpage\nomeqref {1}
% \nompageref{1}
% \item [$m$]\begingroup The mass of one angel\nomrefpage\nomeqref {1}
% \nompageref{1}
% \item [$N$]\begingroup The number of angels per needle point\nomrefeq\nomeqref {1}
% \nompageref{1}
% \end{thenomenclature}
% \caption{Typeset output for Figure~\ref{fig:reference}}
% \label{fig:reference.out}
% \end{example}
%
% While these macros do not have to be at the end of the entries, it's
% probably the most sensible place to put them. Note that such local request
% always supersede the package options.
%
%
% \subsection{Sorting}
% \label{sec:sort}
%
% The Greek letter $\sigma$ turned out to be first in the nomenclature
% list in the examples above because the backslash in |\sigma|
% precedes any alphabetical character. Sometimes this is not what you
% want. Then you can use \meta{prefix} to fine tune the sort order.
%
% Before we describe the usage of \meta{prefix}, we have to explain how
% \MakeIndex\ sorts entries, see~\cite{chen:auto:1987}. \MakeIndex\
% distinguishes three kinds of sort keys:
% \begin{description}
% \item[Strings] Everything that starts with a alphabetic letter (A\dots Z,
% a\dots z).
% \item[Numbers] Everything that starts and only contains digits (0\dots 9).
% \item[Symbols] Everything else.
% \end{description}
% Each group is sorted separately (and differently), then the groups are
% sorted in the order symbols, numbers, strings\footnote{With the |-g| switch
% of \MakeIndex, they are sorted in the order symbols, strings, numbers.}. For
% the groups the following algorithm is used:
% \begin{description}
% \item[Strings] If two letters are compared, the usual ordering is used
% (|a|\textless|C|\textless|q|), but if two words are the
% same except for the capitalization, then an upper case letter
% precedes the lower case letter (|Tea|\textless|tea|).
% If a letter is compared with a non-letter (digit,
% symbol), ASCII code is used (|1|\textless |A|\textless |~|).\footnote{An
% exception seems to be that the non-letters between upper and lower case
% letters (code 91--96) are put just before the capital letters (between
% code 64 and 65) while the non-letters after the lower case letters (code
% 123--127) are left there.} If two
% non-letters are compared (which can not happen at the first position of a
% string), ASCII code is used (|+|\textless |1|\textless |:|\textless
% |\|). Additionally there is the issue of word ordering (treat spaces as
% letters with ASCII code smaller than every printable symbol) and letter
% ordering (ignore spaces). \MakeIndex\ uses word ordering by default, but
% you can change it with some command line option (|-l| on my UNIX).
% \item[Numbers] The natural ordering is used
% (|8|\textless |34|\textless |111|).
% \item[Symbols] ASCII code is used
% (|+|\textless|1|\textless|:|\textless|A|\textless|\|\textless|a|).
% \end{description}
%
% Let's consider the following eight nomenclature entries
% (without the optional argument): |$~Ab$|, |$~aa$|, |$\Ab$|, |$\aa$|, |$Ab$|,
% |$aa$|, |Ab|, |aa|. Try to understand the following example with the help
% of the explanation above and an ASCII table.
%
% If you use \package{nomencl} with its default settings (i.\,e.~``a'' is
% added to every sort key, so every sort key is considered as a string), you
% will get the sort order |$\aa$|, |$\Ab$|, |$aa$|, |$Ab$|, |$~aa$|, |$~Ab$|,
% |aa|, |Ab|. Note that |aa| is in front of |Ab| in all four pairs; note
% also the order |$\Ab$|, |$Ab$|, |$~Ab$| which does not agree with the
% ASCII code.
%
% If you specify the option \package{noprefix}, then you will get |$Ab$|,
% |$\Ab$|, |$\aa$|, |$aa$|, |$~Ab$|, |$~aa$|, |aa|, |Ab|. The first six
% entries are considered as symbols and sorted according to the ASCII code
% (this time correctly). Note that |$\Ab$| is in front of |$\aa$| because
% |A| has the smaller ASCII code. The two strings follow at the end.
%
%
%\subsection{Subgroups}
%\label{sec:grouping}
%
% It often makes sense to separate index entries into several groups
% according to their meaning. The prefix parameter for the
% \cs{nomenclature} command provides a way to do it. The algorithm is:
% \begin{enumerate}
% \item Start prefixes with different letters for different
% subgroups.
% \item Define \cs{nomgroup} command (see Section~\ref{sec:format}
% below) to typeset group names.
% \end{enumerate}
%
% One of the popular choices, suggested by Brian Elmegaard in
% \package{nomentbl} is the following (the corresponding prefixes are
% in bold):
% \begin{description}
% \item[A] Latin letters
% \item[G] Greek letters
% \item[X] Superscripts
% \item[Z] Subscripts
% \end{description}
%
% This choice is implemented in the |stsubgroups| option of the
% package, see Figure~\ref{fig:stdsubgroups}. A further customization
% is discussed in Section~\ref{sec:custom}.
%
% \begin{example}
% \begin{macrocode}
%<*sample02.tex>
% Example provided by Stefan Pinnow (SP)
\documentclass{article}
\usepackage[stdsubgroups,nocfg]{nomencl}
\usepackage{setspace}
\makenomenclature
\begin{document}
\section*{Main equations}
Here an equation
\begin{equation}\label{eq:heatflux}
\dot{Q} = k \cdot A \cdot \Delta T
\end{equation}%
\nomenclature[aQ]{$\dot{Q}$}{heat flux}%
\nomenclature[ak]{$k$}{overall heat transfer
coefficient}%
\nomenclature[aA]{$A$}{area}%
\nomenclature[aL]{$L$}{length}%
\nomenclature[aT]{$T$}{temperature}%
\nomenclature[aT]{$\Delta T$}{temperature difference}%
or another one
\begin{equation}\label{eq:ohtc}
\frac{1}{k} = \left[\frac{1}{\alpha _{\mathrm{i}}\,r_{\mathrm{i}}} +
\sum^n_{j=1}\frac{1}{\lambda _j}\,
\ln \frac{r_{\mathrm{a},j}}{r_{\mathrm{i},j}} +
\frac{1}{\alpha _{\mathrm{a}}\,
r_{\mathrm{a}}}\right] \cdot r_{\mathrm{reference}}
\end{equation}%
\nomenclature[ga]{$\alpha$}{convection heat transfer coefficient}%
\nomenclature[zi]{i}{in}%
\nomenclature[gl]{$\lambda$}{thermal conductivity}%
\nomenclature[za]{a}{out}%
\nomenclature[zn]{$n$}{number of walls}%
\nomenclature[zj]{$j$}{running parameter}%
\onehalfspacing
\printnomenclature
\end{document}
%</sample02.tex>
% \end{macrocode}
% \caption{The \texttt{stdsubgroups} option}
% \label{fig:stdsubgroups}
% \end{example}
%
%
%\subsection{Tabular nomenclature (\texttt{nomentbl} style)}
%\label{sec:nomentbl}
%
% The option |nomentbl| changes the behavior of nomenclature.
%
% \DescribeMacro{\nomenclature}%
% The command \cs{nomenclature} now has four, rather than two,
% mandatory arguments:
% \begin{center}
% \cs{nomenclature}\oarg{prefix}\marg{symbol}\marg{description}\marg{units}\marg{note}
% \end{center}
% Here \oarg{prefix}, \marg{symbol}, and \marg{description} have the
% same meaning as for the usual \cs{nomenclature} command. The
% additional arguments are \marg{units}, which is internally enclosed
% in the \cs{si} command from |siunitx| package, and \cs{note}, which
% is an arbitrary note added to the description.
%
% \DescribeMacro{\setnomtableformat}
% The list is wrapped in a |longtable| with the default format
% \begin{center}
% |lp{0.4\textwidth}cp{0.3\textwidth}@{}l|
% \end{center}
% The command
% \cs{setnomtableformat}\marg{format} can be used to change it, for
% example,
% \begin{verbatim}
% \setnomtableformat{lllll}
% \end{verbatim}
%
% Note that the table has five columns: symbol, description, units,
% note, and reference. If you do not use references, you may suppress
% the last column using |@{}l| declaration.
%
% Figure~\ref{fig:nomentbl} provides an example of this option.
%
% \begin{example}
% \begin{macrocode}
%<*sample03.tex>
% Example provided by Stefan Pinnow (SP)
\documentclass{article}
\usepackage[nomentbl,stdsubgroups]{nomencl}
\usepackage{setspace}
\makenomenclature
\begin{document}
\section*{Main equations}
%
Here an equation
\begin{equation}\label{eq:heatflux}
\dot{Q} = k \cdot A \cdot \Delta T
\end{equation}%
\nomenclature[aQ]{$\dot{Q}$}{heat flux}{W}{}%
\nomenclature[ak]{$k$}{overall heat transfer
coefficient}{\watt\per(\square\meter\kelvin)}{see
eq.~(\ref{eq:ohtc})}%
\nomenclature[aA]{$A$}{area}{\square\meter}{}%
\nomenclature[aL]{$L$}{length}{\meter}{SI base quantity}%
\nomenclature[aT]{$T$}{temperature}{\kelvin}{SI base quantity}%
\nomenclature[aT]{$\Delta T$}{temperature difference}{\kelvin}{SI base quantity}%
or another one
\begin{equation}\label{eq:ohtc}
\frac{1}{k} = \left[\frac{1}{\alpha _{\mathrm{i}}\,r_{\mathrm{i}}} +
\sum^n_{j=1}\frac{1}{\lambda _j}\,
\ln \frac{r_{\mathrm{a},j}}{r_{\mathrm{i},j}} +
\frac{1}{\alpha _{\mathrm{a}}\,
r_{\mathrm{a}}}\right] \cdot r_{\mathrm{reference}}
\end{equation}%
\nomenclature[ga]{$\alpha$}{convection heat transfer
coefficient}{\watt\per(\square\meter\kelvin)}{}%
\nomenclature[zi]{i}{in}{}{}%
\nomenclature[gl]{$\lambda$}{thermal conductivity}{\watt\per\kelvin}{}%
\nomenclature[za]{a}{out}{}{}%
\nomenclature[zn]{$n$}{number of walls}{}{}%
\nomenclature[zj]{$j$}{running parameter}{}{}%
\onehalfspacing
\printnomenclature
\end{document}
%</sample03.tex>
% \end{macrocode}
% \caption{Use of \texttt{nomentbl} option}
% \label{fig:nomentbl}
% \end{example}
%
% \subsection{Customization}
% \label{sec:custom}
%
% Besides the things you can customize by using the package options, there are
% a few more commands that you might want to redefine. If you make the same
% changes in every file, it's probably easier to put all those in a file
% |nomencl.cfg| which is automatically read by the \package{nomencl} package
% whenever it exists in the search path (unless you specified the |nocfg|
% option). You can experiment with loading alternative configuration
% files using |cfg=FILENAME| version of this option.
%
%
% \subsubsection{Formatting the Nomenclature}
% \label{sec:format}
%
% \DescribeMacro{\printnomenclature}%
% \DescribeMacro{\nomlabelwidth}%
% Probably the most common change to the nomenclature is a different
% amount of space for the symbols. By default, the nomenclature is
% formatted as a list with the label width equal to |\nomlabelwidth|
% which is initialized to 1\,cm. You can change this dimension in the
% |cfg| file or you can use the optional argument of
% |\printnomenclature|. If you want to have a little more space for
% the labels (and you don't live in a metric world) you can use
% |\printnomenclature[0.5in]| instead of the simple
% |\printnomenclature|.
%
% \DescribeEnv{thenomenclature}%
% If you don't like the format of the nomenclature at all, you will have
% to redefine the |thenomenclature| environment. Maybe a look at the
% documented code of \package{nomencl} will help.
%
% \DescribeMacro{\nomname}%
% In case you don't like the name of the nomenclature, just redefine
% the |\nomname| macro, e.\,g.
% \begin{center}
% |\renewcommand{\nomname}{List of Symbols}|
% \end{center}
%
%
% \changes{v3.1b (2001/09/30)}{2001/03/12}{Explain how to get toc entry}
% \changes{v4.0 (2005/03/31)}{2005/03/31}{TOC entries now added with package option}
% Putting an entry for the nomenclature in the table of contents can
% be done by adding an \textbf{intoc} to the package options.
%
% \DescribeMacro{\nomgroup}%
% Usually, \MakeIndex\ inserts the macro |\indexspace| between every
% character group, i.\,e.~between symbols and numbers, numbers and
% letters and between every two letter groups. The \package{nomencl}
% package inserts the macro |\nomgroup{|\meta{arg}|}| \emph{instead},
% where \meta{arg} is either the string ``Symbols'' or the string
% ``Numbers'' or the capital letter of the group that is about to
% start. You can redefine |\nomgroup| to insert some white space
% |\renewcommand{\nomgroup}[1]{\medskip}|, or to print a fancy divider
%\begin{verbatim}
% \renewcommand{\nomgroup}[1]{%
% \item[]\hspace*{-\leftmargin}%
% \rule[2pt]{0.45\linewidth}{1pt}%
% \hfill #1\hfill
% \rule[2pt]{0.45\linewidth}{1pt}}
%\end{verbatim}
% Note that |\nomgroup| is executed in a list environment, so you need
% to have an |\item| first and then jump back to the beginning of the
% line with the |\hspace| command.
%
% \DescribeMacro{\nompreamble}\DescribeMacro{\nompostamble}%
% Maybe you want to explain something just between the title of the
% nomenclature and the start of the list or at the very end of the
% list. Just redefine the macros |\nompreamble| and |\nompostamble|
% which do nothing by default. Note that they are executed \emph{outside}
% of the list environment.
%
% \DescribeMacro{\nomitemsep}%
% The skip between two entries in the nomenclature can be adjusted using
% \cs{nomitemsep}. This should be done in the preamble or the file
% |nomencl.cfg|. Note that if you want no extra skip between entries
% you have to use
% |\setlength{\nomitemsep}{-\parsep}|
%
% \DescribeMacro{\nomprefix}%
% If you want, you can redefine the default prefix that is used for the
% sortkeys. By default, |\nomprefix| is set to ``a''; redefining it
% supersedes the package options \package{prefix} and \package{noprefix}.
%
%
% \subsubsection{Formatting the Entries}
%
% \DescribeMacro{\nomlabel}%
% By default, the labels are just shifted to the left within their
% allocated box. If you want to change this, redefine |\nomlabel|
% which should get one argument, e.\,g.
% |\renewcommand{\nomlabel}[1]{\hfil #1\hfil}| to center the symbols.
%
% \DescribeMacro{\nomentryend}%
% Maybe you would like to have a period at the end of every entry.
% Just say |\renewcommand{\nomentryend}{.}|, and there it
% is. Section~\ref{sec:tips:units} explains another nice application
% of this macro.
%
% \DescribeMacro{\eqdeclaration}\DescribeMacro{\pagedeclaration}%
% If you don't like the text that is used for the references to
% equations and pages, you can define |\eqdeclaration| and
% |\pagedeclaration|. Both should accept one argument, namely the
% equation and page number, respectively. An example is
% \begin{center}
% |\renewcommand{\eqdeclaration}[1]{, first used in eq.~(#1)}|.
% \end{center}
%
%
%
%
% \subsection{Tips and Tricks}
% \label{sec:tips}
%
% \changes{v3.1 (2000/09/15)}{2000/09/15}{Sample cfg files for most examples}
%
% \subsubsection{Advanced subgroups}
% \label{sec:tips:subgroups}
%
% The standard subgroups described in Section~\ref{sec:grouping} is
% just one of the possible ways to separate your index. You can do
% much more if you play with the \cs{nomgroup} command. Note that all
% entries sharing the first letter of prefix as grouped together and
% preceded by the \cs{nomgroup}\oarg{Uppercased first leter} command.
% So, for example, if you want to separate constants and variables,
% you may use prefixes |c...| for constants and |v...| for variables,
% and then write down (package \package{ifthen} being loaded by
% \package{nomencl})
% \begin{verbatim}
% \renewcommand{\nomgroup}[1]{%
% \ifthenelse{\equal{#1}{V}}{\item[\textbf{Variables}]}{%
% \ifthenelse{\equal{#1}{C}}{\item[\textbf{Constants}]}{}}}
% \end{verbatim}
%
%
% \subsubsection{Units}
% \label{sec:tips:units}
%
% Besides the obvious possibility of adding units for symbols in the
% description string, you can also use |\nomentryend| to shift the unit
% to the right margin. With package \package{siunitx} you can define
% \begin{macrocode}
%<*sample04.cfg>
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}\si{#1}}}
%</sample04.cfg>
% \end{macrocode}
% and then define nomenclature as
% \begin{center}
% |\nomenclature{$l$}{Length\nomunit{\meter}}|
% \end{center}
%
% See Figure~\ref{fig:units} for the example of the input file.
%
% Option |nomentbl| allows an alternative way to add units to the
% nomenclature (Section~\ref{sec:nomentbl}).
%
% \begin{example}
% \begin{macrocode}
%<*sample04.tex>
\documentclass{article}
\usepackage[cfg=sample04.cfg]{nomencl}
\usepackage{siunitx}
\makenomenclature
\begin{document}
\section*{Main equations}
\begin{equation}
a=\frac{N}{A}
\end{equation}%
\nomenclature{$a$}{The number of angels per unit
area\nomunit{\per\square\meter}}%
\nomenclature{$N$}{The number of angels per needle point}%
\nomenclature{$A$}{The area of the needle
point\nomunit{\square\meter}}%
The equation $\sigma = m a$%
\nomenclature{$\sigma$}{The total mass of angels per unit
area\nomunit{\kilogram\per\square\meter}}%
\nomenclature{$m$}{The mass of one angel\nomunit{\kilogram}}
follows easily.
\printnomenclature
\end{document}
%</sample04.tex>
% \end{macrocode}
% \caption{A simple example with units}
% \label{fig:units}
% \end{example}
%
%
% \subsubsection{Expansion}
%
% \changes{v3.1 (2000/09/15)}{2000/09/01}{Expansion example added}
% The \package{nomencl} package tries hard to write the arguments of the
% |\nomenclature| macro verbatim to the glossary file. This is usually the
% right thing to do because some macros do not like to be expanded at the
% wrong moment or give weird results if they are. On the other hand, there are
% occasions where it is good to have the meaning (or expansion) of a macro in
% the glossary file instead of its name. There are quite some occasions
% where you will get in trouble with this expansion, for example, if the
% expansion of a macro contains~|@| (|\mathcal| expands to |\@mathcal|)
% because |@| is a special character for \MakeIndex\ and thus \MakeIndex\ will
% either fail or give unexpected results. You can avoid the expansion on a
% case by case basis by using |\protect| in front of the macro that should
% not be expanded.
%
% In order to get macro expansion, the redefinition of the |\@nomenclature|
% macro within the |\makenomenclature| macro has to be changed.
% \begin{macrocode}
%<*sample05.cfg>
\def\makenomenclature{%
\newwrite\@nomenclaturefile
\immediate\openout\@nomenclaturefile=\jobname\@outputfileextension
\def\@nomenclature{%
\@ifnextchar[%
{\@@@@nomenclature}{\@@@@nomenclature[\nomprefix]}}%
\PackageInfo{nomencl}{Writing nomenclature file \jobname\@outputfileextension}%
\let\makenomenclature\@empty}
% \end{macrocode}
% The new macro to be called by |\@nomenclature| just writes its arguments to
% the glossary file without further ado, so they will be expanded.
% \begin{macrocode}
\def\@@@@nomenclature[#1]#2#3{%
\protected@write\@nomenclaturefile{}%
{\string\nomenclatureentry{#1#2@[{#2}]%
\begingroup#3\protect\nomeqref{\theequation}%
|nompageref}{\thepage}}}%
%</sample05.cfg>
% \end{macrocode}
%
% The following file has completely different result when using
% expanded and non-expanded versions
% \begin{macrocode}
%<*sample05.tex>
\documentclass{article}
\usepackage[cfg=sample05.cfg]{nomencl}
\makenomenclature
\begin{document}
\section*{Main equations}
\begin{equation}
a=\frac{N}{A}
\end{equation}%
\newcommand{\magritte}{Not the number }
\nomenclature{$a$}{\magritte of angels per unit area}%
\nomenclature{$N$}{\magritte of angels per needle point}%
\nomenclature{$A$}{The area of the needle point}%
The equation $\sigma = m a$%
\nomenclature{$\sigma$}{The total mass of angels per unit area}%
\nomenclature{$m$}{The mass of one angel}
follows easily.
% We renew the command before printing nomenclature. However, since
% our nomencl.cfg uses expansion, it does not affect the result.
% Cf. nocfg option
\renewcommand{\magritte}{The number }
\printnomenclature
\end{document}
%</sample05.tex>
% \end{macrocode}
%
%
% \subsubsection{Glossary in ``Kopka Style''}
%
% \changes{v3.1 (2000/09/15)}{2000/09/16}{Kopka example added}
% I was told that the glossary in the \LaTeX\ book by Kopka looks roughly like
% in Figure~\ref{fig:kopka}. In order to get a glossary like this, there are
% quite some configurations to do.
%
% \begin{example}
% \textbf{Symbol}\dotfill\nopagebreak page number \\
% \hspace*{5mm}Explanation.
% \caption{Glossary entry in ``Kopka Style''}
% \label{fig:kopka}
% \end{example}
%
% First we have to change the macro |\@@@nomenclature| which takes care of
% writing the glossary entry to the glossary file. The only difference to the
% original definition is that we hand over the explanation of a symbol (\#3)
% and the equation number to |\nompageref| instead of writing it directly
% after the symbol (\#2). This is necessary because the explanation should
% appear after (actually below) the page number.
% \begin{macrocode}
%<*sample06.cfg>
\@printpagereftrue
\def\@@@nomenclature[#1]#2#3{%
\def\@tempa{#2}\def\@tempb{#3}%
\protected@write\@nomenclaturefile{}%
{\string\nomenclatureentry{#1\nom@verb\@tempa @[{\nom@verb\@tempa}]%
|nompageref{\begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}}}%
{\thepage}}%
\endgroup
\@esphack}
% \end{macrocode}
% Now we change the definition of |\nompageref| so that it accepts two
% arguments, the explanation (\#1) and the page number (\#2). The page number
% is only printed if required, otherwise |\null| is used to avoid an error
% because of the following |\linebreak|. Note that it is \emph{not} possible
% to turn off the page number locally, because the explanation appears after
% the page number.
% \begin{macrocode}
\def\nompageref#1#2{%
\if@printpageref\pagedeclaration{#2}\else\leavevmode\fi
\linebreak#1\nomentryend\endgroup}
% \end{macrocode}
% And a few little things. We want dots and a space before the page number
% appears at the right margin; the explanation should end with a period; and
% the symbol should be printed in bold face (this only works for regular text,
% not for formulas).
% \begin{macrocode}
\def\pagedeclaration#1{\dotfill\nobreakspace#1}
\def\nomentryend{.}
\def\nomlabel#1{\textbf{#1}\hfil}
%</sample06.cfg>
% \end{macrocode}
%
%
% \subsection{Compatibility Mode}
% \label{sec:compatibility}
%
% With previous versions of the \package{nomencl}, the commands |\makeglossary|
% and |\pringlossary| were used to generate and display the nomenclature.
% These commands have now been depreciated, and replaced with the |\makenomenclature|
% and |\printnomenclature| commands. The new commands do exactly the same
% as the old commands, but because of the name changes, the package is
% now compatible with other packages which use the |\makeglossary| commands.
% The previous versions of \package{nomencl} also used the file extensions
% |.glo| and |.gls| for the generated output and input files. These extensions
% have now been changed to |.nlo| and |.nls| respectively---again, for increased
% compatibility.
%
% For all of the legacy \LaTeX\ files out there which use the old commands
% there is a compatibility option available so that the old commands will still
% work without having to change any of the existing code. To enable the
% compatibility mode simply supply the \textbf{compatible} option
% when using the package. For example:
% \begin{verbatim}
% \usepackage[compatible]{nomencl}
% \end{verbatim}
% Under compatibility mode, the package will generate and use files
% with the old-style file extensions (i.e. |.glo| and |.gls|).
%
% It is worth noting that even though the compatibility mode is available,
% it is highly recommended to update your \LaTeX\ files to use the new
% nomenclature commands.
%
%
%
% \subsection{Acknowledgements}
%
% Since version 5.0 the package incorporates the code from
% |nomentbl.dtx| by Brian Elmegaard.
%
% The authors want to thank Stefan
% B\"ohm and Karl Heinz Marbaise who helped testing this package.
%
% The translations were done by Joan Queralt (Catalan), Branka
% Lon\v{c}arevi\'{c} (Croatian), Brian Elmegaard (Danish), Denis
% B.~Roegel (French), Sani Egisto (Italian), wishfort36 (Norwegian),