diff options
author | Karl Berry <karl@freefriends.org> | 2014-09-02 22:45:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-09-02 22:45:52 +0000 |
commit | 681bba2f19e49a82af83d8db5ca7b2ca9b1c38c1 (patch) | |
tree | e555f1749d48be4428e80ad707fc5e22c1d1e5ba /Master/texmf-dist/tex/latex/glossaries | |
parent | 5948707e26c041128969126837b023209fd7a6ac (diff) |
glossaries (2sep14)
git-svn-id: svn://tug.org/texlive/trunk@35094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries')
-rw-r--r-- | Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index 0a4e5b840a5..e4d3b618e06 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}[2014/08/27 v4.10 (NLCT)] +\ProvidesPackage{glossaries}[2014/09/01 v4.11 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -58,30 +58,6 @@ \@ifclassloaded{nlctdoc}{\@gls@docloadedtrue}{\@gls@docloadedfalse}% } \if@gls@docloaded - \newcommand{\glsorg@glossary}{% - \@bsphack - \begingroup - \@sanitize \endgroup\@esphack - } - \newcommand{\glsorg@wrglossary}[1]{% - \protected@write\@glossaryfile{}{% - \string \glossaryentry{#1}{\thepage}}% - \endgroup - \@esphack - } - \renewcommand*{\RecordChanges}{% - \newwrite\@glossaryfile - \immediate\openout\@glossaryfile=\jobname.glo - \def\glsorg@glossary{\@bsphack\begingroup\@sanitize\glsorg@wrglossary}% - \typeout{Writing glossary file \jobname .glo}% - } - \let\glsorg@changes\changes - \renewcommand{\changes}[3]{% - \begingroup - \let\glossary\glsorg@glossary - \glsorg@changes{#1}{#2}{#3}% - \endgroup - } \let\glsorg@theglossary\theglossary \let\glsorg@endtheglossary\endtheglossary \let\glsorg@PrintChanges\PrintChanges @@ -528,11 +504,15 @@ false,nolabel,autolabel,nameref}[nolabel]{% \GlossariesWarning{sanitize={sort} package option deprecated. Use sanitizesort instead}% } -\define@key{glossaries.sty}{sanitize}[description=true,symbol=true, -name=true]{% +\define@key{glossaries.sty}{sanitize}[description=true,symbol=true,name=true]{% \ifthenelse{\equal{#1}{none}}% {% \GlossariesWarning{sanitize package option deprecated}% + \glssetexpandfield{name}% + \glssetexpandfield{symbol}% + \glssetexpandfield{symbolplural}% + \glssetexpandfield{desc}% + \glssetexpandfield{descplural}% }% {% \setkeys[gls]{sanitize}{#1}% @@ -4078,6 +4058,7 @@ name=true]{% } \edef\glsopenbrace{\expandafter\@gobble\string\{} \edef\glsclosebrace{\expandafter\@gobble\string\}} +\edef\glsbackslash{\expandafter\@gobble\string\\} \edef\glsquote#1{\string"#1\string"} \edef\glspercentchar{\expandafter\@gobble\string\%} \edef\glstildechar{\string~} @@ -4623,15 +4604,19 @@ you \fi }% } +\if@gls@docloaded +\else + \renewcommand*{\glossary}[1][main]{\gls@glossary{#1}} +\fi \newcommand*{\gls@glossary}[1]{% \@gls@glossary{#1}% } \newcommand*{\@gls@glossary}[1]{\index} \newcommand{\@gls@renewglossary}{% - \gdef\@gls@glossary##1{\@bsphack\begingroup\@wrglossary{##1}}% + \gdef\@gls@glossary##1{\@bsphack\begingroup\gls@wrglossary{##1}}% \let\@gls@renewglossary\@empty } -\renewcommand*{\@wrglossary}[2]{% +\newcommand*{\gls@wrglossary}[2]{% \ifglssavewrites \protected@edef\@gls@tmp{\the\csname glo@#1@filetok\endcsname#2}% \expandafter\global\expandafter\csname glo@#1@filetok\endcsname @@ -4672,6 +4657,23 @@ you \newcommand*{\gls@numberpage}{\number\c@page} \newcommand*{\gls@romanpage}{\romannumeral\c@page} \newcommand*{\gls@Romanpage}{\@Roman\c@page} +\newcommand*{\glsaddprotectedpagefmt}[1]{% + \eappto\gls@protected@pagefmts{,\expandonce{\csname gls#1page\endcsname}}% + \csedef{gls#1page}{\expandonce{\csname#1\endcsname}\noexpand\c@page}% + \eappto\@wrglossarynumberhook{% + \noexpand\let\expandonce{\csname org@gls#1\endcsname}% + \expandonce{\csname#1\endcsname}% + \noexpand\def\expandonce{\csname#1\endcsname}{% + \noexpand\@wrglossary@pageformat + \expandonce{\csname gls#1page\endcsname}% + \expandonce{\csname org@gls#1\endcsname}% + }% + }% +} +\newcommand*\@wrglossarynumberhook{} +\newcommand{\@wrglossary@pageformat}[3]{% + \ifx#3\c@page #1\else #2#3\fi +} \newcommand*{\@@do@wrglossary}[1]{% \begingroup \let\orgthe\the @@ -4692,6 +4694,7 @@ you \ifx##1\c@page \gls@alphpage\else\orgalph##1\fi}% \def\@Alph##1{% \ifx##1\c@page \gls@Alphpage\else\orgAlph##1\fi}% + \@wrglossarynumberhook \gls@disablepagerefexpansion \protected@xdef\@glslocref{\theglsentrycounter}% \endgroup |