Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Glossaries and line breaks

1,466 views
Skip to first unread message

Christian Praetorius

unread,
Aug 5, 2013, 10:32:21 AM8/5/13
to
Hi,
I am using the glossaries package to insert acronyms into my work. For
that I have to use a dotted line and some distance due to format
regulations. Unfortunately some of the acronyms have rather lengthy
"translations" which create a line break. These line breaks don't look
very nice, since the new line almost starts below the short form of
the acronym.
Is there a way to indent the text so it starts below the first line of
explanation?

Christian

--
X-no-Sig: yes

Nicola Talbot

unread,
Aug 12, 2013, 6:45:05 AM8/12/13
to
Can you provide a minimal example illustrating this?

Regards
Nicola Talbot
--
Home: http://www.dickimaw-books.com/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/

Christian Praetorius

unread,
Aug 13, 2013, 7:41:57 AM8/13/13
to
Nicola Talbot <n.ta...@uea.ac.uk> wrote:

>Can you provide a minimal example illustrating this?

Yes:

\documentclass[b5paper]{scrreprt}
\usepackage[colorlinks]{hyperref}
\usepackage[acronym,nonumberlist,]{glossaries} % make a separate list
of acronyms
\glossarystyle{listdotted}
\setlength{\glslistdottedwidth}{4cm}
\makeglossaries
\newacronym{Mitf}{Mitf}{Microphthalmia-associated transcription
factor}
\newacronym{short}{short}{This is only short}
\newacronym{long}{long}{This explanation is longer, so you get a line
break here}
\newacronym{superlong}{superlong}{This explanation is so long, that
it is even long than the long example}
\glsaddall
\begin{document}
\printglossaries
\end{document}

The long and superlong acronyms get a line break, which looks not
nice. I have to use a dotted line here, the width can be changed, but
I would like to have the new line aligned if possible.

Christian

--
X-no-Sig: yes

Nicola Talbot

unread,
Aug 13, 2013, 3:58:03 PM8/13/13
to
Is this the kind of thing you want:

\documentclass[b5paper]{scrreprt}

\usepackage{calc}
\usepackage[colorlinks]{hyperref}
\usepackage[acronym,nonumberlist,]{glossaries} % make a separate list of
acronyms
\usepackage{glossary-tree}

\setlength{\glslistdottedwidth}{4cm}

\newglossarystyle{altlistdotted}%
{%
\glossarystyle{tree}%
\renewcommand{\glossaryentryfield}[5]{%
\hangindent0pt\relax
\parindent0pt\relax
\makebox[\glslistdottedwidth][l]%
{%
\glsentryitem{##1}\textbf{\glstarget{##1}{##2}}%
\unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut
}%
\parbox[t]{\linewidth-\glslistdottedwidth}{##3}\par}%
}

\glossarystyle{altlistdotted}

\makeglossaries
\newacronym{Mitf}{Mitf}{Microphthalmia-associated transcription
factor}
\newacronym{short}{short}{This is only short}
\newacronym{long}{long}{This explanation is longer, so you get a
line
break here}
\newacronym{superlong}{superlong}{This explanation is so long, that
it is even long than the long example}
\glsaddall
\begin{document}
\printglossaries
\end{document}

Christian Praetorius

unread,
Aug 14, 2013, 3:13:30 AM8/14/13
to
Nicola Talbot <n.ta...@uea.ac.uk> wrote:

>Is this the kind of thing you want:

Yes, exactly. This works perfect, thanks a lot.

Christian

--
X-no-Sig: yes
0 new messages