2

This is a pontentially dumb question, but I fail at making glossaries print the long form accompanied by the abbreviation in the list of acronyms.

Let this be the document (should be self-contained):

\documentclass[12pt,openany,headsepline,headinclude,footexclude,bigheadings,pointlessnumbers,idxtotoc]{scrbook}

\usepackage{makeidx}
\usepackage[colorlinks=false,
            pdfborder={0 0 0},
            pagebackref=true
            ]{hyperref}
\usepackage[
            style=altlist,
            nomain,
            toc=true,
            acronym,
            description,
            section=chapter,
            sanitize=none
           ]{glossaries}

\newacronym[description={set of tags for use in developing hypertext documents}]{html}{html}{Hyper Text Markup Language}

\begin{document} 
\makeglossaries
Empty document that does not use \gls{html}, because \gls{html} needs contents.
\printglossaries
\end{document}

The appearance of the first and second use of the acronym are just as I want them to be, but in the list of acronyms, it currently prints

html \\ set of tags for use in developing hypertext documents.

where I would like to print

html - Hyper Text Markup Language \\ set of tags for use in developing hypertext documents.

This seems to be discussed in "Defining A Custom Acronym Style" in glossaries-user.pdf, but I don't really get the point, I guess. Or would I need redefining the style altlist or define a new style based on it respectively?

2 Answers 2

2

Use the name key to specify the appearance in the list of acronyms.

\documentclass{scrbook}

\usepackage[style=altlist,acronym]{glossaries}
\makeglossaries

\newacronym[description={set of tags for use in developing hypertext documents},%
    name={html -- Hyper Text Markup Language}]{html}{html}{Hyper Text Markup Language}

\begin{document} 

Empty document that does not use \gls{html}, because \gls{html} needs contents.

\printglossaries

\end{document}
2

Here's an alternative for glossaries v4.02 onwards:

\documentclass{scrbook}

\usepackage[style=altlist,acronym,nomain]{glossaries}
\makeglossaries

\setacronymstyle{long-short-desc}
\renewcommand*{\acronymentry}[1]{%
 \acronymfont{\glsentryshort{#1} -- \glsentrylong{#1}}}

\newacronym[description={set of tags for use in developing hypertext documents}]
{html}{html}{Hyper Text Markup Language}

\begin{document} 

Empty document that does not use \gls{html}, because \gls{html} needs contents.

\printglossaries

\end{document}

You must log in to answer this question.

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