Skip to content

Commit

Permalink
add acro compatibility (#699)
Browse files Browse the repository at this point in the history
* add acro compat

* add issue
  • Loading branch information
mbertucci47 authored Sep 6, 2024
1 parent 4256c47 commit a46ffd5
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 5 deletions.
9 changes: 4 additions & 5 deletions _data/tagging-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,12 @@

- name: acro
type: package
status: unknown
status: compatible
included-in: [tlc3, arxiv01]
priority: 2
issues:
tests: false
tasks: needs tests
updated: 2024-07-13
issues: [698]
tests: true
updated: 2024-09-06

- name: addlines
type: package
Expand Down
117 changes: 117 additions & 0 deletions tagging-status/testfiles/acro/acro-01.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
% adapted form acro.example.basic.tex
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,title,math,table,firstaid}
}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[colorlinks]{hyperref}
\usepackage{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}
104 changes: 104 additions & 0 deletions tagging-status/testfiles/acro/acro-02.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
% adapted form acro.example.units.tex
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,title,math,table,firstaid}
}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{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} ,
tag = physics
}
\DeclareAcronym{A}{
short = \ensuremath{A} ,
long = Fläche ,
unit = \si{\metre^2} ,
tag = physics
}
\DeclareAcronym{C}{
short = \ensuremath{C} ,
long = Kapazität ,
unit = \si{\farad} ,
tag = physics
}
\DeclareAcronym{F}{
short = \ensuremath{F} ,
long = Kraft ,
unit = \si{\newton} ,
tag = physics
}

\NewAcroTemplate[list]{physics}{%
\acronymsmapT{%
\AcroAddRow{%
\acrowrite{short}%
&
\acrowrite{unit}%
&
\acrowrite{list}%
&
\acropages
{\acrotranslate{page}\nobreakspace}%
{\acrotranslate{pages}\nobreakspace}%
\tabularnewline
}%
}%
\acroheading
\acropreamble
\par\noindent
\setlength\LTleft{0pt}%
\setlength\LTright{0pt}%
\begin{longtable}{@{}lll@{\extracolsep{\fill}}l@{}}
\AcronymTable
\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}

0 comments on commit a46ffd5

Please sign in to comment.