diff options
author | Karl Berry <karl@freefriends.org> | 2015-11-23 23:06:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-11-23 23:06:47 +0000 |
commit | 219a6681d9767fea37c5ac397e7a1d58d0367bbb (patch) | |
tree | dcbda55e12ff3617b765fbd284e111b0aa62dd3e /Master/texmf-dist/tex/latex/glossaries | |
parent | 10e6d3f05da678388e44f25765c633b29fe6e170 (diff) |
glossaries (22nov15)
git-svn-id: svn://tug.org/texlive/trunk@38933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries')
16 files changed, 70 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty index 81dcefd8c5d..1adbee65f03 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-babel.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-babel}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries-babel}[2015/11/22 v4.19 (NLCT)] \RequirePackage{tracklang} \let\glsifusetranslator\@secondoftwo \AnyTrackedLanguages diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty index 807a71c5150..3b580195b08 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-207.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-207}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries-compatible-207}[2015/11/22 v4.19 (NLCT)] \ifglsxindy \renewcommand*\GlsAddXdyAttribute[1]{% \edef\@xdyattributes{\@xdyattributes ^^J \string"#1\string"}% diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-307.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-307.sty index fdf789710aa..9d9dcfc52a1 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-307.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-compatible-307.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-compatible-307}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries-compatible-307}[2015/11/22 v4.19 (NLCT)] \newcommand{\compatglossarystyle}[2]{% \ifcsundef{@glscompstyle@#1}% {% diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty index f7b78d43e4c..8b879b0a832 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-polyglossia.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-polyglossia}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries-polyglossia}[2015/11/22 v4.19 (NLCT)] \RequirePackage{tracklang} \let\glsifusetranslator\@secondoftwo \AnyTrackedLanguages 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 68adce62e8c..0622affabed 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries-prefix.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-prefix}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries-prefix}[2015/11/22 v4.19 (NLCT)] \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}} \ProcessOptions \RequirePackage{glossaries} diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 0ee779c837d..3cf9b5fac70 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossaries}[2015/11/22 v4.19 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -1403,6 +1403,22 @@ false,nolabel,autolabel,nameref}[nolabel]{% has not been defined}% }% } +\newcommand{\glsdoifexistsordo}[3]{% + \ifglsentryexists{#1}{#2}{% + \PackageError{glossaries}{Glossary entry `\glsdetoklabel{#1}' + has not been defined}{You need to define a glossary entry before you + can use it.}% + #3% + }% +} +\newcommand{\doifglossarynoexistsordo}[3]{% + \ifglossaryexists{#1}% + {% + \PackageError{glossaries}{Glossary type `#1' already exists}{}% + #3% + }% + {#2}% +} \newcommand{\ifglshaschildren}[3]{% \glsdoifexists{#1}% {% @@ -1525,17 +1541,14 @@ false,nolabel,autolabel,nameref}[nolabel]{% {% }% } +\newcommand*{\gls@gobbleopt}{\new@ifnextchar[{\@gls@gobbleopt}{}} +\def\@gls@gobbleopt[#1]{} \newcommand*{\newglossary}{\@ifstar\s@newglossary\ns@newglossary} \newcommand*{\s@newglossary}[2]{% \ns@newglossary[#1-glg]{#1}{#1-gls}{#1-glo}{#2}% } \newcommand*{\ns@newglossary}[5][glg]{% - \ifglossaryexists{#2}% - {% - \PackageError{glossaries}{Glossary type `#2' already exists}{% - You can't define a new glossary called `#2' because it already - exists}% - }% + \doifglossarynoexistsordo{#2}% {% \ifundef\glsdefaulttype {% @@ -1559,7 +1572,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% {}% \@gls@defsortcount{#2}% \@ifnextchar[{\@gls@setcounter{#2}}% - {\@gls@setcounter{#2}[\glscounter]}}% + {\@gls@setcounter{#2}[\glscounter]}% + }% + {% + \gls@gobbleopt + }% } \newcommand*{\altnewglossary}[3]{% \newglossary[#2-glg]{#1}{#2-gls}{#2-glo}{#3}% @@ -3048,14 +3065,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% \@gls@hyp@opt\@gls@@link } \newcommand*{\@gls@@link}[3][]{% - \ifglsentryexists{#2}% + \glsdoifexistsordo{#2}% {% \let\do@gls@link@checkfirsthyper\relax \@gls@link[#1]{#2}{#3}% }{% - \PackageError{glossaries}{Glossary entry `#2' has not been - defined}{You need to define a glossary entry before you - can use it.}% \glstextformat{#3}% }% \glspostlinkhook @@ -3082,6 +3096,10 @@ false,nolabel,autolabel,nameref}[nolabel]{% \newcommand*{\glslinkcheckfirsthyperhook}{} \newcommand*{\glslinkpostsetkeys}{} \newcommand{\glsifhyperon}[2]{\ifKV@glslink@hyper#1\else#2\fi} +\newcommand*{\do@glsdisablehyperinlist}{% + \expandafter\DTLifinlist\expandafter{\glstype}{\@gls@nohyperlist}% + {\KV@glslink@hyperfalse}{}% +} \def\@gls@link[#1]#2#3{% \leavevmode \edef\glslabel{\glsdetoklabel{#2}}% @@ -3091,13 +3109,7 @@ false,nolabel,autolabel,nameref}[nolabel]{% \edef\@gls@counter{\csname glo@\glslabel @counter\endcsname}% \edef\glstype{\csname glo@\glslabel @type\endcsname}% \let\org@ifKV@glslink@hyper\ifKV@glslink@hyper - \expandafter\DTLifinlist\expandafter - {\glstype}{\@gls@nohyperlist}% - {% - \KV@glslink@hyperfalse - }% - {% - }% + \do@glsdisablehyperinlist \do@gls@link@checkfirsthyper \setkeys{glslink}{#1}% \glslinkpostsetkeys @@ -3667,10 +3679,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% }% \glspostlinkhook } +\newcommand*{\@gls@link@nocheckfirsthyper}{} \newcommand{\@gls@field@link}[3]{% \glsdoifexists{#2}% {% - \let\do@gls@link@checkfirsthyper\relax + \let\do@gls@link@checkfirsthyper\@gls@link@nocheckfirsthyper \@gls@link[#1]{#2}{#3}% }% \glspostlinkhook @@ -4179,16 +4192,21 @@ false,nolabel,autolabel,nameref}[nolabel]{% \letcs{#1}{glo@\glsdetoklabel{#2}@#3}% } \newcommand*{\@Gls@entry@field}[2]{% - \letcs\@glo@text{glo@\glsdetoklabel{#1}@#2}% - \ifdef\@glo@text + \glsdoifexistsordo{#1}% {% - \xmakefirstuc{\@glo@text}% + \letcs\@glo@text{glo@\glsdetoklabel{#1}@#2}% + \ifdef\@glo@text + {% + \xmakefirstuc{\@glo@text}% + }% + {% + ??\PackageError{glossaries}{The field `#2' doesn't exist for glossary + entry `\glsdetoklabel{#1}'}{Check you have correctly spelt the entry + label and the field name}% + }% }% {% - \PackageError{glossaries}{Either glossary entry - `\glsdetoklabel{#1}' doesn't exist or the field `#2' - doesn't exist}{Check you have correctly spelt the entry - label and the field name}% + ??% }% } \newcommand*{\glsentryname}[1]{\@gls@entry@field{#1}{name}} @@ -4838,15 +4856,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% \glsnoidxloclist{\@gls@loclist}% }% {% - \ifglsentryexists{##1}% + ??\glsdoifexists{##1}% {% \GlossariesWarning{Missing location list for `##1'. Either a rerun is required or you haven't referenced the entry.}% }% - {% - \PackageError{glossaries}{Glossary entry `##1' has not been - defined.}{}% - }% }% }% \renewcommand*{\glsdisplaynumberlist}[1]{% @@ -4868,15 +4882,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% \@gls@noidxloclist@prev }% {% - ??\ifglsentryexists{##1}% + ??\glsdoifexists{##1}% {% \GlossariesWarning{Missing location list for `##1'. Either a rerun is required or you haven't referenced the entry.}% }% - {% - \PackageError{glossaries}{Glossary entry `##1' has not been - defined.}{}% - }% }% }% \renewcommand*{\glsnumberlistloop}[3]{% @@ -4890,15 +4900,11 @@ false,nolabel,autolabel,nameref}[nolabel]{% \forlistloop{\glsnoidxnumberlistloophandler}{\@gls@loclist}% }% {% - \ifglsentryexists{##1}% + ??\glsdoifexists{##1}% {% \GlossariesWarning{Missing location list for `##1'. Either a rerun is required or you haven't referenced the entry.}% }% - {% - \PackageError{glossaries}{Glossary entry `##1' has not been - defined.}{}% - }% }% \let\glsnoidxdisplayloc\@gls@org@glsnoidxdisplayloc \let\glsseeformat\@gls@org@glsseeformat @@ -5212,6 +5218,7 @@ you \forallglossaries{\@@glo@type}{\printnoidxglossary[type=\@@glo@type]}% } \newcommand*{\@printgloss@setsort}{} +\newcommand*{\@gls@preglossaryhook}{} \newcommand{\@printglossary}[2]{% \def\@glo@type{\glsdefaulttype}% \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% @@ -5245,6 +5252,7 @@ you \xdef\glscurrententrylabel{\glsdetoklabel{##2}}% \gls@org@glossarysubentryfield{##1}{##2}% }% + \@gls@preglossaryhook #2% \egroup \global\let\glossaryentrynumbers\@org@glossaryentrynumbers diff --git a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty index f6223e43dcd..2a5cd8f5577 100644 --- a/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty +++ b/Master/texmf-dist/tex/latex/glossaries/expl/glossaries-accsupp.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-accsupp}[2015/09/09 v4.18 (NLCT) +\ProvidesPackage{glossaries-accsupp}[2015/11/22 v4.19 (NLCT) Experimental glossaries accessibility] \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}} \ProcessOptions diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty index 18cbfd752eb..f49de6deaba 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-hypernav}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-hypernav}[2015/11/22 v4.19 (NLCT)] \newcommand*{\glsnavhyperlink}[3][\@glo@type]{% \edef\gls@grplabel{#2}\protected@edef\@gls@grptitle{#3}% \@glslink{glsn:#1@#2}{#3}} diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-inline.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-inline.sty index 622d3c38e9b..9a6f6e9ae85 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-inline.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-inline.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-inline}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-inline}[2015/11/22 v4.19 (NLCT)] \newglossarystyle{inline}{% \renewenvironment{theglossary}% {% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty index d423725eb92..7d70e1a0844 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-list.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-list}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-list}[2015/11/22 v4.19 (NLCT)] \providecommand{\indexspace}{% \par \vskip 10\p@ \@plus 5\p@ \@minus 3\p@ \relax } diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty index 9f11b71e0eb..392753f826a 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-long}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-long}[2015/11/22 v4.19 (NLCT)] \RequirePackage{longtable} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty index ac9b52b91ea..465a496f775 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-longragged.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-longragged}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-longragged}[2015/11/22 v4.19 (NLCT)] \RequirePackage{array} \RequirePackage{longtable} \@ifundefined{glsdescwidth}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-mcols.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-mcols.sty index f1942f3c516..3f0ca12f8a6 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-mcols.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-mcols.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-mcols}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-mcols}[2015/11/22 v4.19 (NLCT)] \RequirePackage{multicol} \RequirePackage{glossary-tree} \providecommand{\indexspace}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty index dc94f591000..d59a157cbbc 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-super}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-super}[2015/11/22 v4.19 (NLCT)] \RequirePackage{supertabular} \@ifundefined{glsdescwidth}{% \newlength\glsdescwidth diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty index 3426e7437e5..aca4b7c81c2 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-superragged.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-superragged}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-superragged}[2015/11/22 v4.19 (NLCT)] \RequirePackage{array} \RequirePackage{supertabular} \@ifundefined{glsdescwidth}{% diff --git a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty index d91b4818e07..6fc18752afc 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-tree.sty @@ -38,7 +38,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesPackage{glossary-tree}[2015/09/09 v4.18 (NLCT)] +\ProvidesPackage{glossary-tree}[2015/11/22 v4.19 (NLCT)] \providecommand{\indexspace}{% \par \vskip 10\p@ \@plus 5\p@ \@minus 3\p@ \relax } @@ -171,6 +171,9 @@ #2}% } \newcommand*{\@glswidestname}{} +\newcommand*{\glstreenamebox}[2]{% + \makebox[#1][l]{#2}% +} \newglossarystyle{alttree}{% \renewenvironment{theglossary}% {\def\@gls@prevlevel{-1}% @@ -185,7 +188,7 @@ \fi \hangindent\glstreeindent \parindent\glstreeindent - \makebox[0pt][r]{\makebox[\glstreeindent][l]{% + \makebox[0pt][r]{\glstreenamebox{\glstreeindent}{% \glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{\glossentryname{##1}}}}}% \ifglshassymbol{##1}{(\glossentrysymbol{##1})\space}{}% \glossentrydesc{##1}\glspostdescription \space ##2\par @@ -217,7 +220,7 @@ \fi \fi \hangindent\glstreeindent - \makebox[0pt][r]{\makebox[\gls@tmplen][l]{% + \makebox[0pt][r]{\glstreenamebox{\gls@tmplen}{% \glstreenamefmt{\glstarget{##2}{\glossentryname{##2}}}}}% \ifglshassymbol{##2}{(\glossentrysymbol{##2})\space}{}% \glossentrydesc{##2}\glspostdescription\space ##3\par |