From 11bd7c1043384daa09ab391cfbbc6c9b47514c9f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 9 Apr 2018 21:18:22 +0000 Subject: glossaries-extra (9apr18) git-svn-id: svn://tug.org/texlive/trunk@47410 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/glossaries-extra/glossaries-extra.dtx | 485 +++++++++++++++------ .../latex/glossaries-extra/glossaries-extra.ins | 2 +- 2 files changed, 356 insertions(+), 131 deletions(-) (limited to 'Master/texmf-dist/source/latex/glossaries-extra') diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx index bdcc4aed7e8..8060d834636 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.dtx @@ -1,23 +1,23 @@ %\iffalse % glossaries-extra.dtx generated using makedtx version 1.2 (c) Nicola Talbot % Command line args: -% -macrocode ".*\.tex" -% -macrocode ".*\.bib" +% -setambles ".*\.bib=>\nopreamble\nopostamble" +% -author "Nicola Talbot" +% -doc "glossaries-extra-codedoc.tex" +% -comment ".*\.tex" +% -comment ".*\.bib" % -src "glossaries-extra.sty\Z=>glossaries-extra.sty" % -src "glossaries-extra-bib2gls.sty\Z=>glossaries-extra-bib2gls.sty" % -src "glossaries-extra-stylemods.sty\Z=>glossaries-extra-stylemods.sty" % -src "glossary-bookindex.sty\Z=>glossary-bookindex.sty" % -src "(example-glossaries-.+\.tex)\Z=>\1" % -src "(example-glossaries-.+\.bib)\Z=>\1" -% -setambles ".*\.bib=>\nopreamble\nopostamble" -% -comment ".*\.tex" -% -comment ".*\.bib" -% -doc "glossaries-extra-codedoc.tex" -% -author "Nicola Talbot" -% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" +% -macrocode ".*\.tex" +% -macrocode ".*\.bib" % -section "chapter" +% -codetitle "Main Package Code (\\styfmt{glossaries-extra.sty})" % glossaries-extra -% Created on 2018/3/6 23:39 +% Created on 2018/4/9 19:20 %\fi %\iffalse %<*package> @@ -127,7 +127,7 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \setcounter{IndexColumns}{2} -\CheckSum{22519} +\CheckSum{22659} \newcommand*{\ifirstuse}{\iterm{first use}} \newcommand*{\firstuse}{\gls{firstuse}} @@ -167,13 +167,13 @@ governed by the \gloskey{first} and \gloskey{firstplural} keys of \raggedright } -\title{glossaries-extra.sty v1.28: +\title{glossaries-extra.sty v1.29: documented code} \author{Nicola L.C. Talbot\\[10pt] Dickimaw Books\\ \url{http://www.dickimaw-books.com/}} -\date{2018-03-06} +\date{2018-04-09} \begin{document} \DocInput{glossaries-extra.dtx} @@ -218,7 +218,7 @@ Dickimaw Books\\ %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra}[2018/03/06 v1.28 (NLCT)] +\ProvidesPackage{glossaries-extra}[2018/04/09 v1.29 (NLCT)] % \end{macrocode} % Requires \sty{xkeyval} to define package options. % \begin{macrocode} @@ -454,6 +454,10 @@ Dickimaw Books\\ \glsxtr@@do@wrglossary{#1}% \else \@@glsxtrwrglossmark +% \end{macrocode} +%Increment associated counter. +% \begin{macrocode} + \glsxtr@inc@wrglossaryctr{#1}% \@@do@@wrglossary \fi }% @@ -493,6 +497,10 @@ Dickimaw Books\\ \ifglsentryexists{#2}{}% {% \@@glsxtrwrglossmark +% \end{macrocode} +%Increment associated counter. +% \begin{macrocode} + \glsxtr@inc@wrglossaryctr{#2}% \begingroup % \end{macrocode} %Save the label in case it's needed. @@ -504,10 +512,10 @@ Dickimaw Books\\ \def\@glsxtr@theHvalue{\@glsxtr@thevalue}% \let\@glsxtr@org@theHvalue\@glsxtr@theHvalue % \end{macrocode} -%Entry hasn't been defined, so we'll have to assume the page number by -%default. +%Entry hasn't been defined, so we'll have to assume it's +%\cs{glscounter} by default. % \begin{macrocode} - \def\@gls@counter{page}% + \let\@gls@counter\glscounter % \end{macrocode} %Check for default options (which may switch off indexing). %\changes{1.21}{2017-11-03}{added check for default options} @@ -586,9 +594,24 @@ Dickimaw Books\\ }% \@do@gls@getcounterprefix \fi - \protected@write\@auxout{\let\@glsrecordlocref\relax}{\string\glsxtr@record - {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% - {\@glsrecordlocref}}% + \ifdefstring\@gls@counter{page}% + {% +% \end{macrocode} +%\changes{1.29}{2018-04-09}{check for page counter} +%Protect the location from premature expansion. +% \begin{macrocode} + \protected@write\@auxout{\let\@glsrecordlocref\relax}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% + }% + {% +% \end{macrocode} +%Don't protect the location from premature expansion. +% \begin{macrocode} + \protected@write\@auxout{}{\string\glsxtr@record + {\@gls@label}{\@glo@counterprefix}{\@gls@counter}{\@glsnumberformat}% + {\@glsrecordlocref}}% + }% \@glsxtr@counterrecordhook \let\@glo@counterprefix\@glsxtr@orgprefix } @@ -653,7 +676,8 @@ Dickimaw Books\\ % %\begin{macro}{\@glsxtr@recordsee} %\changes{1.14}{2017-04-18}{new} -%Deal with \cs{glssee} in record mode. +%Deal with \cs{glssee} in record mode. (This doesn't increment the +%associated counter.) % \begin{macrocode} \newcommand*{\@glsxtr@recordsee}[2]{% \@@glsxtrwrglossmark @@ -1426,6 +1450,70 @@ Dickimaw Books\\ % \end{macrocode} %\end{option} % +%\begin{macro}{\glsxtr@inc@wrglossaryctr} +%\changes{1.29}{2018-04-09}{new} +%Increments the associated counter if enabled. Does nothing by +%default. The optional argument is the entry label in case it's +%required, but the \ctr{wrglossary} counter is globally used by all +%entries. +% \begin{macrocode} +\newcommand*{\glsxtr@inc@wrglossaryctr}[1]{} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrInternalLocationHyperlink} +%\changes{1.29}{2018-04-09}{new} +%\begin{definition} +%\cs{glsxtrinternallocationhyperlink}\marg{counter}\marg{prefix}\marg{location} +%\end{definition} +%The first two arguments are always control sequences. +% \begin{macrocode} +\newcommand*{\GlsXtrInternalLocationHyperlink}[3]{% + \glsxtrhyperlink{#1#2#3}{#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@glsxtr@wrglossary@locationhyperlink} +%\changes{1.29}{2018-04-09}{new} +% \begin{macrocode} +\newcommand*{\@glsxtr@wrglossary@locationhyperlink}[3]{% + \pageref{wrglossary.#3}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{option}{indexcounter} +%\changes{1.29}{2018-04-09}{new} +%Define the \ctr{wrglossary} counter that's incremented every time +%an entry is indexed, except for cross-references. This is designed +%for use with \app{bib2gls} v1.4+. It can work with the other indexing +%methods but it will interfere with the number list collation. +%This option automatically implements \pkgopt[wrglossary]{counter}. +% \begin{macrocode} +\@glsxtr@declareoption{indexcounter}{% + \glsxtr@dooption{counter=wrglossary}% + \ifundef\c@wrglossary + {% + \newcounter{wrglossary}% + \renewcommand{\thewrglossary}{\arabic{wrglossary}}% + }% + {}% + \renewcommand*{\glsxtr@inc@wrglossaryctr}[1]{% + \refstepcounter{wrglossary}% + \label{wrglossary.\thewrglossary}% + }% + \renewcommand*{\GlsXtrInternalLocationHyperlink}[3]{% + \ifdefstring\glsentrycounter{wrglossary}% + {% + \@glsxtr@wrglossary@locationhyperlink{##1}{##2}{##3}% + }% + {\glsxtrhyperlink{##1##2##3}{##3}}% + }% +} +% \end{macrocode} +%\end{option} + %\begin{macro}{\@glsxtrwrglossmark} %\changes{1.21}{2017-11-03}{new} %Marks the place where indexing occurs. @@ -1534,6 +1622,7 @@ Dickimaw Books\\ % %\begin{macro}{\@glsxtr@doseeglossary} %\changes{1.21}{2017-11-03}{new} +%This doesn't increment the associated counter. % \begin{macrocode} \newcommand*{\@glsxtr@doseeglossary}[2]{% \glsdoifexists{#1}% @@ -1653,10 +1742,12 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtr@@do@wrglossary} %\changes{1.08}{2016-12-13}{new} -%The new version adds code that can show a marker for debugging. +%The new version adds code that can show a marker for debugging and +%increments the associated counter if enabled. % \begin{macrocode} \newcommand*{\glsxtr@@do@wrglossary}[1]{% \@@glsxtrwrglossmark + \glsxtr@inc@wrglossaryctr{#1}% \glsxtr@org@@do@wrglossary{#1}% } % \end{macrocode} @@ -2003,9 +2094,10 @@ Dickimaw Books\\ % %\begin{macro}{\glsxtrfieldforlistloop} %\changes{1.12}{2017-02-03}{new} +%\changes{1.29}{2018-04-09}{corrected argument order in \cs{forlistcsloop}} % \begin{macrocode} \newcommand*{\glsxtrfieldforlistloop}[3]{% - \forlistcsloop{glo@\glsdetoklabel{#1}@#2}{#3}% + \forlistcsloop{#3}{glo@\glsdetoklabel{#1}@#2}% } % \end{macrocode} %\end{macro} @@ -2834,6 +2926,7 @@ Dickimaw Books\\ %This essentially works like \cs{@do@seeglossary} but uses the %\texttt{seealso} class. %\changes{1.21}{2017-11-03}{added check that the entry exists} +%This doesn't increment the associated counter. % \begin{macrocode} \newrobustcmd*{\glsxtrindexseealso}[2]{% \ifx\@glsxtr@record@setting\@glsxtr@record@setting@alsoindex @@ -3088,9 +3181,35 @@ Dickimaw Books\\ % %\subsection{Document Definitions} % +%\begin{macro}{\gls@begindocdefs} +%This command was only introduced to \styfmt{glossaries} v4.37, so +%it may not be defined. If it has been defined, redefine it to check +%\cs{@glsxtr@docdefval} so that it only inputs the \texttt{.glsdefs} +%file if \pkgopt[true]{docdef}. +% \begin{macrocode} +\ifdef\gls@begindocdefs +{% + \renewcommand*{\gls@begindocdefs}{% + \ifnum\@glsxtr@docdefval=1\relax + \@gls@enablesavenonumberlist + \edef\@gls@restoreat{% + \noexpand\catcode`\noexpand\@=\number\catcode`\@\relax}% + \makeatletter + \InputIfFileExists{\jobname.glsdefs}{}{}% + \@gls@restoreat + \undef\@gls@restoreat + \gls@defdocnewglossaryentry + \fi + } +} +{} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\makenoidxglossaries} -%Modify \cs{makenoidxglossaries} so that it automatically switches -%off (unless the restricted setting is on) and disables the \pkgopt{docdef} key. +%Modify \cs{makenoidxglossaries} so that it automatically +%sets \pkgopt[false]{docdef} (unless the restricted setting is on) +%and disables the \pkgopt{docdef} key. %This command isn't allow with the \pkgopt{record} option. % \begin{macrocode} \let\glsxtr@orgmakenoidxglossaries\makenoidxglossaries @@ -3099,7 +3218,8 @@ Dickimaw Books\\ {% \glsxtr@orgmakenoidxglossaries % \end{macrocode} -%Add marker to \cs{@do@seeglossary} +%Add marker to \cs{@do@seeglossary} but don't increment associated +%counter. % \begin{macrocode} \renewcommand{\@do@seeglossary}[2]{% \@@glsxtrwrglossmark @@ -3169,7 +3289,7 @@ Dickimaw Books\\ }% \or % \end{macrocode} -% \pkgopt[true]{docdef} +% (\pkgopt[true]{docdef} case.) % Since the \gloskey{see} value is now saved in a field, it % can be used by entries that have been defined in the document. % \begin{macrocode} @@ -7420,147 +7540,147 @@ Dickimaw Books\\ % \begin{macrocode} \let\gls@checkseeallowed\relax % \end{macrocode} -%Adjust \cs{@do@seeglossary}. This needs to check for the entries -%existence. +%Adjust \cs{@do@seeglossary}. This needs to check for the entry's +%existence but don't increment associated counter. % \begin{macrocode} \renewcommand*{\@do@seeglossary}[2]{% - \glsdoifexists{##1}% - {% - \edef\@gls@label{\glsdetoklabel{##1}}% - \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% - \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% - {\@glsxtr@org@doseeglossary{##1}{##2}}% + \glsdoifexists{##1}% {% - \@@glsxtrwrglossmark - \protected@write\@auxout{}{% - \string\@gls@reference - {\gls@type}{\@gls@label}{\string\glsseeformat##2{}}% + \edef\@gls@label{\glsdetoklabel{##1}}% + \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {\@glsxtr@org@doseeglossary{##1}{##2}}% + {% + \@@glsxtrwrglossmark + \protected@write\@auxout{}{% + \string\@gls@reference + {\gls@type}{\@gls@label}{\string\glsseeformat##2{}}% + }% }% }% }% - }% % \end{macrocode} % Adjust \cs{@@do@@wrglossary} % \begin{macrocode} - \let\@glsxtr@@do@@wrglossary\@@do@@wrglossary - \def\@@do@@wrglossary{% - \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% - \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% - {\@glsxtr@@do@@wrglossary}% - {\gls@noidxglossary}% - }% + \let\@glsxtr@@do@@wrglossary\@@do@@wrglossary + \def\@@do@@wrglossary{% + \edef\@gls@type{\csname glo@\@gls@label @type\endcsname}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {\@glsxtr@@do@@wrglossary}% + {\gls@noidxglossary}% + }% % \end{macrocode} % Suppress warning about no \cs{makeglossaries} % \begin{macrocode} - \let\warn@nomakeglossaries\relax - \def\warn@noprintglossary{% - \GlossariesWarningNoLine{No \string\printglossary\space - or \string\printglossaries\space - found.^^J(Remove \string\makeglossaries\space if you don't want - any glossaries.)^^JThis document will not have a glossary}% - }% + \let\warn@nomakeglossaries\relax + \def\warn@noprintglossary{% + \GlossariesWarningNoLine{No \string\printglossary\space + or \string\printglossaries\space + found.^^J(Remove \string\makeglossaries\space if you don't want + any glossaries.)^^JThis document will not have a glossary}% + }% % \end{macrocode} % Only warn for glossaries not listed. % \begin{macrocode} - \renewcommand{\@gls@noref@warn}[1]{% - \edef\@gls@type{##1}% - \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% - {% - \GlossariesExtraWarning{Can't use - \string\printnoidxglossary[type={\@gls@type}] - when `\@gls@type' is listed in the optional argument of - \string\makeglossaries}% - }% - {% - \GlossariesWarning{Empty glossary for - \string\printnoidxglossary[type={##1}]. - Rerun may be required (or you may have forgotten to use - commands like \string\gls)}% + \renewcommand{\@gls@noref@warn}[1]{% + \edef\@gls@type{##1}% + \expandafter\DTLifinlist\expandafter{\@gls@type}{\@glsxtr@reg@glosslist}% + {% + \GlossariesExtraWarning{Can't use + \string\printnoidxglossary[type={\@gls@type}] + when `\@gls@type' is listed in the optional argument of + \string\makeglossaries}% + }% + {% + \GlossariesWarning{Empty glossary for + \string\printnoidxglossary[type={##1}]. + Rerun may be required (or you may have forgotten to use + commands like \string\gls)}% + }% }% - }% % \end{macrocode} % Adjust display number list to check for type: % \begin{macrocode} - \renewcommand*{\glsdisplaynumberlist}[1]{% - \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% - {\@glsxtr@idx@displaynumberlist{##1}}% - {\@glsxtr@noidx@displaynumberlist{##1}}% - }% + \renewcommand*{\glsdisplaynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@displaynumberlist{##1}}% + {\@glsxtr@noidx@displaynumberlist{##1}}% + }% % \end{macrocode} % Adjust entry list: % \begin{macrocode} - \renewcommand*{\glsentrynumberlist}[1]{% - \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% - {\@glsxtr@idx@entrynumberlist{##1}}% - {\@glsxtr@noidx@entrynumberlist{##1}}% - }% + \renewcommand*{\glsentrynumberlist}[1]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {\@glsxtr@idx@entrynumberlist{##1}}% + {\@glsxtr@noidx@entrynumberlist{##1}}% + }% % \end{macrocode} % Adjust number list loop % \begin{macrocode} - \renewcommand*{\glsnumberlistloop}[2]{% - \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% - {% - \PackageError{glossaries-extra}{\string\glsnumberlistloop\space - not available for glossary `##1'}{}% + \renewcommand*{\glsnumberlistloop}[2]{% + \expandafter\DTLifinlist\expandafter{##1}{\@glsxtr@reg@glosslist}% + {% + \PackageError{glossaries-extra}{\string\glsnumberlistloop\space + not available for glossary `##1'}{}% + }% + {\@glsxtr@noidx@numberlistloop{##1}{##2}}% }% - {\@glsxtr@noidx@numberlistloop{##1}{##2}}% - }% % \end{macrocode} % Only sanitize sort for normal indexing glossaries. % \begin{macrocode} - \renewcommand*{\glsprestandardsort}[3]{% - \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}% - {% - \glsdosanitizesort - }% - {% - \ifglssanitizesort - \@gls@noidx@sanitizesort - \else - \@gls@noidx@nosanitizesort - \fi + \renewcommand*{\glsprestandardsort}[3]{% + \expandafter\DTLifinlist\expandafter{##2}{\@glsxtr@reg@glosslist}% + {% + \glsdosanitizesort + }% + {% + \ifglssanitizesort + \@gls@noidx@sanitizesort + \else + \@gls@noidx@nosanitizesort + \fi + }% }% - }% % \end{macrocode} % Unlike \cs{makenoidxglossaries} we can't automatically set % sanitizesort=false. All entries must be defined in the preamble. % \begin{macrocode} - \renewcommand*\new@glossaryentry[2]{% - \PackageError{glossaries-extra}{Glossary entries must be defined - in the preamble\MessageBreak when you use the optional argument - of \string\makeglossaries}{Either move your definitions to the - preamble or don't use the optional argument of - \string\makeglossaries}% - }% + \renewcommand*\new@glossaryentry[2]{% + \PackageError{glossaries-extra}{Glossary entries must be defined + in the preamble\MessageBreak when you use the optional argument + of \string\makeglossaries}{Either move your definitions to the + preamble or don't use the optional argument of + \string\makeglossaries}% + }% % \end{macrocode} % Only activate sort key for glossaries that aren't listed in % \verb|#1| (glossary label is stored in \cs{@glo@type} but this % defaults to \cs{glsdefaulttype} so some expansion is required). % \begin{macrocode} - \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey - \renewcommand*{\@printgloss@setsort}{% + \let\@glo@assign@sortkey\@glsxtr@mixed@assign@sortkey + \renewcommand*{\@printgloss@setsort}{% % \end{macrocode} % Need to extract just the \gloskey[printglossary]{type} value. % \begin{macrocode} - \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,% - type=\glsdefaulttype,\@end@glsxtr@gettype - \def\@glo@sorttype{\@glo@default@sorttype}% - }% + \expandafter\@glsxtr@gettype\expandafter,\@glsxtr@printglossopts,% + type=\glsdefaulttype,\@end@glsxtr@gettype + \def\@glo@sorttype{\@glo@default@sorttype}% + }% % \end{macrocode} % Check \pkgopt{automake} setting: % \begin{macrocode} - \ifglsautomake - \renewcommand*{\@gls@doautomake}{% - \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% - \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% + \ifglsautomake + \renewcommand*{\@gls@doautomake}{% + \@for\@gls@type:=\@glsxtr@reg@glosslist\do{% + \ifdefempty{\@gls@type}{}{\@gls@automake{\@gls@type}}% + }% }% - }% - \fi + \fi % \end{macrocode} % Check the sort setting (\sty{glossaries} v4.30 onwards): % \begin{macrocode} - \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% - \fi + \ifdef\@glo@check@sortallowed{\@glo@check@sortallowed\makeglossaries}{}% + \fi }% \fi } @@ -8156,6 +8276,22 @@ Dickimaw Books\\ % \end{macrocode} %\end{macro} % +%\begin{macro}{\setentrycounter} +%\changes{1.29}{2018-04-09}{new} +%Adjust \cs{setentrycounter} to save the original prefix. +% \begin{macrocode} +\renewcommand*{\setentrycounter}[2][]{% + \def\glsxtrcounterprefix{#1}% + \ifx\glsxtrcounterprefix\@empty + \def\@glo@counterprefix{.}% + \else + \def\@glo@counterprefix{.#1.}% + \fi + \def\glsentrycounter{#2}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@gls@removespaces} %\changes{1.14}{2017-04-18}{new} %Redefine to allow adjustments to location hyperlink. @@ -8166,7 +8302,13 @@ Dickimaw Books\\ \edef\x{\the\toks@}% \ifx\x\empty \else - \glsxtrlocationhyperlink{\glsentrycounter}{\@glo@counterprefix}{\the\toks@}% +% \end{macrocode} +%Expand location (just in case \cs{toks@} is needed for something +%else). +%\changes{1.29}{2018-04-09}{added expansion} +% \begin{macrocode} + \expandafter\glsxtrlocationhyperlink\expandafter + \glsentrycounter\expandafter\@glo@counterprefix\expandafter{\the\toks@}% \fi \else \@gls@ReturnAfterFi{% @@ -8183,7 +8325,7 @@ Dickimaw Books\\ \newcommand*{\glsxtrlocationhyperlink}[3]{% \ifdefvoid\glsxtrsupplocationurl {% - \glsxtrhyperlink{#1#2#3}{#3}% + \GlsXtrInternalLocationHyperlink{#1}{#2}{#3}% }% {% \hyperref{\glsxtrsupplocationurl}{}{#1#2#3}{#3}% @@ -21131,7 +21273,7 @@ defined}{}% %automatically loaded by the record option. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-bib2gls}[2018/03/06 v1.28 (NLCT)] +\ProvidesPackage{glossaries-extra-bib2gls}[2018/04/09 v1.29 (NLCT)] % \end{macrocode} % %These are some convenient macros for use with custom rules. @@ -21152,11 +21294,93 @@ defined}{}% % \end{macrocode} %\end{macro} % +%\begin{macro}{\glsxtr@wrglossarylocation} +%\changes{1.29}{2018-04-09}{new} +%For use with \pkgopt{indexcounter} and \app{bib2gls}. +% \begin{macrocode} +\newcommand*{\glsxtr@wrglossarylocation}[2]{#1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrIndexCounterLink} +%\changes{1.29}{2018-04-09}{new} +%\begin{definition} +%\cs{GlsXtrIndexCounterLink}\marg{text}\marg{label} +%\end{definition} +%For use with \pkgopt{indexcounter} and \app{bib2gls}. +% \begin{macrocode} +\ifdef\hyperref +{% + \newcommand*{\GlsXtrIndexCounterLink}[2]{% + \glsxtrifhasfield{indexcounter}{#2}% + {\hyperref[wrglossary.\glscurrentfieldvalue]{#1}}% + {#1}% + } +} +{ + \newcommand*{\GlsXtrIndexCounterLink}[2]{#1} +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrBibTeXEntryAliases} +%\changes{1.29}{2018-04-09}{new} +%Convenient shortcut for use with \texttt{entry-type-aliases} to +%alias standard \BibTeX\ entry types to \texttt{@bibtexentry}. +% \begin{macrocode} +\newcommand*{\GlsXtrBibTeXEntryAliases}{% + article=bibtexentry, + book=bibtexentry, + booklet=bibtexentry, + conference=bibtexentry, + inbook=bibtexentry, + incollection=bibtexentry, + inproceedings=bibtexentry, + manual=bibtexentry, + mastersthesis=bibtexentry, + misc=bibtexentry, + phdthesis=bibtexentry, + proceedings=bibtexentry, + techreport=bibtexentry, + unpublished=bibtexentry +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\GlsXtrProvideBibTeXFields} +%\changes{1.29}{2018-04-09}{new} +%Convenient shortcut to define the standard \BibTeX\ fields. +% \begin{macrocode} +\newcommand*{\GlsXtrProvideBibTeXFields}{% + \glsaddstoragekey{address}{}{\glsxtrbibaddress}% + \glsaddstoragekey{author}{}{\glsxtrbibauthor}% + \glsaddstoragekey{booktitle}{}{\glsxtrbibbooktitle}% + \glsaddstoragekey{chapter}{}{\glsxtrbibchapter}% + \glsaddstoragekey{edition}{}{\glsxtrbibedition}% + \glsaddstoragekey{howpublished}{}{\glsxtrbibhowpublished}% + \glsaddstoragekey{institution}{}{\glsxtrbibinstitution}% + \glsaddstoragekey{journal}{}{\glsxtrbibjournal}% + \glsaddstoragekey{month}{}{\glsxtrbibmonth}% + \glsaddstoragekey{note}{}{\glsxtrbibnote}% + \glsaddstoragekey{number}{}{\glsxtrbibnumber}% + \glsaddstoragekey{organization}{}{\glsxtrbiborganization}% + \glsaddstoragekey{pages}{}{\glsxtrbibpages}% + \glsaddstoragekey{publisher}{}{\glsxtrbibpublisher}% + \glsaddstoragekey{school}{}{\glsxtrbibschool}% + \glsaddstoragekey{series}{}{\glsxtrbibseries}% + \glsaddstoragekey{title}{}{\glsxtrbibtitle}% + \glsaddstoragekey{bibtextype}{}{\glsxtrbibtype}% + \glsaddstoragekey{volume}{}{\glsxtrbibvolume}% +} +% \end{macrocode} +%\end{macro} +% %Provide missing Greek letters for use in maths mode. -%These are recognised by \app{bib2gls} and will be mapped to the +%These commands are recognised by \app{bib2gls} and will be mapped to the %Mathematical Greek Italic letters. This ensures that the Greek %letters that have the same shape as Latin letters are kept -%with the other Greek letters. These commands use an upright font +%with the other mathematical Greek letters for sorting purposes. +%The \LaTeX\ version of these commands (provided here) use an upright font %for capitals and italic for lower case to provide a better match %with the other Greek symbols provided by the kernel. % @@ -21266,7 +21490,7 @@ defined}{}% %\end{macro} % %Provide corresponding upright characters if \sty{upgreek} has been -%loaded. +%loaded. (The upper case characters are the same as above.) % \begin{macrocode} \@ifpackageloaded{upgreek}% { @@ -21374,7 +21598,7 @@ defined}{}% {}% upgreek.sty not loaded % \end{macrocode} % -%This package provides some basic rules but is not intended for +%This package provides some basic rules, but it's not intended for %complete coverage of all locales. The CLDR should provide the %appropriate locale-sensitive rules. These macros are primarily to %help construct custom rules to include, for example, Greek maths symbols @@ -21387,11 +21611,10 @@ defined}{}% %the locale) and add similar commands. See the description %of \cs{IfTrackedLanguageFileExists} in the \sty{tracklang} manual %for the allowed forms of \meta{tag}. The simplest is to just use -%the root language label. The file will then be automatically loaded +%the root language label or ISO code. The file will then be automatically loaded %by \styfmt{glossaries-extra} if the document has support for that %language. % -% %When combining these blocks of rules, remember to separate them %with the appropriate character. For example: %\begin{verbatim} @@ -21411,7 +21634,9 @@ defined}{}% %\begin{macro}{\glsxtrcontrolrules} %\changes{1.27}{2018-02-26}{new} %These are control characters that are usually placed at the start -%of a rule in the `ignored characters' section. +%of a rule in the `ignored characters' section. These control +%characters are unlikely to appear in any entry fields but are +%provided for completeness. %\cs{string} is used for punctuation characters in case they've been %made active. % \begin{macrocode} @@ -23380,7 +23605,7 @@ defined}{}% % First identify package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossaries-extra-stylemods}[2018/03/06 v1.28 (NLCT)] +\ProvidesPackage{glossaries-extra-stylemods}[2018/04/09 v1.29 (NLCT)] % \end{macrocode} % Provide package options to automatically load required predefined % styles. The simplest method is to just test for the existence of @@ -25437,7 +25662,7 @@ defined}{}% %\section{Package Initialisation and Options} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{glossary-bookindex}[2018/03/06 v1.28 (NLCT)] +\ProvidesPackage{glossary-bookindex}[2018/04/09 v1.29 (NLCT)] % \end{macrocode} %Load required packages. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins index aca8e50b65c..9611c082af4 100644 --- a/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins +++ b/Master/texmf-dist/source/latex/glossaries-extra/glossaries-extra.ins @@ -1,4 +1,4 @@ -% glossaries-extra.ins generated using makedtx version 1.2 2018/3/6 23:39 +% glossaries-extra.ins generated using makedtx version 1.2 2018/4/9 19:20 \input docstrip \preamble -- cgit v1.2.3