3

I had a problem trying to set the width of a glossary column. The suggested solution solved the issue, but raised another problem where the terms are appearing weird, not aligned vertically in the glossary. A minimum working example is:

\documentclass{article}    
\usepackage[nomain,acronym]{glossaries}    
\newcommand{\acronentry}[2]{%
  \newglossaryentry{acro#1}{type=\acronymtype, name={#1},description={#2}, first={#2 (#1)}}%
  \glsadd{acro#1}%
}    
\makeglossaries

\newglossarystyle{clong}{%
 \renewenvironment{theglossary}%
     {\begin{longtable}{p{.3\linewidth}p{\glsdescwidth}}}%
     {\end{longtable}}%
  \renewcommand*{\glossaryheader}{}%
  \renewcommand*{\glsgroupheading}[1]{}%
  \renewcommand*{\glossaryentryfield}[5]{%
    \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
  \renewcommand*{\glossarysubentryfield}[6]{%
     & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
  %\renewcommand*{\glsgroupskip}{ & \\}%
}

\usepackage{lipsum}

\acronentry{ABC}{An example one}
\acronentry{BCD}{A second example}
\acronentry{DEF}{A new third example, with more text}
\begin{document}
\glsaddall
\printglossary[type=\acronymtype,style=clong]    
\end{document}

What produces:

Resulting document

How can I make the term and its descriptions aligned to the top vertically keeping the solution provided by @Martin H, as I need that else my layout will break?

6

Uncomment the redefinition of \glsgroupskip; note that the & inside it is useless.

1
  • Thanks, that solved the issue! I copied the solution from @Martin H and I will ask him to fix it in its answers to the other question.
    – Weslei
    Jul 17 '11 at 21:19

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.