[Tex/LaTex] Adjust space between acronym and glossary description

glossariesindentation

I'm using the glossaries package and I would like to get the acronym descriptions to line up with the nomenclature section above it. Tried using the column styles for the glossary, but none of those allow adjustment of the first column (with the acronyms). See picture for misalignment. Any way around this?

Misalignment

Best Answer

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:

enter image description here