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})}
}
This is a solution.
Use a fixed width when issuing \printnomenclature
(e.g. 2cm
):
\printnomenclature[2cm] % <-- change the value here
and define a new glossary style mylong
where you use the same width (2cm
)
\newglossarystyle{mylong}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}% <-- change the value here
{\end{longtable}}%
}
When you print your glossary use the above style:
\printglossary[style=mylong,type=\acronymtype]
MWE:
\documentclass{article}
\usepackage{nomencl}
\usepackage[nonumberlist,acronym]{glossaries}
\newglossarystyle{mylong}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.8\hsize}}}% <-- change the value here
{\end{longtable}}%
}
\makenomenclature
\makeglossaries
\newacronym{BWB}{BWB}{Blended Wing Body}
\newacronym{DOE}{DOE}{Design of Experiments}
\newacronym{FEA}{FEA}{Finite Element Analysis}
\begin{document}
$t_{wb}$ and $w_{fg}$
\newpage
\nomenclature{$t_{wb}$}{Thickness of Stiffener Web (in)}
\nomenclature{$w_{fg}$}{Width of Stiffener Flange (in)}
\printnomenclature[2cm] % <-- change the value here
\glsaddall
\printglossary[style=mylong,type=\acronymtype]
\end{document}
Output:
Best Answer
it can be solved by setting the length of
\glslistdottedwidth