summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-26 21:27:29 +0000
committerKarl Berry <karl@freefriends.org>2020-03-26 21:27:29 +0000
commit0b6fc17678db57f37210b8ced66a414f3fc6a4e6 (patch)
tree83101f43445e2f9947bbc6fc9621cc5cef5aa256
parentbee48aaba44f2ad289dbd3851e7bbc8f8d97731a (diff)
glosmathtools (26mar20)
git-svn-id: svn://tug.org/texlive/trunk@54558 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/README.md5
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.pdfbin0 -> 346481 bytes
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.tex112
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_fr.pdf (renamed from Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf)bin377849 -> 349517 bytes
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_fr.tex (renamed from Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex)19
-rw-r--r--Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_glos.tex4
-rw-r--r--Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty4
7 files changed, 128 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/README.md b/Master/texmf-dist/doc/latex/glosmathtools/README.md
index 1c5478f4528..83d58b8617c 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/README.md
+++ b/Master/texmf-dist/doc/latex/glosmathtools/README.md
@@ -13,8 +13,7 @@ The main features are:
- bilangual nomenclatures (for bilangual documents)
- bilangual abbreviations
-At the time being, the documentation is based on `ulthese` class and
-in french only.
+The documentation is based on `ulthese` class.
## Licence
@@ -23,7 +22,7 @@ later version.
## Version
-0.5.2 (2020-03-20)
+1.0.0 (2020-03-26)
## Author
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.pdf b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.pdf
new file mode 100644
index 00000000000..35c8397461f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.tex b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.tex
new file mode 100644
index 00000000000..bffa7f88905
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_en.tex
@@ -0,0 +1,112 @@
+% !TeX encoding = UTF-8
+% !TeX spellcheck = en_US
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Main document for glosmathtool sample
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% manually load hyperref with nohyperref
+\documentclass[projet,nohyperref,article,english,french]{ulthese}
+%% ===================== packages ============================================
+\ifxetex\else \usepackage[utf8]{inputenc} \fi
+\usepackage{mathtools,siunitx,amsmath,amsfonts}
+\usepackage{hyperref} % loaded last except glosmathtools
+% toc ocption passed to glossaries : add nomenclature to PDF bookmarks
+\usepackage[qtmarkupright,singlelineskip,toc]{glosmathtools}
+%% ===================== preamble ============================================
+%% ------------- glosmathtools -----------------------------------------------
+\makeglossaries% executed in first
+\setacronymlang{L1}% first language abbreviations
+\setglossarystyle{nomencl-L1L2}% bilingual description
+\loadglsentries{sample_glosmathtools_glos} % definition file
+\glssetwidest{LOOP} % IMPORTANT : widest entry in nomenclature
+\renewcommand*{\glscatnamefmt}[1]{\textbf{#1}} % category text format
+%% ------------- ulthese ----------------------------------------------------
+\titre{\texttt{glosmathtools} documentation and sample in \texttt{ulthese}}
+\soustitre{v1.0.0}
+\auteur{Francis Gagnon}
+\makeatletter\renewcommand*{\UL@typeofdoc}{}\makeatother
+%% ============================================================================
+
+\begin{document}
+\selectlanguage{english} % babel-related (not glosmathtool)
+\frontmatter
+\frontispice
+
+\printglossary[title=Nomenclature]
+
+\mainmatter
+
+\chapter{\texttt{glosmathtools} documentation and sample}
+
+\section{Compilation}
+The \texttt{glosmathtools} package is based on \texttt{glossaries} included in MiKTeX and TeX Live. Like a bibliography, the glossary compilation is done by executing the commands in the following order:
+\begin{enumerate}
+ \item \texttt{pdflatex}
+ \item \texttt{makeglossaries}
+ \item \texttt{pdflatex}
+\end{enumerate}
+The \texttt{makeglossaries} command is directly available in TeXstudio menus or with \texttt{F9}. For other editors, add a custom command. For example, in TexMaker, go to \texttt{User > User Commands > Edit User Commands}:
+\begin{itemize}
+ \item Menu Item : \texttt{glossaries}
+ \item Command : \texttt{makeglossaries \%}
+\end{itemize}
+On Windows with MiKTeX, the \texttt{makeglossaries} script may requires an installation of Perl (see \url{https://tinyurl.com/ybnoyqjp}). Once Perl installed, you should run \texttt{perltex.exe} available in the MiKTeX installation directory.
+
+\section{Package options}
+The options of the \texttt{glosmathtools} package are summarized by:
+\begin{description}
+ \item[qtmarkupright] character \texttt{<">} shortcut for subscript without italics
+ \item[singlelineskip] force single line spacing in nomenclature
+ \item[nodefop] use operators and accents without definitions
+ \item[{[other options]}] passed to \texttt{glossaries} package
+\end{description}
+For example, the \textbf{toc} option of \texttt{glossaries} can be added to include the nomenclature in the table of contents.
+
+\section{Using the package}
+By default, mathematical symbols must be used in the text so that they are added to the nomenclature, which encourages the author to introduce his variables. It is still possible to manually add a symbol without referring to it with the \texttt{\textbackslash glsadd\{label\}} macro, or \texttt{\textbackslash glsaddall}, to add everything.
+
+\subsection{Symbols, subscripts and accents}
+The insertion of a simple mathematical symbol with hyperlink is done with the \texttt{\textbackslash gls} macro of \texttt{glossaries}: \gls{k}, \gls{mat.A} and \gls{mat.b}. The same goes for abbreviations: the \gls{ODE}. Abbreviations are only defined at their first use: the \gls{ODE}.
+
+Subscripts must be labeled \texttt{sub.restOfTheLabel}: the subscript \gls{sub.a} indicates air. The \texttt{\textbackslash glsub} macro allows to add subscripts to variables: \glsub{d}{v}, \glsub{z}{v}, \glsub{T}{v}, \glsub{D}{a}, \glsub{rho}{w} and \glsub{mu}{v}. By defining mathematical symbols with \texttt{\textbackslash newglosentrymath}, all macros can be used in text mode and math mode (with \texttt{\$\$}). Still, it is better to write explicit symbols in equations to ease code reading (no hyperlink):
+\begin{equation}
+d"v + \glsub{d}{v} = \SI{10.0}{\centi\meter} = 3.937\qtmark
+\end{equation}
+The package can be loaded with the \texttt{qtmarkupright} option. The \texttt{<">} character is then configured as a shortcut for writing an index without italics in \texttt{math} mode (\texttt{<\_>} for italic index) \footnote{The \texttt{\textbackslash qtmark} macro inserts the character <">. In ISO, subscripts representing the abbreviation of a word are written without italics, and those representing a variable, in italics.}.
+
+The \texttt{\textbackslash glsvi} macro appends a variable in index to another variable, and \texttt{\textbackslash glsvisub}, an indexed variable to another variable: \glsvi{T}{k} and \glsvisub{T}{z}{v}. Finally, it is possible to add two subscripts separated by comma with \texttt{\textbackslash glsubs}: \glsubs{D}{w}{a}. In this case, the comma operator is added to the nomenclature, which must be defined in the glossary under \texttt{op.comma} label.
+
+Accents can also be added to variables with \texttt{\textbackslash glsac} macro: \glsac[dot]{m} and \glsac[bar]{T}. At their respective use, an operator is added to the nomenclature. They must therefore be defined at their respective labels. The available accents are:
+\begin{description}
+\item[dot] $\dot{\bullet}$ (defined at label \texttt{op.dot})
+\item[ddot] $\ddot{\bullet}$ (defined at label \texttt{op.ddot})
+\item[bar] $\bar{\bullet}$ (defined at label \texttt{op.bar})
+\item[hat] $\widehat{\bullet}$ (defined at label \texttt{op.hat})
+\item[vec] $\vec{\bullet}$ (defined at label \texttt{op.vec})
+\item[tilde] $\widetilde{\bullet}$ (defined at label \texttt{op.tilde})
+\end{description}
+Moreover, an optional argument makes it possible to add accents to all the aforementioned macros: \glsub[bar]{T}{v} and \glsubs[dot]{m}{v}{a}. There are two optional arguments for \texttt{\textbackslash glsvi} and \texttt{\textbackslash glsvisub} cases: \glsvi[dot]{m}{k}, \glsvi[bar][dot]{T}{m} and \glsvisub[][dot]{T}{m}{w}. Finally, the \texttt{nodefop} option makes it possible to use accents without nomenclature definitions.
+
+\subsection{Language, abbreviations and nomenclature}
+If there are language changes throughout the document, you must change the language for acronyms. The \texttt{descseclang} key must be defined in the glossary beforehand. Afterward, the \texttt{\textbackslash setacronymlang} macro allows to choose among 4 language options:
+\begin{description}
+ \item[L1] main language description (abbreviation) : \setacronymlang{L1}\acrfull{TL}
+ \item[L2] second language description (abbreviation) : \setacronymlang{L2}\acrfull{TL}
+ \item[L1L2] bilingual description, main language (abbreviation, \textit{second language}) : \setacronymlang{L1L2}\acrfull{TL}
+ \item[L2L1] bilingual description, second language (abbreviation, \textit{main language}) : \setacronymlang{L2L1}\acrfull{TL}
+\end{description}
+\setacronymlang{L1}% back to document language
+The \texttt{acronymlang} environment works in a similar way: \begin{acronymlang}{L1L2}\acrfull{TL}\end{acronymlang}. The \texttt{\textbackslash glslang} macro displays the acronym in the specified language: \glslang[L1L2]{TL}. Second descriptions are also available with \texttt{\textbackslash glsdescsec}: \textit{le \glsdescsec{TL}}.
+
+For the nomenclature (or list of symbols), the widest entry must be defined in the preamble with \texttt{\textbackslash glssetwidest}. Like abbreviations, it is possible to change your language with 4 style options for \texttt{\textbackslash setglossarystyle}:
+\begin{description}
+ \item[nomencl-L1] (or \textbf{nomencl}) main language description
+ \item[nomencl-L2] second language description
+ \item[nomencl-L1L2] bilingual description, main language (abbreviation, \textit{second language})
+ \item[nomencl-L2L1] bilingual description, second language (abbreviation, \textit{main language})
+\end{description}
+The \texttt{singlespaceglos} package option forces single line spacing in the nomenclature (requires \texttt{ulthese}/\texttt{memoir} or the \texttt{setspace} package). The \texttt{\textbackslash glscatnamefmt} macro can be redefined in the preamble to modify header format for categories. The example on page ii is a bilingual nomenclature \textbf{nomencl-L2L1} with single line spacing.
+
+If defined, the content of \texttt{symbol} key is appended to descriptions (for units or dimensions). Note that the mathematical symbols are not saved in this key, but at the \texttt{name} key.
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_fr.pdf
index 69c126e0415..930ee1909a2 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.pdf
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_fr.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_fr.tex
index e4e1c785f8e..ffda16f91cb 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools.tex
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_fr.tex
@@ -5,8 +5,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% nohyperref pour charger le package hyperref manuellement
-% voir https://gitlab.com/vigou3/ulthese/issues/2
-\documentclass[projet,nohyperref,english,french]{ulthese}
+\documentclass[projet,nohyperref,article,english,french]{ulthese}
%% ===================== packages ============================================
\ifxetex\else \usepackage[utf8]{inputenc} \fi
\usepackage{mathtools,siunitx,amsmath,amsfonts}
@@ -23,14 +22,16 @@
\renewcommand*{\glscatnamefmt}[1]{\textbf{#1}} % format des catégories
%% ------------- ulthese ----------------------------------------------------
\titre{Documentation et exemple de \texttt{glosmathtools} dans \texttt{ulthese}}
-\soustitre{v0.5.2}
+\soustitre{v1.0.0}
\auteur{Francis Gagnon}
+\makeatletter\renewcommand*{\UL@typeofdoc}{}\makeatother
%% ============================================================================
\begin{document}
-\frontmatter
-
+\selectlanguage{french} % pour babel (pas glosmathtool)
+\frontmatter
\frontispice
+
\printglossary[title=Nomenclature]
\mainmatter
@@ -59,12 +60,13 @@ Les options du package \texttt{glosmathtools} se résument par :
\item[nodefop] utilisation des opérateurs et accents sans définition
\item[{[autres options]}] passés au package \texttt{glossaries}
\end{description}
-Par exemple, l'option \textbf{toc} du package \texttt{glossaries} peut être ajouté afin d'inclure la nomenclature dans la table des matières. De plus amples informations sont fournies ci-dessous (voir .
+Par exemple, l'option \textbf{toc} du package \texttt{glossaries} peut être ajouté afin d'inclure la nomenclature dans la table des matières.
\section{Utilisation du package}
-\subsection{Symboles, indices et accentuations}
+Par défaut, les symboles mathématiques doivent être utilisés dans le texte pour qu'ils soient ajoutés à la nomenclature, ce qui incite l'auteur à introduire ses variables. Il est tout de même possible de manuellement ajouter un symbole sans y référer avec la macro \texttt{\textbackslash glsadd\{label\}}, ou \texttt{\textbackslash glsaddall}, pour tout ajouter.
-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}.
+\subsection{Symboles, indices et accentuations}
+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 : la \gls{TL}. Les abréviations sont uniquement définies à leur première utilisation : la \gls{TL}.
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}
@@ -86,7 +88,6 @@ Des accents peuvent aussi s'ajouter sur les variables avec la macro \texttt{\tex
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} et \texttt{\textbackslash glsvisub} : \glsvi[dot]{m}{k}, \glsvi[bar][dot]{T}{m} et \glsvisub[][dot]{T}{m}{w}. Finalement, il est possible d'utiliser les accents sans définition dans la nomenclature avec l'option \texttt{nodefop}.
\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}
\item[L1] description langue principale (abréviations) : \setacronymlang{L1}\acrfull{ODE}
diff --git a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_glos.tex b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_glos.tex
index edab2bc8f9d..62c2386dd06 100644
--- a/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_glos.tex
+++ b/Master/texmf-dist/doc/latex/glosmathtools/sample_glosmathtools_glos.tex
@@ -156,7 +156,7 @@
parent=abbrv%
]{ODE}{ODE}{ordinary differential equation}
\newacronym[%
- descseclang={laboratoire d'observation et d'optimisation des procédés},%
+ descseclang={transformation de Laplace},%
parent=abbrv%
- ]{LOOP}{LOOP}{process observation and optimization laboratory}
+ ]{TL}{TL}{Laplace transform}
}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty b/Master/texmf-dist/tex/latex/glosmathtools/glosmathtools.sty
index 1eeab40e759..9344689e97f 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}%
[%
-2020/03/20 v0.5.2 %
+2020/03/26 v1.0.0 %
Mathematical nomenclature tools based on glossaries package %
Francis Gagnon %
]%
@@ -252,7 +252,7 @@ Francis Gagnon %
\renewcommand*{\glosstyledesc}[1]{\glsentrydesc{##1}}%
\renewcommand*{\glossentry}[2]%
{%
- \ifnum\value{glosmath@mainEntryCtr}>0\leavevmode\par\fi%
+ \ifnum\value{glosmath@mainEntryCtr}>0\vspace{\baselineskip}\fi%
\glstarget{##1}{\glscatnamefmt{\glosstyledesc{##1}}}%
\par\nopagebreak%
\stepcounter{glosmath@mainEntryCtr}%