document vocab package

This commit is contained in:
Maximilian Keßler 2022-01-30 19:13:26 +01:00
parent 9f5af1d669
commit 30565a139d
3 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,4 @@
$makeindex = "makeindex -s gind.ist %O -o %D %S";
$clean_ext .= ' glo';
$clean_ext .= ' hd';
$clean_ext .= ' ins';

View file

@ -0,0 +1,8 @@
doc:
latexmk
full:
latexmk -gg
clean:
latexmk -C

View file

@ -0,0 +1,55 @@
\documentclass[full]{l3doc}
\title{The \pkg{mkessler-vocab} package}
\author{Maximilian Keßler}
\usepackage{mkessler-vocab}
\begin{document}
\maketitle
\begin{abstract}
When defining lots of new notions in a document,
it is useful to index these at the point of their definition,
to let users easily look up the spots where notions are
introduced in a document.
Also, one often wants to highlight these when defining a new notion.
We combined both approaches.
\end{abstract}
\begin{documentation}
\section{Macros}
\begin{function}{\vocab}
\begin{syntax}
\cs{vocab}\oarg{index entry}\marg{vocab}
\end{syntax}
Highlights \meta{vocab} in the text (bold blue).
Also indexes this under \oarg{index entry}.
If \oarg{index entry} is empty, \meta{vocab} itself will appear in the index.
\end{function}
\begin{function}{\printvocabindex, \PrintVocabIndex}
Prints the index of vocabs.
The \cs{printvocabindex} is deprecated,
use the better named \cs{PrintVocabIndex}.
\end{function}
\section{Package options}
You can specify the two options \texttt{index} and \texttt{noindex}.
The default is \texttt{noindex}.
Index entries are only generated if \texttt{index} has been specified.
Of course, \cs{PrintVocabIndex} results in an error if the package
has been loaded with \texttt{noindex}.
\end{documentation}
\end{document}