This is the right way.
I added \glsaddall
simply to add all entries in the lists.
\documentclass{article}
\usepackage{glossaries}
\newglossary[nlg]{nomenc}{not}{ntn}{Nomenclature}
\newglossary[slg]{abbrev}{sot}{stn}{Abbreviations}
% Your custom styles here
% \newglossarystyle{style1}{.....}
% \newglossarystyle{style2}{.....}
\makeglossaries
\loadglsentries[nomenc]{INP-00-glossary}
\loadglsentries[abbrev]{INP-01-glossary}
\begin{document}
\glsaddall
\printglossary[style=style1,type=nomenc]
\printglossary[style=style2,type=abbrev]
\end{document}
EDIT
If you have the need to load the glossaries
package with the option acronym
\usepackage[acronym]{glossaries}
then you can use this workaround to load your database with acronyms: substitute the line
\loadglsentries[nomenc]{INP-00-glossary}
with
\let\oldacronymtype\acronymtype
\def\acronymtype{nomenc}
\loadglsentries[nomenc]{INP-00-glossary}
\let\acronymtype\oldacronymtype
EDIT2
To solve your issue with \gls{md}
, you should define the first
key, which determines how the glossary entry is printed the first time it is used (it is automatic for acronyms, but not for common glossary entries).
This means that you have to rewrite your entry as:
\newglossaryentry{md}
{
name={MD},
description={molecular dynamics},
first={\glsentrydesc{md} (\glsentrytext{md})}
}
May I recommend the tool "arara"?
Just use the following MWE:
% arara: pdflatex
% arara: nomencl
% arara: pdflatex
\documentclass{article}
%other packages
\usepackage{nomencl}
\renewcommand{\nomname}{Abbreviations}
\makenomenclature
\begin{document}
\printnomenclature
\section{Experimental Part}
\textit{Synthesis of some compound \textbf{(aa)}}\\ %E13
To a solution of 2-bromo-5-methoxybenzoic acid in DMF \nomenclature{DMF}{Dimethylformamide} (33 mL) is added CuCN\nomenclature{CuCN}{Copper Cyanide}.
\end{document}
and run arara thesis.tex
. That works and you don't have to waste more thoughts on the makeindex
compiling routine of nomencl
Best Answer
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 packageacro
and one forglossaries
.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:Here is a full example:
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 tonomencl
it requires you to run a script to sort the entries. If your file is calledfile.tex
this is usually done by callingfrom the command line. Details can be found in the user manual (page 26, section 1.3.3).
The full example: