5

My current glossary looks like this:

enter image description here

What I'd like to do is:

  1. Have the acronym-list print the short and the long version of the acronym, like this:

FPS (Frames Per Second) Text describing the acronym

  1. "Merge" the glossary and the acronym list into one single list. This should also order the acronyms and the glossary-entries together, so that the acronym "FPS" would be between the glossary-entries "App" and "Heap".

I've checked out the huge user-manual for glossaries and some of the questions here, but no luck. Also, I found this How to combine Acronym and Glossary, which I can accept as a last resort, but I'd like to put them both in one list.


The merged glossary would be something like this:

activity Eine Art Controller[...] 6,19

FPS (Frames Per Second) Gibt an, wie oft der[...] 4,18,19,26

Heap Ein Baum, welcher die Heap[...] 5,10,81

Where activity and Heap are normal glossary entries and FPS is an acronym.


MWE

\documentclass[12pt,titlepage]{article}
\usepackage[toc, nopostdot]{glossaries}
\setacronymstyle{long-short}
\makeglossaries
\loadglsentries{glossar.tex}
\newcommand{\Gloss}[1]{\textit{\Gls{#1}}}
\newcommand{\gloss}[1]{\textit{\gls{#1}}}
\newcommand{\Glosspl}[1]{\textit{\Glspl{#1}}}
\newcommand{\glosspl}[1]{\textit{\glspl{#1}}}

\begin{document}

Some text goes here \Gloss{glossar:acro:jvm} yada yada yada...

\cleardoublepage
\printglossary[title=Glossar]

\end{document}

That creates this output:

Some text goes here Java Virtual Machine (JVM) yada yada yada...

and the second time

Some other text later in the document has a JVM related topic

6
  • Could you demo what your merged option would look like?
    – EngBIRD
    Jul 16, 2015 at 22:43
  • @EngBIRD I added a demo. Jul 17, 2015 at 6:55
  • 1
    It would help if you could provide a minimal working example (MWE) we can work with. If you're using the glossaries package, then just remove the acronym package option to have a single glossary. For a short and long version with a description try \setacronymstyle{long-short-desc}. Jul 17, 2015 at 11:10
  • Removing the acronym option from the package works for question 2, thanks for that! Though the \setacronymstyle is for displaying long and short in the text, right? I only want the long and short version in the glossary. Jul 17, 2015 at 13:47
  • \setacronymstyle also sets how the name key (used in the glossary) is constructed, but it may be more appropriate to define a custom glossary style. What do you want in the text? Long only or short only? It really would help if you could provide minimal working example we can work with. Jul 17, 2015 at 18:22

1 Answer 1

2

So what I ended up doing was this:

To solve Nr. 1, I used this older answer from @Nicola Talbot:

\setacronymstyle{long-short-desc}  % Print both long and short
\renewcommand*{\acronymentry}[1]{%
 \acronymfont{\glsentryshort{#1}} (\textnormal{\glsentrylong{#1}})} % Print it the way I want
\makeglossaries
\loadglsentries{glossar.tex} % Or define them directly...

To solve Nr. 2, Nicola helped me in the comments directly, by pointing out that leaving the acronym package option out of the \usepackage-command would result in just what I wanted.

Together, the output now looks like this:

enter image description here

3
  • Could you please post how you formatted the \newglossaryentry in your file?
    – Marcel
    Dec 13, 2016 at 9:10
  • @Marcel not really sure what you're asking for. If you mean the style with which the glossary-items appear in the text, see my questions MWE. Dec 13, 2016 at 10:39
  • I found it in Nicolas Thread. They glossary entries have to be formatted like this :\newacronym[description={set of tags for use in developing hypertext documents}]{html}{html}{Hyper Text Markup Language}
    – Marcel
    Dec 13, 2016 at 19:32

You must log in to answer this question.

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