summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-03 21:57:18 +0000
committerKarl Berry <karl@freefriends.org>2019-08-03 21:57:18 +0000
commit8205a632507f4dec01ae55eecb85357b9aac6adb (patch)
tree6082ac6f8864432ea3f85d0d583f345e412a08c3 /Master/texmf-dist/tex
parent8d92fe1781393126d42adc719409576e3d8b48e6 (diff)
glosmathtools (3aug19)
git-svn-id: svn://tug.org/texlive/trunk@51809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty55
1 files changed, 32 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty b/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty
index befddad9653..c117579d296 100644
--- a/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty
+++ b/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty
@@ -3,25 +3,23 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{glosmathtools}%
[%
-2019/08/01 v0.5 %
+2019/08/02 v0.5.1 %
Mathematical nomenclature tools based on glossaries package %
Francis Gagnon %
]%
\RequirePackage{amsmath,amsfonts,etoolbox}%
-% noredefwarn to supress warnings with memoir class redifintion :
-\RequirePackage[noredefwarn]{glossaries}%
% ===========================================================================
% =================== PACKAGE OPTIONS =======================================
% ===========================================================================
-% define char '"' as shortcut for "sbu" macro in math mode
+% define char <"> as shortcut for "sbu" macro in math mode
% and define qtmark macro to show the quotation mark character
\DeclareOption{qtmarkupright}{%
\begingroup\lccode`~=`"\lowercase{\endgroup\def~}#1{\sbu{#1}}%
\mathchardef\qtmark=\mathcode`"\AtBeginDocument{\mathcode`"=\string"8000}%
}%
-% single lineskip nomenclature (memoir/linespace package required)
+% single lineskip nomenclature (memoir/setspace package required)
\newtoggle{glosmath@singlelineskip}%
\DeclareOption{singlelineskip}{\toggletrue{glosmath@singlelineskip}}%
@@ -29,12 +27,23 @@ Francis Gagnon %
\newtoggle{glosmath@nodefop}%
\DeclareOption{nodefop}{\toggletrue{glosmath@nodefop}}%
-%% unknown options
-\DeclareOption*{%
- \PackageWarning{glosmathtools}{Unknown option '\CurrentOption'}%
-}%
+%% other options are passed to glossaires package
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{glossaries}}%
\ProcessOptions\relax%
+% noredefwarn to supress warnings with memoir class redifintion
+\RequirePackage[noredefwarn]{glossaries}%
+
+% checkup if memoir or setspace is loaded with singlelineskip option
+\iftoggle{glosmath@singlelineskip}{%
+ \@ifclassloaded{memoir}{\relax}{%
+ \@ifpackageloaded{setspace}{\relax}{%
+ \PackageError{glosmathtools}%
+ {memoir class ot setspace package must be %
+ loaded for singlelineskip option}{}%
+ }%
+ }%
+}%
% ===========================================================================
% =================== PUBLIC MACROS =========================================
@@ -223,8 +232,8 @@ Francis Gagnon %
\renewcommand*{\glossaryheader}%
{%
\iftoggle{glosmath@singlelineskip}{%
- \ifdefined\SingleSpacing \SingleSpacing \fi% memoir class
- \ifdefined\singlespacing \singlespacing \fi% setspace package
+ \ifdefined\SingleSpacing\SingleSpacing\fi% memoir class
+ \ifdefined\singlespacing\singlespacing\fi% setspace package
}{}%
}%
\setcounter{glosmath@mainEntryCtr}{0}%
@@ -335,13 +344,13 @@ Francis Gagnon %
\renewcommand*{\glosmath@acrmainpl}[1]{\glsentrylongpl{##1}}%
\renewcommand*{\glosmath@Acrmainpl}[1]{\Glsentrylongpl{##1}}%
\renewcommand*{\glosmath@acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}}%
\renewcommand*{\glosmath@Acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}}%
\renewcommand*{\glosmath@acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}}%
\renewcommand*{\glosmath@Acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}}%
\renewcommand*{\glosmath@acrlang}{L1}%
}%
@@ -361,16 +370,16 @@ Francis Gagnon %
{%
\glosmath@setLone % base defintions
\renewcommand*{\glosmath@acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}%
,\space\textit{\glsentrydescsec{##1}}}%
\renewcommand*{\glosmath@Acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}%
,\space\textit{\Glsentrydescsec{##1}}}%
\renewcommand*{\glosmath@acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}%
,\space\textit{\glsentrydescsec{##1}}}%
\renewcommand*{\glosmath@Acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}%
,\space\textit{\Glsentrydescsec{##1}}}%
\renewcommand*{\glosmath@acrlang}{L1L2}%
}%
@@ -380,16 +389,16 @@ Francis Gagnon %
{%
\glosmath@setLtwo % base defintions
\renewcommand*{\glosmath@acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}%
,\space\textit{\glsentrydesc{##1}}}%
\renewcommand*{\glosmath@Acrpar}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}%
,\space\textit{\Glsentrydesc{##1}}}%
\renewcommand*{\glosmath@acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshort{##1}}%
+ {\protect\firstacronymfont{\glsentryshort{##1}}%
,\space\textit{\glsentrydescpl{##1}}}%
\renewcommand*{\glosmath@Acrparpl}[1]%
- {\protect\firstacronymfont{\glsentryshortpl{##1}}%
+ {\protect\firstacronymfont{\glsentryshortpl{##1}}%
,\space\textit{\Glsentrydescpl{##1}}}%
\renewcommand*{\glosmath@acrlang}{L2L1}%
}%