| 1 |
% This file is embedded in glossaries-extra-manual.pdf |
| 2 |
% Example 119 Foreign language field encapsulation |
| 3 |
% Label: "ex:foreignlangfmt" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage[main=british,brazilian,ngerman]{babel} |
| 9 |
\usepackage{glossaries-extra} |
| 10 |
\setabbreviationstyle{long-short-user} |
| 11 |
\newabbreviation |
| 12 |
[user1={Associação Brasileria de Normas Técnicas}, |
| 13 |
user2={pt-BR} |
| 14 |
] |
| 15 |
{abnt}{ABNT}{Brazilian National Standards Organization} |
| 16 |
|
| 17 |
|
| 18 |
\newabbreviation |
| 19 |
[user1={Deutsches Institut für Normung e.V.}, |
| 20 |
user2={de-DE-1996}] |
| 21 |
{din}{DIN}{German Institute for Standardization} |
| 22 |
|
| 23 |
|
| 24 |
\newabbreviation{tug}{TUG}{\TeX\ User Group} |
| 25 |
|
| 26 |
|
| 27 |
\renewcommand*{\glsxtruserparen}[2]{% |
| 28 |
\glsxtrfullsep{#2}% |
| 29 |
\glsxtrparen |
| 30 |
{#1% |
| 31 |
\ifglshasfield{\glsxtruserfield}{#2}% |
| 32 |
{, \emph{\GlsXtrForeignText{#2}{\glscurrentfieldvalue}}}% |
| 33 |
{}% |
| 34 |
}% |
| 35 |
} |
| 36 |
\begin{document} |
| 37 |
\gls{abnt}, \gls{din}, \gls{tug}. |
| 38 |
\printunsrtglossaries |
| 39 |
\end{document} |