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
|
||||
\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
|
||||
|
||||
|
|
Loading…
Reference in a new issue