Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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