Abkürzungen mit Verweis auf Glossar stylen - Glosssaries

Erstellen von Index, Glossar, Symbolverzeichnis, einer Nomenklatur etc. mit MakeIndex oder Xindy


Mario90

Abkürzungen mit Verweis auf Glossar stylen - Glosssaries

Beitrag von Mario90 »

Hallo,
ich verwende Glossaries um sowohl Abkürzungen als auch Glossareinträge zu erstellen. Einige Abkürzungen sollten einen Verweis auf dem Glossareintrag haben. Es klappte mit dem unten stehenden Code. Nur mit der Darstellung bin nicht ganz zufrieden.
Ich würde gerne die Abkürzungen so dargestellt haben:
Bild
Bis jetzt habe ich nur dies erreicht (Glossarverweis zerkwetscht und Seitennummer vor Glossarverweis):
Bild
Minimalbeispiel:
\documentclass{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\makeglossaries


%%% The glossary entry the acronym links to   
\newglossaryentry{apig}{name={API},
    description={An Application Programming Interface (API) is a particular set
of rules and specifications that a software program can follow to access and
make use of the services and resources provided by another particular software
program that implements that API}}

%%% define the acronym and use the see= option
\newglossaryentry{api}{type=\acronymtype, name={API}, description={Application
Programming Interface}, first={Application
Programming Interface (API)\glsadd{apig}}, see=[Glossary:]{apig}}
\begin{document}
\noindent
First use \gls{api}\    subsequent \gls{api}
\newpage

\printglossary[type=\acronymtype,style=long3col]
%%% \newpage just to demonstrate that links are correct
\newpage
\printglossary[type=main]

\end{document}
Wäre sehr dankbar für jede Hilfe!

Gast

Beitrag von Gast »

\documentclass[a4paper]{article}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\usepackage{glossary-longragged}

\setlength{\glsdescwidth}{0.75\hsize}


\newglossarystyle{longragged3coldotted}{%
  \renewenvironment{theglossary}%
    {\begin{longtable}{@{}l>{\raggedright}p{\glsdescwidth}<{\dotfill}%
       >{\raggedright}p{\glspagelistwidth}@{}}}%
    {\end{longtable}}%
  \renewcommand*{\glossaryheader}{}%
  \renewcommand*{\glsgroupheading}[1]{}%
  \renewcommand{\glossentry}[2]{%
    \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
    \glossentrydesc{##1} & ##2\tabularnewline
  }%
  \renewcommand{\subglossentry}[3]{%
     &
     \glssubentryitem{##2}%
     \glstarget{##2}{\strut}\glossentrydesc{##2} &
     ##3\tabularnewline
  }%
  \renewcommand*{\glsgroupskip}{%
    \ifglsnogroupskip\else & &\tabularnewline\fi}%
}


\makeglossaries


%%% The glossary entry the acronym links to   
\newglossaryentry{apig}{name={API},
    description={An Application Programming Interface (API) is a particular set
of rules and specifications that a software program can follow to access and
make use of the services and resources provided by another particular software
program that implements that API}}

%%% define the acronym
\newglossaryentry{api}{type=\acronymtype, name={API}, description={Application
Programming Interface \textsf{\textit{Glossary:}}\gls{apig}}, first={Application
Programming Interface (API)\glsadd{apig}}}
\begin{document}
\noindent
First use \gls{api}\    subsequent \gls{api}
\newpage

\printglossary[type=\acronymtype,style=longragged3coldotted]
%%% \newpage just to demonstrate that links are correct
\newpage
\printglossary[type=main]

\end{document}
Würde ich aber nicht so machen.

Mario90

Beitrag von Mario90 »

Vielen Dank für deine Hilfe.
Kannst du mir vielleicht erklären, warum du das nicht so machen würdest?

Besserwisser

Beitrag von Besserwisser »

Ich betrachte Verweise vom einen Verzeichnis in das andere als überflüssig, da die Kürzel ja hoffentlich ohnehin identisch sind. Aus diesem Grund würde max. eine Art gemeinsame Markierung für alle Einträge mit glossar-Eintrag genügen. Man braucht das aber eigentlich gar nicht. Egal wie man es haben will, ein eigener Befehl \seeglossary{…} wäre sicher besser, als bei jedem Eintrag hart die Formatierung anzugeben. Aber ob das wirklich bei der Erklärung gut aufgehoben ist? Ich bezweifle das.

Vielleicht wäre die sinnvollste Lösung sogar, aus beiden Tabellen eine zu machen.

Die Pünktchen sind eher störend als nützlich.

Wird die Erklärung mehrzeilig, sind die Pünktchen an der falschen Stelle. Zwar könne man dafür sorgen, dass die Zellen anders ausgerichtet werden, wenn dann aber in der Spalte mit den Seitenzahlen so viele Einträge stehen, dass es dort einen Seitenumbruch gibt, passen die Pünktchen wieder nicht.

Antworten