summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/acro/examples/acro.example.texsx-507726.tex
blob: f9acd723d1228c2603cba27aa8091764c9c991b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\documentclass{article}
\usepackage[english,ngerman]{babel}
\usepackage{csquotes}
\usepackage[version=3]{acro}

% issue #136
\DeclareAcroProperty{foreign-short}

\RenewAcroTemplate {long-short}{%
  \acroiffirstTF{%
    \acrowrite{long}\acspace
    (%
      \acrowrite{short}%
      \acroifT{foreign}{, \acrowrite{foreign}}%
      \acroifT{foreign-short}{, \acrowrite{foreign-short}}%
      \acrogroupcite
    )%
  }
  {\acrowrite{short}}%
}

\RenewAcroTemplate[list]{description}{%
  \acroheading
  \acropreamble
  \begin{description}
    \acronymsmapF{
      \item [\acrowrite{short}\acroifT{alt}{/\acrowrite{alt}}]
        \acrowrite{long}%
        \acroifanyT{foreign,extra}{ (}%
        \acroifT{foreign}{%
          \acrowrite{foreign}%
          \acroifT{foreign-short}{, \acrowrite{foreign-short}}%
          \acroifT{extra}{, }%
        }%
        \acroifT{extra}{\acrowrite{extra}}%
        \acroifanyT{foreign,extra}{)}%
        \acroifpagesT{%
          \acropagefill
          \acropages
            {\acrotranslate{page}\nobreakspace}%
            {\acrotranslate{pages}\nobreakspace}%
        }%
    }
    { \item \AcroRerun }
  \end {description}
}

\DeclareAcronym{dsgvo}{
  short = DSGVO,
  long = {Datenschutz-Grundverordnung},
  foreign = General Data Protection Regulation ,
  foreign-short = GDPR, % new line
  foreign-babel = english,
  foreign-format = \enquote
}

\begin{document}

\ac{dsgvo}

\printacronyms

\end{document}