diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvindex/hvindex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hvindex/hvindex.sty | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/hvindex/hvindex.sty b/Master/texmf-dist/tex/latex/hvindex/hvindex.sty index 7b39cb999f0..f6dba8e127a 100644 --- a/Master/texmf-dist/tex/latex/hvindex/hvindex.sty +++ b/Master/texmf-dist/tex/latex/hvindex/hvindex.sty @@ -5,7 +5,7 @@ %% This is file `hvindex.sty', %% %% Herbert Voss <herbert@dante.de> -%% October 01, 2009 +%% October 01, 2009- %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -15,60 +15,56 @@ %% `hvindex' offers macros for simplifing indexing of words %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{0.03} -\def\filedate{2009/10/24} -% -\ProvidesPackage{hvindex}[\filedate\ \fileversion\ Index macros (hv)] +\def\fileversion{0.04} +\def\filedate{2017/12/12} \message{`hvindex' v\fileversion, \filedate\space (hv)} % +\ProvidesPackage{hvindex}[\filedate~Index macros (hv)] +% +\RequirePackage{xkeyval} \newif\ifhv@makeidx\hv@makeidxfalse -\DeclareOption{makeidx}{\hv@makeidxtrue} -\ProcessOptions\relax +\DeclareOptionX{makeidx}{\hv@makeidxtrue} +\newcommand*\hv@index@quote{>} +\DeclareOptionX{quote}{\renewcommand*\hv@index@quote{#1}} + + +\ProcessOptionsX\relax \ifhv@makeidx - \RequirePackage{makeidx}\makeindex + \RequirePackage{makeidx} + \makeindex \fi % \let\IndexNIL\@nil \def\hvIDXfontDefault#1{#1} \let\hvIDXfont\hvIDXfontDefault -%\providecommand*\shorthandoff[1]{} -%\providecommand*\shorthandon[1]{} -\newif\ifhvShortHandOff\hvShortHandOfffalse -%\ifcat"~\shorthandoff{"}\hvShortHandOfftrue\fi -\def\hvEncap{"|} % \makeatother \def\Index#1{\expandafter\IndexXi#1!!!\IndexNIL} \def\IndexXi#1!#2!#3!#4\IndexNIL{% - \ifx\relax#3\relax % no 3rd argument - \ifx\relax#2\relax % no 2nd argument - \IndexXXi#1@@\IndexNIL % scan #1 for @ - \else\IndexXXii#1!#2@@\IndexNIL\fi % scan #2 for @ + \ifx\relax#3\relax% % no 3rd argument + \ifx\relax#2\relax% % no 2nd argument + \IndexXXi#1@@==%\IndexNIL% % scan #1 for @ + \else\IndexXXii#1!#2@@\IndexNIL\fi% % scan #2 for @ \else\IndexXXiii#1!\noexpand#2!#3@@\IndexNIL% scan #3 for @ \fi} \def\IndexXXi#1@#2@#3\IndexNIL{% - \ifx\relax#2\relax % no @ in last arg - \def\hvTemp{#1}% - \ifx\hvTemp\hvEncap\index{{#1}}#1\else% {{...}} to get "| with hyperref - \ifx\hvIDXfont\hvIDXfontDefault\index{#1}#1 - \else\index{#1@\hvIDXfont{#1}}\hvIDXfont{#1}\fi\fi%#1 + \ifx\relax#2\relax% no @ in last arg + \ifx\hvIDXfont\hvIDXfontDefault + \index{#1}#1% + \else\index{#1@\hvIDXfont{#1}}\hvIDXfont{#1}\fi%#1 \else\index{#1@#2}#2\fi}% % #1@#2 % \def\IndexXXii#1!#2@#3@#4\IndexNIL{% \ifx\relax#3\relax % no @ in last arg - \def\hvTemp{#2}% - \ifx\hvTemp\hvEncap\index{#1!{#2}}#2\else - \ifx\hvIDXfont\hvIDXfontDefault\index{#2}#2 - \else\index{#1!#2@\hvIDXfont{#2}}\hvIDXfont{#2}\fi\fi% + \ifx\hvIDXfont\hvIDXfontDefault\index{#2}#2% + \else\index{#1!#2@\hvIDXfont{#2}}\hvIDXfont{#2}\fi% \else\index{#1!\protect#2@#3}#3\fi} % \def\IndexXXiii#1!#2!#3@#4@#5\IndexNIL{% \ifx\relax#4\relax % no @ in last arg - \def\hvTemp{#3}% - \ifx\hvTemp\hvEncap\index{#1!#2!{#3}}#3\else - \ifx\hvIDXfont\hvIDXfontDefault\index{#3}#3 - \else\index{#1!#2!#3@\hvIDXfont{#3}}\hvIDXfont{#3}\fi\fi% + \ifx\hvIDXfont\hvIDXfontDefault\index{#3}#3% + \else\index{#1!#2!#3@\hvIDXfont{#3}}\hvIDXfont{#3}\fi% \else\index{#1!#2!\protect#3@#4}#4\fi} % \def\sfIndex#1{\let\hvIDXfont\textsf\Index{#1}\let\hvIDXfont\hvIDXfontDefault} @@ -83,15 +79,15 @@ \def\saIndex#1{\expandafter\saIndex@i#1\@nil} \def\saIndex@i#1|#2\@nil{\index{#1|seealso{#2}}#1} % +\iffalse \begingroup \lccode`0=`\{ \lccode`1=`\} \lowercase{% \endgroup - \newcommand\hv@BraceLeft{0}% - \newcommand\hv@BraceRight{1}% + \newcommand\hvBraceLeft{0}% + \newcommand\hvBraceRight{1}% } -\iffalse \def\iBraceL{% \begingroup \edef\x{\endgroup @@ -102,22 +98,26 @@ \edef\x{\endgroup \noexpand\index{\string"\string{@\string\textbraceleft}% }\x} -\fi %\begingroup % \edef\x{\endgroup % \noexpand\index{\string"\string{@\string\textbraceleft}% % }% %\x -\newcommand*{\hv@braceIndex}[1]{\index{#1}} -\newcommand*\iBraceL{\hv@braceIndex{\string"\hv@BraceLeft @\string\textbraceleft}} -\newcommand*\iBraceR{\hv@braceIndex{\string"\hv@BraceRight @\string\textbraceright}} -\newcommand*\IBraceL{\hv@braceIndex{\string"\hv@BraceLeft @\string\textbraceleft}\{} -\newcommand*\IBraceR{\hv@braceIndex{\string"\hv@BraceRight @\string\textbraceright}\}} +\else +%\newcommand*{\hv@braceIndex}[1]{\index{#1}} +%\newcommand*\iBraceL{\hv@braceIndex{"\hvBraceLeft @\string\textbraceleft}} +%\newcommand*\iBraceR{\hv@braceIndex{"\hvBraceRight @\string\textbraceright}} +%\newcommand*\IBraceL{\hv@braceIndex{"\hvBraceLeft @\textbraceleft}\{} +%\newcommand*\IBraceR{\hv@braceIndex{"\hvBraceRight @\textbraceright}\}} +\def\iBraceL{\index{\char123}} +\def\iBraceR{\index{\char125}} +\def\iVert{\index{\char124}} + +\fi +\newcommand*\IBraceL{\iBraceL\textbraceleft} +\newcommand*\IBraceR{\iBraceR\textbraceright} +\newcommand*\IVert{\iVert|} + -%\newcommand*\iBraceL{\iBraceL} -%\newcommand*\iBraceR{\iBraceR} -%\newcommand*\IBraceL{\iBraceL\textbraceleft} -%\newcommand*\IBraceR{\iBraceR\textbraceright} -%\ifhvShortHandOff\shorthandon{"}\fi \endinput |