From a319b877e3db590613748f78848498aea73114dc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Nov 2019 22:38:28 +0000 Subject: acronym (17nov19) git-svn-id: svn://tug.org/texlive/trunk@52845 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/acronym/CHANGES | 195 ++++++++++ Master/texmf-dist/doc/latex/acronym/README | 16 +- Master/texmf-dist/doc/latex/acronym/acronym.pdf | Bin 267497 -> 272577 bytes Master/texmf-dist/doc/latex/acronym/acrotest.tex | 6 + Master/texmf-dist/source/latex/acronym/acronym.dtx | 433 +++++++++++++++++---- Master/texmf-dist/tex/latex/acronym/acronym.sty | 202 +++++++--- 6 files changed, 718 insertions(+), 134 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/acronym/CHANGES diff --git a/Master/texmf-dist/doc/latex/acronym/CHANGES b/Master/texmf-dist/doc/latex/acronym/CHANGES new file mode 100644 index 00000000000..f98d1f9b5cf --- /dev/null +++ b/Master/texmf-dist/doc/latex/acronym/CHANGES @@ -0,0 +1,195 @@ + +Version 1.42 (Nov 2019) + +fix the carriage return with long lines (line 234/235) -- Philippe Chauvat +fix page number display for acfi Acfi -- Tobi Oetiker +fix double space and missing used flag with acfi -- Horst Schirmeier + +Version 1.41 (Mar 2015) + +change names of internal macros to avoid nameing conflics with pageslts +package -- Tobi Oetiker and Jason Mills + +Version 1.40 (Sept 2014) + +remove \hskip\z@ instances, since they cause bad formating +since space at the end of a line can not be collapsed anymore +-- Hartmut Henkel + +Version 1.39 (Aug 2014) + +make the appearance of labels consistent whether or not the acronym environment +has its optional argument provided +-- Yann Leprince + +Version 1.38 (Oct 2012) + +add support for dynamic indefinite articles depending on the acronym form used +-- Ash Hughes + +fix for non hyphenation of first word in long form +-- Martin Rüßler + +fix description of acrodefplural +-- Joel Johnson + +\ac* should NOT set the used flag ... now it does not +-- Martin Falk + +Version 1.36 (Sept 2010) Uwe Bieling disable hyperlinks in nolist mode. +Tobi added mbox to prevent hyphenation of short form of acronyms. + +Version 1.35 (Oct 2009) Added support for nonstandard plural forms. +Changed management of default short form in acronym definition. +Now, one can safely use \newacro in the preamble to define acronyms. +-- Sergio Callegari + +Version 1.34 (Jan 2009) Make sure the s in acp gets smaller as well when the +smaller package option is used. +-- Tobi Oetiker + +Version 1.33 (Dec 2008) Make the alternate acronym environment +representation work. The test for the presence of optional argument was +rather broken. When it worked, it did so for all the wrong reasons +-- Enrico Gregorio + +Version 1.32 (May 2008) Altered code to redefine labels in +order to cope with unreproducable bug-reports. Warnings turned into infos. +-- Ulrich Diez + +Version 1.31 (April 2008) Renamed clearlist to AC@clearlist to fix +name conflict with jurabib +-- Philipp Lehman + +Version 1.30 (April 2008) Corrected code to redefine labels and +adjusted behavior with \cmd{\AC@used}. +-- Ulrich Diez + +Version 1.29 (April 2008) let withpage option show the 'corect' page number +and not just the first one. +-- Domagoj Babic (babic in cs.ubc.ca) (with help from Ulrich Diaz) + +Version 1.28 (April 2008) fixed layout of addpage list +-- Tobias Oetiker (tobi with oetiker.ch) + +Version 1.27 (April 2008) add option 'addpage' to add pagenumber of first +occurenace to list of acronyms. +-- Tobias Oetiker (tobi with oetiker.ch) + +Version 1.26 (June 2006) supress lone item when nolist is in effect +-- Immo Köster + +Version 1.25 (November 2005) properly handle acronyms in pdfbookmarks +-- Heiko Oberdiek + +Version 1.24 (October 2005) ac* commands are now not fragile anymore ... +-- José Emilio Vila Forcén jose.vila there cui.unige.ch + +Version 1.23 (October 2005) fixed typo in nolist option. added comment about fragility of ac commands. +-- Tobias Oetiker (tobi with oetiker.ch) + +Version 1.22 (October 2005) added starred versions of ac(p), acf(p), acs(p), +acl(p), acfi, acsu & aclu +-- Stefan Pinnow (Mo-Gul here gmx.net) + +Version 1.21 (September 2005): fixed the \acused command again ... broke it +in 1.20 (this time I amended the docs, so that the intention becomes clear). +Set acronyms as used in the first run, not only in the second one. +-- Tobi Oetiker tobi at oetiker.ch + +added new option nolist to suppress printing the acronym list all together +-- José Emilio Vila Forcén jose.vila there cui.unige.ch + +Version 1.20 (August 2005): make the acused command actually work +-- Richard Walker Richard.Walker there cs.anu.edu.au + +Version 1.19 (April 2005): three new commands acused (set-used), acsu (adds to used), aclu (adds to used) +-- Lee Netherton ltn100 there ohm.york.ac.uk + +Version 1.18 (April 2005): added additional format option for Full Name (acfi) +-- Manuel G"ortz mgoertz there kom.tu-darmstadt.de + +Version 1.17 (November 2004): added don't use acronyms (dua) option +-- Oliver Creighton + +Version 1.16 (November 2004): fix version number +-- Oliver Creighton +new option to suppress all acronym printing -- don't use acronyms (dua) + +Version 1.16 (November 2004): fix version number +-- tobi there oetiker.ch + +Version 1.15 (November 2004): fix for acresetall to work when ac is called +in grouped material. +-- Hendri Adriaens + +Version 1.14 (October 2004): fix acsp and acfp for footnote mode +-- Markus Ortner + +Version 1.13 (July 2004): deflist renamed to AC there deflist to +avoid unnecessary naming conflict. +-- Peter May + +Version 1.13 (July 2004): printonlyused was not working anymore +-- Tobi Oetiker + +Version 1.13 (July 2004): if the footnote option was on, footnotes were +printed for ALL acronyms ALL the time, this looked rather odd if the same +acronym was used more than once on the same page. Changed it so that +footnote printing follows the same rules as normal acronym printing (only +print footnote first time). One might think about changing this, so that +either footnotes get printed 'once' per page. Or that the footnote marks are +issued once per acronym and page, so that all instances of the same acronym +on a page get the same footnote mark. Feel free to contribute patches. +-- Tobi Oetiker + +Version 1.12 (June 2004): Make acronyms robust and compatible +with pdf bookmarks. +-- Danie Els + +Version 1.11 (June 2004): Make hyperlinks work inside optional +item text by replacing hypertarget with raisedhypertarget +-- Martin Salois + +Version 1.10 (May 2004): Fix for the bug of a \cs{}\cs{} following an +acronym. Add footnote optional out for \cmd{\acs}. Fix for list of acronyms +in front matter and addition of \cmd{\acroextra} command. +-- Danie Els + +Version 1.9 (October 2003): Fix hyperref processing to work regardles +of calling order. 'printused' now prints every acronym used not only +the ones called through \ac. +-- Danie Els and Tobi Oetiker + +Version 1.8 (October 2003): When the hyperref package is loaded before the +acronym package, all acronyms will become a hyperlink to their own +definition. +-- Martin Salois + +Version 1.7 (September 2003): Added \acresetall for resetting the 'used'-tag +of \ac. With the new option 'printonlyused', the acronym-list will consist of +the used acronyms only and not of all defined acronyms; Optional in a special +deflist - environment. +-- Sebastian Max + +Version 1.6 (May 2000): Added the smaller option and the macros \acsfont, +\acffont, and \acfsfont used to control the appearance of \acs and \acf. +-- Ingo Lepper + +Version 1.5 (May 2000): Added support for english plural forms and the +footnote option. +-- David Sterratt + +Version 1.4 (February 2000): A formatted acronym string, which is allowed +to contain indices, for example, is now possible. For this purpose +the syntax of \acro and \acrodef now permits an optional argument: + \acro{}{} (without opt. arg.) + \acro{}[]{} (with opt. arg.) +The user macros \ac, \acs, \acl, and \acf print now +instead of , if available. +-- Heiko Oberdiek + +Version 1.2 (August 1996) features a new command: \acl to print the +expanded acronym with out even mentioning that there is an acronym for +this word. +-- Tobias Oetiker diff --git a/Master/texmf-dist/doc/latex/acronym/README b/Master/texmf-dist/doc/latex/acronym/README index cb17146dca2..92bc92d41bf 100644 --- a/Master/texmf-dist/doc/latex/acronym/README +++ b/Master/texmf-dist/doc/latex/acronym/README @@ -1,19 +1,16 @@ -I'd like to announce the availability of -my LaTeX2e acronym Package from CTAN. +An Acronym Environment for LaTeX INSTALLATION: - call 'latex acronym.ins' and copy the acronym.sty - file into a path searched by LaTeX. - to re-generate the documentation, call latex acronym.dtx -When writing a paper on cellular mobile radio I started to used a lot -of acronyms. This can be very disturbing for the reader, as he might -not know all the used acronyms. To help the reader I kept a list of -all the acronyms at the end of my paper. +While writing a paper on cellular mobile radio I had to used a lot of +acronyms. Acronyms can be quite disturbing for the novice reader ... -This package makes sure, that all acronyms used in the text are -spelled out in full at least once. And it provides an environment to -keep a list of used acronyms. +The Acronym package provides tooling to make sure that all acronyms used in +the text are spelled out in full at least once and it provides an +environment to keep a list of used acronyms. Note that acronym requires the 'suffix' package. You can find it on CTAN:macros/latex/contrib/bigfoot/ @@ -24,4 +21,3 @@ Files of the `acronym' package: acronym.ins Installation script generating the source and an example acronym.pdf PDF Version of the Docs CHANGES list of changes - diff --git a/Master/texmf-dist/doc/latex/acronym/acronym.pdf b/Master/texmf-dist/doc/latex/acronym/acronym.pdf index 62d58b1b729..109766fa153 100644 Binary files a/Master/texmf-dist/doc/latex/acronym/acronym.pdf and b/Master/texmf-dist/doc/latex/acronym/acronym.pdf differ diff --git a/Master/texmf-dist/doc/latex/acronym/acrotest.tex b/Master/texmf-dist/doc/latex/acronym/acrotest.tex index e3a2d87546c..ff6944baff1 100644 --- a/Master/texmf-dist/doc/latex/acronym/acrotest.tex +++ b/Master/texmf-dist/doc/latex/acronym/acrotest.tex @@ -64,6 +64,10 @@ between the constant of Boltzmann and the \acl{NA}: \acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2}) +\Acp{LFVP} are processes in which the lepton number of the initial +and final states are different. An example for \iac{LFVP} is +neutrinoless double beta decay. + \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 @@ -76,6 +80,8 @@ blocks to be tested separately. The latter are commonly indicated as \acro{NA}[\ensuremath{N_{\mathrm A}}] {Number of Avogadro\acroextra{ (see \S\ref{Chem})}} \acro{NAD+}[NAD\textsuperscript{+}]{Nicotinamide Adenine Dinucleotide} + \acro{LFVP}{lepton flavor violating process} + \acroindefinite{LFVP}{an}{a} \acro{NUA}{Not Used Acronym} \acro{TDMA}{Time Division Multiple Access} \acro{UA}{Used Acronym} diff --git a/Master/texmf-dist/source/latex/acronym/acronym.dtx b/Master/texmf-dist/source/latex/acronym/acronym.dtx index 6e54f37dc01..62df769abb4 100644 --- a/Master/texmf-dist/source/latex/acronym/acronym.dtx +++ b/Master/texmf-dist/source/latex/acronym/acronym.dtx @@ -2,7 +2,7 @@ % % Doc-Source file to use with LaTeX2e % -% Copyright 1994-2015 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors. +% Copyright 1994-2019 by Tobias Oetiker (tobi@oetiker.ch) and many Contributors. % All rights reserved. % % This work may be distributed and/or modified under the conditions of @@ -35,7 +35,7 @@ % % \fi % -% \CheckSum{1062} +% \CheckSum{1389} % %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -83,6 +83,7 @@ % \DoNotIndex{\usepackage} % % +% \changes{v1.42}{2019/11/11}{Philippe Chauvat \cmd{hskip} Fix the carriage return with long lines, Tobi Oetiker and Horst Schirmeier fixed usedflag and page number entries for acfi and Acfi} % \changes{v1.41}{2015/03/21}{Tobi Oetiker and Jason Mills \cmd{hskip} fix nameing conflicts with pageslts package} % \changes{v1.40}{2014/09/29}{Hartmut Henkel - remove \cmd{hskip} instances, since they cause bad formating since space at the end of a line can not be collapsed anymore} % \changes{v1.39}{2014/08/14}{Yann Leprince - make the appearance of labels consistent whether or not the acronym environment has its optional argument provided} @@ -180,7 +181,7 @@ % \DescribeMacro{\ac} % To enter an acronym inside the text, use the % \begin{quote} -% |\ac{|\meta{acronym}|}| +% |\ac[|\meta{linebreak penalty}|]{|\meta{acronym}|}| % \end{quote} % command. The first time you use an acronym, the full name of the % acronym along with the acronym in brackets will be printed. If you @@ -189,6 +190,18 @@ % The next time you access the acronym only the acronym will % be printed. % +% When an acronym is being used, for the first time (with the |footnote| +% option not specified), next to the end of the line, a line break between +% the full name of the acronym and the acronym in brackets can be +% encountered. The optional variable represents the penalty level of +% breaking the line at that place, taking integer values between 0 and 4. +% A higher number corresponds to a higher penalty. +% +% \DescribeMacro{\Ac} +% Works in the same way as \cmd{\ac}, but starts the long form with an +% upper case letter. Use case: when the acronym is used for the first +% time, at the beginning of a sentence. +% % \DescribeMacro{\acresetall} % The 'memory' of the macro \cmd{\ac} can be flushed by calling the macro % \cmd{\acresetall}. Afterwards, \cmd{\ac} will print the full name of any @@ -198,11 +211,20 @@ % If later in the text again the Full Name of the acronym should be % printed, use the command % \begin{quote} -% |\acf{|\meta{acronym}|}| +% |\acf[|\meta{linebreak penalty}|]{|\meta{acronym}|}| % \end{quote} % to access the acronym. It stands for ``full acronym'' and it -% always prints the full name -% and the acronym in brackets. +% always prints the full name and the acronym in brackets. +% +% When an full acronym is being used next to the end of the line, a line +% break between the full name of the acronym and the acronym in brackets +% can be encountered. The optional variable represents the penalty level +% of breaking the line at that place, taking integer values between 0 +% and 4. A higher number corresponds to a higher penalty. +% +% \DescribeMacro{\Acf} +% Works in the same way as \cmd{\acf}, but starts the long form with an +% upper case letter. % % \DescribeMacro{\acs} % To get the short version of the acronym, use the command @@ -217,13 +239,25 @@ % |\acl{|\meta{acronym}|}| % \end{quote} % +% \DescribeMacro{\Acl} +% Works in the same way as \cmd{\acl}, but starts with an upper case +% letter. +% % \DescribeMacro{\acp} % Works in the same way as \cmd{\ac}, but makes the short and/or -% long forms into plurals. +% long forms into plurals. +% +% \DescribeMacro{\Acp} +% Works in the same way as \cmd{\acp}, but starts the long form with an +% upper case letter. % % \DescribeMacro{\acfp} % Works in the same way as \cmd{\acf}, but makes the short and -% long forms into plurals. +% long forms into plurals. +% +% \DescribeMacro{\Acfp} +% Works in the same way as \cmd{\acfp}, but starts the long form with an +% upper case letter. % % \DescribeMacro{\acsp} % Works in the same way as \cmd{\acs}, but makes the short @@ -233,9 +267,18 @@ % Works in the same way as \cmd{\acl}, but makes the long form % into a plural. % +% \DescribeMacro{\Aclp} +% Works in the same way as \cmd{\aclp}, but starts with an upper case +% letter. +% % \DescribeMacro{\acfi} -% Prints the Full Name acronym (\cmd{\acl}) in italics and the abbreviated -% form (\cmd{\acs}) in upshaped form. +% Works in the same way as \cmd{\acf}, but prints the Full Name acronym +% (\cmd{\acl}) in italics and the abbreviated form (\cmd{\acs}) in +% upshaped form. +% +% \DescribeMacro{\Acfi} +% Works in the same way as \cmd{\acfi}, but starts the long form with an +% upper case letter. % % \DescribeMacro{\acused} % Marks an acronym as used, as if it had been called with \cmd{\ac}, @@ -248,6 +291,10 @@ % \DescribeMacro{\aclu} % Prints the long form of the acronym and marks it as used. % +% \DescribeMacro{\Aclu} +% Works in the same way as \cmd{\aclu}, but starts with an upper case +% letter. +% % Example: |\acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2})| % % \DescribeMacro{\iac} @@ -263,9 +310,10 @@ % that the acronym will not be marked as used. If you work with the 'onlyused' % option then macros which have only been used with starred commands will % not show up.\\ -% \cmd{\ac*}, \cmd{\acs*}, \cmd{\acl*}, \cmd{\acf*}, \cmd{\acp*}, -% \cmd{\acsp*}, \cmd{\aclp*}, \cmd{\acfp*}, \cmd{\acfi*}, \cmd{\acsu*}, -% \cmd{\aclu*}, \cmd{\iac*} and \cmd{\Iac*}. +% \cmd{\ac*}, \cmd{\Ac*}, \cmd{\acs*}, \cmd{\acl*}, \cmd{\Acl*}, \cmd{\acf*}, +% \cmd{\Acf*}, \cmd{\acp*}, \cmd{\Acp*}, \cmd{\acsp*}, \cmd{\aclp*}, \cmd{\Aclp*}, +% \cmd{\acfp*}, \cmd{\Acfp*}, \cmd{\acfi*}, \cmd{\Acfi*}, \cmd{\acsu*}, +% \cmd{\aclu*}, \cmd{\Aclu*}, \cmd{\iac*} and \cmd{\Iac*}. % % \subsection{Customization} % @@ -287,7 +335,7 @@ % handles the output of \cmd{\acf}, where the included acronym % goes through \DescribeMacro{\acfsfont}\cmd{\acfsfont} (and % \cmd{\acsfont}). -% The plural forms are treated accordingly. Usually the +% The plural and upper case forms are treated accordingly. Usually the % three macros do nothing. To give an example, the option |smaller| % makes \cmd{\acsfont} use the command \cmd{\textsmaller} from the % |relsize| package: @@ -496,7 +544,7 @@ % but please note the following: % \begin{itemize} % \item Do not use the general form (\cmd{\ac} or \cmd{\acp}) in -% sectional headers, because it will the uses the full name the first time, +% sectional headers, because it will uses the full name the first time, % that is in the table of contents, and the short form further on. % % \item The text of \meta{acronym} is used verbatim in bookmarks and @@ -509,7 +557,7 @@ % for example: % \begin{quote} % |\acro{Nx}[\ensuremath{N_{\chi}}]|\\ -% | {\texorpdfstring{$\chi$}{X}-faktor}| +% | {\texorpdfstring{$\chi$}{X}-factor}| % \end{quote} % which will then give % \begin{quote}\begin{tabbing} @@ -577,6 +625,10 @@ between the constant of Boltzmann and the \acl{NA}: \acl{lox}/\acl{lh2} (\acsu{lox}/\acsu{lh2}) +\Acp{LFVP} are processes in which the lepton number of the initial +and final states are different. An example for \iac{LFVP} is +neutrinoless double beta decay. + \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 @@ -589,6 +641,8 @@ blocks to be tested separately. The latter are commonly indicated as \acro{NA}[\ensuremath{N_{\mathrm A}}] {Number of Avogadro\acroextra{ (see \S\ref{Chem})}} \acro{NAD+}[NAD\textsuperscript{+}]{Nicotinamide Adenine Dinucleotide} + \acro{LFVP}{lepton flavor violating process} + \acroindefinite{LFVP}{an}{a} \acro{NUA}{Not Used Acronym} \acro{TDMA}{Time Division Multiple Access} \acro{UA}{Used Acronym} @@ -621,8 +675,8 @@ blocks to be tested separately. The latter are commonly indicated as % First we test that we got the right format and name the package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2015/03/21 - v1.41 +\ProvidesPackage{acronym}[2019/11/11 + v1.42 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix,xstring} % \end{macrocode} @@ -632,8 +686,9 @@ blocks to be tested separately. The latter are commonly indicated as % \subsection{Options} % % \begin{macro}{\ifAC@footnote} -% The option |footnote| leads to a redefinition of \cmd{\acf} and -% \cmd{\acfp}, making the full name appear as a footnote. +% The option |footnote| leads to a redefinition of \cmd{\acf}, +% \cmd{\Acf}, \cmd{\acfp}, and \cmd{\Acfp}, making the full name appear +% as a footnote. % \begin{macrocode} \newif\ifAC@footnote \AC@footnotefalse @@ -695,10 +750,10 @@ blocks to be tested separately. The latter are commonly indicated as % % \begin{macro}{\ifAC@dua} % The option |dua| stands for ``don't use acronyms''. -% It leads to a redefinition of \cmd{\ac} and -% \cmd{\acp}, making the full name appear all the time +% It leads to a redefinition of \cmd{\ac}, \cmd{\Ac}, \cmd{\acp}, +% and \cmd{\Acp}, making the full name appear all the time % and suppressing all acronyms but the explicity requested by -% \cmd{\acf} or \cmd{\acfp}. +% \cmd{\acf}, \cmd{\Acf}, \cmd{\acfp} or \cmd{\Acfp}. % \begin{macrocode} \newif\ifAC@dua \AC@duafalse @@ -715,6 +770,16 @@ blocks to be tested separately. The latter are commonly indicated as % \end{macrocode} % \end{macro} % +% \begin{macro}{\ifAC@nolinebreak} +% The option |nolinebreak| dictates whether to forbid, by defalt, a line break +% between the full name and the short name, when they are presented together. +% \begin{macrocode} +\newif\ifAC@nolinebreak +\AC@nolinebreakfalse +\DeclareOption{nolinebreak}{\AC@nolinebreaktrue} +% \end{macrocode} +% \end{macro} +% % Now we process the options. % \begin{macrocode} \ProcessOptions\relax @@ -751,6 +816,21 @@ blocks to be tested separately. The latter are commonly indicated as % \end{macro} % \end{macro} % +% \begin{macro}{\AC@linebreakpenalty} +% When the option |nolinebreak| is specified, the default penalty for a line break +% is being set to the maximum. Otherwise, the default penalty is one level below +% the maximum, meaning that most of the times, by default, the line will not get +% broken. +% +% \begin{macrocode} +\ifAC@nolinebreak + \def\AC@linebreakpenalty{4} +\else + \def\AC@linebreakpenalty{3} +\fi +% \end{macrocode} +% \end{macro} +% % \subsection{Hyperlinks and PDF support} % % \begin{macro}{\AC@hyperlink} @@ -814,17 +894,27 @@ blocks to be tested separately. The latter are commonly indicated as }% \def\acs#1{\AChy@call{#1}\AC@acs}% \def\acl#1{\AChy@call{#1}\@acl}% + \def\Acl#1{\AChy@call{#1}\@Acl}% \def\acf#1{\AChy@call{#1}\AChy@acf}% + \def\Acf#1{\AChy@call{#1}\AChy@Acf}% \def\ac#1{\AChy@call{#1}\@ac}% + \def\Ac#1{\AChy@call{#1}\@Ac}% \def\acsp#1{\AChy@call{#1}\@acsp}% \def\aclp#1{\AChy@call{#1}\@aclp}% + \def\Aclp#1{\AChy@call{#1}\@Aclp}% \def\acfp#1{\AChy@call{#1}\AChy@acfp}% + \def\Acfp#1{\AChy@call{#1}\AChy@Acfp}% \def\acp#1{\AChy@call{#1}\@acp}% + \def\Acp#1{\AChy@call{#1}\@Acp}% \def\acfi#1{\AChy@call{#1}\AChy@acf}% + \def\Acfi#1{\AChy@call{#1}\AChy@Acf}% \let\acsu\acs \let\aclu\acl + \let\Aclu\Acl \def\AChy@acf#1{\AC@acl{#1} (\AC@acs{#1})}% + \def\AChy@Acf#1{\AC@Acl{#1} (\AC@acs{#1})}% \def\AChy@acfp#1{\AC@aclp{#1} (\AC@acsp{#1})}% + \def\AChy@Acfp#1{\AC@Aclp{#1} (\AC@acsp{#1})}% }% } % \end{macrocode} @@ -856,7 +946,7 @@ blocks to be tested separately. The latter are commonly indicated as % \begin{macro}{\acresetall} % \begin{macro}{\AC@reset} % This macro resets the |AC@FN| - tag of each acronym, therefore |\ac| -% will use FullName (FN) next time it is called +% will use Full Name (FN) next time it is called % \begin{macrocode} \newcommand*\acresetall{\the\AC@clearlist\AC@clearlist={}} % \end{macrocode} @@ -928,6 +1018,17 @@ blocks to be tested separately. The latter are commonly indicated as % \end{macro} % \end{macro} % +% \begin{macro}{\@firstupper} +% Internal commands for making a first letter upper case. +% \begin{macrocode} +\newcommand{\@firstupper}[1]{% + \StrLeft{#1}{1}[\firstletter]% + \StrGobbleLeft{#1}{1}[\remainder]% + \MakeUppercase\firstletter\remainder% +} +% \end{macrocode} +% \end{macro} +% % % \subsection{Defining acronyms} % @@ -1086,8 +1187,8 @@ blocks to be tested separately. The latter are commonly indicated as full in text}% \else% \dotfill\pageref{acro:#1}% - \fi\\% - \fi% + \fi% + \fi\\% \fi% \else% \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3% @@ -1099,7 +1200,8 @@ blocks to be tested separately. The latter are commonly indicated as \protected@write\@auxout{}% {\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}% \@esphack - \endgroup} + \endgroup + \ignorespaces} % \end{macrocode} % \end{macro} % \end{macro} @@ -1220,6 +1322,7 @@ blocks to be tested separately. The latter are commonly indicated as % % % \begin{macro}{\AC@aclp} +% \begin{macro}{\AC@Aclp} % \begin{macro}{\AC@acsp} % Deliver either standard or nonstandard plural form (long and short % respectively). @@ -1231,6 +1334,9 @@ blocks to be tested separately. The latter are commonly indicated as \AC@acl{#1}s% \fi } +\newcommand*\AC@Aclp[1]{% + \@firstupper{\AC@aclp{#1}}% +} \newcommand*\AC@acsp[1]{% \ifcsname fn@#1@PS\endcsname \csname fn@#1@PS\endcsname @@ -1241,7 +1347,7 @@ blocks to be tested separately. The latter are commonly indicated as % \end{macrocode} % \end{macro} % \end{macro} - +% \end{macro} % % \subsection{Using acronyms} % @@ -1277,6 +1383,7 @@ blocks to be tested separately. The latter are commonly indicated as % % \begin{macro}{\AC@acs} % \begin{macro}{\AC@acl} +% \begin{macro}{\AC@Acl} % The internal commands \cmd{\AC@acs} and \cmd{\AC@acl} returns % the (unformatted) short and the long forms of an acronym as % saved in \fnacro. Mbox to prevent hyphenation of short form. @@ -1288,6 +1395,12 @@ blocks to be tested separately. The latter are commonly indicated as \newcommand*\AC@acl[1]{% \expandafter\AC@get\csname fn@#1\endcsname\@secondoftwo{#1}} % \end{macrocode} +% \begin{macrocode} +\newcommand*\AC@Acl[1]{% + \@firstupper{\AC@acl{#1}}% +} +% \end{macrocode} +% \end{macro} % \end{macro} % \end{macro} % @@ -1319,6 +1432,8 @@ blocks to be tested separately. The latter are commonly indicated as % % \begin{macro}{\acl} % \begin{macro}{\@acl} +% \begin{macro}{\Acl} +% \begin{macro}{\@Acl} % The user macro \cmd{\acl} prints the full name of the % acronym. % \begin{macrocode} @@ -1326,10 +1441,21 @@ blocks to be tested separately. The latter are commonly indicated as \WithSuffix\newcommand\acl*{\AC@starredtrue\protect\@acl}% % \end{macrocode} % \begin{macrocode} +\newcommand*{\Acl}{\AC@starredfalse\protect\@Acl}% +\WithSuffix\newcommand\Acl*{\AC@starredtrue\protect\@Acl}% +% \end{macrocode} +% \begin{macrocode} \newcommand*{\@acl}[1]{% \AC@acl{#1}% \ifAC@starred\else\AC@logged{#1}\fi} % \end{macrocode} +% \begin{macrocode} +\newcommand*{\@Acl}[1]{% + \AC@Acl{#1}% + \ifAC@starred\else\AC@logged{#1}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % @@ -1425,6 +1551,9 @@ blocks to be tested separately. The latter are commonly indicated as % \begin{macro}{\acf} % \begin{macro}{\acfa} % \begin{macro}{\@acf} +% \begin{macro}{\Acf} +% \begin{macro}{\Acfa} +% \begin{macro}{\@Acf} % The user macro \cmd{\acf} always prints the full name with % the acronym. The format depends on \cmd{\acffont} and % \cmd{\acfsfont}, and on the option |footnote| handled below. @@ -1434,72 +1563,112 @@ blocks to be tested separately. The latter are commonly indicated as % % The option |footnote| leads to a redefinition of \cmd{\acf}, % making the full name appear as a footnote. There is then -% no need for \cmd{\acffont} and \cmd{\acfsfont}. +% no need for \cmd{\acffont} and \cmd{\acfsfont}. If the option +% |footnote| is not specified, the optional variable determines +% the penalty for a line break. % \begin{macrocode} \newcommand*{\acf}{\AC@starredfalse\protect\acfa}% \WithSuffix\newcommand\acf*{\AC@starredtrue\protect\acfa}% % \end{macrocode} % \begin{macrocode} -\newcommand*{\acfa}[1]{% - \texorpdfstring{\protect\@acf{#1}}{\AC@acl{#1} (#1)}} +\newcommand*{\Acf}{\AC@starredfalse\protect\Acfa}% +\WithSuffix\newcommand\Acf*{\AC@starredtrue\protect\Acfa}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\acfa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acf[#1]{#2}}{\AC@acl{#2} (#2)}} % \end{macrocode} % \begin{macrocode} -\newcommand*{\@acf}[1]{% +\newcommand*{\Acfa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acf[#1]{#2}}{\AC@Acl{#2} (#2)}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\@acf}[2][\AC@linebreakpenalty]{% \ifAC@footnote - \acsfont{\AC@acs{#1}}% - \footnote{\AC@placelabel{#1}\AC@acl{#1}{}}% + \acsfont{\AC@acs{#2}}% + \footnote{\AC@placelabel{#2}\AC@acl{#2}{}}% \else \acffont{% - \AC@placelabel{#1}\AC@acl{#1}% - \nolinebreak[3] % - \acfsfont{(\acsfont{\AC@acs{#1}})}% + \AC@placelabel{#2}\AC@acl{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% }% \fi - \ifAC@starred\else\AC@logged{#1}\fi} + \ifAC@starred\else\AC@logged{#2}\fi} % \end{macrocode} +% \begin{macrocode} +\newcommand*{\@Acf}[2][\AC@linebreakpenalty]{% + \ifAC@footnote + \acsfont{\AC@acs{#2}}% + \footnote{\AC@placelabel{#2}\AC@Acl{#2}{}}% + \else + \acffont{% + \AC@placelabel{#2}\AC@Acl{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \fi + \ifAC@starred\else\AC@logged{#2}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\ac} +% \begin{macro}{\@ac} +% \begin{macro}{\Ac} +% \begin{macro}{\@Ac} % The first time an acronym is accessed its Full Name (FN) is % printed. The next time just (FN). When the |footnote| option is -% used the short form (FN) is always used. +% used the short form (FN) is always used. The optional variable +% is being passed to \cmd{\acf}, in case it is used. % \begin{macrocode} \newcommand*{\ac}{\AC@starredfalse\protect\@ac}% \WithSuffix\newcommand\ac*{\AC@starredtrue\protect\@ac}% % \end{macrocode} % \begin{macrocode} -\newcommand{\@ac}[1]{% +\newcommand*{\Ac}{\AC@starredfalse\protect\@Ac}% +\WithSuffix\newcommand\Ac*{\AC@starredtrue\protect\@Ac}% +% \end{macrocode} +% \begin{macrocode} +\newcommand{\@ac}[2][\AC@linebreakpenalty]{% \ifAC@dua - \ifAC@starred\acl*{#1}\else\acl{#1}\fi% + \ifAC@starred\acl*{#2}\else\acl{#2}\fi% \else - \expandafter\ifx\csname AC@#1\endcsname\AC@used% - \ifAC@starred\acs*{#1}\else\acs{#1}\fi% + \expandafter\ifx\csname AC@#2\endcsname\AC@used% + \ifAC@starred\acs*{#2}\else\acs{#2}\fi% \else - \ifAC@starred\acf*{#1}\else\acf{#1}\fi% + \ifAC@starred\acf*[#1]{#2}\else\acf[#1]{#2}\fi% \fi \fi} % \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@firstupper} -% Internal commands for Indefinite article % \begin{macrocode} -\newcommand{\@firstupper}[1]{% - \StrLeft{#1}{1}[\firstletter]% - \StrGobbleLeft{#1}{1}[\remainder]% - \MakeUppercase\firstletter\remainder -} +\newcommand{\@Ac}[2][\AC@linebreakpenalty]{% + \ifAC@dua + \ifAC@starred\Acl*{#2}\else\Acl{#2}\fi% + \else + \expandafter\ifx\csname AC@#2\endcsname\AC@used% + \ifAC@starred\acs*{#2}\else\acs{#2}\fi% + \else + \ifAC@starred\Acf*[#1]{#2}\else\Acf[#1]{#2}\fi% + \fi + \fi} % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\iac} % \begin{macro}{\@iac} % \begin{macro}{\@iaci} % \begin{macro}{\Iac} % \begin{macro}{\@Iac} -% Indefinite article correct expansion +% Indefinite article correct expansion. The optional variable +% is being passed to \cmd{\ac}. % \begin{macrocode} \newcommand*{\iac}{\AC@starredfalse\protect\@iac}% \WithSuffix\newcommand\iac*{\AC@starredtrue\protect\@iac}% @@ -1522,11 +1691,11 @@ blocks to be tested separately. The latter are commonly indicated as a% \fi } -\newcommand*{\@iac}[1]{% - \@iaci{#1} \ifAC@starred\ac*{#1}\else\ac{#1}\fi% +\newcommand*{\@iac}[2][\AC@linebreakpenalty]{% + \@iaci{#2} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi% } -\newcommand*{\@Iac}[1]{% - \@firstupper{\@iaci{#1}} \ifAC@starred\ac*{#1}\else\ac{#1}\fi% +\newcommand*{\@Iac}[2][\AC@linebreakpenalty]{% + \@firstupper{\@iaci{#2}} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi% } % \end{macrocode} % \end{macro} @@ -1562,6 +1731,8 @@ blocks to be tested separately. The latter are commonly indicated as % % \begin{macro}{\aclp} % \begin{macro}{\@aclp} +% \begin{macro}{\Aclp} +% \begin{macro}{\@Aclp} % The user macro \cmd{\aclp} prints the plural full name of the % acronym. % \begin{macrocode} @@ -1569,85 +1740,177 @@ blocks to be tested separately. The latter are commonly indicated as \WithSuffix\newcommand\aclp*{\AC@starredtrue\protect\@aclp}% % \end{macrocode} % \begin{macrocode} +\newcommand*{\Aclp}{\AC@starredfalse\protect\@Aclp}% +\WithSuffix\newcommand\Aclp*{\AC@starredtrue\protect\@Aclp}% +% \end{macrocode} +% \begin{macrocode} \newcommand*{\@aclp}[1]{% \AC@aclp{#1}% \ifAC@starred\else\AC@logged{#1}\fi} % \end{macrocode} +% \begin{macrocode} +\newcommand*{\@Aclp}[1]{% + \AC@Aclp{#1}% + \ifAC@starred\else\AC@logged{#1}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\acfp} % \begin{macro}{\acfpa} % \begin{macro}{\@acfp} +% \begin{macro}{\Acfp} +% \begin{macro}{\Acfpa} +% \begin{macro}{\@Acfp} % The user macro \cmd{\acfp} always prints the plural full name with % the plural of the acronym. The format depends on \cmd{\acffont} and % \cmd{\acfsfont}, and on the option |footnote| handled below. % -% The option |footnote| leads to a redefinition of -% \cmd{\acfp}, making the full name appear as a footnote. -% There is then -% no need for \cmd{\acffont} and \cmd{\acfsfont}. +% The option |footnote| leads to a redefinition of \cmd{\acfp}, +% making the full name appear as a footnote. There is then no need +% for \cmd{\acffont} and \cmd{\acfsfont}. If the option |footnote| is +% not specified, the optional variable determines the penalty for a +% line break. % \begin{macrocode} \newcommand*{\acfp}{\AC@starredfalse\protect\acfpa}% \WithSuffix\newcommand\acfp*{\AC@starredtrue\protect\acfpa}% % \end{macrocode} % \begin{macrocode} -\newcommand*{\acfpa}[1]{% - \texorpdfstring{\protect\@acfp{#1}}{\AC@aclp{#1} (\AC@acsp{#1})}} +\newcommand*{\Acfp}{\AC@starredfalse\protect\Acfpa}% +\WithSuffix\newcommand\Acfp*{\AC@starredtrue\protect\Acfpa}% +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\acfpa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acfp[#1]{#2}}{\AC@aclp{#2} (\AC@acsp{#2})}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\Acfpa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acfp[#1]{#2}}{\AC@Aclp{#2} (\AC@acsp{#2})}} % \end{macrocode} % \begin{macrocode} -\newcommand*{\@acfp}[1]{% +\newcommand*{\@acfp}[2][\AC@linebreakpenalty]{% \ifAC@footnote - \acsfont{\AC@acsp{#1}}% - \footnote{\AC@placelabel{#1}\AC@aclp{#1}{}}% + \acsfont{\AC@acsp{#2}}% + \footnote{\AC@placelabel{#2}\AC@aclp{#2}{}}% \else \acffont{% - \AC@placelabel{#1}\AC@aclp{#1}% - \nolinebreak[3] % - \acfsfont{(\acsfont{\AC@acsp{#1}})}% + \AC@placelabel{#2}\AC@aclp{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acsp{#2}})}% }% \fi - \ifAC@starred\else\AC@logged{#1}\fi} + \ifAC@starred\else\AC@logged{#2}\fi} % \end{macrocode} +% \begin{macrocode} +\newcommand*{\@Acfp}[2][\AC@linebreakpenalty]{% + \ifAC@footnote + \acsfont{\AC@acsp{#2}}% + \footnote{\AC@placelabel{#2}\AC@Aclp{#2}{}}% + \else + \acffont{% + \AC@placelabel{#2}\AC@Aclp{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acsp{#2}})}% + }% + \fi + \ifAC@starred\else\AC@logged{#2}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\acp} % \begin{macro}{\@acp} +% \begin{macro}{\Acp} +% \begin{macro}{\@Acp} % The first time an acronym is accessed Full Names (FNs) is -% printed. The next time just (FNs). +% printed. The next time just (FNs).The optional variable +% is being passed to \cmd{\acfp}, in case it is used. % \begin{macrocode} \newcommand*{\acp}{\AC@starredfalse\protect\@acp}% \WithSuffix\newcommand\acp*{\AC@starredtrue\protect\@acp}% % \end{macrocode} % \begin{macrocode} -\newcommand{\@acp}[1]{% +\newcommand*{\Acp}{\AC@starredfalse\protect\@Acp}% +\WithSuffix\newcommand\Acp*{\AC@starredtrue\protect\@Acp}% +% \end{macrocode} +% \begin{macrocode} +\newcommand{\@acp}[2][\AC@linebreakpenalty]{% + \ifAC@dua + \ifAC@starred\aclp*{#2}\else\aclp{#2}\fi% + \else + \expandafter\ifx\csname AC@#2\endcsname\AC@used + \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi% + \else + \ifAC@starred\acfp*[#1]{#2}\else\acfp[#1]{#2}\fi% + \fi + \fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand{\@Acp}[2][\AC@linebreakpenalty]{% \ifAC@dua - \ifAC@starred\aclp*{#1}\else\aclp{#1}\fi% + \ifAC@starred\Aclp*{#2}\else\Aclp{#2}\fi% \else - \expandafter\ifx\csname AC@#1\endcsname\AC@used - \ifAC@starred\acsp*{#1}\else\acsp{#1}\fi% + \expandafter\ifx\csname AC@#2\endcsname\AC@used + \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi% \else - \ifAC@starred\acfp*{#1}\else\acfp{#1}\fi% + \ifAC@starred\Acfp*[#1]{#2}\else\Acfp[#1]{#2}\fi% \fi \fi} % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % % \begin{macro}{\acfi} % \begin{macro}{\acfia} +% \begin{macro}{\Acfi} +% \begin{macro}{\Acfia} % The Full Name is printed in italics and the abbreviated is printed in upshape. +% The optional variable determines the penalty for a line break. % \begin{macrocode} \newcommand*{\acfi}{\AC@starredfalse\protect\acfia}% \WithSuffix\newcommand\acfi*{\AC@starredtrue\protect\acfia}% % \end{macrocode} % \begin{macrocode} -\newcommand{\acfia}[1]{% - {\itshape \AC@acl{#1} \nolinebreak[3]} (\ifAC@starred\acs*{#1}\else\acs{#1}\fi)} +\newcommand*{\Acfi}{\AC@starredfalse\protect\Acfia}% +\WithSuffix\newcommand\Acfi*{\AC@starredtrue\protect\Acfia}% % \end{macrocode} +% \begin{macrocode} +\newcommand{\acfia}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acfi[#1]{#2}}{{\AC@acl{#2}} (#2)}} +% \end{macrocode} +% \begin{macrocode} +\newcommand{\Acfia}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acfi[#1]{#2}}{{\AC@Acl{#2}} (#2)}} +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\@acfi}[2][\AC@linebreakpenalty]{% + \acffont{% + \AC@placelabel{#2}{\itshape\AC@acl{#2}}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \ifAC@starred\else\AC@logged{#2}\fi} +% \end{macrocode} +% \begin{macrocode} +\newcommand*{\@Acfi}[2][\AC@linebreakpenalty]{% + \acffont{% + \AC@placelabel{#2}{\itshape\AC@Acl{#2}}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \ifAC@starred\else\AC@logged{#2}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % @@ -1677,15 +1940,27 @@ blocks to be tested separately. The latter are commonly indicated as % % \begin{macro}{\aclu} % \begin{macro}{\aclua} +% \begin{macro}{\Aclu} +% \begin{macro}{\Aclua} % Print the long form of the acronym and mark it as used. % \begin{macrocode} \newcommand*{\aclu}{\AC@starredfalse\protect\aclua}% \WithSuffix\newcommand\aclu*{\AC@starredtrue\protect\aclua}% % \end{macrocode} % \begin{macrocode} +\newcommand*{\Aclu}{\AC@starredfalse\protect\Aclua}% +\WithSuffix\newcommand\Aclu*{\AC@starredtrue\protect\Aclua}% +% \end{macrocode} +% \begin{macrocode} \newcommand{\aclua}[1]{% \ifAC@starred\acl*{#1}\else\acl{#1}\fi\acused{#1}} % \end{macrocode} +% \begin{macrocode} +\newcommand{\Aclua}[1]{% + \ifAC@starred\Acl*{#1}\else\Acl{#1}\fi\acused{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % diff --git a/Master/texmf-dist/tex/latex/acronym/acronym.sty b/Master/texmf-dist/tex/latex/acronym/acronym.sty index 5d6581a77af..c582d6e9b9c 100644 --- a/Master/texmf-dist/tex/latex/acronym/acronym.sty +++ b/Master/texmf-dist/tex/latex/acronym/acronym.sty @@ -40,8 +40,8 @@ %% %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{acronym}[2015/03/21 - v1.41 +\ProvidesPackage{acronym}[2019/11/11 + v1.42 Support for acronyms (Tobias Oetiker)] \RequirePackage{suffix,xstring} \newif\ifAC@footnote @@ -65,6 +65,9 @@ \newif\ifAC@nolist \AC@nolistfalse \DeclareOption{nolist}{\AC@nolisttrue\AC@nohyperlinkstrue} +\newif\ifAC@nolinebreak +\AC@nolinebreakfalse +\DeclareOption{nolinebreak}{\AC@nolinebreaktrue} \ProcessOptions\relax \ifAC@smaller \RequirePackage{relsize} @@ -74,6 +77,11 @@ \fi \newcommand*{\acffont}[1]{#1} \newcommand*{\acfsfont}[1]{#1} +\ifAC@nolinebreak + \def\AC@linebreakpenalty{4} +\else + \def\AC@linebreakpenalty{3} +\fi \def\AC@hyperlink#1#2{#2} \def\AC@hypertarget#1#2{#2} \def\AC@phantomsection{} @@ -115,17 +123,27 @@ }% \def\acs#1{\AChy@call{#1}\AC@acs}% \def\acl#1{\AChy@call{#1}\@acl}% + \def\Acl#1{\AChy@call{#1}\@Acl}% \def\acf#1{\AChy@call{#1}\AChy@acf}% + \def\Acf#1{\AChy@call{#1}\AChy@Acf}% \def\ac#1{\AChy@call{#1}\@ac}% + \def\Ac#1{\AChy@call{#1}\@Ac}% \def\acsp#1{\AChy@call{#1}\@acsp}% \def\aclp#1{\AChy@call{#1}\@aclp}% + \def\Aclp#1{\AChy@call{#1}\@Aclp}% \def\acfp#1{\AChy@call{#1}\AChy@acfp}% + \def\Acfp#1{\AChy@call{#1}\AChy@Acfp}% \def\acp#1{\AChy@call{#1}\@acp}% + \def\Acp#1{\AChy@call{#1}\@Acp}% \def\acfi#1{\AChy@call{#1}\AChy@acf}% + \def\Acfi#1{\AChy@call{#1}\AChy@Acf}% \let\acsu\acs \let\aclu\acl + \let\Aclu\Acl \def\AChy@acf#1{\AC@acl{#1} (\AC@acs{#1})}% + \def\AChy@Acf#1{\AC@Acl{#1} (\AC@acs{#1})}% \def\AChy@acfp#1{\AC@aclp{#1} (\AC@acsp{#1})}% + \def\AChy@Acfp#1{\AC@Aclp{#1} (\AC@acsp{#1})}% }% } \newtoks\AC@clearlist @@ -155,6 +173,11 @@ \global\expandafter\let\csname acused@#1\endcsname\AC@used \global\let\AC@populated\AC@used \fi} +\newcommand{\@firstupper}[1]{% + \StrLeft{#1}{1}[\firstletter]% + \StrGobbleLeft{#1}{1}[\remainder]% + \MakeUppercase\firstletter\remainder% +} \newcommand*\newacro[1]{% \@ifnextchar[{\AC@newacro{#1}}{\AC@newacro{#1}[#1]}} \newcommand\AC@newacro{} @@ -231,8 +254,8 @@ full in text}% \else% \dotfill\pageref{acro:#1}% - \fi\\% - \fi% + \fi% + \fi\\% \fi% \else% \item[\protect\AC@hypertarget{#1}{\aclabelfont{#2}}] #3% @@ -244,7 +267,8 @@ \protected@write\@auxout{}% {\string\newacro{#1}[\string\AC@hyperlink{#1}{#2}]{#3}}% \@esphack - \endgroup} + \endgroup + \ignorespaces} \newcommand*\newacroindefinite[3]{% \expandafter\gdef\csname fn@#1@IS\endcsname{#2}% \expandafter\gdef\csname fn@#1@IL\endcsname{#3}% @@ -311,6 +335,9 @@ \AC@acl{#1}s% \fi } +\newcommand*\AC@Aclp[1]{% + \@firstupper{\AC@aclp{#1}}% +} \newcommand*\AC@acsp[1]{% \ifcsname fn@#1@PS\endcsname \csname fn@#1@PS\endcsname @@ -318,7 +345,6 @@ \AC@acs{#1}s% \fi } - \newif\ifAC@starred \newcommand*\AC@get[3]{% \ifx#1\relax @@ -331,6 +357,9 @@ \mbox{\expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}}} \newcommand*\AC@acl[1]{% \expandafter\AC@get\csname fn@#1\endcsname\@secondoftwo{#1}} +\newcommand*\AC@Acl[1]{% + \@firstupper{\AC@acl{#1}}% +} \newcommand*{\acs}{\AC@starredfalse\protect\acsa}% \WithSuffix\newcommand\acs*{\AC@starredtrue\protect\acsa}% \newcommand*{\acsa}[1]{% @@ -344,9 +373,14 @@ \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*{\acl}{\AC@starredfalse\protect\@acl}% \WithSuffix\newcommand\acl*{\AC@starredtrue\protect\@acl}% +\newcommand*{\Acl}{\AC@starredfalse\protect\@Acl}% +\WithSuffix\newcommand\Acl*{\AC@starredtrue\protect\@Acl}% \newcommand*{\@acl}[1]{% \AC@acl{#1}% \ifAC@starred\else\AC@logged{#1}\fi} +\newcommand*{\@Acl}[1]{% + \AC@Acl{#1}% + \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*\@verridelabel[1]{% \@bsphack \protected@write\@auxout{}{\string\AC@undonewlabel{#1}}% @@ -425,37 +459,60 @@ }% \newcommand*{\acf}{\AC@starredfalse\protect\acfa}% \WithSuffix\newcommand\acf*{\AC@starredtrue\protect\acfa}% -\newcommand*{\acfa}[1]{% - \texorpdfstring{\protect\@acf{#1}}{\AC@acl{#1} (#1)}} -\newcommand*{\@acf}[1]{% +\newcommand*{\Acf}{\AC@starredfalse\protect\Acfa}% +\WithSuffix\newcommand\Acf*{\AC@starredtrue\protect\Acfa}% +\newcommand*{\acfa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acf[#1]{#2}}{\AC@acl{#2} (#2)}} +\newcommand*{\Acfa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acf[#1]{#2}}{\AC@Acl{#2} (#2)}} +\newcommand*{\@acf}[2][\AC@linebreakpenalty]{% \ifAC@footnote - \acsfont{\AC@acs{#1}}% - \footnote{\AC@placelabel{#1}\AC@acl{#1}{}}% + \acsfont{\AC@acs{#2}}% + \footnote{\AC@placelabel{#2}\AC@acl{#2}{}}% \else \acffont{% - \AC@placelabel{#1}\AC@acl{#1}% - \nolinebreak[3] % - \acfsfont{(\acsfont{\AC@acs{#1}})}% + \AC@placelabel{#2}\AC@acl{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% }% \fi - \ifAC@starred\else\AC@logged{#1}\fi} + \ifAC@starred\else\AC@logged{#2}\fi} +\newcommand*{\@Acf}[2][\AC@linebreakpenalty]{% + \ifAC@footnote + \acsfont{\AC@acs{#2}}% + \footnote{\AC@placelabel{#2}\AC@Acl{#2}{}}% + \else + \acffont{% + \AC@placelabel{#2}\AC@Acl{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \fi + \ifAC@starred\else\AC@logged{#2}\fi} \newcommand*{\ac}{\AC@starredfalse\protect\@ac}% \WithSuffix\newcommand\ac*{\AC@starredtrue\protect\@ac}% -\newcommand{\@ac}[1]{% +\newcommand*{\Ac}{\AC@starredfalse\protect\@Ac}% +\WithSuffix\newcommand\Ac*{\AC@starredtrue\protect\@Ac}% +\newcommand{\@ac}[2][\AC@linebreakpenalty]{% \ifAC@dua - \ifAC@starred\acl*{#1}\else\acl{#1}\fi% + \ifAC@starred\acl*{#2}\else\acl{#2}\fi% \else - \expandafter\ifx\csname AC@#1\endcsname\AC@used% - \ifAC@starred\acs*{#1}\else\acs{#1}\fi% + \expandafter\ifx\csname AC@#2\endcsname\AC@used% + \ifAC@starred\acs*{#2}\else\acs{#2}\fi% \else - \ifAC@starred\acf*{#1}\else\acf{#1}\fi% + \ifAC@starred\acf*[#1]{#2}\else\acf[#1]{#2}\fi% + \fi + \fi} +\newcommand{\@Ac}[2][\AC@linebreakpenalty]{% + \ifAC@dua + \ifAC@starred\Acl*{#2}\else\Acl{#2}\fi% + \else + \expandafter\ifx\csname AC@#2\endcsname\AC@used% + \ifAC@starred\acs*{#2}\else\acs{#2}\fi% + \else + \ifAC@starred\Acf*[#1]{#2}\else\Acf[#1]{#2}\fi% \fi \fi} -\newcommand{\@firstupper}[1]{% - \StrLeft{#1}{1}[\firstletter]% - \StrGobbleLeft{#1}{1}[\remainder]% - \MakeUppercase\firstletter\remainder -} \newcommand*{\iac}{\AC@starredfalse\protect\@iac}% \WithSuffix\newcommand\iac*{\AC@starredtrue\protect\@iac}% \newcommand*{\Iac}{\AC@starredfalse\protect\@Iac}% @@ -475,11 +532,11 @@ a% \fi } -\newcommand*{\@iac}[1]{% - \@iaci{#1} \ifAC@starred\ac*{#1}\else\ac{#1}\fi% +\newcommand*{\@iac}[2][\AC@linebreakpenalty]{% + \@iaci{#2} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi% } -\newcommand*{\@Iac}[1]{% - \@firstupper{\@iaci{#1}} \ifAC@starred\ac*{#1}\else\ac{#1}\fi% +\newcommand*{\@Iac}[2][\AC@linebreakpenalty]{% + \@firstupper{\@iaci{#2}} \ifAC@starred\ac*[#1]{#2}\else\ac[#1]{#2}\fi% } \newcommand*{\acsp}{\AC@starredfalse\protect\acspa}% \WithSuffix\newcommand\acsp*{\AC@starredtrue\protect\acspa}% @@ -490,41 +547,92 @@ \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*{\aclp}{\AC@starredfalse\protect\@aclp}% \WithSuffix\newcommand\aclp*{\AC@starredtrue\protect\@aclp}% +\newcommand*{\Aclp}{\AC@starredfalse\protect\@Aclp}% +\WithSuffix\newcommand\Aclp*{\AC@starredtrue\protect\@Aclp}% \newcommand*{\@aclp}[1]{% \AC@aclp{#1}% \ifAC@starred\else\AC@logged{#1}\fi} +\newcommand*{\@Aclp}[1]{% + \AC@Aclp{#1}% + \ifAC@starred\else\AC@logged{#1}\fi} \newcommand*{\acfp}{\AC@starredfalse\protect\acfpa}% \WithSuffix\newcommand\acfp*{\AC@starredtrue\protect\acfpa}% -\newcommand*{\acfpa}[1]{% - \texorpdfstring{\protect\@acfp{#1}}{\AC@aclp{#1} (\AC@acsp{#1})}} -\newcommand*{\@acfp}[1]{% +\newcommand*{\Acfp}{\AC@starredfalse\protect\Acfpa}% +\WithSuffix\newcommand\Acfp*{\AC@starredtrue\protect\Acfpa}% +\newcommand*{\acfpa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acfp[#1]{#2}}{\AC@aclp{#2} (\AC@acsp{#2})}} +\newcommand*{\Acfpa}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acfp[#1]{#2}}{\AC@Aclp{#2} (\AC@acsp{#2})}} +\newcommand*{\@acfp}[2][\AC@linebreakpenalty]{% \ifAC@footnote - \acsfont{\AC@acsp{#1}}% - \footnote{\AC@placelabel{#1}\AC@aclp{#1}{}}% + \acsfont{\AC@acsp{#2}}% + \footnote{\AC@placelabel{#2}\AC@aclp{#2}{}}% \else \acffont{% - \AC@placelabel{#1}\AC@aclp{#1}% - \nolinebreak[3] % - \acfsfont{(\acsfont{\AC@acsp{#1}})}% + \AC@placelabel{#2}\AC@aclp{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acsp{#2}})}% }% \fi - \ifAC@starred\else\AC@logged{#1}\fi} + \ifAC@starred\else\AC@logged{#2}\fi} +\newcommand*{\@Acfp}[2][\AC@linebreakpenalty]{% + \ifAC@footnote + \acsfont{\AC@acsp{#2}}% + \footnote{\AC@placelabel{#2}\AC@Aclp{#2}{}}% + \else + \acffont{% + \AC@placelabel{#2}\AC@Aclp{#2}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acsp{#2}})}% + }% + \fi + \ifAC@starred\else\AC@logged{#2}\fi} \newcommand*{\acp}{\AC@starredfalse\protect\@acp}% \WithSuffix\newcommand\acp*{\AC@starredtrue\protect\@acp}% -\newcommand{\@acp}[1]{% +\newcommand*{\Acp}{\AC@starredfalse\protect\@Acp}% +\WithSuffix\newcommand\Acp*{\AC@starredtrue\protect\@Acp}% +\newcommand{\@acp}[2][\AC@linebreakpenalty]{% + \ifAC@dua + \ifAC@starred\aclp*{#2}\else\aclp{#2}\fi% + \else + \expandafter\ifx\csname AC@#2\endcsname\AC@used + \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi% + \else + \ifAC@starred\acfp*[#1]{#2}\else\acfp[#1]{#2}\fi% + \fi + \fi} +\newcommand{\@Acp}[2][\AC@linebreakpenalty]{% \ifAC@dua - \ifAC@starred\aclp*{#1}\else\aclp{#1}\fi% + \ifAC@starred\Aclp*{#2}\else\Aclp{#2}\fi% \else - \expandafter\ifx\csname AC@#1\endcsname\AC@used - \ifAC@starred\acsp*{#1}\else\acsp{#1}\fi% + \expandafter\ifx\csname AC@#2\endcsname\AC@used + \ifAC@starred\acsp*{#2}\else\acsp{#2}\fi% \else - \ifAC@starred\acfp*{#1}\else\acfp{#1}\fi% + \ifAC@starred\Acfp*[#1]{#2}\else\Acfp[#1]{#2}\fi% \fi \fi} \newcommand*{\acfi}{\AC@starredfalse\protect\acfia}% \WithSuffix\newcommand\acfi*{\AC@starredtrue\protect\acfia}% -\newcommand{\acfia}[1]{% - {\itshape \AC@acl{#1} \nolinebreak[3]} (\ifAC@starred\acs*{#1}\else\acs{#1}\fi)} +\newcommand*{\Acfi}{\AC@starredfalse\protect\Acfia}% +\WithSuffix\newcommand\Acfi*{\AC@starredtrue\protect\Acfia}% +\newcommand{\acfia}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@acfi[#1]{#2}}{{\AC@acl{#2}} (#2)}} +\newcommand{\Acfia}[2][\AC@linebreakpenalty]{% + \texorpdfstring{\protect\@Acfi[#1]{#2}}{{\AC@Acl{#2}} (#2)}} +\newcommand*{\@acfi}[2][\AC@linebreakpenalty]{% + \acffont{% + \AC@placelabel{#2}{\itshape\AC@acl{#2}}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \ifAC@starred\else\AC@logged{#2}\fi} +\newcommand*{\@Acfi}[2][\AC@linebreakpenalty]{% + \acffont{% + \AC@placelabel{#2}{\itshape\AC@Acl{#2}}% + \nolinebreak[#1] % + \acfsfont{(\acsfont{\AC@acs{#2}})}% + }% + \ifAC@starred\else\AC@logged{#2}\fi} \newcommand{\acused}[1]{% \global\expandafter\let\csname AC@#1\endcsname\AC@used% \AC@addtoAC@clearlist{#1}} @@ -534,8 +642,12 @@ \ifAC@starred\acs*{#1}\else\acs{#1}\fi\acused{#1}} \newcommand*{\aclu}{\AC@starredfalse\protect\aclua}% \WithSuffix\newcommand\aclu*{\AC@starredtrue\protect\aclua}% +\newcommand*{\Aclu}{\AC@starredfalse\protect\Aclua}% +\WithSuffix\newcommand\Aclu*{\AC@starredtrue\protect\Aclua}% \newcommand{\aclua}[1]{% \ifAC@starred\acl*{#1}\else\acl{#1}\fi\acused{#1}} +\newcommand{\Aclua}[1]{% + \ifAC@starred\Acl*{#1}\else\Acl{#1}\fi\acused{#1}} \endinput %% %% End of file `acronym.sty'. -- cgit v1.2.3