summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/acro/examples/acro.example.texsx-505891.tex
blob: 60e22e7051e1e5e1d541c4bafc9706e20e1b6072 (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
\documentclass{article}

\usepackage[version=3]{acro}

\DeclareAcroProperty{alt2}
\DeclareAcroProperty{alt2-format}

\RenewAcroTemplate[list]{description}{%
  \acroheading
  \acropreamble
  \begin{description}
    \acronymsmapF{
      \item [%
          \acrowrite{short}%
          \acroifT{alt}{/\acrowrite{alt}}%
          \acroifT{alt2}{/\acrowrite{alt2}}%
        ]
        \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{one}{ short = one , alt = two, alt2 = three, long = common description }
\DeclareAcronym{four}{ short = four , long = another description }

\begin{document}

\printacronyms[display=all]

\end{document}