summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx')
-rw-r--r--Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx106
1 files changed, 61 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx b/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
index cfb15e10617..8a0c72e49de 100644
--- a/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
+++ b/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
@@ -2,10 +2,11 @@
%
% This is file `idxlayout.dtx'.
%
-% Copyright (C) 2010 by Thomas Titz <thomas.titz@chello.at>
+% Copyright (C) 2010--2012 by Thomas Titz <thomas.titz@chello.at>
%
% Permission is granted to distribute and/or modify this work under the
-% terms of the LaTeX Project Public License (LPPL), version 1.3c.
+% terms of the LaTeX Project Public License (LPPL), version 1.3c or
+% later.
%
% The LPPL maintenance status of this work is "maintained".
%
@@ -54,6 +55,7 @@
\def\ila/{\textsf{idxlayout}}
\def\KOMA/{\textsf{KOMA-Script}}
\def\mem/{\textsf{memoir}}
+\widowpenalty=10000
\begin{document}
\DocInput{idxlayout.dtx}
\end{document}
@@ -61,7 +63,7 @@
%
% \fi
%
-% \CheckSum{390}
+% \CheckSum{397}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -90,6 +92,7 @@
% \DoNotIndex{\@nameuse,\nobreak,\or,\p@,\par,\ProvidesPackage,\relax}
% \DoNotIndex{\renewcommand,\renewenvironment,\RequirePackage}
% \DoNotIndex{\setcounter,\setlength,\the,\tw@,\vspace,\z@}
+% \DoNotIndex{\boolfalse,\booltrue,\ifbool,\providecommand}
%
% \title{The \ila/ package\thanks{This document corresponds to
% \ila/~\fileversion, dated \filedate.}}
@@ -130,12 +133,6 @@
% between keyword and first page number, you still have to provide a
% corresponding \textsf{MakeIndex} style file.
%
-% This manual is typeset according to the conventions of the \LaTeX\
-% \textsc{docstrip} utility which enables the automatic extraction of
-% the \LaTeX\ macro source files \cite[ch. 14]{Mit04}. Section~2
-% describes the usage of the package, while the optional section~3
-% contains the commented source code.
-%
% \begin{figure}
% \centering
% \scalebox{0.83}{%
@@ -211,8 +208,9 @@
%
% The options provided by \ila/ use the key--value interface
% `\meta{key}=\meta{value}'. Set them with
-% |\usepackage[|\meta{options}|]{idxlayout}|. Unless indicated
-% otherwise, any valid \TeX\ dimension is a permitted value.
+% |\usepackage[|\meta{options}|]{idxlayout}|. For boolean options, the
+% default value is \textsf{false}, and specifying \meta{key} is
+% equivalent to \meta{key}\textsf{=true}.
%
% \begin{description}[font=\sffamily]
%
@@ -224,8 +222,7 @@
%
% \item[unbalanced]\SpecialOptIndex{unbalanced} A boolean option that,
% if enabled, switches off the balancing of columns on the last index
-% page. The default value is \textsf{false}. You may simply specify
-% \textsf{unbalanced}, which is equivalent to \textsf{unbalanced=true}.
+% page.
%
% \changes{v0.4a}{2010/01/24}{New option \textsf{unbalanced}}
%
@@ -313,9 +310,7 @@
%
% \item[columnnote]\SpecialOptIndex{columnnote} A boolean option that
% controls whether a possible prenote is typeset as part of the first
-% index column. The default value is \textsf{false}. You may simply
-% specify \textsf{columnnote}, which is equivalent to
-% \textsf{columnnote=true}.
+% index column.
%
% \changes{v0.4b}{2010/03/01}{New option \textsf{columnnote}}
%
@@ -334,20 +329,23 @@
% \item[justific]\SpecialOptIndex{justific} The justification of index
% columns. The permitted values are \textsf{standard} (i.\,e. left and
% right margin justified), \textsf{raggedright} and \textsf{RaggedRight}
-% (which uses the command of the same name of the \textsf{ragged2e}
-% package).\footnote{Before \ila/ v0.4c, \textsf{justific=RaggedRight}
-% erroneously utilized \texttt{\textbackslash raggedright}.} The default
-% value is \textsf{standard}.
+% (which uses the correspondent command of the automatically loaded
+% \textsf{ragged2e} package).\footnote{Before \ila/ v0.4c,
+% \textsf{justific=RaggedRight} erroneously utilized
+% \texttt{\textbackslash raggedright}.} The default value is
+% \textsf{standard}.
%
% \changes{v0.4c}{2010/06/26}{Corrected option \textsf{justific!=
% RaggedRight}}
%
+% \changes{v0.4c}{2010/06/26}{Package \textsf{ragged2e} now loaded
+% automatically}
+%
% \item[totoc]\SpecialOptIndex{totoc} A boolean option that controls
% whether the index is included in the table of contents. The default
-% value is set according to the standard behaviour of the document class
-% (\textsf{true} for \mem/, \textsf{false} for other classes). You may
-% simply specify \textsf{totoc}, which is equivalent to
-% \textsf{totoc=true}.
+% value of this option is set according to the standard behaviour of the
+% document class (\textsf{true} for \mem/, \textsf{false} for other
+% classes).
%
% \end{description}
%
@@ -384,14 +382,25 @@
% Redefine the command |\indexsubsdelim| if you happen to dislike the
%default delimiter used with the option \textsf{itemlayout=singlepar}.
%
+% \DescribeMacro{\indexstheadcase}
+% In the standard classes, the index header is typeset using
+% |\MakeUppercase|. \ila/ allows you to change this by redefining
+% |\indexstheadcase|.
+%
+% \changes{v0.4d}{2010/03/01}{Added \texttt{\textbackslash
+% indexstheadcase}}
+%
% \subsection{Compatibility issues and notes}
%
% \ila/ has been tested with the standard classes \textsf{article},
% \textsf{book} and \textsf{report} (v1.4h), the \KOMA/-classes
-% \textsf{scrartcl}, \textsf{scrbook} and \textsf{scrreprt} (v3.06) and
-% the \mem/ class (v3.6). It is responsive to their index-related
+% \textsf{scrartcl}, \textsf{scrbook} and \textsf{scrreprt} (v3.10a) and
+% the \mem/ class (v3.6j). It is responsive to their index-related
% options and commands:
%
+% \changes{v0.4d}{2012/03/30}{Adapted emulation of \textsf{theindex} to
+% \KOMA/ v3.10}
+%
% \begin{itemize}
%
% \item The \KOMA/ options for including the index in the table of
@@ -434,21 +443,18 @@
% a typographic point of view. See \cite[pp. 86--87]{Koh08} for
% details.}
%
-% \changes{v0.4b}{2010/03/01}{Package \textsf{index} now supported}
+% Another package which must not be loaded after \ila/ is
+% \textsf{imakeidx} which allows to create indexes during the main
+% typesetting run.
%
% The \textsf{index} package also has to be loaded before \ila/. You may
% use the newly-defined second optional argument of |\printindex| to
% override the prenote text of |\setindexprenote| for individual
% indexes.
%
-% The package \textsf{multind} (from 1991) is not supported.
-%
-% If necessary, the \textsf{ragged2e} package will be loaded
-% automatically in order to use the option
-% \textsf{justific=RaggedRight}.
+% \changes{v0.4b}{2010/03/01}{Package \textsf{index} now supported}
%
-% \changes{v0.4c}{2010/06/26}{Package \textsf{ragged2e} now loaded
-% automatically}
+% The \textsf{multind} package (from 1991) is not supported.
%
% As \ila/ is based on the \textsf{multicol} package, the appearance of
% the index is affected by any \textsf{multicol} parameter not
@@ -495,9 +501,9 @@
% \bibitem{Wri09}
% Wright, Joseph and Christian Feuers\"anger.
% ``Implementing key--value input: An introduction''.
-% Preliminary draft, March 17, 2009.
-% \url{http://www.texdev.net/wp-content/uploads/2009/03/keyval.pdf}
-% (accessed January 2, 2010).
+% \emph{TUGboat} 30.1 (2009), pp.~110--122.
+% \url{http://www.tug.org/TUGboat/tb30-1/tb94wright-keyval.pdf}
+% (accessed March 30, 2012).
%
% \end{thebibliography}
%
@@ -513,7 +519,7 @@
% Announce the name and version of the package, which requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{idxlayout}[2010/06/26 v0.4c Configurable index layout]
+\ProvidesPackage{idxlayout}[2012/03/30 v0.4d Configurable index layout]
% \end{macrocode}
% Besides \textsf{multicol}, we require the packages \textsf{kvoptions}
% (to conveniently specify options as key--value pairs) and
@@ -544,7 +550,7 @@
% second is a ``short key'' which must be used as a second prefix after
% |ila@| when defining the functions associated with each value. The
% optional argument specifies a default value ``which is then used if
-% the user does not supply one'' \cite[p. 1002]{Wri09}.
+% the user does not supply one'' \cite[p.~111]{Wri09}.
% \begin{macrocode}
\newcommand*{\ila@defradiokey}[3][]{%
\define@key{ila}{#2}[#1]{%
@@ -749,8 +755,8 @@
% the \KOMA/-classes) also explicitly set |\parfillskip| to its default
% value of 0\,pt plus 1\,fil. This way, resettings done outside the
% |theindex| environment won't affect the justification of index
-% columns. We try to load the \textsf{ragged2e} package at the begin of
-% the document in order to prevent option clashes. If the package is not
+% columns. We try to load the \textsf{ragged2e} package at the end of
+% the preamble in order to prevent option clashes. If the package is not
% available, we issue a warning message and use |\raggedright| instead
% of |\RaggedRight|.
% \begin{macrocode}
@@ -766,7 +772,7 @@
\def\ila@ju@RaggedRight{%
\renewcommand*{\indexjustific}{\ila@RaggedRight}%
}
-\AtBeginDocument{%
+\AtEndPreamble{%
\IfFileExists{ragged2e.sty}{%
\RequirePackage{ragged2e}%
\renewcommand*{\ila@RaggedRight}{\RaggedRight}%
@@ -804,6 +810,14 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macro}{\indexstheadcase}
+% The |\indexstheadcase| command allows to avoid hard-coding
+% |\MakeUppercase| into the index header definition (as is currently
+% done by the standard classes).
+% \begin{macrocode}
+\newcommand*{\indexstheadcase}{\MakeUppercase}
+% \end{macrocode}
+% \end{macro}
% \subsection{Emulating specific document classes and packages}
%
% \begin{macro}{\ila@classtype}
@@ -859,7 +873,7 @@
}{%
}%
}%
- \@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}%
+ \@mkboth{\indexstheadcase\indexname}{\indexstheadcase\indexname}%
}
% \end{macrocode}
% \end{macro}
@@ -867,12 +881,14 @@
% \textsf{scrreprt}, we create \textsf{totoc} as a pseudo boolean key
% using |\ila@defradiokey|. If not set, this key will respect the
% default behaviour of the class plus any changes carried out before
-% loading \ila/.
+% loading \ila/. We also provide |\MakeMarkcase| to ensure compatibility
+% with older versions (below 3.10) of \KOMA/.
% \begin{macrocode}
\or
\def\ila@tc@true{\KOMAoptions{index=totoc}}%
\def\ila@tc@false{\KOMAoptions{index=nottotoc}}%
\ila@defradiokey[true]{totoc}{tc}%
+ \providecommand{\MakeMarkcase}[1]{#1}%
% \end{macrocode}
% Again, |\ila@prologue| is very much a recoding exercise. Note that the
% \KOMA/-command |\idx@@heading| is responsive to |\KOMAoptions| and
@@ -892,7 +908,7 @@
}%
}%
\idx@@heading{\indexname}%
- \@mkboth{\indexname}{\indexname}%
+ \@mkboth{\MakeMarkcase{\indexname}}{\MakeMarkcase{\indexname}}%
\ifundef{\chapter}{%
}{%
\thispagestyle{\indexpagestyle}%