-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make public the glossary
template?
#238
Comments
Well, it's neither really private as the code of the manual class is public nor is it very complex: \NewAcroTemplate[list]{glossary}{%
\begin{description}
\acronymsmapF{%
\item[\sffamily\acrowrite{short}] \acrowrite{long}%
}%
{ \item \AcroRerun }%
\end {description}
} To be honest it is just a very simple version of the default template: \NewAcroTemplate[list]{description}{%
\acroheading
\acropreamble
\begin{description}
\acronymsmapF{%
\item[\acrowrite{short}\acroifT{alt}{/}\acrowrite{alt}]
\acrowrite{list}%
\acroifanyT{foreign,extra}{ (}%
\acrowrite{foreign}%
\acroifallT{foreign,extra}{, }%
\acrowrite{extra}%
\acroifanyT{foreign,extra}{)}%
\acropagefill
\acropages{\acrotranslate{page}~}{\acrotranslate{pages}~}%
}
{ \item \AcroRerun }%
\end{description}
} The only reason for the template definition in the manual is the (Which reminds that there should maybe be a possibility to set the format of the short forms in the list…?) |
Sorry, I wrote "private" whereas I meant "available and documented". In fact, examples of a glossary and of a nomenclature would be welcome 😄 |
As an example for a simple glossary the \NewAcroTemplate[list]{glossary}{%
\begin{description}
\acronymsmapF{%
\item[\sffamily\acrowrite{short}] \acrowrite{long}%
}%
{ \item \AcroRerun }%
\end {description}
} and defines the terms using the \DeclareAcronym{property}{
long = A \property*{property} is an option to the second argument of the
\cs*{DeclareAcroym} command. They are options of an individual acronym if
you will. ,
tag = glossary , no-index
} The glossary then is printed like this: \section{Glossary}
\printacronyms[include=glossary,template=glossary] |
A more “nomenclature” like example is the following \documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{acro}
\acsetup{
list/display = all ,
pages/display = first ,
pages/name = true
}
\usepackage{longtable,siunitx}
\DeclareAcroProperty{unit}
\NewAcroTemplate[list]{physics}{
\setlength\LTleft{0pt}%
\setlength\LTright{0pt}%
\acsetup{ pages/display = all }%
\acroheading
\acropreamble
\acronymsmapF{%
\AcroAddRow{
\acrowrite{short} &
\acrowrite{unit} &
\acrowrite{list} &
\acroifpagesT{(S.~\acropages{}{})} \\
}%
}{\AcroRerun}
\begin{longtable}{@{}lll@{\extracolsep{\fill}}l@{}}
\bfseries\sffamily Symbol & \bfseries\sffamily Einheit &
\bfseries\sffamily Name & \\ \endhead
\AcronymTable
\end{longtable}
}
\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}
}
% "Acronyme" (tatsächlich physikalische Größen) einer speziellen Klasse:
\DeclareAcronym{f}{
short = \ensuremath{f} ,
long = Frequenz ,
unit = \unit{\hertz} ,
tag = physics
}
\DeclareAcronym{A}{
short = \ensuremath{A} ,
long = Fläche ,
unit = \unit{\metre^2} ,
tag = physics
}
\DeclareAcronym{C}{
short = \ensuremath{C} ,
long = Kapazität ,
unit = \unit{\farad} ,
tag = physics
}
\DeclareAcronym{F}{
short = \ensuremath{F} ,
long = Kraft ,
unit = \unit{\newton} ,
tag = physics
}
\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[include=physics, name=Formelverzeichnis,template=physics]
\end{document} |
What both examples are missing are divisions are divisions into groups (let's say alphabetical or as in the |
OK so, for this purpose, the packages |
I take this as a feature request ;) |
The (abstract of the) documentation claims that
acro
can also be used for glossaries or nomenclatures. And indeed, a glossary can be found in it, which it is typeset thanks to theglossary
template\printacronyms[include=glossary,template=glossary]
But this template is private:
(defined in
acro-manual.cls
only). Is there any reason for no making it public?The text was updated successfully, but these errors were encountered: