diff options
author | Karl Berry <karl@freefriends.org> | 2022-11-01 19:52:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-11-01 19:52:20 +0000 |
commit | c9b719f44bd18c2bc6f36381664beeaef8e9ea59 (patch) | |
tree | 826eca2dcff0f1581a325e6fc17c367ac59e8227 | |
parent | 2c5c31bc18fa243494f2794216d5d5d07a46dc60 (diff) |
hep-acronym (1nov22)
git-svn-id: svn://tug.org/texlive/trunk@64890 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-acronym/bibliography.bib | 161 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.pdf | bin | 258360 -> 273258 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-implementation.pdf | bin | 316577 -> 334479 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-test.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hep-acronym/hep-acronym-implementation.dtx | 100 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-acronym/hep-acronym.sty | 48 |
7 files changed, 288 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/hep-acronym/bibliography.bib b/Master/texmf-dist/doc/latex/hep-acronym/bibliography.bib index e5117be3d56..5b217a2aad6 100644 --- a/Master/texmf-dist/doc/latex/hep-acronym/bibliography.bib +++ b/Master/texmf-dist/doc/latex/hep-acronym/bibliography.bib @@ -21,7 +21,7 @@ subtitle = "An acronym extension for glossaries", author = "Jan Hajer", year = "2021", eprinttype = "ctan", -eprint = "hep-acronyms", +eprint = "hep-acronym", related = "hep-paper-1", } @@ -95,6 +95,24 @@ eprint = "hep-title", related = "hep-paper-1", } +@article{hep-reference, +title = "The |hep-reference| package", +subtitle = "Selection of reference improvements", +author = "Jan Hajer", +year = "2021", +eprinttype = "ctan", +eprint = "hep-reference", +related = "hep-paper-1", +} + +@article{hep-cv, +title = "The |hep-cv| package", +subtitle = "Appealing curricula vitarum", +author = "Jan Hajer", +year = "2020", +related = "hep-paper-1", +} + @article{kvoptions, title = "The |kvoptions| package", subtitle = "Key value format for package options", @@ -1053,3 +1071,144 @@ eprinttype = "ctan", eprint = "soulutf8", } +@article{moderncv, +title = "The |moderncv| package", +subtitle = "A modern curriculum vitae class", +author = "Xavier Danaux", +year = "2006", +eprinttype = "ctan", +eprint = "moderncv", +related = "moderncv-1", +} + +@article{anyfontsize, +title = "The |anyfontsize| package", +subtitle = "Select any font size in \hologo{LaTeX}", +author = "Péter Szabó", +date = "2007", +eprinttype = "ctan", +eprint = "anyfontsize", +} + +@article{array, +title = "A new implementation of \hologo{LaTeX}’s |tabular| and |array| environment", +subtitle = "Extending the |array| and |tabular| environments", +author = "Frank Mittelbach, David Carlisle", +collaboration= "\hologo{LaTeX} Team", +year = "1993", +eprinttype = "ctan", +eprint = "array", +} + +@article{dashrule, +title = "The |dashrule| package", +subtitle = "Draw dashed rules", +author = "Scott Pakin", +date = "2008", +eprinttype = "ctan", +eprint = "dashrule", +} + +@article{fancyhdr, +title = "The |fancyhdr| and |extramarks| packages", +subtitle = "Extensive control of page headers and footers in \hologo{LaTeX2e}", +author = "Piet van Oostrum", +date = "1994", +eprinttype = "ctan", +eprint = "fancyhdr", +} + +@article{lastpage, +title = "The |lastpage| package", +subtitle = "Reference last page for Page $N$ of $M$ type footers", +author = "Hans-Martin Münch and Jeffrey Goldberg", +date = "1994", +eprinttype = "ctan", +eprint = "lastpage", +} + +@article{textpos, +title = "|Textpos|: absolute positioning of text on the page", +subtitle = "Place boxes at arbitrary positions on the \hologo{LaTeX} page", +author = "Norman Gray", +date = "1999", +eprinttype = "ctan", +eprint = "textpos", +related = "textpos-1", +} + +@manual{textpos-1, +eprinttype = "bitbucket", +eprintclass = "nxg", +eprint = "textpos", +} + +@article{subfiles, +title = "The |subfiles| package: A Document Class and a Package for Handling Multi-File Projects", +subtitle = "Individual typesetting of subfiles of a \enquote{main} document", +author = "Federico Garcia and Gernot Salzer", +date = "2002", +eprinttype = "ctan", +eprint = "subfiles", +related = "subfiles-1", +} + +@manual{subfiles-1, +eprinttype = "github", +eprintclass = "gsalzer", +eprint = "subfiles", +} + +@article{titlesec, +title = "The |titlesec|, |titleps| and |titletoc| packages", +subtitle = "Select alternative section titles", +author = "Javier Bezos", +year = "1998", +eprinttype = "ctan", +eprint = "titlesec", +related = "titlesec-1", +} + +@manual{titlesec-1, +eprinttype = "github", +eprintclass = "jbezos", +eprint = "titlesec", +} + +@article{calc, +title = "The |calc| package", +subtitle = "Simple arithmetic in \hologo{LaTeX} commands", +author = "Kresten Krab Thorup and Frank Jensen", +collaboration = "\hologo{LaTeX3} Project", +year = "1992", +eprinttype = "ctan", +eprint = "calc", +} + +@article{tabulary, +title = "The |tabulary| package", +subtitle = "Tabular with variable width columns balanced", +author = "David Carlisle", +year = "1995", +eprinttype = "ctan", +eprint = "tabulary", +} + +@article{xcolor, +title = "The |xcolor| package", +subtitle = "Driver-independent color extensions for \hologo{LaTeX} and \hologo{pdfLaTeX}", +author = "Uwe Kern", +collaboration = "\hologo{LaTeX} Project", +year = "2003", +eprinttype = "ctan", +eprint = "xcolor", +} + +@article{overlays, +title = "The |overlays| package", +subtitle = "Incremental slides", +author = "Andreas Nolda", +year = "2016", +eprinttype = "ctan", +eprint = "overlays", +} diff --git a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.pdf b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.pdf Binary files differindex 51d02bb90a5..c4e91def91b 100644 --- a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.pdf +++ b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.pdf diff --git a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex index 24d97360700..a5a4029c305 100644 --- a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex +++ b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-documentation.tex @@ -14,7 +14,7 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. -\ProvidesFile{hep-acronym-documentation.tex}[2021/08/01 v1.0 hep-acronym documentation] +\ProvidesFile{hep-acronym-documentation.tex}[2022/11/01 v1.1 hep-acronym documentation] \RequirePackage[l2tabu, orthodox]{nag} \documentclass{ltxdoc} @@ -39,7 +39,7 @@ \title{The \software{hep-acronym} package\thanks{This document corresponds to \software{hep-acronym}~\fileversion.}} \subtitle{An acronym extension for glossaries} -\author{Jan Hajer \email{jan.hajer@unibas.ch}} +\author{Jan Hajer \email{jan.hajer@tecnico.ulisboa.pt}} \date{\filedate} \begin{document} @@ -63,8 +63,10 @@ The second star restores the \hologo{TeX} default of swallowing subsequent white The long form is only shown at the first appearance of these macros, later appearances generate the abbreviation with a hyperlink to the long form. Capitalisation at the beginning of paragraphs and sentences is (mostly) ensured. The long form is never used in math mode which can be exploited to enforce the short form. -In order to enforce the long form use "\glsdesc*"\marg{abbreviation}. -As there can be no fixed rule whether to use the long form or the short form in section headers the user is left to their own devises \eg "\glsdesc"\marg{abbreviation}, "\Glsdesc"\marg{abbreviation}. +In order to enforce the long form use "\"\meta{abbreviation}"long". +As there can be no fixed rule whether to use the long form or the short form in section headers the user is left to their own devices \eg "\glsdesc"\marg{abbreviation}, "\Glsdesc"\marg{abbreviation}. +\DescribeMacro{\sentence} +The "\sentence" macro ensures that the directly following abbreviation is capitalised. \DescribeMacro{\shortacronym} \DescribeMacro{\longacronym} diff --git a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-implementation.pdf b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-implementation.pdf Binary files differindex 47eb0547f8b..d3553fb7762 100644 --- a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-implementation.pdf +++ b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-implementation.pdf diff --git a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-test.tex b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-test.tex index b0065e70ca3..6abedab3bb7 100644 --- a/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-test.tex +++ b/Master/texmf-dist/doc/latex/hep-acronym/hep-acronym-test.tex @@ -19,6 +19,7 @@ \usepackage{hyperref} \usepackage{hep-acronym} +\usepackage{titlesec} \acronym{PDF}{portable document format} \acronym{URL}{uniform resource locator} @@ -35,7 +36,9 @@ $\URL$ \emph{(Second appearance is forced to be always short)} \LM \emph{(Second appearance is shorted)}. $\CM$ \emph{(Enforce short form)} \CM \emph{(then extend second appearance)} -\glsdesc*{CM} \emph{(enforce long form)} +\URLlong \emph{(enforce long form)} + +\section{\PDFlong table of contents is not broken} \end{document} diff --git a/Master/texmf-dist/source/latex/hep-acronym/hep-acronym-implementation.dtx b/Master/texmf-dist/source/latex/hep-acronym/hep-acronym-implementation.dtx index c5e9c60cfac..ded23522db7 100644 --- a/Master/texmf-dist/source/latex/hep-acronym/hep-acronym-implementation.dtx +++ b/Master/texmf-dist/source/latex/hep-acronym/hep-acronym-implementation.dtx @@ -18,8 +18,8 @@ % \iffalse % %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] -%<package>\ProvidesPackage{hep-acronym}[2021/08/01 v1.0 Acronyms using glossaries] -%<documentation>\ProvidesFile{hep-acronym-documentation.tex}[2021/08/01 v1.0 hep-acronym documentation] +%<package>\ProvidesPackage{hep-acronym}[2022/11/01 v1.1 Acronyms using glossaries] +%<documentation>\ProvidesFile{hep-acronym-documentation.tex}[2022/11/01 v1.1 hep-acronym documentation] % %<*documentation> @@ -53,7 +53,7 @@ % % \fi % -% \CheckSum{354} +% \CheckSum{0} % % \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 @@ -72,6 +72,7 @@ % Right brace \} Tilde \~} % % \changes{v1.0}{2021/09/01}{Initial version of the style file.} +% \changes{v1.1}{2022/11/01}{Bug fixes.} % % \ifshort %<*documentation> @@ -81,7 +82,7 @@ \title{The \software{hep-acronym} package\thanks{This document corresponds to \software{hep-acronym}~\fileversion.}} \subtitle{An acronym extension for glossaries} -\author{Jan Hajer \email{jan.hajer@unibas.ch}} +\author{Jan Hajer \email{jan.hajer@tecnico.ulisboa.pt}} \date{\filedate} % \ifshort @@ -107,8 +108,11 @@ The second star restores the \hologo{TeX} default of swallowing subsequent white The long form is only shown at the first appearance of these macros, later appearances generate the abbreviation with a hyperlink to the long form. Capitalisation at the beginning of paragraphs and sentences is (mostly) ensured. The long form is never used in math mode which can be exploited to enforce the short form. -In order to enforce the long form use "\glsdesc*"\marg{abbreviation}. -As there can be no fixed rule whether to use the long form or the short form in section headers the user is left to their own devises \eg "\glsdesc"\marg{abbreviation}, "\Glsdesc"\marg{abbreviation}. +In order to enforce the long form use "\"\meta{abbreviation}"long". +As there can be no fixed rule whether to use the long form or the short form in section headers the user is left to their own devices \eg "\glsdesc"\marg{abbreviation}, "\Glsdesc"\marg{abbreviation}. +\DescribeMacro{\sentence} +The "\sentence" macro ensures that the directly following abbreviation is capitalised. + \DescribeMacro{\shortacronym} \DescribeMacro{\longacronym} @@ -145,7 +149,8 @@ In the case that the glossary should be printed additional packages must be load % % Load the base package \cite{glossaries, glossaries-extra} and set the abbreviation style. % \begin{macrocode} -\RequirePackage[nostyles]{glossaries-extra} +\PassOptionsToPackage{nostyles}{glossaries-extra} +\RequirePackage{glossaries-extra} \setabbreviationstyle{long-hyphen-short-hyphen} % \end{macrocode} % Use the entry count feature. @@ -177,16 +182,26 @@ In the case that the glossary should be printed additional packages must be load \glsdohypertarget{#1}{#2}% }% }} - }{\providecommand{\pdfstringdefDisableCommands}[1]{}} + }{} +} +% \end{macrocode} +% Provide for the case that hyperref is not loaded. +% \begin{macrocode} +\newcommand{\hep@disable}[1]{% + \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{#1}}{}% } % \end{macrocode} % % \begin{macro}{\begin@sentence} % Mark the beginning of a paragraph as if it would follow a full stop using the \software{everyhook} package \cite{everyhook}. % \begin{macrocode} -\RequirePackage[excludeor]{everyhook} +\PassOptionsToPackage{excludeor}{everyhook} +\RequirePackage{everyhook} \newcommand{\begin@sentence}{1001} -\PushPostHook{par}{{\spacefactor=\begin@sentence}} +\newcommand{\sentence}{\spacefactor=\begin@sentence} +\hep@disable{\renewcommand\sentence{}} +\PushPostHook{par}{{\sentence}} +\gdef\ttl@case{\leavevmode\sentence} % \end{macrocode} % \end{macro} % @@ -268,7 +283,7 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the singular acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% + \hep@disable{\expandafter\def\csname#3\endcsname{% \IfNoValueTF{#2}{#3}{#2} }% } % \end{macrocode} @@ -287,7 +302,7 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the plural acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% } % \end{macrocode} @@ -296,6 +311,35 @@ In the case that the glossary should be printed additional packages must be load \expandafter\mathdef\csname#3s\endcsname{% \text{\glsxtrshortpl{#3}}\@gls@increment@currcount{#3}% } +% \end{macrocode} +% Provide an enforced long form. +% \begin{macrocode} + \expandafter\newcommand\csname#3long\endcsname[1][]{% + \if@begin@of@sentence{\Glsdesc*{#3}[##1]}{\glsdesc*{#3}[##1]}% + \IfBooleanTF{#4}{}{\@\xspace}% + } +% \end{macrocode} +% Ensure that it works in \PDFs. +% \begin{macrocode} + \hep@disable{\expandafter\def\csname#3long\endcsname{#5 }} +% \end{macrocode} +% Provide an enforced long plural form. +% \begin{macrocode} + \expandafter\newcommand\csname#3slong\endcsname[1][]{% + \if@begin@of@sentence{% + \Glsxtrlongpl*{#3}[##1]}{\glsxtrlongpl*{#3}[##1]% + }% + \IfBooleanTF{#4}{}{\@\xspace}% + } +% \end{macrocode} +% Ensure that it works in \PDFs. +% \begin{macrocode} + \hep@disable{\expandafter\def\csname#3slong\endcsname{% + \IfNoValueTF{#6}{#5s}{#6} }% + } +% \end{macrocode} +% End of "\acronym". +% \begin{macrocode} } % \end{macrocode} % \end{macro} @@ -313,7 +357,7 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the singular acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% + \hep@disable{\expandafter\def\csname#3\endcsname{% \IfNoValueTF{#2}{#3}{#2} }% } % \end{macrocode} @@ -332,7 +376,7 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the plural acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% } % \end{macrocode} @@ -341,6 +385,14 @@ In the case that the glossary should be printed additional packages must be load \expandafter\mathdef\csname#3s\endcsname{% \text{\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}}% }% +% \end{macrocode} +% Ensure that long form also exists. +% \begin{macrocode} + \expandafter\let\csname#3long\expandafter\endcsname\csname#3\endcsname + \expandafter\let\csname#3slong\expandafter\endcsname\csname#3s\endcsname +% \end{macrocode} +% End of "\shoracronym". +% \begin{macrocode} } % \end{macrocode} % \end{macro} @@ -351,7 +403,7 @@ In the case that the glossary should be printed additional packages must be load \NewDocumentCommand{\longacronym}{somsmo}{ % \end{macrocode} % Provide the singular acronym macro. -% \begin{macrocode}acronyms +% \begin{macrocode} \expandafter\newcommand\csname#3\endcsname[1][]{% \if@begin@of@sentence{\MakeUppercase#5}{#5}% \IfBooleanTF{#4}{}{\@\xspace}##1% @@ -359,7 +411,7 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the singular acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }} + \hep@disable{\expandafter\def\csname#3\endcsname{#5 }} % \end{macrocode} % Provide the plural acronym macro. % \begin{macrocode} @@ -372,9 +424,17 @@ In the case that the glossary should be printed additional packages must be load % \end{macrocode} % Expand the plural acronym macro in \PDF labels. % \begin{macrocode} - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfNoValueTF{#6}{#5s}{#6} }% } +% \end{macrocode} +% Ensure that long form also exists. +% \begin{macrocode} + \expandafter\let\csname#3long\expandafter\endcsname\csname#3\endcsname + \expandafter\let\csname#3slong\expandafter\endcsname\csname#3s\endcsname +% \end{macrocode} +% End of "\longacronym". +% \begin{macrocode} } % \end{macrocode} % \end{macro} @@ -463,9 +523,9 @@ In the case that the glossary should be printed additional packages must be load % \begin{macrocode} \documentclass{article} -% \usepackage{hep-paper} \usepackage{hyperref} \usepackage{hep-acronym} +\usepackage{titlesec} \acronym{PDF}{portable document format} \acronym{URL}{uniform resource locator} @@ -482,7 +542,9 @@ $\URL$ \emph{(Second appearance is forced to be always short)} \LM \emph{(Second appearance is shorted)}. $\CM$ \emph{(Enforce short form)} \CM \emph{(then extend second appearance)} -\glsdesc*{CM} \emph{(enforce long form)} +\URLlong \emph{(enforce long form)} + +\section{\PDFlong table of contents is not broken} \end{document} % \end{macrocode} diff --git a/Master/texmf-dist/tex/latex/hep-acronym/hep-acronym.sty b/Master/texmf-dist/tex/latex/hep-acronym/hep-acronym.sty index 1cb970be785..aea9164920f 100644 --- a/Master/texmf-dist/tex/latex/hep-acronym/hep-acronym.sty +++ b/Master/texmf-dist/tex/latex/hep-acronym/hep-acronym.sty @@ -15,9 +15,10 @@ %% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{hep-acronym}[2021/08/01 v1.0 Acronyms using glossaries] +\ProvidesPackage{hep-acronym}[2022/11/01 v1.1 Acronyms using glossaries] -\RequirePackage[nostyles]{glossaries-extra} +\PassOptionsToPackage{nostyles}{glossaries-extra} +\RequirePackage{glossaries-extra} \setabbreviationstyle{long-hyphen-short-hyphen} \glsenableentrycount \glssetcategoryattribute{abbreviation}{entrycount}{1} @@ -40,11 +41,18 @@ \glsdohypertarget{#1}{#2}% }% }} - }{\providecommand{\pdfstringdefDisableCommands}[1]{}} + }{} } -\RequirePackage[excludeor]{everyhook} +\newcommand{\hep@disable}[1]{% + \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{#1}}{}% +} +\PassOptionsToPackage{excludeor}{everyhook} +\RequirePackage{everyhook} \newcommand{\begin@sentence}{1001} -\PushPostHook{par}{{\spacefactor=\begin@sentence}} +\newcommand{\sentence}{\spacefactor=\begin@sentence} +\hep@disable{\renewcommand\sentence{}} +\PushPostHook{par}{{\sentence}} +\gdef\ttl@case{\leavevmode\sentence} \def\frenchspacing{% \sfcode`\.\begin@sentence \sfcode`\?\begin@sentence \sfcode`\!\begin@sentence \sfcode`\:\begin@sentence @@ -88,7 +96,7 @@ \IfBooleanTF{#4}{}{\@\xspace}% \else\@\xspace\fi } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% + \hep@disable{\expandafter\def\csname#3\endcsname{% \IfNoValueTF{#2}{#3}{#2} }% } \expandafter\mathdef\csname#3\endcsname{% @@ -98,18 +106,32 @@ \if@begin@of@sentence{\cGlspl{#3}[##1]}{\cglspl{#3}[##1]}% \IfBooleanTF{#4}{}{\@\xspace}% } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% } \expandafter\mathdef\csname#3s\endcsname{% \text{\glsxtrshortpl{#3}}\@gls@increment@currcount{#3}% } + \expandafter\newcommand\csname#3long\endcsname[1][]{% + \if@begin@of@sentence{\Glsdesc*{#3}[##1]}{\glsdesc*{#3}[##1]}% + \IfBooleanTF{#4}{}{\@\xspace}% + } + \hep@disable{\expandafter\def\csname#3long\endcsname{#5 }} + \expandafter\newcommand\csname#3slong\endcsname[1][]{% + \if@begin@of@sentence{% + \Glsxtrlongpl*{#3}[##1]}{\glsxtrlongpl*{#3}[##1]% + }% + \IfBooleanTF{#4}{}{\@\xspace}% + } + \hep@disable{\expandafter\def\csname#3slong\endcsname{% + \IfNoValueTF{#6}{#5s}{#6} }% + } } \NewDocumentCommand{\shortacronym}{somsmo}{ \expandafter\newcommand\csname#3\endcsname[1][]{% \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}##1% } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% + \hep@disable{\expandafter\def\csname#3\endcsname{% \IfNoValueTF{#2}{#3}{#2} }% } \expandafter\mathdef\csname#3\endcsname{% @@ -119,28 +141,32 @@ \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}% \IfBooleanTF{#4}{}{\@\xspace}##1% } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% } \expandafter\mathdef\csname#3s\endcsname{% \text{\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}}% }% + \expandafter\let\csname#3long\expandafter\endcsname\csname#3\endcsname + \expandafter\let\csname#3slong\expandafter\endcsname\csname#3s\endcsname } \NewDocumentCommand{\longacronym}{somsmo}{ \expandafter\newcommand\csname#3\endcsname[1][]{% \if@begin@of@sentence{\MakeUppercase#5}{#5}% \IfBooleanTF{#4}{}{\@\xspace}##1% } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }} + \hep@disable{\expandafter\def\csname#3\endcsname{#5 }} \expandafter\newcommand\csname#3s\endcsname[1][]{% \if@begin@of@sentence{% \IfNoValueTF{#6}{\MakeUppercase#5s}{\MakeUppercase#6}% }{% \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}##1% } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% + \hep@disable{\expandafter\def\csname#3s\endcsname{% \IfNoValueTF{#6}{#5s}{#6} }% } + \expandafter\let\csname#3long\expandafter\endcsname\csname#3\endcsname + \expandafter\let\csname#3slong\expandafter\endcsname\csname#3s\endcsname } \renewcommand*{\@gls@write@entrycounts}{% \immediate\write\@auxout{% |