diff options
author | Karl Berry <karl@freefriends.org> | 2008-09-08 00:29:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-09-08 00:29:03 +0000 |
commit | 4e6ebfdfca3e464341eb91ad375a8f6b4f78d3e9 (patch) | |
tree | 8a26e02304c575b73f62cecdf15179a0ac59fd1f /Master/texmf-dist/tex/latex/glossaries | |
parent | 06ebf7d14fd3c483ed229b86d938732cf3f6a5d2 (diff) |
glossaries update (28aug08)
git-svn-id: svn://tug.org/texlive/trunk@10468 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries')
4 files changed, 145 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty index c30716a7552..0209e843f0c 100644 --- a/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty +++ b/Master/texmf-dist/tex/latex/glossaries/base/glossaries.sty @@ -39,10 +39,11 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries}[2008/06/17 v1.14 (NLCT)] +\ProvidesPackage{glossaries}[2008/08/27 v1.16 (NLCT)] \RequirePackage{ifthen} \RequirePackage{xkeyval}[2006/11/18] \RequirePackage{mfirstuc} +\RequirePackage{xfor} \@ifpackageloaded{babel}{\IfFileExists{translator.sty}{% \RequirePackage{translator}}{}}{} \RequirePackage{amsgen} @@ -140,6 +141,8 @@ name=true]{% \@ifundefined{hyperdef}{}{\hyperdef{section}{\thesection}{}}}}}{} \providecommand*{\glossaryname}{Glossary} \providecommand*{\acronymname}{Acronyms} +\newcommand*{\glssettoctitle}[1]{% +\def\glossarytoctitle{\csname @glotype@#1@title\endcsname}} \providecommand*{\entryname}{Notation} \providecommand*{\descriptionname}{Description} \providecommand*{\symbolname}{Symbol} @@ -149,6 +152,12 @@ name=true]{% \newcommand*{\glspluralsuffix}{s} \ifglstranslate \@ifpackageloaded{translator}{\usedictionary{glossaries-dictionary}% + \renewcommand*{\glssettoctitle}[1]{% + \ifthenelse{\equal{#1}{main}}{% + \translatelet{\glossarytoctitle}{Glossary}}{% + \ifthenelse{\equal{#1}{acronym}}{% + \translatelet{\glossarytoctitle}{Acronyms}}{% + \def\glossarytoctitle{\csname @glotype@#1@title\endcsname}}}}% \renewcommand*{\glossaryname}{\translate{Glossary}}% \renewcommand*{\acronymname}{\translate{Acronyms}}% \renewcommand*{\entryname}{\translate{Notation (glossaries)}}% @@ -309,8 +318,8 @@ counter as its value}}{% \def\@glo@symbolplural{\@glo@symbol}% \def\@glo@text{\@glo@name}% \def\@glo@plural{\@glo@text\glspluralsuffix}% -\def\@glo@first{\relax}% -\def\@glo@firstplural{\relax}% +\let\@glo@first\relax +\let\@glo@firstplural\relax \def\@glo@sort{\@glo@name}% \def\@glo@counter{\@gls@getcounter{\@glo@type}}% \setkeys{glossentry}{#2}% @@ -321,15 +330,15 @@ in it}}{% \protected@edef\@glolist@{\csname glolist@\@glo@type\endcsname}% \expandafter\xdef\csname glolist@\@glo@type\endcsname{\@glolist@{#1},}% }% -\if\relax\@glo@firstplural\relax% - \if\relax\@glo@first\relax% +\ifx\relax\@glo@firstplural + \ifx\relax\@glo@first \def\@glo@firstplural{\@glo@plural}% \def\@glo@first{\@glo@text}% \else \def\@glo@firstplural{\@glo@first\glspluralsuffix}% \fi \else - \if\relax\@glo@first\relax% + \ifx\relax\@glo@first \def\@glo@first{\@glo@text}% \fi \fi @@ -341,10 +350,18 @@ in it}}{% \expandafter\protected@xdef\csname glo@#1@counter\endcsname{\@glo@counter}% \@gls@sanitizename \expandafter\protected@xdef\csname glo@#1@name\endcsname{\@glo@name}% +\def\@glo@@desc{\@glo@first}% +\ifx\@glo@desc\@glo@@desc + \let\@glo@desc\@glo@first +\fi \@gls@sanitizedesc \expandafter\protected@xdef\csname glo@#1@desc\endcsname{\@glo@desc}% \expandafter\protected@xdef\csname glo@#1@descplural\endcsname{\@glo@descplural}% \expandafter\protected@xdef\csname glo@#1@sort\endcsname{\@glo@sort}% +\def\@glo@@symbol{\@glo@text}% +\ifx\@glo@symbol\@glo@@symbol + \let\@glo@symbol\@glo@text +\fi \@gls@sanitizesymbol \expandafter\protected@xdef\csname glo@#1@symbol\endcsname{\@glo@symbol}% \expandafter\protected@xdef\csname glo@#1@symbolplural\endcsname{\@glo@symbolplural}% @@ -405,6 +422,7 @@ counter as its value}}{% \newcommand*{\@sgls@link}[1][]{\@gls@link[hyper=false,#1]} \newcommand*{\@gls@link}[3][]{% \glsdoifexists{#2}{% +\def\glslabel{#2}% \def\@glsnumberformat{glsnumberformat}% \edef\@gls@counter{\csname glo@#2@counter\endcsname}% \KV@glslink@hypertrue @@ -665,16 +683,22 @@ counter as its value}}{% }{% \gdef\@glslink#1#2{\hyperlink{#1}{#2}}% } +\newlength\gls@tmplen \@ifundefined{hypertarget}{% \gdef\@glstarget#1#2{#2}% }{% - \gdef\@glstarget#1#2{\hypertarget{#1}{#2}}} + \gdef\@glstarget#1#2{% + \settoheight{\gls@tmplen}{#2}% + \raisebox{\gls@tmplen}{\hypertarget{#1}{}}#2}% +} \newcommand{\glsdisablehyper}{% \renewcommand*\@glslink[2]{##2}% \renewcommand*\@glstarget[2]{##2}} \newcommand{\glsenablehyper}{% \renewcommand*\@glslink[2]{\hyperlink{##1}{##2}}% -\renewcommand*\@glstarget[2]{\hypertarget{##1}{##2}}} +\renewcommand*\@glstarget[2]{% + \settoheight{\gls@tmplen}{##2}% + \raisebox{\gls@tmplen}{\hypertarget{##1}{}}##2}} \newcommand*{\gls}{\@ifstar\@sgls\@gls} \newcommand*{\@sgls}[1][]{\@gls[hyper=false,#1]} \newcommand*{\@gls}[2][]{% @@ -692,11 +716,12 @@ counter as its value}}{% \ifglsused{#2}{% \@gls@link[#1]{#2}{\@glo@text}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - \else + }{% \@gls@link[#1]{#2}{\@glo@text}% - \fi + }% }% \glsunset{#2}}% } @@ -718,13 +743,14 @@ counter as its value}}{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% - \else + }{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% - \fi + }% }% \glsunset{#2}}% } @@ -745,11 +771,12 @@ counter as its value}}{% \ifglsused{#2}{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% - \else + }{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% - \fi + }% }% \glsunset{#2}}% } @@ -772,11 +799,12 @@ counter as its value}}{% \ifglsused{#2}{% \@gls@link[#1]{#2}{\@glo@text}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{\@glo@text}% - \else + }{% \@gls@link[#1]{#2}{\@glo@text}% - \fi + }% }% \glsunset{#2}}% } @@ -800,13 +828,14 @@ counter as its value}}{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% - \else + }{% \@gls@link[#1]{#2}{% \expandafter\makefirstuc\expandafter{\@glo@text}}% - \fi + }% }% \glsunset{#2}}% } @@ -829,11 +858,12 @@ counter as its value}}{% \ifglsused{#2}{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% }{% - \ifglsacrfootnote + \ifthenelse{\equal{\@glo@type}{\acronymtype}\and + \boolean{glsacrfootnote}}{% \@gls@link[#1,hyper=false]{#2}{\MakeUppercase{\@glo@text}}% - \else + }{% \@gls@link[#1]{#2}{\MakeUppercase{\@glo@text}}% - \fi + }% }% \glsunset{#2}}% } @@ -1262,10 +1292,11 @@ to move \string\makeglossaries\space after all your \newcommand*{\printglossary}[1][type=\glsdefaulttype]{% \def\@glo@type{\glsdefaulttype}% \def\glossarytitle{\csname @glotype@\@glo@type @title\endcsname}% -\def\glossarytoctitle{\glossarytitle}% \def\@glossarystyle{}% +\def\gls@dotoctitle{\glssettoctitle{\@glo@type}}% \bgroup \setkeys{printgloss}{#1}% +\gls@dotoctitle \@glossarystyle \makeatletter \@input@{\jobname.\csname @glotype@\@glo@type @in\endcsname}% @@ -1275,7 +1306,9 @@ to move \string\makeglossaries\space after all your \forallglossaries{\@@glo@type}{\printglossary[type=\@@glo@type]}} \define@key{printgloss}{type}{\def\@glo@type{#1}} \define@key{printgloss}{title}{\def\glossarytitle{#1}} -\define@key{printgloss}{toctitle}{\def\glossarytoctitle{#1}} +\define@key{printgloss}{toctitle}{\def\glossarytoctitle{#1}% +\let\gls@dotoctitle\relax +} \define@key{printgloss}{style}{% \@ifundefined{@glsstyle@#1}{\PackageError{glossaries}{Glossary style `#1' undefined}{}}{% 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 e8d3a4ee331..9137a38056a 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-hypernav.sty @@ -47,10 +47,36 @@ \@ifundefined{hypertarget}{% \newcommand*{\glsnavhypertarget}[3][\@glo@type]{% \protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% -#3}}{% +#3% +\expandafter +\let\expandafter\@gls@list\csname @gls@hypergrouplist@#1\endcsname +\@for\@gls@elem:=\@gls@list\do{% +\ifthenelse{\equal{\@gls@elem}{#2}}{\@endfortrue}{}}% +\if@endfor +\else + \PackageWarningNoLine{glossaries}{Navigation panel + for glossary type `#1'^^Jmissing group `#2'}% + \gdef\gls@hypergrouprerun{% + \PackageWarningNoLine{glossaries}{Navigation panel + has changed. Rerun LaTeX}}% +\fi}}{% \newcommand*{\glsnavhypertarget}[3][\@glo@type]{% \protected@write\@auxout{}{\string\@gls@hypergroup{#1}{#2}}% -\hypertarget{glsn:#1@#2}{#3}}} +\hypertarget{glsn:#1@#2}{#3}% +\expandafter +\let\expandafter\@gls@list\csname @gls@hypergrouplist@#1\endcsname +\@for\@gls@elem:=\@gls@list\do{% +\ifthenelse{\equal{\@gls@elem}{#2}}{\@endfortrue}{}}% +\if@endfor +\else + \PackageWarningNoLine{glossaries}{Navigation panel + for glossary type `#1'^^Jmissing group `#2'}% + \gdef\gls@hypergrouprerun{% + \PackageWarningNoLine{glossaries}{Navigation panel + has changed. Rerun LaTeX}}% +\fi}} +\let\gls@hypergrouprerun\relax +\AtEndDocument{\gls@hypergrouprerun} \newcommand*{\@gls@hypergroup}[2]{% \@ifundefined{@gls@hypergrouplist@#1}{% \expandafter\xdef\csname @gls@hypergrouplist@#1\endcsname{#2}% 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 ff84856213b..954d8e7074e 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-long.sty @@ -131,6 +131,30 @@ \bfseries \symbolname& \bfseries\pagelistname\\\hline\endhead\hline\endfoot}% } +\newglossarystyle{altlong4col}{% +\glossarystyle{long4col}% +\renewenvironment{theglossary}{% +\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% +\end{longtable}}% +} +\newglossarystyle{altlong4colheader}{% +\glossarystyle{long4colheader}% +\renewenvironment{theglossary}{% +\begin{longtable}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% +\end{longtable}}% +} +\newglossarystyle{altlong4colborder}{% +\glossarystyle{long4colborder}% +\renewenvironment{theglossary}{% +\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagewidthlist}|}}{% +\end{longtable}}% +} +\newglossarystyle{altlong4colheaderborder}{% +\glossarystyle{long4colheaderborder}% +\renewenvironment{theglossary}{% +\begin{longtable}{|l|p{\glsdescwidth}|l|p{\glspagewidthlist}|}}{% +\end{longtable}}% +} \endinput %% %% End of file `glossary-long.sty'. 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 7de79f26b45..9ee597674a9 100644 --- a/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty +++ b/Master/texmf-dist/tex/latex/glossaries/styles/glossary-super.sty @@ -140,6 +140,38 @@ \begin{supertabular}{|l|l|l|l|}}{% \end{supertabular}}% } +\newglossarystyle{altsuper4col}{% +\glossarystyle{super4col}% +\renewenvironment{theglossary}{% +\tablehead{}\tabletail{}% +\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% +\end{supertabular}}% +} +\newglossarystyle{altsuper4colheader}{% +\glossarystyle{super4colheader}% +\renewenvironment{theglossary}{% +\tablehead{\bfseries\entryname&\bfseries\descriptionname& +\bfseries\symbolname & +\bfseries\pagelistname\\}\tabletail{}% +\begin{supertabular}{lp{\glsdescwidth}lp{\glspagelistwidth}}}{% +\end{supertabular}}% +} +\newglossarystyle{altsuper4colborder}{% +\glossarystyle{super4colborder}% +\renewenvironment{theglossary}{% +\tablehead{\hline}\tabletail{\hline}% +\begin{supertabular}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}{% +\end{supertabular}}% +} +\newglossarystyle{altsuper4colheaderborder}{% +\glossarystyle{super4colheaderborder}% +\renewenvironment{theglossary}{% +\tablehead{\hline\bfseries\entryname&\bfseries\descriptionname& +\bfseries\symbolname & +\bfseries\pagelistname\\}\tabletail{\hline}% +\begin{supertabular}{|l|p{\glsdescwidth}|l|p{\glspagelistwidth}|}}{% +\end{supertabular}}% +} \endinput %% %% End of file `glossary-super.sty'. |