From 2b3e778af2e90f3929a2fa5849c36d5659d11022 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 20 Mar 2020 21:27:21 +0000 Subject: glosmathtools (20mar20) git-svn-id: svn://tug.org/texlive/trunk@54434 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/glosmathtools/glosmathtools.sty | 51 +++++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty b/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty index c117579d296..1eeab40e759 100644 --- a/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty +++ b/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty @@ -3,7 +3,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{glosmathtools}% [% -2019/08/02 v0.5.1 % +2020/03/20 v0.5.2 % Mathematical nomenclature tools based on glossaries package % Francis Gagnon % ]% @@ -74,16 +74,6 @@ Francis Gagnon % \ensuremath{\glsdisp{#2}{\glosmath@MyGlsMacro{#2}}}% }% -% ---------- glsvi ------------------------------------------------------- -% show $a_b$ with link to "a" and variable "b" -% 4 arguments : 2 mandatory arguments and optional 1st and 2nd argument -% for adding accent on "a" and "b" -\newcommand*{\glsvi}[1][]% -{% - \def\glosmath@ArgI{#1}% - \glosmath@glsviRelay% -}% - % ---------- glsub ------------------------------------------------------- % show $a_b$ with link to "a" and subscript "sub.b" % 3 arguments : 2 mandatory arguments and optional 1st argument @@ -109,6 +99,26 @@ Francis Gagnon % }% }% +% ---------- glsvi ------------------------------------------------------- +% show $a_b$ with link to "a" and variable "b" +% 4 arguments : 2 mandatory arguments and optional 1st and 2nd argument +% for adding accent on "a" and "b" +\newcommand*{\glsvi}[1][]% +{% + \def\glosmath@ArgI{#1}% + \glosmath@glsviRelay% +}% + +% ---------- glsvisub ---------------------------------------------------- +% show $a_{b_c}$ with link to "a", variable "b" and subscript "sub.c" +% 4 arguments : 3 mandatory arguments and optional 1st and 2nd argument +% for adding accent on "a" and "b" +\newcommand*{\glsvisub}[1][]% +{% + \def\glosmath@ArgI{#1}% + \glosmath@glsvisubRelay% +}%s + % ---------- glslang ----------------------------------------------------- % show full accronyms definition in specified languages \newcommand*{\glslang}[2][]% @@ -331,7 +341,24 @@ Francis Gagnon % \let \glosmath@SecGls \glosmath@MyGlsMacro% \ensuremath{% \glsdisp{#2}{% - \glosmath@FirGls{#2}_{\glsdisp{#3}{\glosmath@SecGls{#3}}}% + \glosmath@FirGls{#2}_{% + \glsdisp{#3}{\glosmath@SecGls{#3}}}% + }% + }% +}% + +% ---------- glosmath@glsvisubRelay --------------------------------------- +% relay macro for two optional aguments in the glsvisub macro +\newcommand*{\glosmath@glsvisubRelay}[4][]% +{% + \expandafter\glosmath@getMyGlsMacro\expandafter{\glosmath@ArgI}% + \let \glosmath@FirGls \glosmath@MyGlsMacro% + \glosmath@getMyGlsMacro{#1}% + \let \glosmath@SecGls \glosmath@MyGlsMacro% + \ensuremath{% + \glsdisp{#2}{% + \glosmath@FirGls{#2}_{% + \glsdisp{#3}{\glosmath@SecGls{#3}_{\gls{sub.#4}}}}% }% }% }% -- cgit v1.2.3