diff options
author | Karl Berry <karl@freefriends.org> | 2013-07-11 23:28:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-07-11 23:28:20 +0000 |
commit | b625e30b874afe21d62a6a3704e04923abfc6f17 (patch) | |
tree | 9fc22581657b7960110ec5a7988f2fcb2cf26d73 /Master/texmf-dist/tex/latex/glossaries | |
parent | b0c1f2170d2a8b9c940d94e002098245a566b6b0 (diff) |
glossaries
git-svn-id: svn://tug.org/texlive/trunk@31171 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 | 57 |
1 files changed, 49 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index ae21a5218d7..dc53b167230 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}[2013/06/17 v3.06 (NLCT)] +\ProvidesPackage{glossaries}[2013/07/05 v3.07 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} @@ -142,7 +142,9 @@ false,nolabel,autolabel}[nolabel]{% \renewcommand*{\@gls@loadtree}{}% \let\@glossary@default@style\relax } -\newcommand*{\glspostdescription}{\ifglsnopostdot\else.\fi} +\newcommand*{\glspostdescription}{% + \ifglsnopostdot\else.\spacefactor\sfcode`\. \fi +} \define@boolkey{glossaries.sty}[gls]{nopostdot}[true]{} \glsnopostdotfalse \define@boolkey{glossaries.sty}[gls]{nogroupskip}[true]{} @@ -580,7 +582,18 @@ name=true]{% } \newcommand{\delimN}{, } \newcommand{\delimR}{--} -\newcommand*{\glossarypreamble}{} +\newcommand*{\glossarypreamble}{% + \csuse{@glossarypreamble@\currentglossary}% +} +\newcommand{\setglossarypreamble}[2][\glsdefaulttype]{% + \ifglossaryexists{#1}{% + \csgdef{@glossarypreamble@#1}{#2}% + }{% + \PackageWarning{glossaries}{% + Glossary `#1' is not defined% + }% + }% +} \newcommand*{\glossarypostamble}{} \newcommand*{\glossarysection}[2][\@gls@title]{% \def\@gls@title{#2}% @@ -650,7 +663,23 @@ name=true]{% \newcommand*{\gls@doclearpage}{% \ifthenelse{\equal{\@@glossarysec}{chapter}}% {% - \ifcsundef{cleardoublepage}{\clearpage}{\cleardoublepage}% + \ifcsundef{cleardoublepage}% + {% + \clearpage + }% + {% + \ifcsdef{if@openright}% + {% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + }% + {% + \cleardoublepage + }% + }% }% {}% } @@ -1495,8 +1524,9 @@ name=true]{% \def\glslabel{#2}% \def\@glsnumberformat{glsnumberformat}% \edef\@gls@counter{\csname glo@#2@counter\endcsname}% - \expandafter\xifinlist\expandafter - {\csname glo@#2@type\endcsname}{\@gls@nohyperlist}% + \edef\gls@type{\csname glo@#2@type\endcsname}% + \expandafter\DTLifinlist\expandafter + {\gls@type}{\@gls@nohyperlist}% {% \KV@glslink@hyperfalse }% @@ -4212,7 +4242,7 @@ false,nolabel,autolabel}[nolabel]{% }% \newcommand*{\SetDescriptionAcronymDisplayStyle}[1]{% \defglsdisplayfirst[#1]{% - ##1##4 (\firstacronymfont{##3})}% + ##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}}% \defglsdisplay[#1]{\acronymfont{##1}##4}% } \newcommand*{\DescriptionNewAcronymDef}{% @@ -4325,8 +4355,19 @@ false,nolabel,autolabel}[nolabel]{% can't both be set}{}% \fi }% +\DeclareRobustCommand*{\glsdoparenifnotempty}[2]{% + \protected@edef\gls@tmp{#1}% + \ifdefempty\gls@tmp + {}% + {% + \if\gls@tmp\relax + \else + \space (#2{#1})% + \fi + }% +} \newcommand*{\SetSmallAcronymDisplayStyle}[1]{% - \defglsdisplayfirst[#1]{##1##4 (\firstacronymfont{##3})} + \defglsdisplayfirst[#1]{##1##4\glsdoparenifnotempty{##3}{\protect\firstacronymfont}} \defglsdisplay[#1]{\acronymfont{##1}##4}% } \newcommand*{\SmallNewAcronymDef}{% |