summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty50
1 files changed, 35 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty
index 42b34aa3ba4..1fa02310943 100644
--- a/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty
+++ b/Master/texmf-dist/tex/latex/glossaries-extra/glossary-bookindex.sty
@@ -7,7 +7,7 @@
%% glossaries-extra.dtx (with options: `glossary-bookindex.sty,package')
%%
%% glossaries-extra.dtx
-%% Copyright 2018 Nicola Talbot
+%% Copyright 2019 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib.
+%% This work consists of the files glossaries-extra.dtx and glossaries-extra.ins and the derived files glossaries-extra.sty, glossaries-extra-bib2gls.sty, glossaries-extra-stylemods.sty, glossary-bookindex.sty, glossary-longextra.sty, example-glossaries-xr.tex, example-glossaries-acronym-desc.bib, example-glossaries-acronym.bib, example-glossaries-acronyms-lang.bib, example-glossaries-brief.bib, example-glossaries-childnoname.bib, example-glossaries-cite.bib, example-glossaries-images.bib, example-glossaries-long.bib, example-glossaries-multipar.bib, example-glossaries-parent.bib, example-glossaries-symbolnames.bib, example-glossaries-symbols.bib, example-glossaries-url.bib, example-glossaries-xr.bib.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{glossary-bookindex}[2018/12/01 1.38 (NLCT)]
+\ProvidesPackage{glossary-bookindex}[2019/03/22 1.39 (NLCT)]
\RequirePackage{multicol}
\RequirePackage{glossary-tree}
\newcommand{\glsxtrbookindexcols}{2}
@@ -55,6 +55,8 @@
\newcommand*{\glsxtrbookindexsubprelocation}[1]{%
\glsxtrbookindexprelocation{#1}%
}
+\newcommand*{\glsxtrbookindexlocation}[2]{#2}
+\newcommand*{\glsxtrbookindexsublocation}{\glsxtrbookindexlocation}
\newcommand{\glsxtrbookindexparentchildsep}{\nopagebreak}
\newcommand{\glsxtrbookindexparentsubchildsep}{\glsxtrbookindexparentchildsep}
\newcommand{\glsxtrbookindexbetween}[2]{}
@@ -84,15 +86,24 @@
\setglossarystyle{index}%
\renewenvironment{theglossary}%
{%
- \ifdefempty\glsxtrbookindexcolspread
- {%
- \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}%
- {\glsxtrbookindexcols}%
- }%
- {%
- \expandafter\begin\expandafter{\glsxtrbookindexmulticolsenv}%
- {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]%
- }%
+ \ifnum\glsxtrbookindexcols>1\relax
+ \ifdefempty\glsxtrbookindexcolspread
+ {%
+ \edef\glsxtr@beginbookindex{%
+ \noexpand\begin{\glsxtrbookindexmulticolsenv}
+ {\glsxtrbookindexcols}%
+ }%
+ }%
+ {%
+ \edef\glsxtr@beginbookindex{%
+ \noexpand\begin{\glsxtrbookindexmulticolsenv}%
+ {\glsxtrbookindexcols}[\glsxtrbookindexcolspread]%
+ }%
+ }%
+ \else
+ \def\glsxtr@beginbookindex{}%
+ \fi
+ \glsxtr@beginbookindex
\setlength{\parindent}{0pt}%
\setlength{\parskip}{0pt plus 0.3pt}%
\let\@glsxtr@bookindex@sep\glsxtrbookindexparentchildsep
@@ -109,7 +120,14 @@
\@glsxtr@bookindex@subsubatendgroup
\@glsxtr@bookindex@subatendgroup
\@glsxtr@bookindex@atendgroup
- \expandafter\end\expandafter{\glsxtrbookindexmulticolsenv}%
+ \ifnum\glsxtrbookindexcols>1\relax
+ \edef\glsxtr@endbookindex{%
+ \noexpand\end{\glsxtrbookindexmulticolsenv}%
+ }%
+ \else
+ \def\glsxtr@endbookindex{}%
+ \fi
+ \glsxtr@endbookindex
}%
\renewcommand*{\glossaryheader}{\raggedright}%
\renewcommand*{\glossentry}[2]{%
@@ -129,7 +147,8 @@
\glstreeitem
\glsentryitem{##1}%
\glstarget{##1}{\glsxtrbookindexname{##1}}%
- \glsxtrbookindexprelocation{##1}##2%
+ \glsxtrbookindexprelocation{##1}%
+ \glsxtrbookindexlocation{##1}{##2}%
}%
\renewcommand{\subglossentry}[3]{%
\ifcase##1\relax
@@ -161,7 +180,8 @@
\glstreesubsubitem
\fi
\glstarget{##2}{\glsxtrbookindexsubname{##2}}%
- \glsxtrbookindexsubprelocation{##2}##3%
+ \glsxtrbookindexsubprelocation{##2}%
+ \glsxtrbookindexsublocation{##2}{##3}%
}%
\renewcommand*{\glsgroupskip}{}%
\renewcommand*{\glsgroupheading}[1]{%