From e56341155ca3f893f0f131de5df4dc537fc8172b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 23 Nov 2009 01:20:55 +0000 Subject: new latex package hvindex (15oct09) git-svn-id: svn://tug.org/texlive/trunk@16136 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/hvindex/Changes | 12 ++ Master/texmf-dist/doc/latex/hvindex/README | 20 ++++ Master/texmf-dist/doc/latex/hvindex/hvindex.pdf | Bin 0 -> 80769 bytes Master/texmf-dist/doc/latex/hvindex/hvindex.tex | 140 +++++++++++++++++++++++ Master/texmf-dist/tex/latex/hvindex/hvindex.sty | 123 ++++++++++++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 2 +- Master/tlpkg/tlpsrc/collection-pictures.tlpsrc | 1 + Master/tlpkg/tlpsrc/hvindex.tlpsrc | 0 TODO | 8 +- 10 files changed, 305 insertions(+), 3 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/hvindex/Changes create mode 100644 Master/texmf-dist/doc/latex/hvindex/README create mode 100644 Master/texmf-dist/doc/latex/hvindex/hvindex.pdf create mode 100644 Master/texmf-dist/doc/latex/hvindex/hvindex.tex create mode 100644 Master/texmf-dist/tex/latex/hvindex/hvindex.sty create mode 100644 Master/tlpkg/tlpsrc/hvindex.tlpsrc diff --git a/Master/texmf-dist/doc/latex/hvindex/Changes b/Master/texmf-dist/doc/latex/hvindex/Changes new file mode 100644 index 00000000000..6a9f2578882 --- /dev/null +++ b/Master/texmf-dist/doc/latex/hvindex/Changes @@ -0,0 +1,12 @@ +hvindex.sty -------- +0.03 2009-10-24 - fixed an introduced bug with the last version +0.02 2009-10-18 - makeidx and makeindex now depend on the + optional argument [makeidx] + - do not use @ operator when there is no + one in the argument + - added macros \iBraceL, \IBraceL, + \iBraceR, IBraceR to get the braces + well sorted depending to their ASCII number + (thanks to Heiko Oberdiek) +0.01 2009-10-01 first CTAN version + diff --git a/Master/texmf-dist/doc/latex/hvindex/README b/Master/texmf-dist/doc/latex/hvindex/README new file mode 100644 index 00000000000..527d6f326f6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/hvindex/README @@ -0,0 +1,20 @@ +%% Package `hvindex.sty' +%% +%% Herbert Voss (Germany) +%% +%% (C) 2009 +%% +This package defines some macros as a +replacement for \index which makes +live easier. You have to type every +word only once to get it into the index +and into the text. + + +Save the file hvindex.sty in a directory, +which is part of your local TeX tree. +Then do not forget to run texhash to update this tree. +For more information see the documentation of your LaTeX distribution +on installing packages into your local TeX system or read the +TeX Frequently Asked Questions: +(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages). diff --git a/Master/texmf-dist/doc/latex/hvindex/hvindex.pdf b/Master/texmf-dist/doc/latex/hvindex/hvindex.pdf new file mode 100644 index 00000000000..b1dc16b70c9 Binary files /dev/null and b/Master/texmf-dist/doc/latex/hvindex/hvindex.pdf differ diff --git a/Master/texmf-dist/doc/latex/hvindex/hvindex.tex b/Master/texmf-dist/doc/latex/hvindex/hvindex.tex new file mode 100644 index 00000000000..464956fdf70 --- /dev/null +++ b/Master/texmf-dist/doc/latex/hvindex/hvindex.tex @@ -0,0 +1,140 @@ +\listfiles +\documentclass[ngerman]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[osf]{mathpazo} +\usepackage[scaled]{beramono} +\usepackage{babel} +\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 + +\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} & \emph{Text} & \emph{index}\\\hline +\endfirsthead +\multicolumn{3}{@{}l}{\ldots\ continued from previous page}\\\hline +\emph{code} & \emph{Text} & \emph{index}\\\hline +\endhead +\hline +\multicolumn{3}{r@{}}{continued on next page \ldots}\\ +\hline +\endfoot +\hline +\endlastfoot +\verb+\Index{foo}+ &$\Rightarrow$ \Index{foo} & foo\\ +\verb+\Index{foo!bar}+ &$\Rightarrow$ \Index{foo!bar} & foo\\ + & & \kern1em bar\\ +\verb+\Index{foo!bar!baz}+ &$\Rightarrow$ \Index{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em baz\\ +\verb+\Index{foo@\textsc{foo}}+ &$\Rightarrow$ \Index{foo@\textsc{foo}} & \textsc{foo}\\ +\verb+\Index{foo!bar@\textsf{baz}}+ &$\Rightarrow$ \Index{foo!bar@\textsf{bar}} & foo\\ + & & \kern1em\textsf{bar}\\ +\verb+\Index{foo!bar!baz@\texttt{baz}}+ &$\Rightarrow$ \Index{foo!bar!baz@\texttt{baz}}&foo\\ + & & \kern1em bar\\ + & & \kern2em \texttt{baz}\\ +\verb+\Index{foo@\textsc{foo}!bar}+ &$\Rightarrow$ \Index{foo@\textsc{foo}!bar} & \textsc{foo}\\ + & & \kern1em bar\\ +\verb+\Index{foo!bar@\textsc{bar}!baz}+ &$\Rightarrow$ \Index{foo!bar@\textsc{bar}!baz}& foo\\ + & & \kern1em\textsc{bar}\\ + & & \kern2em baz\\ +\verb+\Index{foo@\textsc{foo}}+ &$\Rightarrow$ \Index{foo@\textsc{foo}} & \textsc{foo}\\ +\verb+\Index{foo!bar@\textsf{baz}}+ &$\Rightarrow$ \Index{foo!bar@\textsf{bar}} & foo\\ + & & \kern1em\textsf{bar}\\ +\verb+\Index{foo!bar!baz@\texttt{baz}}+ &$\Rightarrow$ \Index{foo!bar!baz@\texttt{baz}}& foo\\ + & & \kern1em bar\\ + & & \kern2em\texttt{baz}\\ +\verb+\ttIndex{foo}+ &$\Rightarrow$ \ttIndex{foo} & \texttt{foo}\\ +\verb+\bfIndex{foo}+ &$\Rightarrow$ \bfIndex{foo} & \textbf{foo}\\ +\verb+\sfIndex{foo}+ &$\Rightarrow$ \sfIndex{foo} & \textsf{foo}\\ +\verb+\scIndex{foo}+ &$\Rightarrow$ \scIndex{foo} & \textsc{foo}\\ +\verb+\itIndex{foo}+ &$\Rightarrow$ \itIndex{foo} & \textit{foo}\\ +\verb+\ttIndex{foo!bar}+ &$\Rightarrow$ \ttIndex{foo!bar} & foo\\ + & & \kern1em\texttt{bar}\\ +\verb+\bfIndex{foo!bar}+ &$\Rightarrow$ \bfIndex{foo!bar} & foo\\ + & & \kern1em\textbf{bar}\\ +\verb+\sfIndex{foo!bar}+ &$\Rightarrow$ \sfIndex{foo!bar} & foo\\ + & & \kern1em\textsf{bar}\\ +\verb+\scIndex{foo!bar}+ &$\Rightarrow$ \scIndex{foo!bar} & foo\\ + & & \kern1em\textsc{bar}\\ +\verb+\itIndex{foo!bar}+ &$\Rightarrow$ \itIndex{foo!bar} & foo\\ + & & \kern1em\textit{bar}\\ +\clearpage +\verb+\ttIndex{foo!bar!baz}+ &$\Rightarrow$ \ttIndex{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em\texttt{baz}\\ +\verb+\bfIndex{foo!bar!baz}+ &$\Rightarrow$ \bfIndex{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em\textbf{baz}\\ +\verb+\sfIndex{foo!bar!baz}+ &$\Rightarrow$ \sfIndex{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em\textsf{baz}\\ +\verb+\scIndex{foo!bar!baz}+ &$\Rightarrow$ \scIndex{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em\textsc{baz}\\ +\verb+\itIndex{foo!bar!baz}+ &$\Rightarrow$ \itIndex{foo!bar!baz} & foo\\ + & & \kern1em bar\\ + & & \kern2em\textit{baz}\\\hline +\verb+\sIndex{foo|bar}+ &$\Rightarrow$ \sIndex{foo|bar} & foo, see bar \\ +\verb+\saIndex{baz|bar}+ &$\Rightarrow$ \saIndex{baz|bar}& 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 \Index{"|} 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}\index{{"|}} + +\clearpage +\phantomsection +\addcontentsline{toc}{section}{Index} +\printindex +\end{document} + + diff --git a/Master/texmf-dist/tex/latex/hvindex/hvindex.sty b/Master/texmf-dist/tex/latex/hvindex/hvindex.sty new file mode 100644 index 00000000000..7b39cb999f0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/hvindex/hvindex.sty @@ -0,0 +1,123 @@ +% $Id: deIndex.sty 737 2009-10-12 08:59:10Z herbert $ +%% +%% IMPORTANT NOTICE: +%% +%% This is file `hvindex.sty', +%% +%% Herbert Voss +%% October 01, 2009 +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `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)] +\message{`hvindex' v\fileversion, \filedate\space (hv)} +% +\newif\ifhv@makeidx\hv@makeidxfalse +\DeclareOption{makeidx}{\hv@makeidxtrue} +\ProcessOptions\relax + +\ifhv@makeidx + \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 @ + \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 + \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% + \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% + \else\index{#1!#2!\protect#3@#4}#4\fi} +% +\def\sfIndex#1{\let\hvIDXfont\textsf\Index{#1}\let\hvIDXfont\hvIDXfontDefault} +\def\ttIndex#1{\let\hvIDXfont\texttt\Index{#1}\let\hvIDXfont\hvIDXfontDefault} +\def\scIndex#1{\let\hvIDXfont\textsc\Index{#1}\let\hvIDXfont\hvIDXfontDefault} +\def\itIndex#1{\let\hvIDXfont\textit\Index{#1}\let\hvIDXfont\hvIDXfontDefault} +\def\bfIndex#1{\let\hvIDXfont\textbf\Index{#1}\let\hvIDXfont\hvIDXfontDefault} +% +\makeatletter +\def\sIndex#1{\expandafter\sIndex@i#1\@nil} +\def\sIndex@i#1|#2\@nil{\index{#1|see{#2}}#1} +\def\saIndex#1{\expandafter\saIndex@i#1\@nil} +\def\saIndex@i#1|#2\@nil{\index{#1|seealso{#2}}#1} +% +\begingroup + \lccode`0=`\{ + \lccode`1=`\} +\lowercase{% + \endgroup + \newcommand\hv@BraceLeft{0}% + \newcommand\hv@BraceRight{1}% +} +\iffalse +\def\iBraceL{% + \begingroup + \edef\x{\endgroup + \noexpand\index{\string"\string{@\string\textbraceleft}% + }\x} +\def\iBraceR{% + \begingroup + \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}\}} + +%\newcommand*\iBraceL{\iBraceL} +%\newcommand*\iBraceR{\iBraceR} +%\newcommand*\IBraceL{\iBraceL\textbraceleft} +%\newcommand*\IBraceR{\iBraceR\textbraceright} +%\ifhvShortHandOff\shorthandon{"}\fi + +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index c2b091e510a..f75c7934901 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -128,7 +128,7 @@ my @WorkingTLP = qw( HA-prosper hands hanging harmony harvard harvardkyoto harvmac hc hep hepnames hepparticles hepthesis hepunits here - hhtensor histogr hitec hrlatex hvfloat + hhtensor histogr hitec hrlatex hvfloat hvindex hypdvips hyperref hyperxmp hyph-utf8 hyphen-base hyphenat hyphenex hyplain ibygrk icsv IEEEconf IEEEtran ifmtarg ifplatform ifxetex diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index a2ccf1fccfe..c584bc640b8 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -248,7 +248,7 @@ depend hhtensor depend histogr depend hitec depend hpsdiss -depend hvfloat +depend hvindex depend hypdvips depend hyper depend hyperref-docsrc diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc index 758ec4fdc4c..85808fd73d9 100644 --- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc @@ -20,6 +20,7 @@ depend epspdfconversion depend fig4latex depend gnuplottex depend here +depend hvfloat depend miniplot depend pb-diagram depend petri-nets diff --git a/Master/tlpkg/tlpsrc/hvindex.tlpsrc b/Master/tlpkg/tlpsrc/hvindex.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/TODO b/TODO index 95ebe6478b4..20987e8805c 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ $Id$ Public domain. TODO: -0. 2009 +0. 2010 1. Package updates a. add more packages b. fix ctan2tds and friends @@ -11,6 +11,12 @@ Public domain. TODO: 4. random stuff +0. 2010 +- Fix .ARCH revision computation to ignore .tlpsrc and use a + file from the package itself when decreasing revisions need to be + handled. Norbert mail to tldev, 22 Nov 2009 01:09:56. + + 0. Things that have to hang fire until 2009 =========================================== - Vista/W7: -- cgit v1.2.3