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.dtx65
1 files changed, 41 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx b/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
index fb56758ecfe..cfb15e10617 100644
--- a/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
+++ b/Master/texmf-dist/source/latex/idxlayout/idxlayout.dtx
@@ -61,7 +61,7 @@
%
% \fi
%
-% \CheckSum{383}
+% \CheckSum{390}
%
% \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
@@ -210,8 +210,9 @@
% \subsection{Options and commands}
%
% The options provided by \ila/ use the key--value interface
-% `\meta{key}=\meta{value}'. Unless indicated otherwise, any valid \TeX\
-% dimension is a permitted value.
+% `\meta{key}=\meta{value}'. Set them with
+% |\usepackage[|\meta{options}|]{idxlayout}|. Unless indicated
+% otherwise, any valid \TeX\ dimension is a permitted value.
%
% \begin{description}[font=\sffamily]
%
@@ -334,7 +335,12 @@
% 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). The default value is \textsf{standard}.
+% 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}}
%
% \item[totoc]\SpecialOptIndex{totoc} A boolean option that controls
% whether the index is included in the table of contents. The default
@@ -382,9 +388,9 @@
%
% \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.05) and
-% the \mem/ class (v1.618033988c). It is responsive to their
-% index-related options and commands:
+% \textsf{scrartcl}, \textsf{scrbook} and \textsf{scrreprt} (v3.06) and
+% the \mem/ class (v3.6). It is responsive to their index-related
+% options and commands:
%
% \begin{itemize}
%
@@ -403,7 +409,7 @@
% option \textsf{columns}.)
%
% \item The \KOMA/ command |\setindexpreamble| and the \mem/ command
-% |\preindexhook| are supported.\footnote{Because these command do not
+% |\preindexhook| are supported.\footnote{Because these commands do not
% automatically insert vertical space between their argument and the
% first index entry, they have been made to operate independently of the
% \ila/ commands \texttt{\textbackslash setindexprenote} and
@@ -437,8 +443,12 @@
%
% The package \textsf{multind} (from 1991) is not supported.
%
-% The \textsf{ragged2e} package must be loaded before \ila/ in order to
-% use the option \textsf{justific=RaggedRight}.
+% If necessary, the \textsf{ragged2e} package will be loaded
+% automatically in order to use the option
+% \textsf{justific=RaggedRight}.
+%
+% \changes{v0.4c}{2010/06/26}{Package \textsf{ragged2e} now loaded
+% automatically}
%
% As \ila/ is based on the \textsf{multicol} package, the appearance of
% the index is affected by any \textsf{multicol} parameter not
@@ -503,7 +513,7 @@
% Announce the name and version of the package, which requires \LaTeXe.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{idxlayout}[2010/03/01 v0.4b Configurable index layout]
+\ProvidesPackage{idxlayout}[2010/06/26 v0.4c Configurable index layout]
% \end{macrocode}
% Besides \textsf{multicol}, we require the packages \textsf{kvoptions}
% (to conveniently specify options as key--value pairs) and
@@ -739,9 +749,10 @@
% 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. If \textsf{RaggedRight} is chosen without the command of the
-% same name being defined, we issue a warning message and use
-% |\raggedright| instead.
+% 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
+% available, we issue a warning message and use |\raggedright| instead
+% of |\RaggedRight|.
% \begin{macrocode}
\newcommand*{\indexjustific}{}
\def\ila@ju@standard{%
@@ -751,15 +762,21 @@
}%
}
\def\ila@ju@raggedright{\renewcommand*{\indexjustific}{\raggedright}}
+\newcommand*{\ila@RaggedRight}{}
\def\ila@ju@RaggedRight{%
- \ifundef{\RaggedRight}{%
+ \renewcommand*{\indexjustific}{\ila@RaggedRight}%
+}
+\AtBeginDocument{%
+ \IfFileExists{ragged2e.sty}{%
+ \RequirePackage{ragged2e}%
+ \renewcommand*{\ila@RaggedRight}{\RaggedRight}%
+ }{%
\PackageWarning{idxlayout}{%
- Command RaggedRight not defined!\MessageBreak
- I'm using raggedright instead}%
+ Package ragged2e not available, therefore\MessageBreak
+ substituting command raggedright for RaggedRight\MessageBreak
}%
- \renewcommand*{\indexjustific}{\raggedright}%
- }{%
- \renewcommand*{\indexjustific}{\RaggedRight}%
+ \renewcommand*{\ila@RaggedRight}{\raggedright}%
+ }%
}
\ila@defradiokey{justific}{ju}
\setkeys{ila}{justific=standard}
@@ -863,7 +880,7 @@
% \textsf{scrreprt}, we only use |\setchapterpreamble| if
% |\index@preamble| is not defined as |\relax|. Thus, we avoid excessive
% vertical space between the index heading and the first entry. For
-% textsf{scrartcl}, we drop the special pagestyle of the first index
+% \textsf{scrartcl}, we drop the special pagestyle of the first index
% page and also (for the moment) do not use |\index@preamble|.
% \begin{macrocode}
\def\ila@prologue{%
@@ -914,9 +931,9 @@
% If the \textsf{index} package is loaded, the command
% |\ila@packindadjust| will~-- in accordance with the settings for
% individual indexes~-- redefine |\indexname| and (depending on the
-% state of |\index@prologue| which stores the optional argument of
-% |\printindex|) reset the argument of |\setindexprenote|. Because the
-% \mem/ class (with built-in features similar to those of the
+% state of |\index@prologue| which stores the second optional argument
+% of |\printindex|) reset the argument of |\setindexprenote|. Because
+% the \mem/ class (with built-in features similar to those of the
% \textsf{index} package) feigns the presence of the package,
% |\ila@packindadjust| is also let to |\relax| if the reported package
% date is newer than that of the last official version (v4.2beta).