<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% $Id: hvindex-doc.tex 1063 2025-01-24 15:26:55Z herbert $

\listfiles
\documentclass[english]{article}
\usepackage{fontspec}
\usepackage{libertinus-otf}
\setmonofont{NotoSansMono-Regular.ttf}[FakeStretch=0.85,Scale=MatchLowercase]
\usepackage{babel}
\usepackage{geometry}
\usepackage{longtable}
\usepackage[makeidx]{hvindex}
\usepackage[colorlinks,linktocpage]{hyperref}
\providecommand\phantomsection{}
\title{\texttt{hvindex}, v. \fileversion\\ simplifying indexing \ldots}
\author{Herbert VoÃŸ}
\date{\filedate}
\begin{document}
\maketitle

\tableofcontents

\vfill
Thanks to:\\
Denis BitouzÃ©

\clearpage
\section{Package options}
With the \Index{option} \ttIndex{makeidx} the also called package is 
loaded and the macro \texttt{\textbackslash{}makeindex}
is executed.

The package should be loaded \emph{after} package \ttIndex{babel}.

\section{Introduction}
The \Index{package} \ttIndex{hvindex} defines some \Index{macros}
as a \Index{macro!replacement} for 
\Index{macros!index@\texttt{\textbackslash index}} 
which makes \Index{live} easier\index{easy}. You have to type every
\Index{word} only \Index{once} to get it into the \Index{index} 
and into the \Index{text}.


\small
\begin{verbatim}
The \Index{package} \ttIndex{hvindex} defines some \Index{macros}
as a \Index{macro!replacement} for 
\Index{macros!index@\texttt{\textbackslash index}} 
which makes \Index{live} easier\index{easy}. You have to type every
\Index{word} only \Index{once} to get it into the \Index{index} 
and into the \Index{text}.
\end{verbatim}
\normalsize


\clearpage
\section{The macros}

\begin{longtable}{@{} l  l l @{}}\\\hline
\emph{code} &amp; \emph{Text} &amp; \emph{index}\\\hline
\endfirsthead
\multicolumn{3}{@{}l}{\ldots\ continued from previous page}\\\hline
\emph{code} &amp; \emph{Text} &amp; \emph{index}\\\hline
\endhead
\hline
\multicolumn{3}{r@{}}{continued on next page \ldots}\\
\hline
\endfoot
\hline
\endlastfoot
\verb+\Index{foo}+                      &amp; \Index{foo}                   &amp; foo\\
\verb+\Index{foo!bar}+                  &amp; \Index{foo!bar}               &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
\verb+\Index{foo!bar!baz}+              &amp; \Index{foo!bar!baz}           &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em baz\\
\verb+\Index{foo@\textsc{foo}}+         &amp; \Index{foo@\textsc{foo}}      &amp; \textsc{foo}\\
\verb+\Index{foo!bar@\textsf{baz}}+     &amp; \Index{foo!bar@\textsf{bar}}  &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textsf{bar}\\
\verb+\Index{foo!bar!baz@\texttt{baz}}+ &amp; \Index{foo!bar!baz@\texttt{baz}}&amp;foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em \texttt{baz}\\
\verb+\Index{foo@\textsc{foo}!bar}+     &amp; \Index{foo@\textsc{foo}!bar}  &amp; \textsc{foo}\\
                                        &amp;                                            &amp; \kern1em bar\\
\verb+\Index{foo!bar@\textsc{bar}!baz}+ &amp; \Index{foo!bar@\textsc{bar}!baz}&amp; foo\\
                                        &amp;                                            &amp; \kern1em\textsc{bar}\\
                                        &amp;                                            &amp; \kern2em baz\\
\verb+\Index{foo@\textsc{foo}}+         &amp; \Index{foo@\textsc{foo}}      &amp; \textsc{foo}\\ 
\verb+\Index{foo!bar@\textsf{baz}}+     &amp; \Index{foo!bar@\textsf{bar}}  &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textsf{bar}\\
\verb+\Index{foo!bar!baz@\texttt{baz}}+ &amp; \Index{foo!bar!baz@\texttt{baz}}&amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\texttt{baz}\\
\verb+\ttIndex{foo}+                    &amp; \ttIndex{foo} &amp; \texttt{foo}\\
\verb+\bfIndex{foo}+                    &amp; \bfIndex{foo} &amp; \textbf{foo}\\
\verb+\sfIndex{foo}+                    &amp; \sfIndex{foo} &amp; \textsf{foo}\\
\verb+\scIndex{foo}+                    &amp; \scIndex{foo} &amp; \textsc{foo}\\
\verb+\itIndex{foo}+                    &amp; \itIndex{foo} &amp; \textit{foo}\\
\verb+\ttIndex{foo!bar}+                &amp; \ttIndex{foo!bar} &amp; foo\\
                                        &amp;                                            &amp; \kern1em\texttt{bar}\\
\verb+\bfIndex{foo!bar}+                &amp; \bfIndex{foo!bar} &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textbf{bar}\\
\verb+\sfIndex{foo!bar}+                &amp; \sfIndex{foo!bar} &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textsf{bar}\\
\verb+\scIndex{foo!bar}+                &amp; \scIndex{foo!bar} &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textsc{bar}\\
\verb+\itIndex{foo!bar}+                &amp; \itIndex{foo!bar} &amp; foo\\
                                        &amp;                                            &amp; \kern1em\textit{bar}\\
\clearpage
\verb+\ttIndex{foo!bar!baz}+            &amp; \ttIndex{foo!bar!baz} &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\texttt{baz}\\
\verb+\bfIndex{foo!bar!baz}+            &amp; \bfIndex{foo!bar!baz} &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\textbf{baz}\\
\verb+\sfIndex{foo!bar!baz}+            &amp; \sfIndex{foo!bar!baz} &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\textsf{baz}\\
\verb+\scIndex{foo!bar!baz}+            &amp; \scIndex{foo!bar!baz} &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\textsc{baz}\\
\verb+\itIndex{foo!bar!baz}+            &amp; \itIndex{foo!bar!baz} &amp; foo\\
                                        &amp;                                            &amp; \kern1em bar\\
                                        &amp;                                            &amp; \kern2em\textit{baz}\\\hline
\verb+\sIndex{foo|bar}+                 &amp; \sIndex{foo|bar}    &amp; foo, see bar \\
\verb+\saIndex{baz|bar}+                &amp; \saIndex{baz|bar}&amp; baz, see also bar\\\hline

\end{longtable}

It is not easy to get the braces into an index, because \verb+\index+ reads its argument \Index{verbatim}.
The package defines the follwong macros:

\verb+\iBraceL+, which writes the \IBraceL{} into the \Index{index}, same for \verb+\iBraceR+ for the right \IBraceR.
With the upper case variant it is writen into the index and also printed into the text,
like this one: \IBraceL\ and \IBraceR\ (\verb|\IBraceL\ and \IBraceR|). The advantage of these macros is, that
the \Index{braces} are sorted correct, the character \IVert{} (written as \verb|\IVert|) must appear between them and it does \ldots

%BTW: with \texttt{hyperref} we have to write \verb+\index{{"|}}+, to get it as a correct \Index{link} into
%the index. \texttt{hvindex} does it for you if you use \verb+\Index{"|}+.
\index{bar}\iVert

\clearpage
\phantomsection
\addcontentsline{toc}{section}{Index}
\printindex
\end{document}


</pre></body></html>