Nomenclature with Sections

Wolfgang Engelmann engelmann at uni-tuebingen.de
Sat Apr 10 16:11:39 UTC 2021



Am 10.04.21 um 13:44 schrieb Wolfgang Engelmann:
> 
> 
> Am 10.04.21 um 09:09 schrieb Wolfgang Engelmann:
>> I would like to have parts of the nomenclature as a separate section, 
>> namely Abbreviations and Mathematical Symbols (see ##>> below).
>> I found this in the net, but don't know how to realize it so that both 
>> appear in the pdf output printed as sections.
>>
>> %usepackage{ifthen}
>> %Creating Nomenclature with Sections
>> %\renewcommand{\nomname}{Glossary}
>>
>> %\renewcommand{\nomgroup}[1]{%
>> %\ifthenelse{\equal{#1}{A}}{\item[\textbf{Roman Symbols}]}{%
>> %\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{%
>> ##>>%\ifthenelse{\equal{#1}{C}}{\item[\textbf{Abbreviations}]}{%
>> %\ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{%
>> ##>>%\ifthenelse{\equal{#1}{Z}}{\item[\textbf{Mathematical Symbols}]}
>> %{}
>> %}% matches mathematical symbols
>> %}% matches Subscripts
>> %}% matches Abbreviations
>> %}% matches Greek Symbols
>> %}% matches Roman Symbols
>>
>> %\def\nompreamble{\addcontentsline{toc}{section}{\nomname}\markboth{\nomname}{\nomname}} 
>>
>>
>> Wolfgang
> 
> looking at the .nlo file I see that the entries start with an a as here:
> 
> \nomenclatureentry{aprokaryots@[{prokaryots}]
> 
> so I guess that the {A} {C} etc above serve to sort the items according 
> to these letters. But I still do not know enough to make it work. Anny 
> hint were I can read about it in respect to it use in LyX?
> 
> Wolfgang

This is what
nomencl: A Package to Create a Nomenclature
says about prefix:

\nomenclature[hprefix]{hsymbol}{hdescription}
where hprefix is used for fine tuning the sort order, hsymbol is the 
symbol you want to describe and hdescription is the actual description. 
The sortkey will be hprefix hsymbol, where hprefix is either the one 
from the optional argument or, if no optional argument was given, the 
default hprefix which may be empty. See Section 2.5 to make sense of this.
Put this command immediately after the equation or text that intro-
duces hsymbol. 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 
hsymbol in $ signs.

Where is the prefix placed in the nomenclature settings of the Lyx 
document? In sort as?
Would that mean, if I want a nomenclature item to go to the 
abbreviations section, I should add here a C? or a {C}?

Wolfgang





More information about the lyx-users mailing list