Skip to content

Commit 9a56e41

Browse files
committed
v3.8
1 parent 9d51200 commit 9a56e41

9 files changed

Lines changed: 110 additions & 88 deletions

File tree

HISTORY

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ The Current Maintainer of this work is Clemens Niederberger.
362362
- add error message of \NewAcroTemplate tries to define an
363363
existing template
364364
- add `longtable' patch
365-
2022/03/28 v3.8 - use LaTeX's release mechanism for managing usage for
365+
2022/04/01 v3.8 - use LaTeX's release mechanism for managing usage for
366366
version 2 or 3
367367
- fix issue #223: inner acronyms don't inherit articles any more
368368
- require `etoolbox' for the patches
@@ -376,3 +376,6 @@ The Current Maintainer of this work is Clemens Niederberger.
376376
effectively disable raising in a longtable which sets
377377
\baselineskip = 0)
378378
- fix issue #212 (record pages only during shipout)
379+
- fix layout errors (mostly missing commas) in some of the
380+
templates
381+
- fix error in examples file

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--------------------------------------------------------------------------
2-
the ACRO package v3.8 2022/03/31
2+
the ACRO package v3.8 2022/04/01
33

44
Typeset Acronyms
55

code/acro-examples.sty

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ example definitions with acro (CN)]
7070
short = FBI ,
7171
long = Federal Bureau of Investigation
7272
}
73-
\acroifpropertyTF{
73+
\acroifpropertyTF{short-definite}{
7474
\DeclareAcronym{hadopi}{
7575
short = HADOPI ,
7676
long = Haute Autorité pour la diffusion des œuvres et la protection des
@@ -109,7 +109,7 @@ example definitions with acro (CN)]
109109
}
110110
\DeclareAcronym{lppl}{
111111
short = LPPL ,
112-
long = \unexpanded{\LaTeX} Project Public License
112+
long = \LaTeX\ Project Public License
113113
}
114114
\DeclareAcronym{ma}{
115115
short = MA ,

code/acro.definitions.code.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
{
103103
\space
104104
(
105-
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
106-
\acroifT {foreign} { \acrowrite {foreign} :~ }
105+
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
106+
\acroifT {foreign} { \acrowrite {foreign} ,~ }
107107
\acrowrite {long}
108108
\acrogroupcite
109109
)
@@ -117,7 +117,7 @@
117117
{
118118
\acfootnote
119119
{
120-
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} :~ }
120+
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
121121
\acroifT {foreign} { \acrowrite {foreign} ,~ }
122122
\acrowrite {long}
123123
\acrogroupcite
@@ -401,7 +401,7 @@
401401
}
402402

403403
\let\l@acro\l@figure
404-
404+
405405
\NewAcroTemplate [list] {lof}
406406
{
407407
\acroheading

code/acro.start.code.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
% setup package:
3232
\tl_const:Nn \c_acro_package_name_tl {acro}
33-
\tl_const:Nn \c_acro_date_tl {2022/03/31}
33+
\tl_const:Nn \c_acro_date_tl {2022/04/01}
3434
\tl_const:Nn \c_acro_version_major_number_tl {3}
3535
\tl_const:Nn \c_acro_version_minor_number_tl {8}
3636
\tl_const:Nn \c_acro_version_subrelease_tl {}

code/acro.sty

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
% setup package:
3232
\tl_const:Nn \c_acro_package_name_tl {acro}
33-
\tl_const:Nn \c_acro_date_tl {2022/03/31}
33+
\tl_const:Nn \c_acro_date_tl {2022/04/01}
3434
\tl_const:Nn \c_acro_version_major_number_tl {3}
3535
\tl_const:Nn \c_acro_version_minor_number_tl {8}
3636
\tl_const:Nn \c_acro_version_subrelease_tl {}
@@ -5321,8 +5321,8 @@
53215321
{
53225322
\space
53235323
(
5324-
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ~ }
5325-
\acroifT {foreign} { \acrowrite {foreign} :~ }
5324+
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
5325+
\acroifT {foreign} { \acrowrite {foreign} ,~ }
53265326
\acrowrite {long}
53275327
\acrogroupcite
53285328
)
@@ -5336,7 +5336,7 @@
53365336
{
53375337
\acfootnote
53385338
{
5339-
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} :~ }
5339+
\acroifT {alt} { \acrotranslate {or} ~ \acrowrite {alt} ,~ }
53405340
\acroifT {foreign} { \acrowrite {foreign} ,~ }
53415341
\acrowrite {long}
53425342
\acrogroupcite
@@ -5620,7 +5620,7 @@
56205620
}
56215621

56225622
\let\l@acro\l@figure
5623-
5623+
56245624
\NewAcroTemplate [list] {lof}
56255625
{
56265626
\acroheading

doc/acro-manual.cls

Lines changed: 54 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
\DeclareTranslation{English}{cnltx-introduced}{since}
104104
\DeclareTranslation{english}{cnltx-default}{Initial}
105105

106+
\patchcmd\cnltx@tableofcontents{\RaggedRight}{\raggedright}{}{}
107+
106108
\renewcommand*\arg[1]{\textcolor{argument}{\code{#1}}}
107109
\renewcommand*\meta[1]{%
108110
$\langle$\textcolor{meta}{{\argumentformat#1\/}}$\rangle$%
@@ -119,6 +121,7 @@
119121
\endgroup
120122
}
121123

124+
\colorlet{module}{cnltxred}
122125
\colorlet{property}{cnltxblue}
123126
\newidxcmd\property{\code{\textcolor{property}{#1}}}[ (property)]
124127
\newrobustcmd*\prop{\@ifstar{\cnltx@prop@star}{\cnltx@prop@nostar}}
@@ -272,45 +275,28 @@
272275
#1%
273276
}
274277

275-
\newcommand*\acroman@readoptions[1]{%
276-
\catcode`\^^M=13
277-
\acroman@read@options{#1}%
278-
}
279-
280-
\begingroup
281-
\catcode`\^^M=13
282-
\gdef\acroman@read@options#1#2^^M{%
283-
\endgroup
284-
\ifblank{#2}{}{\acroman@read@options@#2}%
285-
#1%
286-
\XSIMfilewritestart*{\jobname.tmp}%
287-
}%
288-
\endgroup
289-
\def\acroman@read@options@[#1]{\pgfqkeys{/cnltx}{#1}}
290-
291-
\RenewDocumentEnvironment{sourcecode}{}
292-
{%
293-
\begingroup
294-
\acroman@readoptions{%
295-
\setlength\cnltx@sidebysidewidth
296-
{\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
297-
\expanded{%
298-
\noexpand\lstset{
299-
style=cnltx,
300-
\ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
301-
{linewidth=\cnltx@sidebysidewidth,}{}%
302-
\expandonce\cnltx@local@listings@options
303-
}%
304-
}%
305-
\XSIMgobblechars{2}%
278+
\RenewDocumentEnvironment{sourcecode}{!o}{%
279+
\setlength\cnltx@sidebysidewidth
280+
{\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
281+
\expanded{%
282+
\noexpand\lstset{
283+
style=cnltx,
284+
\ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
285+
{linewidth=\cnltx@sidebysidewidth,}{}%
286+
\expandonce\cnltx@local@listings@options
306287
}%
307-
}
308-
{%
309-
\XSIMfilewritestop
310-
\cnltxcode[breakable]%
311-
\lstinputlisting[style=cnltx]{\jobname.tmp}%
312-
\endcnltxcode
313-
}
288+
}%
289+
\XSIMgobblechars{2}%
290+
\IfValueT{#1}{\pgfqkeys{/cnltx}{#1}}%
291+
\IfNoValueTF{#1}
292+
{\XSIMfilewritestart*{\jobname.tmp}}
293+
{\XSIMfilewritestart{\jobname.tmp}}%
294+
}{%
295+
\XSIMfilewritestop
296+
\cnltxcode[breakable]%
297+
\lstinputlisting[style=cnltx]{\jobname.tmp}%
298+
\endcnltxcode
299+
}
314300

315301
\RenewDocumentEnvironment{example}{!o}{%
316302
\setlength\cnltx@sidebysidewidth
@@ -329,34 +315,32 @@
329315
{\XSIMfilewritestart*{\jobname.tmp}}
330316
{\XSIMfilewritestart{\jobname.tmp}}%
331317
}{%
332-
\XSIMfilewritestop
333-
\ifbool{cnltx@sidebyside}
334-
{%
335-
\cnltxcode
336-
\noindent
337-
\minipage[c]{\cnltx@sidebysidewidth}%
338-
\cnltx@pre@source@hook
339-
\lstinputlisting[style=cnltx] {\jobname.tmp}%
340-
\cnltx@after@source@hook
341-
\endminipage\hfill
342-
\minipage[c]{\cnltx@sidebysidewidth}%
343-
\cnltx@pre@example@hook
344-
\input {\jobname.tmp}%
345-
\cnltx@after@example@hook
346-
\endminipage
347-
}
348-
{%
349-
\cnltxcode[breakable]%
350-
\cnltx@pre@source@hook
351-
\lstinputlisting{\jobname.tmp}%
352-
\cnltx@after@source@hook
353-
\tcblower
354-
\cnltx@pre@example@hook
355-
\input {\jobname.tmp}%
356-
\cnltx@after@example@hook
357-
}%
358-
\endcnltxcode
359-
}
318+
\XSIMfilewritestop
319+
\ifbool{cnltx@sidebyside}{%
320+
\cnltxcode
321+
\noindent
322+
\minipage[c]{\cnltx@sidebysidewidth}%
323+
\cnltx@pre@source@hook
324+
\lstinputlisting[style=cnltx] {\jobname.tmp}%
325+
\cnltx@after@source@hook
326+
\endminipage\hfill
327+
\minipage[c]{\cnltx@sidebysidewidth}%
328+
\cnltx@pre@example@hook
329+
\input {\jobname.tmp}%
330+
\cnltx@after@example@hook
331+
\endminipage
332+
}{%
333+
\cnltxcode[breakable]%
334+
\cnltx@pre@source@hook
335+
\lstinputlisting{\jobname.tmp}%
336+
\cnltx@after@source@hook
337+
\tcblower
338+
\cnltx@pre@example@hook
339+
\input {\jobname.tmp}%
340+
\cnltx@after@example@hook
341+
}%
342+
\endcnltxcode
343+
}
360344

361345
\RequirePackage[
362346
backend=biber,
@@ -430,12 +414,13 @@
430414
}
431415

432416
\NewAcroTemplate[list]{glossary}{%
417+
\acropreamble
433418
\begin{description}
434419
\acronymsmapF{%
435420
\item[\sffamily\acrowrite{short}] \acrowrite{long}%
436421
}%
437422
{ \item \AcroRerun }%
438-
\end {description}
423+
\end{description}
439424
}
440425

441426
% ----------------------------------------------------------------------------
@@ -540,7 +525,8 @@
540525

541526
\pdfstringdefDisableCommands{%
542527
\pdfdisable\template{#1}%
543-
\pdfdisable\property{#1}
528+
\pdfdisable\property{#1}%
529+
\pdfdisable\module{#1}%
544530
\pdfdisable\cs{\string\\#1}%
545531
\pdfdisable\cmd{\string\\#1}%
546532
\pdfdisable\option{#1}%

doc/acro-manual.pdf

4.2 KB
Binary file not shown.

doc/acro-manual.tex

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
foreign = exempli gratia ,
7171
foreign-babel = latin ,
7272
short-format = \textit ,
73-
foreign-format = \textit
73+
foreign-format = \latin
7474
}
7575
\DeclareAcronym{etc}{
7676
short = etc\acdot ,
@@ -189,16 +189,25 @@
189189
friends.} ,
190190
tag = glossary , no-index
191191
}
192+
\DeclareAcronym{module}{
193+
long = {A \module*{module} is something like a superordinate category for
194+
options. There are several such modules like \module{list} or
195+
\module{pages} for example. Options belonging to a module typically
196+
influence certain objects. For instance options belonging to the
197+
\module{pages} influence how page numbers in the list of acronyms are
198+
handled.} ,
199+
tag = glossary , no-index
200+
}
192201
\DeclareAcronym{load-time option}{
193202
long = {A load-time \option*{option} is a package option of \acro\ which
194203
\emph{must} be set as option to
195204
\cs*{usepackage}\oarg{options}\Marg{acro}.} ,
196205
tag = glossary , no-index
197206
}
198207
\DeclareAcronym{template}{
199-
long = {A template determines how different objects of \acro\ are printed.
200-
This includes the acronyms themselves but also for example the list of
201-
acronyms as a whole.} ,
208+
long = {A \template*{template} determines how different objects of \acro\
209+
are printed. This includes the acronyms themselves but also for example
210+
the list of acronyms as a whole.} ,
202211
tag = glossary , no-index
203212
}
204213
\DeclareAcronym{articles}{
@@ -228,7 +237,31 @@ \section{Licence}\label{sec:licence}
228237
\license
229238

230239
\section{Glossary}
231-
\printacronyms[include=glossary,template=glossary]
240+
\printacronyms[include=glossary,template=glossary,preamble=This manual
241+
repeatedly uses a number of terms which are explained in this section.]
242+
243+
\section{Reading the manual}
244+
This manual uses a certain color code in order to be able to distinguish
245+
options, properties and templates visually from each other.
246+
\begin{options}
247+
\keyval*{option}{value}
248+
Options are displayed in \textcolor{option}{yellow}. For the description
249+
of options a certain nomenclature is used which is explained in
250+
section~\ref{sec:setting-options}. Some options belong to module which are
251+
displayed in \textcolor{module}{red}.
252+
\end{options}
253+
\begin{properties}
254+
\propval*{property}{value}
255+
In order to distinguish them visually from options properties are
256+
displayed in \textcolor{property}{blue}. The nomenclature of properties
257+
is quite similar to the one of the options so it is not explained
258+
explicilty but should be clear by analogy.
259+
\end{properties}
260+
\begin{templates}
261+
\tmpl*{template}
262+
In order to distinguish them visually from options and properties
263+
templates are displayed in \textcolor{template}{green}.
264+
\end{templates}
232265

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

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

0 commit comments

Comments
 (0)