6

I am using latex to write my thesis report, so i use the glossary package to generate the acronym list , but i get a small space between acronym and it description ,here is my minimal code:

\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}

\makeglossaries 

\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }

\begin{document}
    \tableofcontents
    \chapter{Sample}
    This is a sample document that uses the dummy glossary entries
    supplied with the glossaries bundle for testing.
    \gls{ASF} \gls{CICS}
    Here are all the entries (including acronyms):

    \gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
    \gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
    \gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=tree]

\end{document} 

and I get this output:

enter image description here

How can I change the space between the acronym entry and it description?? Can you help me please??

Nousa
  • 525

1 Answers1

10

In the preamble, redefine the macro \glstreepredesc to whatever should precede the acronym descriptions. Without modifying it, it will expand to a single space. If you redefine it as

\renewcommand\glstreepredesc{\quad}

then the space between the acronyms and their descriptions will increase to a \quad.

enter image description here

\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}

\makeglossaries 

\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }
\renewcommand\glstreepredesc{\quad}
\begin{document}
    \tableofcontents
    \chapter{Sample}
    This is a sample document that uses the dummy glossary entries
    supplied with the glossaries bundle for testing.
    \gls{ASF} \gls{CICS}
    Here are all the entries (including acronyms):

    \gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
    \gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
    \gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=tree]

\end{document} 

Edit: From the discussions in the comment it seems that the problem is to align the descriptions vertically. Applying the answer Glossaries: vertical aligment of acronyms' long names to the current problem leads to the following changes:

  • In the \printglossary command, use style=long instead of style=tree.

  • If you want to have the acronyms in boldface (with style long they are in normal font), add the following line to your preamble, after loading the package glossaries:

    \renewcommand{\glsnamefont}[1]{\textbf{#1}}
    
  • To increase the space available for the description, add the following lines to the preamble, after loading the package glossaries:

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

enter image description here

\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\glsdescwidth{0.8\hsize}

\makeglossaries 

\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }
\begin{document}
    \tableofcontents
    \chapter{Sample}
    This is a sample document that uses the dummy glossary entries
    supplied with the glossaries bundle for testing.
    \gls{ASF} \gls{CICS}
    Here are all the entries (including acronyms):

    \gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
    \gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
    \gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=long]

\end{document} 
gernot
  • 49,614
  • When i add \renewcommand\glstreepredesc{\quad} in my preamble i get two errors :(1) \glstreepredesc undefined. \renewcommand\glstreepredesc in my tex file and (2) Command \glstreepredesc already defined. \newcommand{\glstreepredesc}{\space} in the glossary-tree.sty – Nousa Jan 02 '17 at 13:43
  • @Nousa You have to add the \renewcommand after the package glossaries has been loaded. I have added a screenshot and the LaTeX code for it to my answer. Try whether this code also works for you. – gernot Jan 02 '17 at 13:56
  • it works thanks , but the descriptions are not in the same alignment – Nousa Jan 02 '17 at 14:41
  • @Nousa It wasn't clear to me from your post that the problem is to align the descriptions vertically. See the edit to my answer. – gernot Jan 02 '17 at 15:26