6

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

  • 1
    Please provide a complete, minimal document showing the relevant settings and including little examples of the acronyms and nomenclature. – Gonzalo Medina Mar 18 '14 at 1:15
7

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

4

It would help to have a minimal working example, but you could just use the alttree glossary style and set the width taken up by the name using \glssetwidest:

\documentclass{article}

\usepackage[acronym,nopostdot,nonumberlist]{glossaries}

\makeglossaries

\newglossaryentry{twb}{%
  name={\ensuremath{t_{wb}}},
  description={Thickness of Stiffener Web (in)}
}

\newglossaryentry{wfg}{%
  name={\ensuremath{w_{fg}}},
  description={Width of Stiffener Flange (in)}
}

\newacronym{bwb}{BWB}{Blended Wing Body}
\newacronym{doe}{DOE}{Design of Experiments}
\newacronym{fea}{FEA}{Finite Element Analysis}

\setglossarystyle{alttree}
\glssetwidest{BWB}
\renewcommand{\glsnamefont}[1]{\textmd{#1}}

\begin{document}
\glsaddall

\printglossaries
\end{document}

This produces:

Image of resulting glossaries

  • How to manually change the spacing e.g. inside the acronym with default glossarystyle? – qrtLs May 26 '16 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.