summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/acro/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-30 03:01:50 +0000
committerNorbert Preining <norbert@preining.info>2020-04-30 03:01:50 +0000
commitb273a879fbed76480fb7368ad555010024f3e411 (patch)
tree8c29aac231a89dfd7f5de12355da70f573b70d6d /macros/latex/contrib/acro/examples
parent817ecb96eab4ed6494ddb6b8d0f17c2947a91196 (diff)
CTAN sync 202004300301
Diffstat (limited to 'macros/latex/contrib/acro/examples')
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.acflike.pdfbin0 -> 21224 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.acflike.tex17
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.basic.pdfbin0 -> 125351 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.basic.tex113
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-109.pdfbin0 -> 30275 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-109.tex25
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-111.pdfbin0 -> 15733 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-111.tex27
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-119.pdfbin0 -> 8175 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-119.tex49
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-154.pdfbin0 -> 24224 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.issue-154.tex17
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.possessive.pdfbin0 -> 13686 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.possessive.tex36
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.texsx-505891.pdfbin0 -> 32429 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.texsx-505891.tex46
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.texsx-507726.pdfbin0 -> 33721 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.texsx-507726.tex63
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.units.pdfbin0 -> 65310 bytes
-rw-r--r--macros/latex/contrib/acro/examples/acro.example.units.tex99
20 files changed, 492 insertions, 0 deletions
diff --git a/macros/latex/contrib/acro/examples/acro.example.acflike.pdf b/macros/latex/contrib/acro/examples/acro.example.acflike.pdf
new file mode 100644
index 0000000000..59494c9916
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.acflike.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.acflike.tex b/macros/latex/contrib/acro/examples/acro.example.acflike.tex
new file mode 100644
index 0000000000..40e1037181
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.acflike.tex
@@ -0,0 +1,17 @@
+\documentclass{article}
+\usepackage[ngerman]{babel}
+\usepackage{acro}
+\acsetup{format/long=\itshape}
+
+\DeclareAcronym{cd}{short = CD, long = Compact Disc}
+
+\RenewAcroCommand\acflike{mm}{%
+ \acroformat{long}{#2} (\UseAcroTemplate{short}{#1})%
+}
+
+\begin{document}
+
+\ac{cd} \par
+\acflike{cd}{Rohling}
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.basic.pdf b/macros/latex/contrib/acro/examples/acro.example.basic.pdf
new file mode 100644
index 0000000000..670f91f97c
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.basic.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.basic.tex b/macros/latex/contrib/acro/examples/acro.example.basic.tex
new file mode 100644
index 0000000000..aa53ce2f52
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.basic.tex
@@ -0,0 +1,113 @@
+% this file is an adapted version of acrotest.tex shipped out
+% with the `acronym' package
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage[english]{babel}
+\usepackage[colorlinks]{hyperref}
+\usepackage[version=3]{acro}
+
+\acsetup{
+ make-links ,
+ pages / display = first ,
+ pages / fill = {, }
+}
+
+\DeclareAcronym{CDMA}{
+ short = CDMA ,
+ long = Code Division Multiple Access ,
+ long-plural = es
+}
+\DeclareAcronym{GSM}{
+ short = GSM ,
+ long = Global System for Mobile communication
+}
+\DeclareAcronym{NA}{
+ short = {\ensuremath{N_{\mathrm{A}}}} ,
+ long = Number of Avogadro ,
+ extra = see \S\ref{Chem} ,
+ pdfstring = NA
+}
+\DeclareAcronym{NAD+}{
+ short = {NAD\textsuperscript{+}} ,
+ short-plural = ,
+ long = Nicotinamide Adenine Dinucleotide ,
+ pdfstring = NAD+
+}
+\DeclareAcronym{NUA}{
+ short = NUA ,
+ long = Not Used Acronym
+}
+\DeclareAcronym{TDMA}{
+ short = TDMA ,
+ long = Time Division Multiple Access ,
+ long-plural = es
+}
+\DeclareAcronym{UA}{
+ short = UA ,
+ long = Used Acronym
+}
+\DeclareAcronym{lox}{
+ short = {\emph{LOX}} ,
+ long = Liquid Oxygen ,
+ pdfstring = LOX
+}
+\DeclareAcronym{lh2}{
+ short = {\emph{LH\textsubscript{2}}} ,
+ long = Liquid Hydrogen ,
+ pdfstring = LH2
+}
+\DeclareAcronym{IC}{
+ short = IC ,
+ long = Integrated Circuit
+}
+\DeclareAcronym{BUT}{
+ short = BUT ,
+ long = Block Under Test ,
+ long-plural-form = Blocks Under Test
+}
+\begin{document}
+
+\section{Intro}
+In the early nineties, \acs{GSM} was deployed in many European
+countries. \ac{GSM} offered for the first time international
+roaming for mobile subscribers. The \acs{GSM}'s use of \ac{TDMA} as
+its communication standard was debated at length. And every now
+and then there are big discussion whether \ac{CDMA} should have
+been chosen over \ac{TDMA}.
+
+\section{Furthermore}
+\acresetall
+The reader could have forgotten all the nice acronyms, so we repeat the
+meaning again.
+
+If you want to know more about \acf{GSM}, \acf{TDMA}, \acf{CDMA}
+and other acronyms, just read a book about mobile communication. Just
+to mention it: There is another \ac{UA}, just for testing purposes!
+
+\begin{figure}[h]
+Figure
+\caption{A float also admits references like \ac{GSM} or \acf{CDMA}.}
+\end{figure}
+
+\subsection{Some chemistry and physics}
+\label{Chem}
+\ac{NAD+} is a major electron acceptor in the oxidation
+of fuel molecules. The reactive part of \ac{NAD+} is its nictinamide
+ring, a pyridine derivate.
+
+One mol consists of \acs{NA} atoms or molecules. There is a relation
+between the constant of Boltzmann and the \acl{NA}:
+\begin{equation}
+ k = R/\acs{NA}
+\end{equation}
+
+\acl{lox}/\acl{lh2} (\acs{lox}/\acs{lh2})
+
+\subsection{Some testing fundamentals}
+When testing \acp{IC}, one typically wants to identify functional
+blocks to be tested separately. The latter are commonly indicated as
+\acp{BUT}. To test a \ac{BUT} requires defining a testing strategy\dots
+
+\printacronyms
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-109.pdf b/macros/latex/contrib/acro/examples/acro.example.issue-109.pdf
new file mode 100644
index 0000000000..906d959a8f
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-109.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-109.tex b/macros/latex/contrib/acro/examples/acro.example.issue-109.tex
new file mode 100644
index 0000000000..2005b5245a
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-109.tex
@@ -0,0 +1,25 @@
+\documentclass{article}
+\usepackage[enable-debug]{expl3}
+\usepackage{hyperref}
+\usepackage[version=3]{acro}
+
+\acsetup{
+ pages/display=all ,
+ pages/seq=false
+}
+
+\DeclareAcronym{ny}{
+ short = NY ,
+ long = New York ,
+}
+
+\NewAcroCommand\aci{m}{}
+
+\begin{document}
+
+no\aci{ny}thing\newpage
+\ac{ny}
+
+\printacronyms
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-111.pdf b/macros/latex/contrib/acro/examples/acro.example.issue-111.pdf
new file mode 100644
index 0000000000..028c2fa8d8
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-111.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-111.tex b/macros/latex/contrib/acro/examples/acro.example.issue-111.tex
new file mode 100644
index 0000000000..fe97f44e62
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-111.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage[french]{babel}
+\usepackage[version=3]{acro}
+
+\DeclareAcroArticle{definite}{\nospace}
+
+\NewAcroCommand\dacs{m}{\acrodefinite\UseAcroTemplate{short}{#1}}
+\NewAcroCommand\Dacs{m}{\acroupper\acrodefinite\UseAcroTemplate{short}{#1}}
+\NewAcroCommand\dacl{m}{\acrodefinite\UseAcroTemplate{long}{#1}}
+\NewAcroCommand\Dacl{m}{\acroupper\acrodefinite\UseAcroTemplate{long}{#1}}
+
+\DeclareAcronym{hadopi}{
+ short = HADOPI ,
+ long = Haute Autorit\'{e} pour la diffusion des \oe uvres et la protection des
+ droits sur l’Internet ,
+ short-definite = l'\nospace ,
+ long-definite = la ,
+}
+
+\begin{document}
+
+\dacs{hadopi}
+
+\Dacl{hadopi}
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-119.pdf b/macros/latex/contrib/acro/examples/acro.example.issue-119.pdf
new file mode 100644
index 0000000000..6f5f4f7ee4
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-119.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-119.tex b/macros/latex/contrib/acro/examples/acro.example.issue-119.tex
new file mode 100644
index 0000000000..d1b5cadc65
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-119.tex
@@ -0,0 +1,49 @@
+\documentclass{article}
+\usepackage[enable-debug]{expl3}
+
+\usepackage[version=3]{acro}
+
+\makeatletter
+\NewAcroTemplate[list]{external}{%
+ \if@filesw
+ \newwrite\acro@list
+ \immediate\openout\acro@list\jobname.ac\relax
+ \immediate\write\acro@list{\string\begin{description}}
+ \let\item\relax
+ \acronymsmapF{%
+ \immediate\write\acro@list{%
+ \space\space
+ \item[\acrofield{##1}{short}]
+ \acrofield{##1}{long}%
+ \acrofieldifTF{##1}{extra}{ (\acrofield{##1}{extra})}{}%
+ }%
+ }{\immediate\write\acro@list{\item}\AcroRerun}%
+ \immediate\write\acro@list{\string\end{description}}
+ \immediate\closeout\acro@list
+ \fi
+}
+\makeatother
+
+\DeclareAcronym{ny}{
+ short = NY ,
+ long = New York ,
+}
+
+\DeclareAcronym{la}{
+ short = LA ,
+ long = Los Angeles ,
+ extra = City of Angels
+}
+
+\DeclareAcronym{dc}{
+ short = D.C. ,
+ long = Washington D.C.
+}
+
+\begin{document}
+
+\acuseall
+\printacronyms[template=external]
+\null
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-154.pdf b/macros/latex/contrib/acro/examples/acro.example.issue-154.pdf
new file mode 100644
index 0000000000..6ae39ce428
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-154.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.issue-154.tex b/macros/latex/contrib/acro/examples/acro.example.issue-154.tex
new file mode 100644
index 0000000000..709ee5a49e
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.issue-154.tex
@@ -0,0 +1,17 @@
+\documentclass{article}
+
+\usepackage[version=3]{acro}
+
+\RenewAcroCommand\ac{mo}{\UseAcroTemplate{first}{#1}\IfNoValueF{#2}{#2}}
+
+\DeclareAcronym{uc}{
+ short = UC ,
+ long = Universal Composability ,
+ cite = xxx
+}
+
+\begin{document}
+
+We use the \ac{uc}[ model] for\dots
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.possessive.pdf b/macros/latex/contrib/acro/examples/acro.example.possessive.pdf
new file mode 100644
index 0000000000..ab1faaf4b0
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.possessive.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.possessive.tex b/macros/latex/contrib/acro/examples/acro.example.possessive.tex
new file mode 100644
index 0000000000..11e5bf0d67
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.possessive.tex
@@ -0,0 +1,36 @@
+\documentclass{article}
+
+\usepackage[version=3]{acro}
+
+\DeclareAcroEnding{possessive}{'s}{'s}
+
+\NewAcroCommand\acg{m}{\acropossessive\UseAcroTemplate{first}{#1}}
+\NewAcroCommand\acsg{m}{\acropossessive\UseAcroTemplate{short}{#1}}
+\NewAcroCommand\aclg{m}{\acropossessive\UseAcroTemplate{long}{#1}}
+\NewAcroCommand\acfg{m}{%
+ \acrofull
+ \acropossessive
+ \UseAcroTemplate{first}{#1}%
+}
+\NewAcroCommand\iacsg{m}{%
+ \acroindefinite
+ \acropossessive
+ \UseAcroTemplate{short}{#1}%
+}
+
+\DeclareAcronym{MP}{
+ short = MP ,
+ long = Member of Parliament ,
+ long-plural-form = Members of Parliament ,
+ long-possessive-form = Member's of Parliament
+}
+
+\begin{document}
+
+\acg{MP} \par
+\acsg{MP} \par
+\aclg{MP} \par
+\acfg{MP} \par
+\iacsg{MP} \par
+
+\end{document}
diff --git a/macros/latex/contrib/acro/examples/acro.example.texsx-505891.pdf b/macros/latex/contrib/acro/examples/acro.example.texsx-505891.pdf
new file mode 100644
index 0000000000..673ee23f5c
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.texsx-505891.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.texsx-505891.tex b/macros/latex/contrib/acro/examples/acro.example.texsx-505891.tex
new file mode 100644
index 0000000000..60e22e7051
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.texsx-505891.tex
@@ -0,0 +1,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}
+
diff --git a/macros/latex/contrib/acro/examples/acro.example.texsx-507726.pdf b/macros/latex/contrib/acro/examples/acro.example.texsx-507726.pdf
new file mode 100644
index 0000000000..7b2ee1e168
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.texsx-507726.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.texsx-507726.tex b/macros/latex/contrib/acro/examples/acro.example.texsx-507726.tex
new file mode 100644
index 0000000000..f9acd723d1
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.texsx-507726.tex
@@ -0,0 +1,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}
diff --git a/macros/latex/contrib/acro/examples/acro.example.units.pdf b/macros/latex/contrib/acro/examples/acro.example.units.pdf
new file mode 100644
index 0000000000..79c07fc50a
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.units.pdf
Binary files differ
diff --git a/macros/latex/contrib/acro/examples/acro.example.units.tex b/macros/latex/contrib/acro/examples/acro.example.units.tex
new file mode 100644
index 0000000000..7a3ff0b351
--- /dev/null
+++ b/macros/latex/contrib/acro/examples/acro.example.units.tex
@@ -0,0 +1,99 @@
+\documentclass{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[ngerman]{babel}
+\usepackage[version=3]{acro}
+
+\acsetup{ list/display = all , pages/display = all}
+
+\usepackage{longtable,siunitx}
+
+\DeclareAcronym{ecm}{
+ short = ECM ,
+ long = Electro Chemical Machining ,
+ extra = Elektrochemisches Abtragen
+}
+\DeclareAcronym{adc}{
+ short = ADC ,
+ long = Analog-to-Digital-Converter
+}
+\DeclareAcronym{edm}{
+ short = EDM ,
+ long = Electro Discharge Machining
+}
+\DeclareAcronym{ecdm}{
+ short = ECDM ,
+ long = Electro Chemical Discharge Machining ,
+ extra = Kombination aus \acs*{ecm} und \acs*{edm}
+}
+
+\DeclareAcroProperty{unit}
+
+% "Acronyme" (tatsächlich physikalische Größen) einer speziellen Klasse:
+\DeclareAcronym{f}{
+ short = \ensuremath{f} ,
+ long = Frequenz ,
+ unit = \si{\hertz} ,
+ class = physics
+}
+\DeclareAcronym{A}{
+ short = \ensuremath{A} ,
+ long = Fläche ,
+ unit = \si{\metre^2} ,
+ class = physics
+}
+\DeclareAcronym{C}{
+ short = \ensuremath{C} ,
+ long = Kapazität ,
+ unit = \si{\farad} ,
+ class = physics
+}
+\DeclareAcronym{F}{
+ short = \ensuremath{F} ,
+ long = Kraft ,
+ unit = \si{\newton} ,
+ class = physics
+}
+
+\NewAcroTemplate[list]{physics}{%
+ \def\TableCode{}%
+ \acronymsmapT{%
+ \AcroPutRight\TableCode{%
+ \def\AcronymID{##1}%
+ \acrowrite{short}%
+ &
+ \def\AcronymID{##1}%
+ \acrowrite{unit}%
+ &
+ \def\AcronymID{##1}%
+ \acrowrite{long}%
+ &
+ \def\AcronymID{##1}%
+ \acroifpagesT{\acropages{S. }{S. }}%
+ \tabularnewline
+ }%
+ }%
+ \acroheading
+ \acropreamble
+ \par\noindent
+ \setlength\LTleft{0pt}%
+ \setlength\LTright{0pt}%
+ \begin{longtable}{@{}lll@{\extracolsep{\fill}}l@{}}
+ \TableCode
+ \end{longtable}
+}
+
+\begin{document}
+
+erstes Mal: \ac{ecm}
+
+zweites Mal: \ac{ecm}
+
+\ac{F}
+
+% % alle außer der Klasse 'physics' auflisten:
+\printacronyms[exclude=physics]%, name=Abkürzungsverzeichnis]
+
+% nur die Klasse 'physics' auflisten:
+\printacronyms[template=physics, include=physics]%, name=Formelverzeichnis]
+
+\end{document}