Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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}
share|improve this answer

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.