summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/glosmathtools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-20 21:27:21 +0000
committerKarl Berry <karl@freefriends.org>2020-03-20 21:27:21 +0000
commit2b3e778af2e90f3929a2fa5849c36d5659d11022 (patch)
treefb8575d730cfe7c00a90f2aed364ed2a8905b8b9 /Master/texmf-dist/tex/latex/glosmathtools
parent7ec3ddce0199f0c2dfd0386d0ca90ccefdc2840b (diff)
glosmathtools (20mar20)
git-svn-id: svn://tug.org/texlive/trunk@54434 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/glosmathtools')
-rw-r--r--Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty51
1 files changed, 39 insertions, 12 deletions
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}}}}%
}%
}%
}%