fix whitespace around \vocab
This commit is contained in:
parent
b6a13cfa40
commit
521ce5c804
1 changed files with 10 additions and 10 deletions
|
@ -21,25 +21,25 @@ __IF__(index)
|
||||||
%Emphasize \vocabulary
|
%Emphasize \vocabulary
|
||||||
\RequirePackage{expl3}
|
\RequirePackage{expl3}
|
||||||
\ExplSyntaxOn
|
\ExplSyntaxOn
|
||||||
\NewDocumentCommand{\vocab}{O{} m}{
|
\NewDocumentCommand{\vocab}{O{} m}{%
|
||||||
\textbf{\color{blue} #2}%
|
\textbf{\color{blue} #2}%
|
||||||
\if\relax\detokenize{#1}\relax%
|
\if\relax\detokenize{#1}\relax%
|
||||||
\index[vocabindex]{\text_titlecase_first:n{#2}} % true branch: #1 was empty
|
\index[vocabindex]{\text_titlecase_first:n{#2}} % true branch: #1 was empty
|
||||||
\else
|
\else%
|
||||||
\index[vocabindex]{#1} % false branch: #1 was supplied
|
\index[vocabindex]{#1} % false branch: #1 was supplied
|
||||||
\fi
|
\fi%
|
||||||
}
|
}
|
||||||
\ExplSyntaxOff
|
\ExplSyntaxOff
|
||||||
\newcommand\printvocabindex{
|
\newcommand\printvocabindex{%
|
||||||
\printindex[vocabindex]
|
\printindex[vocabindex]%
|
||||||
}
|
}
|
||||||
\NewDocumentCommand{\PrintVocabIndex}{ }
|
\NewDocumentCommand{\PrintVocabIndex}{ }
|
||||||
{
|
{%
|
||||||
\printindex[vocabindex]
|
\printindex[vocabindex]%
|
||||||
}
|
}
|
||||||
\else
|
\else
|
||||||
\NewDocumentCommand{\vocab}{O{} m }{
|
\NewDocumentCommand{\vocab}{O{} m }{%
|
||||||
\textbf{\color{blue} #2}
|
\textbf{\color{blue} #2}%
|
||||||
}
|
}%
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue