fix whitespace around \vocab

Build branch master (521ce5c) from kesslermaximilian/LatexPackages
This commit is contained in:
Maximilian Keßler 2022-08-18 14:09:50 +00:00
parent 0baddf33ea
commit dfbfbb9ea8
2 changed files with 18 additions and 18 deletions

View file

@ -1,8 +1,8 @@
{
"build_time": "",
"source files": {
"version": "v2.9-28-gb6a13cf",
"commit": "b6a13cfa403b88d89bcca900386a177e60dac003",
"version": "v2.9-29-g521ce5c",
"commit": "521ce5c80476d858a17e318dc633af817625e922",
"dirty": false
},
"pytex": {
@ -179,12 +179,12 @@
{
"name": "indexing/vocab/mkessler-vocab.sty",
"source file": "indexing/vocab/vocab.pysty",
"build time": "2022/01/30 23:48",
"source version": "v2.8.1-9-g4bda829",
"source commit hash": "4bda829518c07d985656547cf897712db361160e",
"build time": "2022/08/18 14:09",
"source version": "v2.9-29-g521ce5c",
"source commit hash": "521ce5c80476d858a17e318dc633af817625e922",
"pytex version": "v1.2.0-31-gc9bb0e8",
"pytex commit hash": "c9bb0e87c91beae3e17a829603e4459cf804ec51",
"md5sum": "3e4f15a2db5cb0184969bdcfc5d4d365",
"md5sum": "f2d2b06d55656ac058da07b2531d69cf",
"dirty": false
},
{

View file

@ -31,7 +31,7 @@
%
% Build details:
% PyTeX version: v1.2.0-31-gc9bb0e8 (commit c9bb0e8)
% Source code version: v2.8.1-9-g4bda829 (commit 4bda829)
% Source code version: v2.9-29-g521ce5c (commit 521ce5c)
%
% This LaTeX package is free software and is dual-licensed
% under the LPPLv1.3c and the GPLv3 licenses.
@ -47,7 +47,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-vocab}[2022/01/30 - Package for emphasizing vocabulary]
\ProvidesPackage{mkessler-vocab}[2022/08/18 - Package for emphasizing vocabulary]
%%Provides a \vocab<[name in index]>{vocabulary} command to print vocabulary in bold blue and automatically index it.
@ -77,25 +77,25 @@
%Emphasize \vocabulary
\RequirePackage{expl3}
\ExplSyntaxOn
\NewDocumentCommand{\vocab}{O{} m}{
\NewDocumentCommand{\vocab}{O{} m}{%
\textbf{\color{blue} #2}%
\if\relax\detokenize{#1}\relax%
\index[vocabindex]{\text_titlecase_first:n{#2}} % true branch: #1 was empty
\else
\else%
\index[vocabindex]{#1} % false branch: #1 was supplied
\fi
\fi%
}
\ExplSyntaxOff
\newcommand\printvocabindex{
\printindex[vocabindex]
\newcommand\printvocabindex{%
\printindex[vocabindex]%
}
\NewDocumentCommand{\PrintVocabIndex}{ }
{
\printindex[vocabindex]
{%
\printindex[vocabindex]%
}
\else
\NewDocumentCommand{\vocab}{O{} m }{
\textbf{\color{blue} #2}
}
\NewDocumentCommand{\vocab}{O{} m }{%
\textbf{\color{blue} #2}%
}%
\fi