summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty')
-rw-r--r--Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty55
1 files changed, 33 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty
index ee25f03bc4a..dbac71c219e 100644
--- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty
+++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty
@@ -7,7 +7,7 @@
%% glossaries.dtx (with options: `glossaries-prefix.sty,package')
%%
%% glossaries.dtx
-%% Copyright 2019 Nicola Talbot
+%% Copyright 2020 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossaries-prefix}[2019/12/06 v4.44 (NLCT)]
+\ProvidesPackage{glossaries-prefix}[2020/02/13 v4.45 (NLCT)]
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}}
\ProcessOptions
\RequirePackage{glossaries}
@@ -69,43 +69,44 @@
{\csname glo@\@glo@label @prefixplural\endcsname}{\@glo@label}%
{prefixfirstplural}{\@glo@entryprefixfirstplural}%
}
-\newcommand*{\glsentryprefixfirst}[1]{\csuse{glo@#1@prefixfirst}}
-\newcommand*{\glsentryprefixfirstplural}[1]{\csuse{glo@#1@prefixfirstplural}}
-\newcommand*{\glsentryprefix}[1]{\csuse{glo@#1@prefix}}
-\newcommand*{\glsentryprefixplural}[1]{\csuse{glo@#1@prefixplural}}
+\newcommand*{\glsentryprefixfirst}[1]{\csuse{glo@\glsdetoklabel{#1}@prefixfirst}}
+\newcommand*{\glsentryprefixfirstplural}[1]{%
+ \csuse{glo@\glsdetoklabel{#1}@prefixfirstplural}}
+\newcommand*{\glsentryprefix}[1]{\csuse{glo@\glsdetoklabel{#1}@prefix}}
+\newcommand*{\glsentryprefixplural}[1]{\csuse{glo@\glsdetoklabel{#1}@prefixplural}}
\newrobustcmd*{\Glsentryprefixfirst}[1]{%
- \protected@edef\@glo@text{\csname glo@#1@prefixfirst\endcsname}%
+ \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixfirst\endcsname}%
\xmakefirstuc\@glo@text
}
\newrobustcmd*{\Glsentryprefixfirstplural}[1]{%
- \protected@edef\@glo@text{\csname glo@#1@prefixfirstplural\endcsname}%
+ \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixfirstplural\endcsname}%
\xmakefirstuc\@glo@text
}
\newrobustcmd*{\Glsentryprefix}[1]{%
- \protected@edef\@glo@text{\csname glo@#1@prefix\endcsname}%
+ \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefix\endcsname}%
\xmakefirstuc\@glo@text
}
\newrobustcmd*{\Glsentryprefixplural}[1]{%
- \protected@edef\@glo@text{\csname glo@#1@prefixplural\endcsname}%
+ \protected@edef\@glo@text{\csname glo@\glsdetoklabel{#1}@prefixplural\endcsname}%
\xmakefirstuc\@glo@text
}
\newcommand*{\ifglshasprefix}[3]{%
- \ifcsempty{glo@#1@prefix}%
+ \ifcsempty{glo@\glsdetoklabel{#1}@prefix}%
{#3}%
{#2}%
}
\newcommand*{\ifglshasprefixplural}[3]{%
- \ifcsempty{glo@#1@prefixplural}%
+ \ifcsempty{glo@\glsdetoklabel{#1}@prefixplural}%
{#3}%
{#2}%
}
\newcommand*{\ifglshasprefixfirst}[3]{%
- \ifcsempty{glo@#1@prefixfirst}%
+ \ifcsempty{glo@\glsdetoklabel{#1}@prefixfirst}%
{#3}%
{#2}%
}
\newcommand*{\ifglshasprefixfirstplural}[3]{%
- \ifcsempty{glo@#1@prefixfirstplural}%
+ \ifcsempty{glo@\glsdetoklabel{#1}@prefixfirstplural}%
{#3}%
{#2}%
}
@@ -114,6 +115,7 @@
{\@glsxtr@record{#1}{#2}{glslink}}%
{}%
}
+\newcommand{\glsprefixsep}{}
\newrobustcmd{\pgls}{\@gls@hyp@opt\@pgls}
\newcommand*{\@pgls}[2][]{%
\new@ifnextchar[%
@@ -126,10 +128,10 @@
{%
\ifglsused{#2}%
{%
- \glsentryprefix{#2}%
+ \ifglshasprefix{#2}{\glsentryprefix{#2}\glsprefixsep}{}%
}%
{%
- \glsentryprefixfirst{#2}%
+ \ifglshasprefixfirst{#2}{\glsentryprefixfirst{#2}\glsprefixsep}{}%
}%
\@gls@{#1}{#2}[#3]%
}%
@@ -146,10 +148,11 @@
{%
\ifglsused{#2}%
{%
- \glsentryprefixplural{#2}%
+ \ifglshasprefixplural{#2}{\glsentryprefixplural{#2}\glsprefixsep}{}%
}%
{%
- \glsentryprefixfirstplural{#2}%
+ \ifglshasprefixfirstplural{#2}%
+ {\glsentryprefixfirstplural{#2}\glsprefixsep}{}%
}%
\@glspl@{#1}{#2}[#3]%
}%
@@ -169,6 +172,7 @@
\ifglshasprefix{#2}%
{%
\Glsentryprefix{#2}%
+ \glsprefixsep
\@gls@{#1}{#2}[#3]%
}%
{\@Gls@{#1}{#2}[#3]}%
@@ -177,6 +181,7 @@
\ifglshasprefixfirst{#2}%
{%
\Glsentryprefixfirst{#2}%
+ \glsprefixsep
\@gls@{#1}{#2}[#3]%
}%
{\@Gls@{#1}{#2}[#3]}%
@@ -198,6 +203,7 @@
\ifglshasprefixplural{#2}%
{%
\Glsentryprefixplural{#2}%
+ \glsprefixsep
\@glspl@{#1}{#2}[#3]%
}%
{\@Glspl@{#1}{#2}[#3]}%
@@ -206,6 +212,7 @@
\ifglshasprefixfirstplural{#2}%
{%
\Glsentryprefixfirstplural{#2}%
+ \glsprefixsep
\@glspl@{#1}{#2}[#3]%
}%
{\@Glspl@{#1}{#2}[#3]}%
@@ -224,10 +231,12 @@
{%
\ifglsused{#2}%
{%
- \mfirstucMakeUppercase{\glsentryprefix{#2}}%
+ \ifglshasprefix{#2}%
+ {\mfirstucMakeUppercase{\glsentryprefix{#2}\glsprefixsep}}{}%
}%
{%
- \mfirstucMakeUppercase{\glsentryprefixfirst{#2}}%
+ \ifglshasprefixfirst{#2}%
+ {\mfirstucMakeUppercase{\glsentryprefixfirst{#2}\glsprefixsep}}{}%
}%
\@GLS@{#1}{#2}[#3]%
}%
@@ -244,10 +253,12 @@
{%
\ifglsused{#2}%
{%
- \mfirstucMakeUppercase{\glsentryprefixplural{#2}}%
+ \ifglshasprefixplural{#2}%
+ {\mfirstucMakeUppercase{\glsentryprefixplural{#2}\glsprefixsep}}{}%
}%
{%
- \mfirstucMakeUppercase{\glsentryprefixfirstplural{#2}}%
+ \ifglshasprefixfirstplural{#2}%
+ {\mfirstucMakeUppercase{\glsentryprefixfirstplural{#2}\glsprefixsep}}{}%
}%
\@GLSpl@{#1}{#2}[#3]%
}%