Text Formattingglossaries | Justify Acronym Descriptions

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Dominik
Posts: 1
Joined: Fri Jul 01, 2011 6:29 pm

glossaries | Justify Acronym Descriptions

Post by Dominik »

Hi everyone,

is there a way to get acronym descriptions maintained by the glossaries package to be right justified in their column instead of left justified (in the listdotted style).

Best,
Dominik

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries | Justify Acronym Descriptions

Post by nlct »

You could try defining a new style:

Code: Select all

\newglossarystyle{altlistdotted}{%
  \glossarystyle{list}%
  \renewcommand*{\glossaryentryfield}[5]{%
    \item[]\makebox[\glslistdottedwidth][l]{%
      \glsentryitem{##1}\glstarget{##1}{##2}%
      \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}\hfill##3}%
  \renewcommand*{\glossarysubentryfield}[6]{%
    \item[]\makebox[\glslistdottedwidth][l]{%
    \glssubentryitem{##2}%
    \glstarget{##2}{##3}%
    \unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}\hfill##4}%
}
You may need to adjust the value of \glslistdottedwidth as this will shove the description to the end of the text body and the dotted line may appear truncated.

Regards
Nicola Talbot
Post Reply