1

Question

I have these glossary entries:

I just created the document and it is empty except for test text and a few definitions. The glossary is on page 3. As you can see, there is a comma before the page numbers linking to where the entries have been referred to for Datenobjekt and Objekt. You can also see that Objekt refers to Datenobjekt.

On my search for a solution, I came across this question. \glsaddallunused already is at the end of the document and when I created test text referring to passives Objekt (which isn't referred to by a different glossary entry), no comma appeared before the page number. So it seems to be caused by referring to a glossary entry in a glossary entry and calling \glsaddallunused in the document.

How can the commas be removed?


Example Document

I cut my document down content-wise as much as possible without breaking any reference dependencies and removed all other command definitions.

\documentclass[a4paper,11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[a4paper, total={6in, 10in}]{geometry}
\usepackage{booktabs}
\usepackage[colorlinks]{hyperref}
\usepackage[acronym,toc]{glossaries}

\title{UTF-8's Example Document}
\author{UTF-8}

\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=blue,
    urlcolor=black,
    pdftitle={\@title},
    pdfauthor={\@author},
    bookmarks=true
}

\newcommand{\glsquotation}[1]{
    \paragraph{\gls{#1}:} \glsdesc*{#1}.
}


\makeglossaries

\newglossaryentry{Objekt}
{
    name=Objekt,
    plural=Objekte,
    description={Siehe \gls{Datenobjekt}},
}

\newglossaryentry{Datenobjekt}
{
    name=Datenobjekt,
    plural=Datenobjekte,
    description={Repräsentiert Informationen},
}

\newglossaryentry{Subjekt}
{
    name=Subjekt,
    plural=Subjekte,
    description={Benutzer eines Systems oder Objekt, das im Auftrag von Benutzern im System aktiv sein kann (z.B. Prozess, Server, Prozedur)},
}

\newglossaryentry{Autorisierung}
{
    name=Autorisierung,
    plural=Autorisierungen,
    description={Besitzt ein \gls{Subjekt} die Berechtigung, auf ein \gls{Objekt} zuzugreifen, so nennt man das Subjekt für diesen Datenzugriff autorisiert},
}

\newglossaryentry{Authentizitaet}
{
    name=Authentizität,
    plural=Authentizitäten,
    description={Echtheit und Glaubwürdigkeit eines \glslink{Objekt}{Objekts} bzw. \glslink{Subjekt}{Subjekts}, die anhand seiner Identität und seiner charakteristischen Eigenschaften überprüfbar ist},
}

\newglossaryentry{vertraulich}
{
    name=vertraulich,
    description={System ermöglicht keine \glslink{Autorisierung}{unautorisierte} Informationsgewinnung},
}

\newglossaryentry{integer}
{
    name=integer,
    description={Subjekten ist es nicht möglich, Daten \glslink{Autorisierung}{unautorisiert} und unbemerkt zu manipulieren},
}

\newglossaryentry{verfuegbar}
{
    name=verfügbar,
    description={Authentifizierte und \glslink{Autorisierung}{autorisierte} \glspl{Subjekt} werden in der Wahrnehmung ihrer Berechtigungen nicht \glslink{Autorisierung}{unautorisiert} beeinträchtigt},
}

\begin{document}
\maketitle
\tableofcontents

\chapter{Chapter}
\section{Section}
\glsquotation{Authentizitaet}\\

Das klassische Schutzziel-Trio besteht aus Vertraulichkeit, Integrität, und Verfügbarkeit:

\glsquotation{vertraulich}
\glsquotation{integer}
\glsquotation{verfuegbar}


\glsaddallunused
\printglossaries

\end{document}

I wrote this script to build it (but you obviously can't use the cleaning option without the cleaning script):

# Builds the document specified by 'documentname'.
# Call with option '-c' or '--clean' to clean the top-levl directory before building.

#!/bin/bash

# CONFIGURATION
documentname="ENTER WHAT YOU CALLED THE FILE HERE (WITHOUT FILE EXTENSION)"
# END OF CONFUGURATION

if [ $1 == "-c" ] || [ $1 == "--clean" ]; then
    ./clean.sh
fi


pdflatex "$documentname.tex"
makeglossaries "$documentname"
pdflatex "$documentname.tex"
pdflatex "$documentname.tex"
makeindex -s "$documentname.ist" -o "$documentname.gls" "$documentname.glo"
pdflatex "$documentname.tex"
echo finished
sleep 2
  • Please provide a complete small document, starting with \documentclass and ending with \end{document} that illustrates your problem. Without this information, it is hard/impossible to analyze the problem. – gernot Oct 29 '16 at 21:18
1

You don't actually have to use \glsaddallunused. And from what I can tell you don't need to.

You found that some of your terms, i.e. Datenobjekt weren't showing up in your glossary because it wasn't explicitly used, only used in the initialization of another term.

The only issue you have here is that makeindex is not an infinitely recursive/iterative process.

If you simply add makeindex calls for any glossary that uses recursive terms you can continue to use \gls{Datenobjekt} or \glslink{Datenobjekt}{Datenobjekt} in your \newglossaryentry

For example, I can compile your document (commenting out only the %\glsaddallunused) and compiling (on my MikTeX machine) using my own little compilation script:

:CheckOS
IF "%PROCESSOR_ARCHITECTURE%"=="x86" (GOTO 32BIT) ELSE (GOTO 64BIT)

:64BIT
ECHO 64-bit compiling
SET MikTexPath=C:\Program Files\MiKTeX 2.9\miktex\bin\x64\
GOTO END

:32BIT
ECHO 32-bit compiling
SET MikTexPath=C:\Program Files\MiKTeX 2.9\miktex\bin\
GOTO END

:END

SET TeXCompilier=xelatex.exe

FOR %%A IN (*.tex) DO (
"%MikTexPath%%TeXCompilier%" "%%~nxA" &_
call BibTeXBuild.bat &_
"%MikTexPath%makeindex.exe" -s "%%~nA.ist" -t "%%~nA.glg" -o "%%~nA.gls" "%%~nA.glo" &_
"%MikTexPath%makeindex.exe" -s "%%~nA.ist" -t "%%~nA.alg" -o "%%~nA.acr" "%%~nA.acn" &_
"%MikTexPath%%TeXCompilier%" "%%~nxA" &_
"%MikTexPath%makeindex.exe" -s "%%~nA.ist" -t "%%~nA.glg" -o "%%~nA.gls" "%%~nA.glo" &_
"%MikTexPath%makeindex.exe" -s "%%~nA.ist" -t "%%~nA.alg" -o "%%~nA.acr" "%%~nA.acn" &_
"%MikTexPath%%TeXCompilier%" "%%~nxA" &_
"%MikTexPath%%TeXCompilier%" "%%~nxA" &_
"%MikTexPath%%TeXCompilier%" "%%~nxA" &_
)

I don't have any problem with the page references running my script, so possibly changing your script to the following (untested) might work:

# Builds the document specified by 'documentname'.
# Call with option '-c' or '--clean' to clean the top-levl directory before building.

#!/bin/bash

# CONFIGURATION
documentname="ENTER WHAT YOU CALLED THE FILE HERE (WITHOUT FILE EXTENSION)"
# END OF CONFUGURATION

if [ $1 == "-c" ] || [ $1 == "--clean" ]; then
    ./clean.sh
fi


pdflatex "$documentname.tex"
makeglossaries "$documentname"
makeindex -s "$documentname.ist" -o "$documentname.gls" "$documentname.glo"
pdflatex "$documentname.tex"
makeglossaries "$documentname"
makeindex -s "$documentname.ist" -o "$documentname.gls" "$documentname.glo"
pdflatex "$documentname.tex"
pdflatex "$documentname.tex"
pdflatex "$documentname.tex"
echo finished
sleep 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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