summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
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
parent8d92fe1781393126d42adc719409576e3d8b48e6 (diff)
glosmathtools (3aug19)
git-svn-id: svn://tug.org/texlive/trunk@51809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdfbin351937 -> 369524 bytes
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex20
-rw-r--r--Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty55
4 files changed, 49 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/README.md b/Master/texmf-dist/doc/latex/glosmathtools/README.md
index d8fbf30aa57..906422c625f 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/README.md
+++ b/Master/texmf-dist/doc/latex/glosmathtools/README.md
@@ -23,7 +23,7 @@ later version.
## Version
-0.5 (2019-08-01)
+0.5.1 (2019-08-02)
## Author
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf
index 0f8badbb6c7..6e48a5476aa 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex
index 81b0c0664b2..ae1aa12a5de 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex
@@ -22,6 +22,7 @@
\renewcommand*{\glscatnamefmt}[1]{\textbf{#1}} % format des catégories
%% ------------- ulthese ----------------------------------------------------
\titre{Documentation et exemple de \texttt{glosmathtools} dans \texttt{ulthese}}
+\soustitre{v0.5.1}
\auteur{Francis Gagnon}
%% ============================================================================
@@ -49,9 +50,20 @@ La commande \texttt{makeglossaries} est directement accessible dans les menu de
\end{itemize}
Sous Windows avec MiKTeX, il est possible que le script \texttt{makeglossaries} nécessite une installation de Perl (voir \url{https://tinyurl.com/ybnoyqjp}). Une fois Perl installé, il faut exécuter le script \texttt{perltex.exe} disponible dans le répertoire d'installation de MiKTeX.
-\section{Symboles, indices et accentuations}
+\section{Options du package}
+Les options du package \texttt{glosmathtools} se résument par :
+\begin{description}
+ \item[qtmarkupright] caractère \texttt{<">} raccourci pour indice sans italique
+ \item[singlelineskip] force interligne simple pour la nomenclature
+ \item[nodefop] utilisation des opérateurs et accents sans définition
+ \item[{[autres options]}] passés au package \texttt{glossaries}
+\end{description}
+De plus amples informations sont fournies ci-dessous.
+
+\section{Utilisation du package}
+\subsection{Symboles, indices et accentuations}
-L'insertion d'un symbole mathématique simple avec hyperlien se fait avec la macro \texttt{\textbackslash gls} de glossaries : \gls{k}, \gls{mat.A} et \gls{mat.b}. C'est la même chose pour les abréviations : le \Glspl{LOOP}. Les abréviations sont uniquement définies à leur première utilisation : le \gls{LOOP}.
+L'insertion d'un symbole mathématique simple avec hyperlien se fait avec la macro \texttt{\textbackslash gls} de \texttt{glossaries} : \gls{k}, \gls{mat.A} et \gls{mat.b}. C'est la même chose pour les abréviations : le \gls{LOOP}. Les abréviations sont uniquement définies à leur première utilisation : le \gls{LOOP}.
Les indices doivent être définis avec un label du format \texttt{sub.resteDuLabel}: l'indice \gls{sub.a} désigne l'air. La macro \texttt{\textbackslash glsub} permet d'ajouter un indice à une variable : \glsub{d}{v}, \glsub{z}{v}, \glsub{T}{v}, \glsub{D}{a}, \glsub{rho}{w} et \glsub{mu}{v}. En définissant les symboles mathématiques avec \texttt{\textbackslash newglosentrymath}, toutes les macros peuvent s'utiliser autant en mode \texttt{text} qu'en mode \texttt{math} (avec \texttt{\$\$}). Par contre, il est mieux d'écrire explicitement les symboles dans une équation afin d'alléger le code (pas d'hyperlien):
\begin{equation}
@@ -72,7 +84,7 @@ Il est aussi possible d'ajouter des accents sur les variables avec la macro \tex
\end{description}
De plus, un argument optionnel permet d'ajouter des accents à toutes les macros précédentes : \glsub[bar]{T}{v} et \glsubs[dot]{m}{v}{a}. Il y a deux arguments optionnels dans le cas de \texttt{\textbackslash glsvi} : \glsvi[dot]{m}{k}, \glsvi[][dot]{k}{m} et \glsvi[bar][dot]{T}{m}. Finalement, il est possible d'utiliser les accents sans définition dans la nomenclature avec l'option \texttt{nodefop}.
-\section{Langue, abréviations et nomenclature}
+\subsection{Langue, abréviations et nomenclature}
S'il y a des changements de langues à travers le document, il faut changer de langue pour les acronymes. La clé \texttt{descseclang} doit être préalablement définie dans le glossaire. Par la suite, la macro \texttt{\textbackslash setacronymlang} permet de choisir 4 options de langue:
\begin{description}
@@ -92,7 +104,7 @@ Comme les abréviations, il est possible de changer sa langue avec 4 options de
\item[nomencl-L1L2] descriptions bilingues, langue principale (\textit{langue seconde})
\item[nomencl-L2L1] descriptions bilingues, langue seconde (\textit{langue principale})
\end{description}
-L'option \texttt{singlespaceglos} du package permet de forcer un interligne simple pour la nomenclature (nécessite \texttt{ulthese}/\texttt{memoir} ou le package \texttt{linespace}). La macro \texttt{\textbackslash glscatnamefmt} peut être redéfinie au préambule afin de modifier le style de l'en-tête des catégories. L'exemple de la page ii est une nomenclature bilingue \textbf{nomencl-L2L1} en interligne simple.
+L'option \texttt{singlespaceglos} du package permet de forcer un interligne simple pour la nomenclature (nécessite \texttt{ulthese}/\texttt{memoir} ou le package \texttt{setspace}). La macro \texttt{\textbackslash glscatnamefmt} peut être redéfinie au préambule afin de modifier le style de l'en-tête des catégories. L'exemple de la page ii est une nomenclature bilingue \textbf{nomencl-L2L1} en interligne simple.
Si défini, le contenu de la clé \texttt{symbol} est ajouté a la fin de la description (pour les unités ou dimensions). À noter que les symboles mathématiques ne sont pas enregistrés dans cette clé, mais bien dans la clé \texttt{name}.
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}%
}%