How do I create list of abbreviations if I want to add them manually and not tag each abbreaviation in the file first (the file is already written)?
[Tex/LaTex] Creating abbreviations list with manual entries
acronyms
Related Solutions
I'm not aware of a way to do this with nomencl
. However, there are other packages which can be used. I'll give two examples, one for my package acro
and one for glossaries
.
acro
The acro
package allows to assign acronyms to a class and print lists for each class (also for combined classes...). This fact can be used for the task. Entries are defined with the following syntax:
\DeclareAcronym{<ID>}{
short = <short> ,
long = <long> ,
class = <class>
}
Here is a full example:
\documentclass{article}
\usepackage{acro}
% probably a good idea for the nomenclature entries:
\acsetup{first-style=short}
% class `abbrev': abbreviations:
\DeclareAcronym{ny}{
short = NY ,
long = New York ,
class = abbrev
}
\DeclareAcronym{la}{
short = LA ,
long = Los Angeles ,
class = abbrev
}
\DeclareAcronym{un}{
short = UN ,
long = United Nations ,
class = abbrev
}
% class `nomencl': nomenclature
\DeclareAcronym{angelsperarea}{
short = \ensuremath{a} ,
long = The number of angels per unit area ,
sort = a ,
class = nomencl
}
\DeclareAcronym{numofangels}{
short = \ensuremath{N} ,
long = The number of angels per needle point ,
sort = N ,
class = nomencl
}
\DeclareAcronym{areaofneedle}{
short = \ensuremath{A} ,
long = The area of the needle point ,
sort = A ,
class = nomencl
}
\begin{document}
\ac{ny}, \ac{la} and \ac{un} are abbreviations whereas
\ac{angelsperarea}, \ac{numofangels} and \ac{areaofneedle} are part of the
nomenclature
\printacronyms[include=abbrev,name=Abbreviations]
\printacronyms[include=nomencl,name=Nomenclature]
\end{document}
glossaries
The glossaries
package is much more powerfull. You can define as many glossaries as you like. Here we can use the fact that a glossary for acronyms is already defined. Similar to nomencl
it requires you to run a script to sort the entries. If your file is called file.tex
this is usually done by calling
makeglossaries file
from the command line. Details can be found in the user manual (page 26, section 1.3.3).
The full example:
\documentclass{article}
\usepackage{longtable}
\usepackage[acronym]{glossaries}
% abbreviations:
\newacronym{ny}{NY}{New York}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}
% nomenclature:
\newglossaryentry{angelsperarea}{
name = $a$ ,
description = The number of angels per unit area,
}
\newglossaryentry{numofangels}{
name = $N$ ,
description = The number of angels per needle point
}
\newglossaryentry{areaofneedle}{
name = $A$ ,
description = The area of the needle point
}
\makeglossaries
\begin{document}
\gls{ny}, \gls{la} and \gls{un} are abbreviations whereas
\gls{angelsperarea}, \gls{numofangels} and \gls{areaofneedle} are part of the
nomenclature
\printglossary[type=\acronymtype,title=Abbreviations]
\printglossary[title=Nomenclature]
\end{document}
Best Answer
A simple tabular-like environment?