Skip to content

Commit

Permalink
v3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Apr 1, 2022
1 parent 9d51200 commit 9a56e41
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 88 deletions.
5 changes: 4 additions & 1 deletion HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ The Current Maintainer of this work is Clemens Niederberger.
- add error message of \NewAcroTemplate tries to define an
existing template
- add `longtable' patch
2022/03/28 v3.8 - use LaTeX's release mechanism for managing usage for
2022/04/01 v3.8 - use LaTeX's release mechanism for managing usage for
version 2 or 3
- fix issue #223: inner acronyms don't inherit articles any more
- require `etoolbox' for the patches
Expand All @@ -376,3 +376,6 @@ The Current Maintainer of this work is Clemens Niederberger.
effectively disable raising in a longtable which sets
\baselineskip = 0)
- fix issue #212 (record pages only during shipout)
- fix layout errors (mostly missing commas) in some of the
templates
- fix error in examples file
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the ACRO package v3.8 2022/03/31
the ACRO package v3.8 2022/04/01

Typeset Acronyms

Expand Down
4 changes: 2 additions & 2 deletions code/acro-examples.sty
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ example definitions with acro (CN)]
short = FBI ,
long = Federal Bureau of Investigation
}
\acroifpropertyTF{
\acroifpropertyTF{short-definite}{
\DeclareAcronym{hadopi}{
short = HADOPI ,
long = Haute Autorité pour la diffusion des œuvres et la protection des
Expand Down Expand Up @@ -109,7 +109,7 @@ example definitions with acro (CN)]
}
\DeclareAcronym{lppl}{
short = LPPL ,
long = \unexpanded{\LaTeX} Project Public License
long = \LaTeX\ Project Public License
}
\DeclareAcronym{ma}{
short = MA ,
Expand Down
8 changes: 4 additions & 4 deletions code/acro.definitions.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
{
\space
(
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
\acroifT {foreign} { \acrowrite {foreign} :~ }
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
\acroifT {foreign} { \acrowrite {foreign} ,~ }
\acrowrite {long}
\acrogroupcite
)
Expand All @@ -117,7 +117,7 @@
{
\acfootnote
{
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} :~ }
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
\acroifT {foreign} { \acrowrite {foreign} ,~ }
\acrowrite {long}
\acrogroupcite
Expand Down Expand Up @@ -401,7 +401,7 @@
}

\let\l@acro\l@figure

\NewAcroTemplate [list] {lof}
{
\acroheading
Expand Down
2 changes: 1 addition & 1 deletion code/acro.start.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

% setup package:
\tl_const:Nn \c_acro_package_name_tl {acro}
\tl_const:Nn \c_acro_date_tl {2022/03/31}
\tl_const:Nn \c_acro_date_tl {2022/04/01}
\tl_const:Nn \c_acro_version_major_number_tl {3}
\tl_const:Nn \c_acro_version_minor_number_tl {8}
\tl_const:Nn \c_acro_version_subrelease_tl {}
Expand Down
10 changes: 5 additions & 5 deletions code/acro.sty
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

% setup package:
\tl_const:Nn \c_acro_package_name_tl {acro}
\tl_const:Nn \c_acro_date_tl {2022/03/31}
\tl_const:Nn \c_acro_date_tl {2022/04/01}
\tl_const:Nn \c_acro_version_major_number_tl {3}
\tl_const:Nn \c_acro_version_minor_number_tl {8}
\tl_const:Nn \c_acro_version_subrelease_tl {}
Expand Down Expand Up @@ -5321,8 +5321,8 @@
{
\space
(
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
\acroifT {foreign} { \acrowrite {foreign} :~ }
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
\acroifT {foreign} { \acrowrite {foreign} ,~ }
\acrowrite {long}
\acrogroupcite
)
Expand All @@ -5336,7 +5336,7 @@
{
\acfootnote
{
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} :~ }
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
\acroifT {foreign} { \acrowrite {foreign} ,~ }
\acrowrite {long}
\acrogroupcite
Expand Down Expand Up @@ -5620,7 +5620,7 @@
}

\let\l@acro\l@figure

\NewAcroTemplate [list] {lof}
{
\acroheading
Expand Down
122 changes: 54 additions & 68 deletions doc/acro-manual.cls
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
\DeclareTranslation{English}{cnltx-introduced}{since}
\DeclareTranslation{english}{cnltx-default}{Initial}

\patchcmd\cnltx@tableofcontents{\RaggedRight}{\raggedright}{}{}

\renewcommand*\arg[1]{\textcolor{argument}{\code{#1}}}
\renewcommand*\meta[1]{%
$\langle$\textcolor{meta}{{\argumentformat#1\/}}$\rangle$%
Expand All @@ -119,6 +121,7 @@
\endgroup
}

\colorlet{module}{cnltxred}
\colorlet{property}{cnltxblue}
\newidxcmd\property{\code{\textcolor{property}{#1}}}[ (property)]
\newrobustcmd*\prop{\@ifstar{\cnltx@prop@star}{\cnltx@prop@nostar}}
Expand Down Expand Up @@ -272,45 +275,28 @@
#1%
}

\newcommand*\acroman@readoptions[1]{%
\catcode`\^^M=13
\acroman@read@options{#1}%
}

\begingroup
\catcode`\^^M=13
\gdef\acroman@read@options#1#2^^M{%
\endgroup
\ifblank{#2}{}{\acroman@read@options@#2}%
#1%
\XSIMfilewritestart*{\jobname.tmp}%
}%
\endgroup
\def\acroman@read@options@[#1]{\pgfqkeys{/cnltx}{#1}}

\RenewDocumentEnvironment{sourcecode}{}
{%
\begingroup
\acroman@readoptions{%
\setlength\cnltx@sidebysidewidth
{\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
\expanded{%
\noexpand\lstset{
style=cnltx,
\ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
{linewidth=\cnltx@sidebysidewidth,}{}%
\expandonce\cnltx@local@listings@options
}%
}%
\XSIMgobblechars{2}%
\RenewDocumentEnvironment{sourcecode}{!o}{%
\setlength\cnltx@sidebysidewidth
{\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
\expanded{%
\noexpand\lstset{
style=cnltx,
\ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
{linewidth=\cnltx@sidebysidewidth,}{}%
\expandonce\cnltx@local@listings@options
}%
}
{%
\XSIMfilewritestop
\cnltxcode[breakable]%
\lstinputlisting[style=cnltx]{\jobname.tmp}%
\endcnltxcode
}
}%
\XSIMgobblechars{2}%
\IfValueT{#1}{\pgfqkeys{/cnltx}{#1}}%
\IfNoValueTF{#1}
{\XSIMfilewritestart*{\jobname.tmp}}
{\XSIMfilewritestart{\jobname.tmp}}%
}{%
\XSIMfilewritestop
\cnltxcode[breakable]%
\lstinputlisting[style=cnltx]{\jobname.tmp}%
\endcnltxcode
}

\RenewDocumentEnvironment{example}{!o}{%
\setlength\cnltx@sidebysidewidth
Expand All @@ -329,34 +315,32 @@
{\XSIMfilewritestart*{\jobname.tmp}}
{\XSIMfilewritestart{\jobname.tmp}}%
}{%
\XSIMfilewritestop
\ifbool{cnltx@sidebyside}
{%
\cnltxcode
\noindent
\minipage[c]{\cnltx@sidebysidewidth}%
\cnltx@pre@source@hook
\lstinputlisting[style=cnltx] {\jobname.tmp}%
\cnltx@after@source@hook
\endminipage\hfill
\minipage[c]{\cnltx@sidebysidewidth}%
\cnltx@pre@example@hook
\input {\jobname.tmp}%
\cnltx@after@example@hook
\endminipage
}
{%
\cnltxcode[breakable]%
\cnltx@pre@source@hook
\lstinputlisting{\jobname.tmp}%
\cnltx@after@source@hook
\tcblower
\cnltx@pre@example@hook
\input {\jobname.tmp}%
\cnltx@after@example@hook
}%
\endcnltxcode
}
\XSIMfilewritestop
\ifbool{cnltx@sidebyside}{%
\cnltxcode
\noindent
\minipage[c]{\cnltx@sidebysidewidth}%
\cnltx@pre@source@hook
\lstinputlisting[style=cnltx] {\jobname.tmp}%
\cnltx@after@source@hook
\endminipage\hfill
\minipage[c]{\cnltx@sidebysidewidth}%
\cnltx@pre@example@hook
\input {\jobname.tmp}%
\cnltx@after@example@hook
\endminipage
}{%
\cnltxcode[breakable]%
\cnltx@pre@source@hook
\lstinputlisting{\jobname.tmp}%
\cnltx@after@source@hook
\tcblower
\cnltx@pre@example@hook
\input {\jobname.tmp}%
\cnltx@after@example@hook
}%
\endcnltxcode
}

\RequirePackage[
backend=biber,
Expand Down Expand Up @@ -430,12 +414,13 @@
}

\NewAcroTemplate[list]{glossary}{%
\acropreamble
\begin{description}
\acronymsmapF{%
\item[\sffamily\acrowrite{short}] \acrowrite{long}%
}%
{ \item \AcroRerun }%
\end {description}
\end{description}
}

% ----------------------------------------------------------------------------
Expand Down Expand Up @@ -540,7 +525,8 @@

\pdfstringdefDisableCommands{%
\pdfdisable\template{#1}%
\pdfdisable\property{#1}
\pdfdisable\property{#1}%
\pdfdisable\module{#1}%
\pdfdisable\cs{\string\\#1}%
\pdfdisable\cmd{\string\\#1}%
\pdfdisable\option{#1}%
Expand Down
Binary file modified doc/acro-manual.pdf
Binary file not shown.
45 changes: 39 additions & 6 deletions doc/acro-manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
foreign = exempli gratia ,
foreign-babel = latin ,
short-format = \textit ,
foreign-format = \textit
foreign-format = \latin
}
\DeclareAcronym{etc}{
short = etc\acdot ,
Expand Down Expand Up @@ -189,16 +189,25 @@
friends.} ,
tag = glossary , no-index
}
\DeclareAcronym{module}{
long = {A \module*{module} is something like a superordinate category for
options. There are several such modules like \module{list} or
\module{pages} for example. Options belonging to a module typically
influence certain objects. For instance options belonging to the
\module{pages} influence how page numbers in the list of acronyms are
handled.} ,
tag = glossary , no-index
}
\DeclareAcronym{load-time option}{
long = {A load-time \option*{option} is a package option of \acro\ which
\emph{must} be set as option to
\cs*{usepackage}\oarg{options}\Marg{acro}.} ,
tag = glossary , no-index
}
\DeclareAcronym{template}{
long = {A template determines how different objects of \acro\ are printed.
This includes the acronyms themselves but also for example the list of
acronyms as a whole.} ,
long = {A \template*{template} determines how different objects of \acro\
are printed. This includes the acronyms themselves but also for example
the list of acronyms as a whole.} ,
tag = glossary , no-index
}
\DeclareAcronym{articles}{
Expand Down Expand Up @@ -228,7 +237,31 @@ \section{Licence}\label{sec:licence}
\license

\section{Glossary}
\printacronyms[include=glossary,template=glossary]
\printacronyms[include=glossary,template=glossary,preamble=This manual
repeatedly uses a number of terms which are explained in this section.]

\section{Reading the manual}
This manual uses a certain color code in order to be able to distinguish
options, properties and templates visually from each other.
\begin{options}
\keyval*{option}{value}
Options are displayed in \textcolor{option}{yellow}. For the description
of options a certain nomenclature is used which is explained in
section~\ref{sec:setting-options}. Some options belong to module which are
displayed in \textcolor{module}{red}.
\end{options}
\begin{properties}
\propval*{property}{value}
In order to distinguish them visually from options properties are
displayed in \textcolor{property}{blue}. The nomenclature of properties
is quite similar to the one of the options so it is not explained
explicilty but should be clear by analogy.
\end{properties}
\begin{templates}
\tmpl*{template}
In order to distinguish them visually from options and properties
templates are displayed in \textcolor{template}{green}.
\end{templates}

\section{\acro\ for the impatient}\label{sec:acro-impatient}

Expand Down Expand Up @@ -328,7 +361,7 @@ \subsection{Setup command}\label{sec:setup-command}
An option with a determined set of choices. The underlined value is
chosen if the option is given without value.
\keybool*{option}
A boolean option with only the choices \code{true} and \code{false}.
A boolean option with the only choices \code{true} and \code{false}.
\opt*{option}\Module{module}
An option at a deeper level belonging to the module \module*{module}.
\end{options}
Expand Down

0 comments on commit 9a56e41

Please sign in to comment.