diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.tex | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.tex b/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.tex new file mode 100644 index 00000000000..041dc24e48c --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries-extra/sample-trans.tex @@ -0,0 +1,54 @@ +% arara: pdflatex +% arara: makeglossaries +% arara: pdflatex +\documentclass{article} + +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[nogroupskip]{glossaries-extra} + +\makeglossaries + +\setabbreviationstyle[acronym]{long-short-user} + +% Translations are stored in the user1 key in the sample file +% (loaded below). +% This is the default for the long-short-user style so +% \glsxtruserfield doesn't need changing, but let's illustrate +% changing the font style for the short form: + +\renewcommand{\glsabbrvuserfont}[1]{\textsc{\MakeLowercase{#1}}} +\renewcommand*{\glsxtrusersuffix}{\glsxtrscsuffix} + +\loadglsentries{example-glossaries-acronyms-lang} + +% The entries in the above file are all defined using +% \newacronym, which automatically sets the category +% to "acronym" (which is why the abbreviation style needs +% to use "acronym" in the optional argument). The glossary +% can be adapted by using the post-description hook for this +% category. + +% \glscurrentfieldvalue only works with glossaries v4.23 (and above) +\renewcommand{\glsxtrpostdescacronym}{% + \ifglshasfield{\glsxtruserfield}{\glscurrententrylabel}% + { (English: \glscurrentfieldvalue)}% + {}% +} + +\begin{document} + +\section{Sample} + +First use: + +\forglsentries{\thislabel}{\gls{\thislabel}. } + +Next use: + +\forglsentries{\thislabel}{\gls{\thislabel}. } + +\printglossaries + +\end{document} + |