2

I'm using the glossaries package to create a list of abbreviations. I would like to set the horizontal space between the abbreviation and definition to 2.5 cm. I realise this question has been asked previously but I was not able to find a solution that fits the simple example below.

Here is a MWE. Thanking you in advance!

\documentclass{report}
\usepackage[acronym, sort=use, nopostdot, nonumberlist, hyperfirst=false]{glossaries}

\makeglossaries
\renewcommand*{\acronymname}{List of Abbreviations}
\newacronym{who}{WHO}{World Health Office}
\newacronym{oth}{OTHER}{Some disease other than Response System}
\newacronym{sar}{SARI}{Severe acute something infection}
\newacronym{vid}{VIDAL}{Another very very other long acronym}

\begin{document}
\printglossaries
First use: \gls{who}. Second use: \gls{who}. Now we move on to \gls{sar} this is the first mention so when i use \gls{sar} again we get the short version. I also discuss \gls{vid} of course too

\end{document}

The output is attached. I just want to increase the space between acronym and its definition to 2.5 cm Space is too small

  • Please check my answer and the original answer to see if it fits your needs. If so, tell as to mark it as a duplicate. – koleygr Sep 8 '18 at 16:08
  • Do you want the descriptions vertically aligned (as though in a table) or do you simply want to increase the gap between the end of the name and the start of the description (maintaining a ragged effect)? – Nicola Talbot Sep 23 '18 at 15:08
  • @NicolaTalbot Yes, I do want the descriptions vertically aligned. thank you for clarifying. Can achieve that modifying the code suggested by LianTze below? – epdnm Sep 30 '18 at 5:04
1

Do you mean the absolute separation distance between each acronym and its description needs to be 2.5cm? That's quite wide, but adding these in the preamble should do it:

\usepackage{enumitem}
\usepackage{etoolbox}
\patchcmd{\theglossary}
  {\begin{description}}
  {\begin{description}[labelsep=2.5cm]}{}{}

If you mean you need every label to occupy a width of 2.5cm, then you can change labelsep to labelwidth.

| improve this answer | |
  • This works, however I get a red corss next to the two last lines of code and when I hover the mouse over them there is a message that says: unexpected close group } after \begin {description} – epdnm Sep 30 '18 at 4:59
0

In my answer I just used the answer of @AlexGrede from here so please don't upvote... I am voting to close the question if OP says it is ok.

\documentclass{report}
\usepackage[xindy={glsnumbers=false}, nonumberlist, nopostdot, nogroupskip]{glossaries}

% Original method for bold
%\newglossarystyle{mylong}{%
%  \setglossarystyle{long}%
%  \renewcommand{\glossentry}[2]{%
%    \glsentryitem{##1}\glstarget{##1}{\bfseries \glossentryname{##1}} &
%    \glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
%  }%
%}
%\setglossarystyle{mylong}

% Nicola Talbot's suggestion
\setglossarystyle{long}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}

\makeglossaries

\renewcommand*{\acronymname}{List of Abbreviations}
\newacronym{who}{WHO}{World Health Office}
\newacronym{oth}{OTHER}{Some disease other than Response System}
\newacronym{sar}{SARI}{Severe acute something infection}
\newacronym{vid}{VIDAL}{Another very very other long acronym}

\begin{document}

\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\glsdescwidth{0.8\hsize}
\printglossaries

First use: \gls{who}. Second use: \gls{who}. Now we move on to \gls{sar} this is the first mention so when i use \gls{sar} again we get the short version. I also discuss \gls{vid} of course too

\end{document}

enter image description here

| improve this answer | |
  • In my output the distance between items is less than 2.5 cm. Are you able to point out where you set that value? – epdnm Sep 8 '18 at 16:14
  • Tried but not.. Sorry. I am just leaving the answer to let people know the problem. I thought about hidding a long acronym but didn't made it to work yet. Leaving the answer for futer people to use the idea if they manage to do it – koleygr Sep 8 '18 at 16:21
  • It seemed like something so simple to set, but clearly it is not :( – epdnm Sep 8 '18 at 16:25

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.