0

I'm using glossaries package to generate my acronym list. How can I prevent line breaks in case of long acronym or just align it correctly. Can someone help me with that :) Thank you so much.

\documentclass[oneside, a4paper, 12pt, french]{book}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{libertine}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{libertinust1math}
\usepackage{babel}
\usepackage[top=2cm, bottom=2cm, inner=2cm, outer=1.5cm, headheight=24pt]{geometry}
 \usepackage[acronym, style=super, nogroupskip, nopostdot, nonumberlist, toc]{glossaries}
 \makenoidxglossaries
  
  \newacronym{af2i}{AF2I}{Association Française des Investisseurs Institutionnels}
   \newacronym{ntic}{NTIC}{Nouvelles Technologies de l'Information et de la Communication} 
    \newacronym{ocde}{OCDE}{Organisation de Coopération et de Développement Économiques}
     \renewcommand{\glsnamefont}[1]{\textbf{#1}}
    
    \begin{document}
   \setglossarystyle{listdotted}
    \printnoidxglossary[type=\acronymtype, title=Liste des acronymes, toctitle= LISTE DES ACRONYMES]
     
       \acrfull{ocde}

     \end{document}

1 Answer 1

1

Reduce \glslistdottedwidth. This length per default is half of the textwidth. In case of your long descriptions there is not enough space left to fit in one line. I added \setlength{\glslistdottedwidth}{.3\linewidth} in your example:

\documentclass[oneside, a4paper, 12pt, french]{book}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{libertine}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{libertinust1math}
\usepackage{babel}
\usepackage[top=2cm, bottom=2cm, inner=2cm, outer=1.5cm, headheight=24pt]{geometry}
\usepackage[acronym, style=super, nogroupskip, nopostdot, nonumberlist, toc]{glossaries}
\makenoidxglossaries
  
\newacronym{af2i}{AF2I}{Association Française des Investisseurs Institutionnels}
\newacronym{ntic}{NTIC}{Nouvelles Technologies de l'Information et de la Communication} 
\newacronym{ocde}{OCDE}{Organisation de Coopération et de Développement Économiques}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
 
\setglossarystyle{listdotted}
\setlength{\glslistdottedwidth}{.3\linewidth}

\begin{document}

\printnoidxglossary[type=\acronymtype, title=Liste des acronymes, toctitle= LISTE DES ACRONYMES]
     
\acrfull{ocde} \par
\acrfull{ntic} \par
\acrfull{af2i}

\end{document}

enter image description here

1
  • Thank you so much :) Commented Jan 16, 2021 at 14:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .