summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/generic/pst-pdf/pst-pdf.dtx20
-rw-r--r--Master/texmf-dist/source/latex/babelbib/babelbib.dtx892
-rw-r--r--Master/texmf-dist/source/latex/babelbib/babelbib.ins1
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.dtx162
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.ins4
-rw-r--r--Master/texmf-dist/source/latex/breakurl/breakurl.dtx92
-rw-r--r--Master/texmf-dist/source/latex/dk-bib/Makefile9
-rw-r--r--Master/texmf-dist/source/latex/dottex/dottex.dtx176
-rw-r--r--Master/texmf-dist/source/latex/flowfram/flowfram.dtx111
-rw-r--r--Master/texmf-dist/source/latex/flowfram/flowfram.ins2
-rw-r--r--Master/texmf-dist/source/latex/labelcas/labelcas.dtx1092
-rw-r--r--Master/texmf-dist/source/latex/labelcas/labelcas.ins10
-rw-r--r--Master/texmf-dist/source/latex/makeplot/makeplot.dtx138
-rw-r--r--Master/texmf-dist/source/latex/makeplot/makeplot.ins120
-rw-r--r--Master/texmf-dist/source/latex/ncctools/afterpackage.dtx118
-rw-r--r--Master/texmf-dist/source/latex/ncctools/dcounter.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/desclist.dtx3
-rw-r--r--Master/texmf-dist/source/latex/ncctools/extdash.dtx5
-rw-r--r--Master/texmf-dist/source/latex/ncctools/manyfoot.dtx3
-rw-r--r--Master/texmf-dist/source/latex/ncctools/mboxfill.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccbbb.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccboxes.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/ncccomma.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/ncccropbox.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/ncccropmark.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccfancyhdr.dtx7
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccfloats.dtx326
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccfoots.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccmath.dtx3
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccparskip.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccpic.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccrules.dtx3
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccsect.dtx1451
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccstretch.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/nccthm.dtx26
-rw-r--r--Master/texmf-dist/source/latex/ncctools/ncctools.ins5
-rw-r--r--Master/texmf-dist/source/latex/ncctools/textarea.dtx236
-rw-r--r--Master/texmf-dist/source/latex/ncctools/tocenter.dtx1
-rw-r--r--Master/texmf-dist/source/latex/ncctools/topsection.dtx133
-rw-r--r--Master/texmf-dist/source/latex/ncctools/watermark.dtx1
-rw-r--r--Master/texmf-dist/source/latex/poemscol/poemscol.dtx649
-rw-r--r--Master/texmf-dist/source/latex/screenplay/screenplay.dtx122
-rw-r--r--Master/texmf-dist/source/latex/verse/verse.dtx117
-rw-r--r--Master/texmf-dist/source/latex/verse/verse.ins4
-rw-r--r--Master/texmf-dist/source/latex/xcolor/xcolor.dtx2944
-rw-r--r--Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx43
46 files changed, 6988 insertions, 2052 deletions
diff --git a/Master/texmf-dist/source/generic/pst-pdf/pst-pdf.dtx b/Master/texmf-dist/source/generic/pst-pdf/pst-pdf.dtx
index 8ee7acca0aa..b8bd1986086 100644
--- a/Master/texmf-dist/source/generic/pst-pdf/pst-pdf.dtx
+++ b/Master/texmf-dist/source/generic/pst-pdf/pst-pdf.dtx
@@ -24,7 +24,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{pst-pdf}
%<*package>
- [2006/07/14 v1.1n PS graphics for pdfLaTeX (RN,HjG)]
+ [2006/08/31 v1.1o PS graphics for pdfLaTeX (RN,HjG)]
%</package>
%
%<*driver>
@@ -50,7 +50,7 @@
%</driver>
% \fi
%
-% \CheckSum{832}
+% \CheckSum{836}
%
% \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
@@ -600,7 +600,7 @@
\newcommand*\ppf@draft{false}
\newif\if@ppf@PST@used\@ppf@PST@usedtrue
\newif\if@ppf@tightpage \@ppf@tightpagetrue
-\DeclareOption{active}{\def\ppf@TeX@mode{0}}
+\DeclareOption{active}{\OptionNotUsed}
\DeclareOption{inactive}{\def\ppf@TeX@mode{9}}
\DeclareOption{ignore}{\def\ppf@TeX@mode{999}}
\DeclareOption{pstricks}{\@ppf@PST@usedtrue}
@@ -1023,6 +1023,20 @@
\PreviewMacro[{{}{}}]{\pfx@includegraphicx}}%
}%
% \end{macrocode}
+% \begin{macro}{\Gscale@@box}
+% \ifGERMAN
+% Skalieren verhindern.
+% \fi
+% \ifENGLISH
+% Disable scaling.
+% \fi
+% \changes{v1.1o}{2006/08/31}{Disable scaling. (RN)}
+% \begin{macrocode}
+ \def\Gscale@@box#1#2#3{%
+ \toks@{\mbox}%
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\Ginclude@graphics}
% \ifGERMAN
% Alle Grafiken mit bekanntem Format (z.\,B. EPS-Dateien) werden normal
diff --git a/Master/texmf-dist/source/latex/babelbib/babelbib.dtx b/Master/texmf-dist/source/latex/babelbib/babelbib.dtx
index ab7715223c9..8ac31e748e2 100644
--- a/Master/texmf-dist/source/latex/babelbib/babelbib.dtx
+++ b/Master/texmf-dist/source/latex/babelbib/babelbib.dtx
@@ -46,7 +46,7 @@
\DoNotIndex{\bibs,\ifx,\else,\fi,\ ,\ae,\emph,\input}
\CodelineNumbered
\RecordChanges
-\CheckSum{7995}
+\CheckSum{8856}
\hyphenation{bib-lio-gra-phy}
\begin{document}
\DocInput{babelbib.dtx}
@@ -92,6 +92,25 @@
% \changes{1.13}{2005/06/27}{Apply corrections to and complete Italian
% language}%
% \changes{1.14}{2005/07/11}{Complete and correct catalan}%
+% \changes{1.20}{2005/11/13}{Add Greek language}%
+% \changes{1.20}{2005/11/13}{Change method to write \texttt{urldate}
+% to enable to write it in brackets}%
+% \changes{1.20}{2005/11/13}{Bugfix in names writing of abbreviated
+% styles}%
+% \changes{1.20}{2005/11/13}{Ensure to write URL's in latin font}%
+% \changes{1.20}{2005/11/13}{Numerals for French and Spanish}%
+% \changes{1.20}{2005/11/13}{Add the fields \texttt{ANNOTE} and
+% \texttt{ANNOTELANGUAGE} to all bib\TeX\ styles and introduce the
+% command \cs{btxannotation} which prints the annotations on
+% request.}%
+% \changes{1.20}{2005/11/13}{Add the package options \texttt{isbn},
+% \texttt{noisbn}, \texttt{issn}, \texttt{noissn},
+% \texttt{varlanguage}, \texttt{nolanguagenames}, \texttt{annote}, and
+% \texttt{noannote}}%
+% \changes{1.20}{2005/11/13}{Add new font \texttt{jtitle} for titles
+% of journal articles}%
+% \changes{1.20}{2005/11/13}{Fix a bug with additional spaces after
+% names}%
%
% \maketitle
% \begin{abstract}
@@ -166,7 +185,8 @@
%
% By default, the language of the bibliographic keywords (``editor'',
% ``page'', etc.) switches for each item to the language of the cited
-% document.
+% document.\footnote{This is equivalent to using the package option
+% \texttt{varlanguage}.}
% If all citations shall be written in the same language, add the
% option\index{fixlanguage=\texttt{fixlanguage}|usage} |fixlanguage|
% to the package call.
@@ -193,6 +213,7 @@
% \index{languagenames=\texttt{languagenames}|usage}%
% If you want to use this style, you have to add the option
% |languagenames| to the call of the package.
+% Default is |nolanguagenames|.
%
% \DescribeMacro{\declarebtxcommands}%
% If you don't like some of the keywords provided by |babelbib|, or if
@@ -221,7 +242,8 @@
% The \AmS\ \BibTeX\ style |amsplain| uses ``Ph.D.\ thesis'' instead
% of the default ``PhD thesis'' for |babamspl|.
% If you want the same keyword as in the \AmS\ original, you can use
-% the |\declarebtxcommands| line shown above.
+% the \cs{declarebtxcommands} line shown above.
+%
%
% \section{Preparing the \texttt{bib} files}
%
@@ -260,8 +282,8 @@
% \begin{verbatim}
%\setbtxfallbacklanguage{ngerman}\end{verbatim}
%
-% |babelbib| supports four additional fields:
-% |ISBN|, |ISSN|, |URL|, and |URLDATE|.
+% |babelbib| supports a couple of additional fields:
+% |ISBN|, |ISSN|, |URL|, |URLDATE|, and |ANNOTE|.
% |ISBN| and |ISSN| take the ISBN or ISSN respectively.
% |URL| is the address of a WWW page while |URLDATE| is the date when
% the WWW page has been visited.
@@ -269,6 +291,17 @@
% e.\,g., if the user has loaded |url.sty|.
% Otherwise, |babelbib| defines a |\url| command which just calls
% |\texttt|.
+% |ANNOTE| typesets annotations after each entry in the bibliography.
+% By default, a |quotation| environment (starting with \cs{noindent})
+% is used.
+% If the field |ANNOTELANGUAGE| is also given, the language is
+% switched to the specified language.
+% Otherwise the language of the keywords is used.
+%
+% You can change the behaviour by redefining
+% \cs{btxannotation}\marg{annotations}.
+% The annotations are only printed when the package option |annote| is
+% used.
%
% \DescribeMacro{\biblanguage}%
% If you want to use language-dependent commands as \cs{alsoname} in a
@@ -347,13 +380,15 @@
% name& Authors, editors& & \\
% lastname& Lastnames of Authors, editors& & \\
% title& All kinds of titles& \cs{emph}& \cs{emph}\\
+% jtitle& Title of journal articles& \cs{emph}& \cs{emph}\\
% etal& ``\emph{et al.}''& \cs{emph}& \\
-% journal& Journal title& & \\
+% journal& Journal name& & \\
% volume& Volume (journal)& & \cs{textbf} \\
% ISBN& ISBN& \cs{MakeUppercase}& \cs{MakeUppercase} \\
% ISSN& ISSN& \cs{MakeUppercase}& \cs{MakeUppercase} \\
% url& URL& \cs{url}& \cs{url} \\
% urldate& visiting date of URL& & \\
+% ordinal& ordinal numbers in edition& & \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -367,6 +402,9 @@
% As it can be seen in this example, the argument of the used font
% command mustn't be specified in |\setbibliographyfont|.
%
+%
+% \subsection{Names}
+%
% The \meta{element} |name| changes the whole name of the author,
% including forename and lastname.
% If |lastname| is also specified, it changes the lastname within the
@@ -378,6 +416,19 @@
% leads to |\emph{Harald \MakeUppercase{Harders}}| resp.\
% ``\emph{Harald \MakeUppercase{Harders}}''.
%
+%
+% By default, a colon is printed after the author names.
+% If you want another sign, just redefine the command
+% \cs{btxauthorcolon}:
+% \begin{verbatim}
+%\renewcommand\btxauthorcolon{,}\end{verbatim}
+% Unfortunately, it cannot detect if the name ends on a fullstop.
+% Thus, things like ``Harders, H.. \emph{Title of document}'' may
+% appear.
+%
+%
+% \subsection{URL's}
+%
% The font definition for |urldate| can also be used not to change the
% font but to provide a command that writes the date in the correct
% language, e.\,g., using the |isodate| package:
@@ -385,6 +436,29 @@
%\usepackage[short]{isodate}
%\setbibliographyfont{urldate}{\printdate}\end{verbatim}
%
+% When using |urldate|, normally a string is printed between the url
+% itself and the the date, e.g., in English
+% ``\url{http://www.dante.de}, visited on 2005-11-11''.
+% The string is ``|, visited on |''.
+% This is reached by the definition of the internal command
+% \cs{btxurldatecomment}, e.g., for English
+% \begin{verbatim}
+%\def\btxurldatecomment#1{%
+% \protect\foreignlanguage{english}{, visited on #1}%
+%}\end{verbatim}
+% You can change this command, for example, to typeset the date in
+% brackets:
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxurldatecomment#1{ [#1]}%
+%}\end{verbatim}
+% Be sure not to forget the leading space.
+% It is necessary to be able to begin with a comma which does not have
+% a space before it.
+%
+%
+% \subsection{ISBN and ISSN}
+%
% \DescribeMacro{\btxISBN}%
% \DescribeMacro{\btxISSN}%
% There are two additional commands, \cs{btxISBN} and \cs{btxISSN}.
@@ -404,7 +478,11 @@
% resp.\ \cs{btxprintISSN\{false\}}.
% Similarly, printing is switched on by \cs{btxprintISBN\{true\}}
% resp.\ \cs{btxprintISSN\{true\}}.
-% This, however, only works for the "`standard"' styles, i.\,e., not for
+% Alternatively, you can switch on or off the ISBN and ISSN when
+% loading the package by using the package options |isbn|, |noisbn|,
+% |issn|, or |noissn|.
+%
+% This, however, only works for the ``standard'' styles, i.\,e., not for
% the \AmS\ style |babamspl|.
%
% If you are using |babamspl|, the language names of the citations are
@@ -414,6 +492,83 @@
%\newcommand\btxprintamslanguage[1]{}\end{verbatim}
%
%
+% \subsection{Spaces between forenames}
+%
+% \DescribeMacro{\btxfnamespaceshort}%
+% \DescribeMacro{\btxfnamespacelong}%
+% The spaces between multiple forenames are written by
+% \cs{btxfnamespacelong} and \cs{btxfnamespaceshort} for full and
+% abbreviated forenames, respectively.
+% By default, a normal space is used between full forenames, and a
+% thin space (\cs{,}) is used between abbreviated forenames (with the
+% exception English where no space is printed).
+% These defaults can be changed language-dependent:
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxfnamespaceshort{\,}%
+% \def\btxfnamespacelong{~}%
+%}\end{verbatim}
+%
+%
+% \subsection{Edition numbers}
+%
+% Ordinal numbers for editions are handled by \LaTeX\ when typesetting
+% the bibliography.
+% You just have to give the number itself in the |bib| file and it is
+% typeset correctly in the bibliography, e.g.,
+% \begin{verbatim}
+%edition = 3\end{verbatim}
+% is typeset as "`3."' in German and ``3rd'' in English.
+% Unfortunately, I do not know about other languages than these two
+% how to write ordinal numbers.
+% Thus, in all other languages, a warning is produced and the given
+% number is printed without a change (``3'' in the example).
+% If not a pure number is given, it also is typeset without a change.
+% You can add or change the output of edition numbers on a language
+% basis, e.g.,
+% \begin{verbatim}
+%\declarebtxcommands{english}{%
+% \def\btxnumeralshort#1{%
+% \btxnumeralenglish{english}{#1}}%
+% \def\btxnumerallong#1{%
+% \ifnumber{#1}{%
+% \ifcase#1 0th\or first\or second\or third\or forth\or fifth\or
+% sixth\or seventh\or eighth\or nineth\or tenth\else
+% \btxnumeralenglish{english}{#1}%
+% \fi}{#1}}%
+%}\end{verbatim}
+% This example typesets the ordinals between 1st and 10th as words and
+% switches to the short form for larger numbers in English language
+% for the long version and uses the default function for the short
+% version.
+%
+% Three output formats are predefined:
+% \cs{btxnumeraldot} prints the number with a dot followed, as
+% it is common in German.
+% \cs{btxnumeralenglish} adds ``st'', ``nd'', ``rd'', or
+% ``th'', depending on the number.
+% And \cs{btxnumeralfallback} generates a warning and prints
+% the number as given.
+%
+% If you, for instance, want to switch the Danish behaviour to be as
+% the German is, use these commands:
+% \begin{verbatim}
+%\declarebtxcommands{danish}{%
+% \def\btxnumeralshort#1{\btxnumeraldot{danish}{#1}}%
+% \def\btxnumerallong#1{\btxnumeraldot{danish}{#1}}%
+%}\end{verbatim}
+%
+% For the English variant, a font |numeral| is predefined that
+% typesets the appended characters.
+% If you, for example, want to print the superscripted, use
+% \begin{verbatim}
+%\setbibliographyfont{numeral}{\textsuperscript}\end{verbatim}
+%
+% If you know how numerals are handled in a language, please send me
+% an eMail.
+%
+%
+%
% \section{How to add new languages}
%
% The language definitions are placed in special files with the
@@ -438,10 +593,17 @@
% \section{Problems and Incompatibilities}
%
% \begin{itemize}
-% \item Babelbib does not work together with old versions of the
+% \item
+% Babelbib does not work together with old versions of the
% |frenchle| package prior V5,987.
% Please update the frenchle package or use the native babel support
% for the French language, instead.
+% \item
+% If babelbib is used together with one of the classes of the
+% KOMA-Script bundle, some additional spaces are added when
+% numerical edition numbers are used.
+% This is a KOMA-Script bug and will be fixed in the next
+% KOMA-Script release.
% \end{itemize}
%
% \section{To Do}
@@ -468,8 +630,12 @@
% Jan Steffan, \url{me@jansteffan.de} (\cs{setbtxfallbacklanguage});
% Philip Ratcliffe, \url{philip.ratcliffe@email.it} (corrections for
% Italian); Angel Tsankov, \url{bigman@abv.bg} (bugfix with
-% \cs{bbbb\meta{\cs{CurrentOption}}loaded}).
-%
+% \cs{bbbb\meta{\cs{CurrentOption}}loaded});
+% Prokopis Prokopidis, \url{prokopis@ilsp.gr} (Greek);
+% Daniel Flipo, \url{daniel.flipo@univ-lille1.fr} (French numerals);
+% Ignacio Fern\'andez Galv\'an, \url{jellby@yahoo.com} (Spanish
+% numerals);
+% Peter Bartke, \url{bartke@inf.fu-berlin.de} (idea of annote field).
%
%\begin{thebibliography}{1}
% \providebibliographyfont{name}{}%
@@ -518,31 +684,34 @@
% File heads of the |bdf| files:
% \begin{macrocode}
%<afrikaans>%% Language definitions for Afrikaans by
-%<afrikaans>%% Danie Els, dnjels@sun.ac.za
+%<afrikaans>%% Danie Els <dnjels@sun.ac.za>
%<afrikaans>\ProvidesFile{afrikaans.bdf}
%<catalan>%% Language definitions for Catalan by
-%<catalan>%% Robert Fuster, rfuster@imm.upv.es
+%<catalan>%% Robert Fuster <rfuster@imm.upv.es>
%<catalan>\ProvidesFile{catalan.bdf}
%<danish>\ProvidesFile{danish.bdf}
%<dutch>\ProvidesFile{dutch.bdf}
%<english>\ProvidesFile{english.bdf}
%<esperanto>%% Language definitions for Esperanto by
-%<esperanto>%% Taneli Huuskonen, huuskone@cc.helsinki.fi
+%<esperanto>%% Taneli Huuskonen <huuskone@cc.helsinki.fi>
%<esperanto>\ProvidesFile{esperanto.bdf}
-%<portuguese>%% Language definitions for Portuguese by
-%<portuguese>%% Jos\'e Carlos Santos, jcsantos@fc.up.pt
-%<portuguese>\ProvidesFile{portuguese.bdf}
%<finnish>%% Language definitions for Finnish by
-%<finnish>%% Taneli Huuskonen, huuskone@cc.helsinki.fi
+%<finnish>%% Taneli Huuskonen <huuskone@cc.helsinki.fi>
%<finnish>\ProvidesFile{finnish.bdf}
%<french>\ProvidesFile{french.bdf}
%<german>\ProvidesFile{german.bdf}
+%<greek>\ProvidesFile{greek.bdf}
+%<greek>%% Language definitions for Greek by
+%<greek>%% Prokopis Prokopidis <prokopis@ilsp.gr>
%<italian>\ProvidesFile{italian.bdf}
%<norsk>%% Language definitions for Norwegian by
%<norsk>%% Hans Fredrik Nordhaug <hansfn@mi.uib.no>
%<norsk>\ProvidesFile{norsk.bdf}
+%<portuguese>%% Language definitions for Portuguese by
+%<portuguese>%% Jos\'e Carlos Santos <jcsantos@fc.up.pt>
+%<portuguese>\ProvidesFile{portuguese.bdf}
%<spanish>%% Language definitions for spanish by
-%<spanish>%% V{\'\i}ctor Lua{\~n}a, victor@fluor.quimica.uniovi.es
+%<spanish>%% V{\'\i}ctor Lua{\~n}a <victor@fluor.quimica.uniovi.es>
%<spanish>\ProvidesFile{spanish.bdf}
%<swedish>%% Language definitions for Swedish by
%<swedish>%% Hans Fredrik Nordhaug <hansfn@mi.uib.no>
@@ -550,8 +719,8 @@
% \end{macrocode}
% Version information unique for all generated files:
% \begin{macrocode}
-%<latex> [2005/09/01 v1.15 babelbib: multilingual bibliographies (HH)]
-%<bst>%% 2005/09/01 v1.15 babelbib: multilingual bibliographies (HH)
+%<latex> [2005/11/13 v1.20 babelbib: multilingual bibliographies (HH)]
+%<bst>%% 2005/11/13 v1.20 babelbib: multilingual bibliographies (HH)
% \end{macrocode}
%
% \subsection{The package itself}
@@ -563,6 +732,7 @@
%<*package>
\newif\ifbbbbfixlanguage
\DeclareOption{fixlanguage}{\bbbbfixlanguagetrue}
+\DeclareOption{varlanguage}{\bbbbfixlanguagefalse}
% \end{macrocode}
% \changes{0.2}{2003/04/20}{Added option \texttt{languagenames} to
% define commands for language names}%
@@ -573,8 +743,28 @@
% \foreignlanguage{ngerman}{"`französisch"'}.
% \begin{macrocode}
\newif\ifbbbblanguagenames
+\DeclareOption{nolanguagenames}{\bbbblanguagenamesfalse}
\DeclareOption{languagenames}{\bbbblanguagenamestrue}
% \end{macrocode}
+% \begin{macrocode}
+\newif\ifbbbbannotations
+\DeclareOption{annote}{\bbbbannotationstrue}
+\DeclareOption{noannote}{\bbbbannotationsfalse}
+% \end{macrocode}
+% \begin{macro}{\ifbtx@printISBN}
+% \begin{macro}{\ifbtx@printISSN}
+% The booleans that store the necessary information if ISBN and ISSN
+% shall be printed.
+% \begin{macrocode}
+\newif\ifbtx@printISBN
+\newif\ifbtx@printISSN
+\DeclareOption{isbn}{\btx@printISBNtrue}
+\DeclareOption{noisbn}{\btx@printISBNfalse}
+\DeclareOption{issn}{\btx@printISSNtrue}
+\DeclareOption{noissn}{\btx@printISSNfalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% If additional options are given, try to load these as
% languages. This is implemented in order to be able to use a new
% language that is not yet supported by the official |babelbib|.
@@ -590,6 +780,10 @@
}%
}
% \end{macrocode}
+% Default options.
+% \begin{macrocode}
+\ExecuteOptions{varlanguage,nolanguagenames,noannote,isbn,issn}
+% \end{macrocode}
% Process the given options.
% \begin{macrocode}
\ProcessOptions*
@@ -975,6 +1169,8 @@
\let\btxlastnamefont=\@empty
\newcommand\btxtitlefont{}
\let\btxtitlefont=\@empty
+\newcommand\btxjtitlefont{}
+\let\btxjtitlefont=\@empty
\newcommand\btxetalfont{}
\let\btxetalfont=\@empty
\newcommand\btxjournalfont{}
@@ -989,6 +1185,8 @@
\let\btxurlfont=\@empty
\newcommand\btxurldatefont{}
\let\btxurldatefont=\@empty
+\newcommand\btxnumeralfont{}
+\let\btxnumeralfont=\@empty
% \end{macrocode}
% \end{macro}
% \begin{macro}{\btxauthorcolon}
@@ -1037,16 +1235,106 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \begin{macro}{\ifbtx@printISBN}
-% \begin{macro}{\ifbtx@printISSN}
-% The booleans that store the necessary information.
+% \begin{macro}{\btxannotation}
+% A command that typesets annotations.
+% \begin{macrocode}
+\ifbbbbannotations
+ \DeclareRobustCommand\btxannotation[1]{%
+ \begin{quotation}%
+ \noindent
+ #1%
+ \end{quotation}%
+ }
+\else
+ \DeclareRobustCommand\btxannotation[1]{}%
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btx@ifnumerical}
+% Test wheather argument 1 is a number (from KOMA script)
+% \begin{macrocode}
+\providecommand\ifnumber[3]{%
+ \begingroup\@tempswafalse\let\scr@next\test@number
+ \expandafter\scr@next#1\scr@next
+ \if@tempswa\endgroup#2\else\endgroup#3\fi
+}
+\providecommand*\test@number[1]{%
+ \ifx \scr@next#1%
+ \let\scr@next\relax
+ \else
+ \@tempcnta=\expandafter\expandafter\expandafter\number
+ \expandafter`#1\relax
+ \ifnum \@tempcnta>47\relax
+ \ifnum \@tempcnta<58\relax
+ \@tempswatrue
+ \else\@tempswafalse\fi
+ \else\@tempswafalse\fi
+ \if@tempswa\else\let\scr@next\gobble@till@next\fi\fi
+ \scr@next
+}
+\def\gobble@till@next#1\scr@next{}
+% \end{macrocode}
+% \end{macro}
+% \changes{1.17}{2005/11/05}{Handle numerical edition numbers}%
+% \begin{macro}{\btx@parsenum}
+% Parses the number given by \cs{btx@parsenum}\meta{number}\cs{@empty}
+% prints it and returns the last two digits in \cs{btx@digita} and
+% \cs{btx@digitb}.
+% \begin{macrocode}
+\def\btx@parsenum#1#2#3\@empty{%
+ #1%
+ \edef\btx@digitb{#3}%
+ \ifx\@empty\btx@digitb
+ #2%
+ \edef\btx@digita{#1}%
+ \edef\btx@digitb{#2}%
+ \else
+ \expandafter\btx@parsenum#2#3\@empty
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeralfallback}
% \begin{macrocode}
-\newif\ifbtx@printISBN
-\newif\ifbtx@printISSN
-\btxprintISBN{true}
-\btxprintISSN{true}
+\DeclareRobustCommand\btxnumeralfallback[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \PackageWarning{babelbib}{Handling of numerical editions not
+ handled\MessageBreak by language #1 for edition `#2'}%
+ }{}%
+ #2%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\btxnumeraldot}
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeraldot[2]{%
+ \foreignlanguage{#1}{\ifnumber{#2}{#2.}{#2}}%
+}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\btxnumeralenglish}
+% \begin{macrocode}
+\DeclareRobustCommand\btxnumeralenglish[2]{%
+ \foreignlanguage{#1}{%
+ \ifnumber{#2}{%
+ \expandafter\btx@parsenum#2\@empty\@empty\@empty
+ \btxnumeralfont{%
+ \ifx\btx@digitb\@empty
+ \ifcase\btx@digita th\or st\or nd\or rd\else th\fi
+ \else
+ \ifnum\btx@digita=1
+ th%
+ \else
+ \ifcase\btx@digitb th\or st\or nd\or rd\else th\fi
+ \fi
+ \fi
+ }%
+ }{#2}%
+ }%
+}
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\url}
% \changes{0.40}{2003/09/26}{If no \cs{url} command is defined,
@@ -1106,6 +1394,7 @@
\inputbdf{frenchb}{french}
\inputbdf{german}{german}
\inputbdf{germanb}{german}
+ \inputbdf{greek}{greek}
\inputbdf{italian}{italian}
\inputbdf{norsk}{norsk}
\inputbdf{mexican}{spanish}
@@ -1267,12 +1556,27 @@
\def\Btxpageslong{\btxpageslong}%
\def\Btxtechrepshort{\btxtechrepshort}%
\def\Btxtechreplong{\btxtechreplong}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{besucht:}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, besucht: ##1}}%
+% \end{macrocode}
+% \changes{1.16}{2005/10/31}{Allow to alter space between two
+% forenames}%
+% The command \cs{btxfnamespaceshort} and \cs{btxfnamespacelong}
+% contain the space between two abbreviated resp.\ full forenames.
+% \begin{macrocode}
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+% \end{macrocode}
+% \changes{1.17}{2005/11/05}{Handle numerical edition numbers}%
+% Handle numerical edition numbers.
+% \begin{macrocode}
+ \def\btxnumeralshort##1{\btxnumeraldot{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeraldot{#1}{##1}}%
% \end{macrocode}
% A command that just puts some user defined text in the language of
% the keywords.
% \begin{macrocode}
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+% \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
% \end{macrocode}
% \changes{0.2}{2003/04/20}{Added language names}%
% Names of all known languages in the current language.
@@ -1492,8 +1796,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pages}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rep##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technical Report}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{visited on}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visited on ##1}}%
+ \def\btxfnamespaceshort{}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralenglish{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralenglish{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
% \end{macrocode}
% \changes{0.2}{2003/04/20}{Added language names}%
% Names of all known languages in the current language.
@@ -1650,10 +1958,10 @@
\def\btxmondecshort##1{\protect\foreignlanguage{#1}{dic##1{}}}%
\def\Btxinlong##1{\protect\foreignlanguage{#1}{Nel}}%
\def\Btxinshort##1{\protect\foreignlanguage{#1}{Nel}}%
- \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
- \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Editore}}%
- \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Ed##1{}}}%
- \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Editori}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Cur##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Curatore}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Cur##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Curatori}}%
\def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{Vol##1{}}}%
\def\Btxvolumelong##1{\protect\foreignlanguage{#1}{Volume}}%
\def\Btxnumbershort##1{\protect\foreignlanguage{#1}{No##1{}}}%
@@ -1668,8 +1976,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pagine}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap.\ Tecnico}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Rapporto Tecnico}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{accesso a}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, accesso a ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
% \end{macrocode}
% \changes{0.2}{2003/04/20}{Added placeholders for language names}%
% \changes{0.31}{2003/05/01}{Added some language names for Italian}%
@@ -1740,6 +2052,168 @@
%</italian>
% \end{macrocode}
%
+% \subsubsection{Greek}
+% \begin{macrocode}
+%<*greek>
+% \end{macrocode}
+%
+% The language definition for Greek was provided by Prokopis
+% Prokopidis.
+%
+% \begin{macro}{\bibsgreek}
+% Bibliographic commands for Greek.
+% \begin{macrocode}
+\newcommand\bibsgreek[1][greek]{%
+ \def\biblanguagename{#1}%
+ \def\btxetalshort##1{\protect\foreignlanguage{#1}{k.'a##1{}}}%
+ \def\btxetallong##1{\protect\foreignlanguage{#1}{kai 'alloi}}%
+ \def\btxandshort##1{\protect\foreignlanguage{#1}{kai}}%
+ \def\btxandlong##1{\protect\foreignlanguage{#1}{kai}}%
+ \def\btxandcomma##1{,}%
+ \def\btxinlong##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxinshort##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxofseriesshort##1{\protect\foreignlanguage{#1}{tou}}%
+ \def\btxinseriesshort##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxofserieslong##1{\protect\foreignlanguage{#1}{tou}}%
+ \def\btxinserieslong##1{\protect\foreignlanguage{#1}{sto}}%
+ \def\btxeditorshort##1{\protect\foreignlanguage{#1}{epim##1{}}}%
+ \def\btxeditorlong##1{\protect\foreignlanguage{#1}{epimelht'hc}}%
+ \def\btxeditorsshort##1{\protect\foreignlanguage{#1}{epim##1{}}}%
+ \def\btxeditorslong##1{\protect\foreignlanguage{#1}{epimelht'ec}}%
+ \def\btxvolumeshort##1{\protect\foreignlanguage{#1}{t'om##1{}}}%
+ \def\btxvolumelong##1{\protect\foreignlanguage{#1}{t'omoc}}%
+ \def\btxnumbershort##1{\protect\foreignlanguage{#1}{ar##1{}}}%
+ \def\btxnumberlong##1{\protect\foreignlanguage{#1}{arijm'oc}}%
+ \def\btxeditionshort##1{\protect\foreignlanguage{#1}{'ekd##1{}}}%
+ \def\btxeditionlong##1{\protect\foreignlanguage{#1}{'ekdosh}}%
+ \def\btxchaptershort##1{\protect\foreignlanguage{#1}{kef##1{}}}%
+ \def\btxchapterlong##1{\protect\foreignlanguage{#1}{kef'alaio}}%
+ \def\btxpageshort##1{\protect\foreignlanguage{#1}{sel##1{}}}%
+ \def\btxpagelong##1{\protect\foreignlanguage{#1}{sel'ida}}%
+ \def\btxpagesshort##1{\protect\foreignlanguage{#1}{sel##1{}}}%
+ \def\btxpageslong##1{\protect\foreignlanguage{#1}{sel'idec}}%
+ \def\btxmastthesis##1{\protect\foreignlanguage{#1}{Metaptuqiak'h ergas'ia}}%
+ \def\btxphdthesis##1{\protect\foreignlanguage{#1}{Didaktorik'h diatrib'h}}%
+ \def\btxtechrepshort##1{\protect\foreignlanguage{#1}{Teqn.\ anaf##1{}}}%
+ \def\btxtechreplong##1{\protect\foreignlanguage{#1}{Teqnik'h anafor'a}}%
+ \def\btxmonjanlong##1{\protect\foreignlanguage{#1}{Ianou'arioc}}%
+ \def\btxmonfeblong##1{\protect\foreignlanguage{#1}{Febrou'arioc}}%
+ \def\btxmonmarlong##1{\protect\foreignlanguage{#1}{M'artioc}}%
+ \def\btxmonaprlong##1{\protect\foreignlanguage{#1}{Apr'ilioc}}%
+ \def\btxmonmaylong##1{\protect\foreignlanguage{#1}{M'aioc}}%
+ \def\btxmonjunlong##1{\protect\foreignlanguage{#1}{Io'unioc}}%
+ \def\btxmonjullong##1{\protect\foreignlanguage{#1}{Io'ulioc}}%
+ \def\btxmonauglong##1{\protect\foreignlanguage{#1}{A'ugoustoc}}%
+ \def\btxmonseplong##1{\protect\foreignlanguage{#1}{Sept'embrioc}}%
+ \def\btxmonoctlong##1{\protect\foreignlanguage{#1}{Okt'wbrioc}}%
+ \def\btxmonnovlong##1{\protect\foreignlanguage{#1}{No'embrioc}}%
+ \def\btxmondeclong##1{\protect\foreignlanguage{#1}{Dek'embrioc}}%
+ \def\btxmonjanshort##1{\protect\foreignlanguage{#1}{Ian##1{}}}%
+ \def\btxmonfebshort##1{\protect\foreignlanguage{#1}{Feb##1{}}}%
+ \def\btxmonmarshort##1{\protect\foreignlanguage{#1}{M'ar##1{}}}%
+ \def\btxmonaprshort##1{\protect\foreignlanguage{#1}{Apr##1{}}}%
+ \def\btxmonmayshort##1{\protect\foreignlanguage{#1}{M'ai}}%
+ \def\btxmonjunshort##1{\protect\foreignlanguage{#1}{Io'un##1{}}}%
+ \def\btxmonjulshort##1{\protect\foreignlanguage{#1}{Io'ul##1{}}}%
+ \def\btxmonaugshort##1{\protect\foreignlanguage{#1}{A'ug##1{}}}%
+ \def\btxmonsepshort##1{\protect\foreignlanguage{#1}{Sept##1{}}}%
+ \def\btxmonoctshort##1{\protect\foreignlanguage{#1}{Okt##1{}}}%
+ \def\btxmonnovshort##1{\protect\foreignlanguage{#1}{No'e##1{}}}%
+ \def\btxmondecshort##1{\protect\foreignlanguage{#1}{Dek##1{}}}%
+ \def\Btxinlong##1{\protect\foreignlanguage{#1}{Sto}}%
+ \def\Btxinshort##1{\protect\foreignlanguage{#1}{Sto}}%
+ \def\Btxeditorshort##1{\protect\foreignlanguage{#1}{Epim##1{}}}%
+ \def\Btxeditorlong##1{\protect\foreignlanguage{#1}{Epimelht'hc}}%
+ \def\Btxeditorsshort##1{\protect\foreignlanguage{#1}{Epim##1{}}}%
+ \def\Btxeditorslong##1{\protect\foreignlanguage{#1}{Epimelht'ec}}%
+ \def\Btxvolumeshort##1{\protect\foreignlanguage{#1}{T'om##1{}}}%
+ \def\Btxvolumelong##1{\protect\foreignlanguage{#1}{T'omoc}}%
+ \def\Btxnumbershort##1{\protect\foreignlanguage{#1}{Ar##1{}}}%
+ \def\Btxnumberlong##1{\protect\foreignlanguage{#1}{Arijm'oc}}%
+ \def\Btxeditionshort##1{\protect\foreignlanguage{#1}{'Ekd##1{}}}%
+ \def\Btxeditionlong##1{\protect\foreignlanguage{#1}{'Ekdosh}}%
+ \def\Btxchaptershort##1{\protect\foreignlanguage{#1}{Kef##1{}}}%
+ \def\Btxchapterlong##1{\protect\foreignlanguage{#1}{Kef'alaio}}%
+ \def\Btxpageshort##1{\protect\foreignlanguage{#1}{Sel##1{}}}%
+ \def\Btxpagelong##1{\protect\foreignlanguage{#1}{Sel'ida}}%
+ \def\Btxpagesshort##1{\protect\foreignlanguage{#1}{Sel##1{}}}%
+ \def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sel'idec}}%
+ \def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Teqn.\ Anaf##1{}}}%
+ \def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teqnik'h Anafor'a}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ep'iskeyh thn ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1h}{##1}}}%
+ \def\btxnumerallong##1{\protect\foreignlanguage{#1}{\ifnumber{##1}{%
+ \ifcase##1 ##1h\or pr'wth\or de'uterh\or tr'ith\or t'etarth%
+ \or p'empth\or 'ekth\or 'ebdomh\or 'ogdoh\or 'enath\else ##1h\fi
+ }{##1}}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
+% \end{macrocode}
+% Names of all known languages in the current language.
+% \begin{macrocode}
+ \ifbbbblanguagenames
+ \def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamebrazil{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamebrazilian{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamebritish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenamebulgarian{\protect\foreignlanguage{#1}{boulgarik'a}}%
+ \def\btxlanguagenamecanadian{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenamecanadien{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamecatalan{\protect\foreignlanguage{#1}{katalanik'a}}%
+ \def\btxlanguagenamecroatian{\protect\foreignlanguage{#1}{kroatik'a}}%
+ \def\btxlanguagenameczech{\protect\foreignlanguage{#1}{tseqik'a}}%
+ \def\btxlanguagenamedanish{\protect\foreignlanguage{#1}{danik'a}}%
+ \def\btxlanguagenamedutch{\protect\foreignlanguage{#1}{ollandik'a}}%
+ \def\btxlanguagenameenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameesperanto{\protect\foreignlanguage{#1}{esperanto}}%
+ \def\btxlanguagenamefinnish{\protect\foreignlanguage{#1}{finlandik'a}}%
+ \def\btxlanguagenamefrancais{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamefrench{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamefrenchb{\protect\foreignlanguage{#1}{gallik'a}}%
+ \def\btxlanguagenamegerman{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamegermanb{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamegreek{\protect\foreignlanguage{#1}{ellhnik'a}}%
+ \def\btxlanguagenamehebrew{\protect\foreignlanguage{#1}{ebra"ik'a}}%
+ \def\btxlanguagenamehungarian{\protect\foreignlanguage{#1}{ouggrik'a}}%
+ \def\btxlanguagenameicelandic{\protect\foreignlanguage{#1}{islandik'a}}%
+ \def\btxlanguagenameirish{\protect\foreignlanguage{#1}{irlandik'a}}%
+ \def\btxlanguagenameitalian{\protect\foreignlanguage{#1}{italik'a}}%
+ \def\btxlanguagenamelatin{\protect\foreignlanguage{#1}{latinik'a}}%
+ \def\btxlanguagenamenaustrian{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamengerman{\protect\foreignlanguage{#1}{germanik'a}}%
+ \def\btxlanguagenamenorsk{\protect\foreignlanguage{#1}{norbhgik'a}}%
+ \def\btxlanguagenamenynorsk{\protect\foreignlanguage{#1}{n'ea norbhgik'a}}%
+ \def\btxlanguagenamepolish{\protect\foreignlanguage{#1}{polwnik'a}}%
+ \def\btxlanguagenameportuges{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenameportuguese{\protect\foreignlanguage{#1}{portogalik'a}}%
+ \def\btxlanguagenamerussian{\protect\foreignlanguage{#1}{rwsik'a}}%
+ \def\btxlanguagenamescottish{\protect\foreignlanguage{#1}{skwts'ezika}}%
+ \def\btxlanguagenameserbian{\protect\foreignlanguage{#1}{serbik'a}}%
+ \def\btxlanguagenamespanish{\protect\foreignlanguage{#1}{ispanik'a}}%
+ \def\btxlanguagenameswedish{\protect\foreignlanguage{#1}{souhdik'a}}%
+ \def\btxlanguagenameturkish{\protect\foreignlanguage{#1}{tourkik'a}}%
+ \def\btxlanguagenameUKenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \def\btxlanguagenameUSenglish{\protect\foreignlanguage{#1}{agglik'a}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% Append the definitions to the language-calling commands.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbbbbfixlanguage
+ \else
+ \bbbbaddto{greek}{bibsgreek}
+ \fi
+ \bbbbaddto{greek}{btxifchangecaseoff}
+}
+%</greek>
+% \end{macrocode}
+%
+%
% \subsubsection{Norwegian}
% \begin{macrocode}
%<*norsk>
@@ -1828,8 +2302,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sider}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{sjekket:}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, sjekket: ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
% \end{macrocode}
% Names of all known languages in the current language.
% \begin{macrocode}
@@ -1994,8 +2472,13 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pages}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rap. tech##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Rapport technique}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{visit\'e le}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visit\'e le ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\protect\foreignlanguage{#1}{%
+ \ifnumber{##1}{##1"a}{##1}}}%
+ \def\btxnumerallong##1{\btxnumeralshort{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
% \end{macrocode}
% Names of all known languages in the current language.
% \begin{macrocode}
@@ -2174,8 +2657,13 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\'aginas}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Informe t\'ecnico}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{visitado el}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visitado el ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\ifnumber{##1}{\protect\foreignlanguage{#1}{%
+ ##1\ifcase##1 \ieme\or \iere\else \ieme\fi}}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralshort{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{ingl\'es}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\'an}}%
@@ -2331,8 +2819,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sider}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknisk rapport}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{bes\o gt den}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, bes\o gt den ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engelsk}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tysk}}%
@@ -2479,8 +2971,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Sivut}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ rap##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Tekninen raportti}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{vierailtu}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, vierailtu ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{englanti}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{saksa}}%
@@ -2631,11 +3127,15 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pa\^goj}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tekn.\ Rap##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Teknika Raporto}}%
-% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{??}}%
+% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ?? ##1}}%
\def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
urldate in Esperanto undefined. Please send the translation for
- 'visited on' to harald.harders@tu-bs.de}{}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ 'visited on' to harald.harders@tu-bs.de}{} [##1]}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{angla}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{germana}}%
@@ -2790,8 +3290,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\'aginas}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rel.\ T\'ec##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Relat\'orio T\'ecnico}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{acedido em}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, acedido em ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{ingl\^es}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\~ao}}%
@@ -2954,8 +3458,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pagina's}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rapp##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technisch Rapport}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{bezocht op}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, bezocht op ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engels}}%
% \def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{german}}%
@@ -3110,11 +3618,15 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Pagina's}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tech.\ Rapp##1{}}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Technisch Rapport}}%
-% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{??}}%
+% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ?? ##1}}%
\def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
urldate in Swedish undefined. Please send the translation for
- 'visited on' to harald.harders@tu-bs.de}{}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ 'visited on' to harald.harders@tu-bs.de}{} [##1]}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engelska}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{tyska}}%
@@ -3267,11 +3779,15 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{Bladsye}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Tegn.\ Verslag}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Tegniese Verslag}}%
-% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{??}}%
+% \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, ?? ##1}}%
\def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
urldate in Afrikaans undefined. Please send the translation for
- 'visited on' to harald.harders@tu-bs.de}{}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ 'visited on' to harald.harders@tu-bs.de}{} [##1]}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameafrikaans{\protect\foreignlanguage{#1}{afrikaans}}%
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{engels}}%
@@ -3424,11 +3940,12 @@
\def\Btxpageslong##1{\protect\foreignlanguage{#1}{P\`agines}}%
\def\Btxtechrepshort##1{\protect\foreignlanguage{#1}{Rep. t\`ecnic}}%
\def\Btxtechreplong##1{\protect\foreignlanguage{#1}{Report t\`ecnic}}%
- \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{visitada el}}%
- \def\btxurldatecomment##1{\PackageError{babelbib}{Comment for
- urldate in Catalan undefined. Please send the translation for
- 'visited on' to harald.harders@tu-bs.de}{}}%
- \def\btxkeywordlanguage##1{\protect\foreignlanguage{#1}{##1}}%
+ \def\btxurldatecomment##1{\protect\foreignlanguage{#1}{, visitada el ##1}}%
+ \def\btxfnamespaceshort{\,}%
+ \def\btxfnamespacelong{ }%
+ \def\btxnumeralshort##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxnumerallong##1{\btxnumeralfallback{#1}{##1}}%
+ \def\btxkeywordlanguage##1{{\protect\selectlanguage{#1}##1}}%
\ifbbbblanguagenames
\def\btxlanguagenameamerican{\protect\foreignlanguage{#1}{angl\`es}}%
\def\btxlanguagenameaustrian{\protect\foreignlanguage{#1}{alem\`any}}%
@@ -3510,6 +4027,8 @@
% \begin{macrocode}
ENTRY
{ address
+ annote
+ annotelanguage
author
booktitle
chapter
@@ -3689,6 +4208,8 @@ FUNCTION {output.check}
% \end{macrocode}
% Outputs a bibliography item.
+% \changes{1.17}{2005/11/05}{Change the language in alpha-numerical
+% bib items}%
% \begin{macrocode}
FUNCTION {output.bibitem}
{ newline$
@@ -3702,28 +4223,26 @@ FUNCTION {output.bibitem}
% \begin{macrocode}
language empty$
{ "empty language in " cite$ * warning$
+ "\expandafter\btxselectlanguage\expandafter {"
+ "\btxfallbacklanguage}" *
language.state "nolanguage" =
'skip$
- {
- "\expandafter\btxselectlanguage\expandafter {"
- "\btxfallbacklanguage}" * write$
- newline$
- }
+ { duplicate$ write$ newline$ }
if$
"nolanguage" 'language.state :=
}
- { language.state language =
+ {
+ "\btxselectlanguage {" language * "}" *
+ language.state language =
'skip$
- { "\btxselectlanguage {" language * "}" * write$
- newline$
- }
+ { duplicate$ write$ newline$ }
if$
language 'language.state :=
}
if$
%</bststd>
-%<bststd&!bstalpha> "\bibitem{" write$
-%<bststd&bstalpha> "\bibitem[" label * "]{" * write$
+%<bststd&!bstalpha> pop$ "\bibitem {" write$
+%<bststd&bstalpha> "\bibitem [{" swap$ * label * "}]{" * write$
%<*bststd>
cite$ write$
"}" write$
@@ -3924,9 +4443,8 @@ FUNCTION {lastnamefont}
{ "\btxlastnamefont {" swap$ * "}" * }
if$
}
-
% \end{macrocode}
-%
+% Set font for titles:
% \begin{macrocode}
FUNCTION {titlefont}
{ duplicate$ empty$
@@ -3934,9 +4452,17 @@ FUNCTION {titlefont}
{ "\btxtitlefont {" swap$ * "}" * }
if$
}
-
% \end{macrocode}
-%
+% Set font for titles of articles in journals:
+% \begin{macrocode}
+FUNCTION {jtitlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjtitlefont {" swap$ * "}" * }
+ if$
+}
+% \end{macrocode}
+% Set font for the journal name:
% \begin{macrocode}
FUNCTION {journalfont}
{ duplicate$ empty$
@@ -3944,7 +4470,6 @@ FUNCTION {journalfont}
{ "\btxjournalfont {" swap$ * "}" * }
if$
}
-
% \end{macrocode}
%
% \begin{macrocode}
@@ -3980,28 +4505,30 @@ FUNCTION {format.names}
numnames 'namesleft :=
{ namesleft #0 > }
{ nameptr #1 >
+ {
%</bststd>
%<*bststd&!bstshort&!namevarb>
- {
- s nameptr "{ff~}{vv~}" format.name$
+ s nameptr "{ff{\btxfnamespacelong } }{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
- s nameptr "{, jj}" format.name$ * 't :=
+ s nameptr "{, jj}" format.name$ *
+ 't :=
%</bststd&!bstshort&!namevarb>
%<*bststd&bstshort&!namevarb>
- {
- s nameptr "{f.~}{vv~}" format.name$
+ s nameptr
+ "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
- s nameptr "{, jj}" format.name$ * 't :=
+ s nameptr "{,~jj}" format.name$ *
+ 't :=
%</bststd&bstshort&!namevarb>
%<*bststd&!bstshort&namevarb>
- {
s nameptr "{ll}" format.name$ lastnamefont
- s nameptr "{, jj}{, ff}{~vv}" format.name$ * 't :=
+ s nameptr "{,~jj}{, ff{\btxfnamespacelong }}{~vv}" format.name$ *
+ 't :=
%</bststd&!bstshort&namevarb>
%<*bststd&bstshort&namevarb>
- {
s nameptr "{ll}" format.name$ lastnamefont
- s nameptr "{,~jj}{,~f.}{~vv}" format.name$ * 't :=
+ s nameptr "{,~jj}{,~f{.\btxfnamespaceshort }.}{~vv}" format.name$ *
+ 't :=
%</bststd&bstshort&namevarb>
%<*bststd&bstthree>
namesleft #2 >
@@ -4030,34 +4557,30 @@ FUNCTION {format.names}
}
if$
}
+ {
%</bststd>
%<*bststd&!bstshort&!namevara>
- {
s nameptr "{ll}" format.name$ lastnamefont
- s nameptr "{,~jj}{, ff}{~vv}" format.name$ * namefont
- }
+ s nameptr "{,~jj}{, ff{\btxfnamespacelong }}{~vv}"
+ format.name$ * namefont
%</bststd&!bstshort&!namevara>
%<*bststd&bstshort&!namevara>
- {
s nameptr "{ll}" format.name$ lastnamefont
- s nameptr "{,~jj}{,~f.}{~vv}" format.name$ * namefont
- }
+ s nameptr "{,~jj}{,~f{.\btxfnamespaceshort }.}{~vv}"
+ format.name$ * namefont
%</bststd&bstshort&!namevara>
%<*bststd&!bstshort&namevara>
- {
- s nameptr "{ff~}{vv~}" format.name$
+ s nameptr "{ff{\btxfnamespacelong } }{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
- s nameptr "{, jj}" format.name$ * namefont
- }
+ s nameptr "{,~jj}" format.name$ * namefont
%</bststd&!bstshort&namevara>
%<*bststd&bstshort&namevara>
- {
- s nameptr "{f.~}{vv~}" format.name$
+ s nameptr "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
- s nameptr "{, jj}" format.name$ * namefont
- }
+ s nameptr "{,~jj}" format.name$ * namefont
%</bststd&bstshort&namevara>
%<*bststd>
+ }
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
@@ -4097,9 +4620,8 @@ FUNCTION {format.editors}
}
if$
}
-
% \end{macrocode}
-%
+% Format the title:
% \begin{macrocode}
FUNCTION {format.title}
{ title empty$
@@ -4107,7 +4629,15 @@ FUNCTION {format.title}
{ title "t" language.change.case titlefont }
if$
}
-
+% \end{macrocode}
+% Format the title of a journal article:
+% \begin{macrocode}
+FUNCTION {format.jtitle}
+{ title empty$
+ { "" }
+ { title "t" language.change.case jtitlefont }
+ if$
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -4259,18 +4789,29 @@ FUNCTION {format.edition}
{ edition empty$
{ "" }
{
- output.state mid.sentence =
%</bststd>
+% \end{macrocode}
+% Handle the edition first to get the beginning of the sentence.
+% Afterwards, the text before the edition is put to the stack and
+% exchanged with the edition number itself.
+% \begin{macrocode}
%<*bststd&!bstshort>
- { edition "l" language.change.case "~\btxeditionlong {}" * }
- { edition "t" language.change.case "~\btxeditionlong {}" * }
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+ "\btxnumerallong {" swap$ *
+ "}~\btxeditionlong {}" *
%</bststd&!bstshort>
%<*bststd&bstshort>
- { edition "l" language.change.case "~\btxeditionshort {.}" * }
- { edition "t" language.change.case "~\btxeditionshort {.}" * }
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
+ if$
+ "\btxnumeralshort {" swap$ *
+ "}~\btxeditionshort {.}" *
%</bststd&bstshort>
%<*bststd>
- if$
}
if$
}
@@ -4291,7 +4832,6 @@ FUNCTION {format.issn}
{ "\btxISSN~\btxISSNfont {" issn * "}" * }
if$
}
-
% \end{macrocode}
%
% \begin{macrocode}
@@ -4300,17 +4840,32 @@ FUNCTION {format.url}
{ "" }
{
urldate empty$
- { "\btxurlfont{" url * "}" * }
+ { "{\latintext \btxurlfont {" url * "}}" * }
{
- "\btxurlfont{" url *
- "}, \btxurldatecomment{} \btxkeywordlanguage {\btxurldatefont{" *
- urldate * "}}" *
+ "{\latintext \btxurlfont {" url *
+ "}}\btxurldatecomment {\btxkeywordlanguage {\btxurldatefont{" *
+ urldate * "}}}" *
}
if$
}
if$
}
-
+% \end{macrocode}
+% Format annotations:
+% \begin{macrocode}
+FUNCTION {write.annote}
+{ annote empty$
+ 'skip$
+ {
+ annotelanguage empty$
+ { "\btxkeywordlanguage {" }
+ { "{\selectlanguage {" annotelanguage * "}" * }
+ if$
+ "\btxannotation {" * annote * "}}" *
+ write$ newline$
+ }
+ if$
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -4594,10 +5149,7 @@ FUNCTION {format.book.crossref}
{ key titlefont * }
if$
}
-%</bststd>
-%<bststd&!bstshort> { "\Btxinlong {}\ " format.crossref.editor * }
-%<bststd&bstshort> { "\Btxinshort {.}\ " format.crossref.editor * }
-%<*bststd>
+ { format.crossref.editor * }
if$
" \cite{" * crossref * "}" *
}
@@ -4642,7 +5194,7 @@ FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
after.authors
- format.title "title" output.check
+ format.jtitle "title" output.check
new.block
crossref missing$
{ journal
@@ -4663,6 +5215,7 @@ FUNCTION {article}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4700,6 +5253,7 @@ FUNCTION {book}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4718,6 +5272,7 @@ FUNCTION {booklet}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4757,6 +5312,7 @@ FUNCTION {inbook}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4788,6 +5344,7 @@ FUNCTION {incollection}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4827,6 +5384,7 @@ FUNCTION {inproceedings}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4871,6 +5429,7 @@ FUNCTION {manual}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4890,6 +5449,7 @@ FUNCTION {mastersthesis}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4910,6 +5470,7 @@ FUNCTION {misc}
format.url output
note output
fin.entry
+ write.annote
empty.misc.check
}
@@ -4931,6 +5492,7 @@ FUNCTION {phdthesis}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4971,6 +5533,7 @@ FUNCTION {proceedings}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -4991,6 +5554,7 @@ FUNCTION {techreport}
format.url output
note output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -5006,6 +5570,7 @@ FUNCTION {unpublished}
note "note" output.check
format.date output
fin.entry
+ write.annote
}
% \end{macrocode}
@@ -5590,12 +6155,14 @@ FUNCTION {begin.bib}
" \providebibliographyfont{name}{}%" write$ newline$
" \providebibliographyfont{lastname}{}%" write$ newline$
" \providebibliographyfont{title}{\emph}%" write$ newline$
+ " \providebibliographyfont{jtitle}{\btxtitlefont}%" write$ newline$
" \providebibliographyfont{etal}{\emph}%" write$ newline$
" \providebibliographyfont{journal}{}%" write$ newline$
" \providebibliographyfont{volume}{}%" write$ newline$
" \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
" \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
" \providebibliographyfont{url}{\url}%" write$ newline$
+ " \providebibliographyfont{numeral}{}%" write$ newline$
}
% \end{macrocode}
@@ -5639,6 +6206,8 @@ EXECUTE {end.bib}
%<*bstams>
ENTRY
{ address
+ annote
+ annotelanguage
author
booktitle
chapter
@@ -5757,6 +6326,13 @@ FUNCTION {titlefont}
if$
}
+FUNCTION {jtitlefont}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "\btxjtitlefont {" swap$ * "}" * }
+ if$
+}
+
FUNCTION {journalfont}
{ duplicate$ empty$
{ pop$ "" }
@@ -5936,9 +6512,7 @@ FUNCTION {output.bibitem}
language 'language.state :=
}
if$
- "\bibitem{" write$
- cite$ write$
- "}" write$
+ "\bibitem {" cite$ * "}" * write$
newline$
% \end{macrocode}
% This empty string is the first thing that will be written
@@ -6000,7 +6574,7 @@ FUNCTION {format.names}
numnames 'namesleft :=
{ namesleft #0 > }
{
- s nameptr "{ff~}{vv~}" format.name$
+ s nameptr "{ff{\btxfnamespacelong }~}{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
s nameptr "{, jj}" format.name$ * 't :=
nameptr #1 >
@@ -6018,7 +6592,7 @@ FUNCTION {format.names}
if$
}
{
- s nameptr "{ff~}{vv~}" format.name$
+ s nameptr "{ff{\btxfnamespacelong }~}{vv~}" format.name$
s nameptr "{ll}" format.name$ lastnamefont *
s nameptr "{, jj}" format.name$ * namefont
}
@@ -6071,6 +6645,13 @@ FUNCTION {format.title}
if$
}
+FUNCTION {format.jtitle}
+{ title empty$
+ { "" }
+ { jtitle "t" language.change.case titlefont }
+ if$
+}
+
FUNCTION {format.journal.vol.year}
{ journal empty$
{ "journal name" missing.warning ""}
@@ -6216,10 +6797,13 @@ FUNCTION {format.incoll.title.editors}
FUNCTION {format.edition}
{ edition empty$
{ "" }
- { output.state mid.sentence =
- { edition "l" language.change.case " \btxeditionshort {.}" * }
- { edition "t" language.change.case " \btxeditionshort {.}" * }
+ {
+ output.state mid.sentence =
+ { edition "l" change.case$ }
+ { edition "t" change.case$ }
if$
+ "\btxnumeralshort {" swap$ *
+ "}~\btxeditionshort {.}" *
}
if$
}
@@ -6243,17 +6827,34 @@ FUNCTION {format.url}
{ "" }
{
urldate empty$
- { "\btxurlfont{" url * "}" * }
+ { "{\latintext \btxurlfont {" url * "}}" * }
{
- "\btxurlfont{" url *
- "}, \btxurldatecomment{} \btxkeywordlanguage {\btxurldatefont {" *
- urldate * "}}" *
+ "{\latintext \btxurlfont {" url *
+ "}}\btxurldatecomment {\btxkeywordlanguage {\btxurldatefont {" *
+ urldate * "}}}" *
}
if$
}
if$
}
+% \end{macrocode}
+% Format annotations:
+% \begin{macrocode}
+FUNCTION {write.annote}
+{ annote empty$
+ 'skip$
+ {
+ annotelanguage empty$
+ { "\btxkeywordlanguage {" }
+ { "{\selectlanguage {" annotelanguage * "}" * }
+ if$
+ "\btxannotation {" * annote * "}}" *
+ write$ newline$
+ }
+ if$
+}
+
INTEGERS { multiresult }
FUNCTION {multi.page.check}
@@ -6436,7 +7037,7 @@ FUNCTION {format.incoll.inproc.crossref}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
- format.title "title" output.check
+ format.jtitle "title" output.check
crossref missing$
{ format.journal.vol.year output
format.number output
@@ -6451,6 +7052,7 @@ FUNCTION {article}
format.language *
note output
fin.entry
+ write.annote
}
FUNCTION {book}
@@ -6480,6 +7082,7 @@ FUNCTION {book}
format.language *
note output
fin.entry
+ write.annote
}
FUNCTION {booklet}
@@ -6492,6 +7095,7 @@ FUNCTION {booklet}
format.url output
note output
fin.entry
+ write.annote
}
FUNCTION {inbook}
@@ -6523,6 +7127,7 @@ FUNCTION {inbook}
format.language *
note output
fin.entry
+ write.annote
}
FUNCTION {incollection}
@@ -6546,6 +7151,7 @@ FUNCTION {incollection}
format.url output
format.language *
fin.entry
+ write.annote
}
FUNCTION {inproceedings}
@@ -6568,6 +7174,7 @@ FUNCTION {inproceedings}
format.url output
format.language *
fin.entry
+ write.annote
}
FUNCTION {conference} { inproceedings }
@@ -6601,6 +7208,7 @@ FUNCTION {manual}
format.url output
note output
fin.entry
+ write.annote
}
FUNCTION {mastersthesis}
@@ -6615,6 +7223,7 @@ FUNCTION {mastersthesis}
note output
format.book.pages output
fin.entry
+ write.annote
}
FUNCTION {misc}
@@ -6629,6 +7238,7 @@ FUNCTION {misc}
note output
format.book.pages output
fin.entry
+ write.annote
empty.misc.check
}
@@ -6645,6 +7255,7 @@ FUNCTION {phdthesis}
note output
format.book.pages output
fin.entry
+ write.annote
}
FUNCTION {proceedings}
@@ -6676,6 +7287,7 @@ FUNCTION {proceedings}
format.url output
note output
fin.entry
+ write.annote
}
FUNCTION {techreport}
@@ -6690,6 +7302,7 @@ FUNCTION {techreport}
format.url output
note output
fin.entry
+ write.annote
}
FUNCTION {unpublished}
@@ -6700,6 +7313,7 @@ FUNCTION {unpublished}
note "note" output.check
format.date output
fin.entry
+ write.annote
}
FUNCTION {default.type} { misc }
@@ -6937,12 +7551,14 @@ FUNCTION {begin.bib}
" \providebibliographyfont{name}{}%" write$ newline$
" \providebibliographyfont{lastname}{}%" write$ newline$
" \providebibliographyfont{title}{\emph}%" write$ newline$
+ " \providebibliographyfont{jtitle}{\btxtitlefont}%" write$ newline$
" \providebibliographyfont{etal}{}%" write$ newline$
" \providebibliographyfont{journal}{}%" write$ newline$
" \providebibliographyfont{volume}{\textbf}%" write$ newline$
" \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
" \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
" \providebibliographyfont{url}{\url}%" write$ newline$
+ " \providebibliographyfont{numeral}{}%" write$ newline$
" \providecommand\btxprintamslanguage[1]{\ (#1)}"
write$ newline$
}
diff --git a/Master/texmf-dist/source/latex/babelbib/babelbib.ins b/Master/texmf-dist/source/latex/babelbib/babelbib.ins
index 3af7fa758f2..1091acc3388 100644
--- a/Master/texmf-dist/source/latex/babelbib/babelbib.ins
+++ b/Master/texmf-dist/source/latex/babelbib/babelbib.ins
@@ -30,6 +30,7 @@
\file{finnish.bdf}{\from{babelbib.dtx}{latex,finnish}}%
\file{french.bdf}{\from{babelbib.dtx}{latex,french}}%
\file{german.bdf}{\from{babelbib.dtx}{latex,german}}%
+ \file{greek.bdf}{\from{babelbib.dtx}{latex,greek}}%
\file{italian.bdf}{\from{babelbib.dtx}{latex,italian}}%
\file{norsk.bdf}{\from{babelbib.dtx}{latex,norsk}}%
\file{portuguese.bdf}{\from{babelbib.dtx}{latex,portuguese}}%
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
index 35a65bc2d67..c9a38b547c7 100644
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
@@ -1,5 +1,5 @@
%\iffalse
-% bibleref.dtx generated using makedtx version 0.9b (c) Nicola Talbot
+% bibleref.dtx generated using makedtx version 0.91b (c) Nicola Talbot
% Command line args:
% -src "(.+)\.(sty)=>\1.\2"
% -src "(.+)\.(tex)=>\1.\2"
@@ -7,7 +7,7 @@
% -author "Nicola Talbot"
% -dir "source"
% bibleref
-% Created on 2005/9/28 15:01
+% Created on 2006/7/30 14:17
%\fi
%\iffalse
%<*package>
@@ -30,7 +30,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2005 Nicola Talbot, all rights reserved.
+% Copyright (C) 2006 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -40,16 +40,17 @@
\usepackage{bibleref}
\newcommand{\sty}[1]{\textsf{#1}}
-\CheckSum{2050}
+\CheckSum{2208}
+\OnlyDescription
-\def\docdate{28 Sep 2005}
+\def\docdate{30 July 2006}
\begin{document}
\DocInput{bibleref.dtx}
\end{document}
%</driver>
%\fi
-%\title{bibleref.sty v1.02: \LaTeXe\ Package for
+%\title{bibleref.sty v1.06: \LaTeXe\ Package for
%typesetting bible references}
%\author{Nicola Talbot}
%\date{\docdate}
@@ -160,6 +161,22 @@
%\end{verbatim}
%Note the use of \verb|##1| instead of \verb|#1|.
%
+%\section{Indexing Bible References}
+%
+%\DescribeMacro{\ibibleverse}
+%The command \verb|\ibibleverse| does the same as \verb|\bibleverse|
+%but also adds an index entry (provided you have used
+%\verb|\makeindex| in the preamble.) The default page number
+%format is given by the command
+%\DescribeMacro{\bvidxpgformat}\verb|\bvidxpgformat|. This
+%is \texttt{textrm} by default, but can be redefined. To
+%override the page number format for a particular entry you can
+%use the optional argument to \verb|\ibibleverse|. For example:
+%\begin{verbatim}
+%\ibibleverse[textit]{Exodus}
+%\end{verbatim}
+%(Note there is no backslash.)
+%
%\section{Acknowledgements}
%Many thanks to all the useful comments from comp.text.tex,
%especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.
@@ -183,7 +200,7 @@
% Declare package
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bibleref}[2005/09/28 1.02 (NLCT)]
+\ProvidesPackage{bibleref}[2006/07/30 1.06 (NLCT)]
% \end{macrocode}
% Need to do some conditional stuff
% \begin{macrocode}
@@ -352,7 +369,7 @@
\def\br@IThessalonians{\BRepistlenumberstyle{1}\BRepistletothe Thessalonians}%
\def\br@IIThessalonians{\BRepistlenumberstyle{2}\BRepistletothe Thessalonians}%
\def\br@ITimothy{\BRepistlenumberstyle{1}\BRepistleto Timothy}%
-\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistletoTimothy}%
+\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistleto Timothy}%
\def\br@Titus{\BRepistleto Titus}%
\def\br@Philemon{\BRepistleto Philemon}%
\def\br@Hebrews{\BRepistletothe Hebrews}%
@@ -373,7 +390,7 @@
% will switch to an abbreviated form for the book titles.
% \begin{macrocode}
\newcommand{\brabbrvname}{%
-\def\br@Gensis{Gn\BRperiod}%
+\def\br@Genesis{Gn\BRperiod}%
\def\br@Exodus{Ex\BRperiod}%
\def\br@Leviticus{Lv\BRperiod}%
\def\br@Numbers{Nb\BRperiod}%
@@ -451,7 +468,7 @@
% switches to an alternative set of abbreviations.
% \begin{macrocode}
\newcommand{\braltabbrvname}{%
-\def\br@Gensis{Gen\BRperiod}%
+\def\br@Genesis{Gen\BRperiod}%
\def\br@Exodus{Exod\BRperiod}%
\def\br@Leviticus{Lev\BRperiod}%
\def\br@Numbers{Num\BRperiod}%
@@ -902,17 +919,17 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\def\@@br@vrsty#1-#2\end{%
\@do@verses#1,\relax\end
-\ifx#2\@nil
+\ifx\@nil#2\relax
\else
-\BRvrsep
+\@bv@do{\BRvrsep}%
\@@br@vrsty#2\end%
\fi}
\def\@do@verses#1,#2\end{%
-\ifthenelse{\equal{#1}{}}{}{\BRversestyle{#1}}%
-\ifx\relax#2%
+\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRversestyle{#1}}}%
+\ifx\relax#2\@empty
\else
-\BRvsep
+\@bv@do{\BRvsep}%
\@do@verses#2\end
\fi
}
@@ -926,22 +943,26 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% \begin{macrocode}
\newcommand{\bibleverse}[1]{%
\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book '#1'}{%
-}}{\BRbooktitlestyle{\csname br@#1\endcsname}}%
-\@ifnextchar({\BRbkchsep \@bibleverse}\relax
+}}{\@bv@idxsort{\csname br@#1\endcsname}%
+\def\@bv@chidxsort{}%
+\@bv@do{\BRbooktitlestyle{\csname br@#1\endcsname}}}%
+\@ifnextchar({\BRbkchsep\@bv@addtoidx{!}\@bibleverse}{\@end@@bibleverse}%
}
% \end{macrocode}
% Get the chapter number.
% \begin{macrocode}
\def\@bibleverse(#1:{%
\ifthenelse{\equal{#1}{}}{}{%
-\BRchapterstyle{#1}}%
+\ifthenelse{\equal{\@bv@chidxsort}{}}{%
+\def\@bvchidxsort{#1}\@bv@addtoidx{#1@}}{}%
+\@bv@do{\BRchapterstyle{#1}}}%
\@@bibleverse}
% \end{macrocode}
% Second part of a range spanning chapters.
% \begin{macrocode}
\def\@bibleverser-(#1:{%
\ifthenelse{\equal{#1}{}}{}{%
-\BRchapterstyle{#1}}%
+\@bv@do{\BRchapterstyle{#1}}}%
\@@bibleverse}
% \end{macrocode}
% Get the verse number (or number range), and check to see
@@ -949,9 +970,75 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% chapter, verse pair).
% \begin{macrocode}
\def\@@bibleverse#1){%
-\ifthenelse{\equal{#1}{}}{}{\BRchvsep\@br@vrsty{#1}}%
-\@ifnextchar({\BRchsep\@bibleverse}%
-{\@ifnextchar-{\BRvrsep\@bibleverser}\relax}}
+\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRchvsep}\@br@vrsty{#1}}%
+\@ifnextchar({\@bv@do{\BRchsep}\@bibleverse}%
+{\@ifnextchar-{\@bv@do{\BRvrsep}\@bibleverser}{\@end@@bibleverse}}}
+% \end{macrocode}
+% This controls what to do at the end of the final
+% verse.
+% \begin{macrocode}
+\newcommand{\@end@@bibleverse}{%
+\if@bv@idx
+\index{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}%
+\@bv@idxfalse
+\fi
+}
+% \end{macrocode}
+% Do argument and add to idx
+% \begin{macrocode}
+\newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}}
+% \end{macrocode}
+% Append text to \verb|\@bv@idxentry|
+% \begin{macrocode}
+\toksdef\@bv@tmpa=0
+\toksdef\@bv@tmpb=2
+\newcommand{\@bv@addtoidx}[1]{%
+\if@bv@idx
+\@bv@tmpa={#1}%
+\@bv@tmpb=\expandafter{\@bv@idxentry}%
+\edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
+\fi}
+% \end{macrocode}
+% Append text to \verb|\@@bv@idxsort|
+% \begin{macrocode}
+\newcommand{\@bv@addtoidxsort}[1]{%
+\if@bv@idx
+\@bv@tmpa={#1}%
+\@bv@tmpb=\expandafter{\@@bv@idxsort}%
+\edef\@@bv@idxsort{\the\@bv@tmpb\the\@bv@tmpa}%
+\fi}
+% \end{macrocode}
+% Define switch to indicate whether or not to index
+% bible reference.
+% \begin{macrocode}
+\newif\if@bv@idx
+\@bv@idxfalse
+% \end{macrocode}
+% Sort key for bible verse index. (Strip all the formatting
+% bits.)
+% \begin{macrocode}
+\newcommand{\@bv@idxsort}[1]{%
+\if@bv@idx
+{\def\BRbooknumberstyle##1##2\relax{##2##1}%
+\def\BRepistlenumberstyle##1##2\relax{##2##1}%
+\def\BRgospel{}\def\BRbookof{}\def\BRepistleto{}%
+\def\BRepistletothe{}\def\BRepistleof{}%
+\xdef\@@bv@idxsort{#1\relax}%
+}%
+\fi}
+% \end{macrocode}
+% Define \verb|\ibibleverse|. This is like \verb|\bibleverse|,
+% but also adds an index entry. The optional argument indicates
+% how to format the page number (without the preceeding backslash)
+% e.g. \verb|\ibibleref[textit]{Romans}|.
+% \begin{macrocode}
+\newcommand{\ibibleverse}[1][\bvidxpgformat]{%
+\def\@bv@idxpgformat{#1}%
+\@bv@idxtrue\def\@bv@idxentry{}\bibleverse}
+% \end{macrocode}
+% Default page number format for bible verse index entries
+% \begin{macrocode}
+\newcommand{\bvidxpgformat}{textrm}
% \end{macrocode}
% \begin{macrocode}
%</bibleref.sty>
@@ -961,9 +1048,15 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% \end{macrocode}
%\subsection{Sample Document}
% \begin{macrocode}
-\documentclass{ltxdoc}
+\documentclass{article}
\usepackage{bibleref}
+\usepackage{makeidx}
+\makeindex
+
+% make the page numbers in the index italic for bible
+% references
+\renewcommand{\bvidxpgformat}{textit}
\begin{document}
\title{Sample Document}
@@ -972,9 +1065,9 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
Long citation in text:
\biblerefstyle{text}
-\bibleverse{IICor}(12:15,18,21-32).
+\bibleverse{IICor}(12:15,18,21-33).
Short citation in footnote\footnote{%
-\biblerefstyle{chicago}\bibleverse{IICor}(12:15,18,21-32)}.
+\biblerefstyle{chicago}\bibleverse{IICor}(12:15,18,21-33)}.
\section{Default Style}
@@ -1168,6 +1261,25 @@ has verses in lower case Roman numerals, and redefines
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}
+\section{MHRA Style---Indexed}
+
+\biblerefstyle{MHRA}
+\noindent
+\begin{tabular}{ll}
+\verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
+\verb|\ibibleverse{Exodus}(9:)| & \ibibleverse{Exodus}(9:)\\
+\verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
+\verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
+\verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
+\verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
+\verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
+\verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
+\verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
+\ibibleverse{IChronicles}(1:3)-(2:7)
+\end{tabular}
+
+\printindex
+
\end{document}
% \end{macrocode}
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.ins b/Master/texmf-dist/source/latex/bibleref/bibleref.ins
index f2237e5745a..ab25c0cd2df 100644
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.ins
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.ins
@@ -1,8 +1,8 @@
-% bibleref.ins generated using makedtx version 0.9b 2005/9/28 15:01
+% bibleref.ins generated using makedtx version 0.91b 2006/7/30 14:17
\input docstrip
\preamble
-Copyright (C) 2005 Nicola Talbot, all rights reserved.
+Copyright (C) 2006 Nicola Talbot, all rights reserved.
If you modify this file, you must change its name first.
You are NOT ALLOWED to distribute this file alone. You are NOT
ALLOWED to take money for the distribution or use of either this
diff --git a/Master/texmf-dist/source/latex/breakurl/breakurl.dtx b/Master/texmf-dist/source/latex/breakurl/breakurl.dtx
index ec9a4d64b86..d5111f4be86 100644
--- a/Master/texmf-dist/source/latex/breakurl/breakurl.dtx
+++ b/Master/texmf-dist/source/latex/breakurl/breakurl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005 by Vilar Camara Neto.
+% Copyright (C) 2005,2006 by Vilar Camara Neto.
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -28,7 +28,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{breakurl}
%<*package>
- [2005/09/23 v1.10 Breakable hyperref URLs]
+ [2006/08/26 v1.20 Breakable hyperref URLs]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -43,7 +43,7 @@
%</driver>
% \fi
-% \CheckSum{371}
+% \CheckSum{372}
% \CharacterTable
@@ -62,6 +62,7 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
+% \changes{v1.20}{2006/08/26}{Changes to reflect update of hyperref package}
% \changes{v1.10}{2005/09/23}{Added the command \string\urlalt, allowing one to
% specify different values for displayed and actual link}
% \changes{v1.01}{2005/09/22}{Fixed a bug when a page break occurs in the
@@ -82,7 +83,7 @@
% \textsf{breakurl}~\fileversion, dated~\filedate.}}
% \author{Vilar Camara Neto \\
% \texttt{neto@dcc.ufmg.br}}
-% \date{September 23, 2005}
+% \date{August 26, 2006}
%
% \maketitle
%
@@ -119,12 +120,10 @@
% the |\usepackage{hyperref}|. The |\burl| command is defined and, by default,
% the package also turns the |\url| command into a synonym of |\burl|. This
% might come in handy, for example, if you use Bib\TeX{}, your |.bib|-file has
-% lots of |\url| commands and you don't want to replace them by
-% |\burl|.\footnote{Yes, \texttt{\string\burl} also works inside
-% bibliographies, since they are considered to be ``in the middle of the
-% document''.} If, for some reason, you want to preserve the original behaviour
-% of |\url| (i.e., it creates an unbreakable link), you must supply the
-% |preserveurlmacro| option to the package (see Section \ref{sec:pkgoptions}).
+% lots of |\url| commands and you don't want to replace them by |\burl|. If,
+% for some reason, you want to preserve the original behavior of |\url| (i.e.,
+% it creates an unbreakable link), you must supply the |preserveurlmacro|
+% option to the package (see Section \ref{sec:pkgoptions}).
%
% In the middle of the document, the syntax of |\burl| (and its synonym |\url|)
% is exactly like the original |\url|: |\burl|\marg{URL}, where \meta{URL} is,
@@ -139,7 +138,7 @@
% \texttt{\string\hyperref}'s \texttt{\string\href}, but since it works in a
% different manner I decided not to call it ``\texttt{\string\bhref}''.}
%
-% The default behaviour of the package is to break the link after any sequence
+% The default behavior of the package is to break the link after any sequence
% of these characters:
%
% \begin{center}
@@ -191,7 +190,7 @@
% \newcommand{\sep}{$\mid$}
%
% When using the |\usepackage| command, you can give some options to customize
-% the package behaviour. Possible options are explained below:
+% the package behavior. Possible options are explained below:
%
% \begin{itemize}
% \item |hyphenbreaks|\par
@@ -242,6 +241,10 @@
%
% \begin{description}
%
+% \item[v1.20] An update was needed because |hyperref|'s internals were
+% changed. (Thanks Heiko for sending the correction patch.) Troubleshooting
+% now includes a note about |\sloppy|.
+%
% \item[v1.10] A new command, |\burlalt| (and the synonym |\urlalt|), allows
% one to specify different values for actual and displayed link.
%
@@ -280,32 +283,57 @@
%
% \subsection{Troubleshooting}
%
-% I received some comments saying that in some cases |breakurl| destroys the
-% formatting of the document: the left/right margins aren't respected,
-% justification becomes weird, etc. In all these cases, the problems were
-% corrected when other packages were upgraded, notabily |xkeyval|.
+% Here comes a few notes about known issues:
%
-% If your compilation issues the following error:
-% \begin{quote}
-% |! Undefined control sequence.|\\
-% |<argument> \headerps@out| \ldots
-% \end{quote}
-% it's probabily because you forgot to specify the |dvips| driver as an option
-% to |hyperref|. Check if you have it:
-% \begin{quote}
-% |\usepackage[dvips]{hyperref}|
-% \end{quote}
+% \begin{itemize}
+%
+% \item I received some comments saying that in some cases |breakurl| destroys
+% the formatting of the document: the left/right margins aren't respected,
+% justification becomes weird, etc. In all these cases, the problems were
+% corrected when other packages were upgraded, notabily |xkeyval|.
%
+% \item If your compilation issues the following error:
+% \begin{quote}
+% |! Undefined control sequence.|\\
+% |<argument> \headerps@out| \ldots
+% \end{quote}
+% it's probabily because you forgot to specify the |dvips| driver as an
+% option to |hyperref|. Check if you have it:
+% \begin{quote}
+% |\usepackage[dvips]{hyperref}|
+% \end{quote}
%
+% \item If everything compiles but sometimes URLs still don't respect the right
+% margin, don't blame the package yet :-) . Roughly speaking, by default the
+% right margin is a limit to be respected ``only if word spacing is okay'',
+% so it may be ignored even when URLs aren't used. Check the following
+% paragraph:
+%
+% Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin
+% zzzzzzzzzzzzzzzzzzzzzzz\ldots
+%
+% To overcome this (and make right margins a hard limit) use the command
+% |\sloppy|, preferably before |\begin{document}|. This makes the previous
+% paragraph look like:
+%
+% \sloppy
+%
+% Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin
+% zzzzzzzzzzzzzzzzzzzzzzz\ldots
+%
+% As a drawback word spacing becomes terrible, but now the text is kept
+% inside designed margins. You should decide what looks better.
+%
+% \end{itemize}
%
% \subsection{Acknowledgments}
%
% Thanks to Hendri Adriaens, Donald Arseneau, Michael Friendly, Morten Hřgholm,
-% David Le Kim, Damian Menscher, Tristan Miller, Christoph Schiller, Xiaotian
-% Sun, and David Tulloh for suggestions, bug reports, comments, and
-% corrections. A special thanks to the participants of |comp.text.tex|
-% newsgroups for their constant effort to help hundreds of people in the
-% beautiful world of \TeX/\LaTeX.
+% David Le Kim, Damian Menscher, Tristan Miller, Heiko Oberdiek, Christoph
+% Schiller, Xiaotian Sun, and David Tulloh for suggestions, bug reports,
+% comments, and corrections. A special thanks to the participants of
+% |comp.text.tex| newsgroups for their constant effort to help hundreds of
+% people in the beautiful world of \TeX/\LaTeX.
%
%
% \section{Source code}
@@ -550,7 +578,7 @@
\burl@toks{}%
\let\burl@UrlRight=\UrlRight
\let\UrlRight=\empty
- \Hy@colorlink{\@ifundefined{@urlcolor}{\@linkcolor}{\@urlcolor}}%
+ \@ifundefined{@urlcolor}{\Hy@colorlink\@linkcolor}{\Hy@colorlink\@urlcolor}%
\@burl@breakablefalse
\expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=%
\burl@urltext\do{%
diff --git a/Master/texmf-dist/source/latex/dk-bib/Makefile b/Master/texmf-dist/source/latex/dk-bib/Makefile
index f21d8fb9a57..0489f75f6fb 100644
--- a/Master/texmf-dist/source/latex/dk-bib/Makefile
+++ b/Master/texmf-dist/source/latex/dk-bib/Makefile
@@ -1,8 +1,8 @@
### Makefile --- for building dk-bib
-# Copyright (C) 2004, 2005 Arne Jorgensen
+# Copyright (C) 2004, 2005, 2006 Arne Jorgensen
-# Version: $Id: Makefile 82 2005-10-02 16:26:11Z arne $
+# Version: $Id: Makefile 89 2006-05-16 19:50:56Z arne $
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this file; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.PHONY: all doc install-texmfhome install-texmflocal install texlive clean
@@ -36,7 +36,7 @@ dk-bib.dvi: dk-bib.ltx litteratur.bib dk-plain.bst dk-bib.sty
LATEX=latex make doc
dk-bib.zip: README COPYRIGHT Makefile dk-bib.ltx dk-bib.pdf\
- dk-bib.sty litteratur.bib *.bst *.csf
+ *.sty litteratur.bib *.bst *.csf
zip -z $@ $^ < README
install: dk-bib.pdf
@@ -46,6 +46,7 @@ install: dk-bib.pdf
install -m 0755 -d ${INSTALLDIR}/bibtex/bst/dk-bib/
install -m 0755 -d ${INSTALLDIR}/bibtex/csf/dk-bib/
install -m 0644 dk-bib.sty ${INSTALLDIR}/tex/latex/dk-bib/
+ install -m 0644 dk-apali.sty ${INSTALLDIR}/tex/latex/dk-bib/
install -m 0644 dk-bib.pdf ${INSTALLDIR}/doc/latex/dk-bib/
install -m 0644 *.bst ${INSTALLDIR}/bibtex/bst/dk-bib/
install -m 0644 *.csf ${INSTALLDIR}/bibtex/csf/dk-bib/
diff --git a/Master/texmf-dist/source/latex/dottex/dottex.dtx b/Master/texmf-dist/source/latex/dottex/dottex.dtx
index 5d41805b792..d1877d5451e 100644
--- a/Master/texmf-dist/source/latex/dottex/dottex.dtx
+++ b/Master/texmf-dist/source/latex/dottex/dottex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (c) 2005, Lars Kotthoff <metalhead@metalhead.ws>
+% Copyright (c) 2005-2006, Lars Kotthoff <metalhead@metalhead.ws>
%
% Large portions copied from pdftex,
% Copyright (c) 2001-3, Radhakrishnan CV <cvr@river-valley.com>
@@ -42,8 +42,8 @@
%<package> \NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package> \ProvidesPackage{dottex}
%<*package>
- [2005/08/13 v0.2 dot/neato graphs in LaTeX]
-\RequirePackage{graphicx,moreverb}
+ [2006/04/02 v0.5 dot/neato graphs in LaTeX]
+\RequirePackage{graphicx,moreverb,keyval}
%</package>
%
%<*driver>
@@ -60,7 +60,7 @@
%</driver>
% \fi
%
-% \CheckSum{217}
+% \CheckSum{387}
%
% \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
@@ -79,8 +79,12 @@
% Right brace \} Tilde \~}
%
%
-% \changes{v0.1}{2005/08/06}{Initial version}
-% \changes{v0.2}{2005/08/13}{New way to set graph width, neatopic environment}
+% \changes{v0.1}{2005/08/06}{Initial version.}
+% \changes{v0.2}{2005/08/13}{New way to set graph width, neatopic environment.}
+% \changes{v0.3}{2005/11/16}{Added pdf option to package.}
+% \changes{v0.4}{2006/01/23}{Changed pdf support to ps -> eps -> pdf conversion.
+% Fixed bugs.}
+% \changes{v0.5}{2006/04/02}{Added keyval interface for picture dimensions.}
%
% \GetFileInfo{dottex.dtx}
%
@@ -113,8 +117,9 @@
%
% \section{Requirements}
%
-% To use dottex, you'll need the \texttt{graphicx} and \texttt{moreverb}
-% packages, and of course, dot.
+% To use dottex, you'll need the \texttt{graphicx}, \texttt{keyval} and
+% \texttt{moreverb} packages, ps2epsi and epstopdf if you want to use the pdf
+% option, and of course, dot / neato.
%
% \section{Usage}
%
@@ -126,6 +131,8 @@
% \item[\oarg{noshell}] Don't use shell escape, graphs must be generated
% manually.
% \item[\oarg{miktex}] We're using mikTeX.
+% \item[\oarg{pdf}] PDF output, generate .pdf files of the graphs out of
+% .ps.
% \end{description}
%
% The following environments can be used to include graphs:
@@ -142,8 +149,8 @@
% The \texttt{graph} preamble and the surrounding braces are inserted
% automatically.
%
-% The width of the graph in your document can be controlled via the
-% \verb=\dotwidth= parameter, which is set to \verb=\textwidth= by default.
+% For both environments, you may specify width or height of the picture using
+% [width=\meta{width}] or [height=\meta{height}] as in the \texttt{includegraphics} command.
%
% \StopEventually{}
%
@@ -153,17 +160,19 @@
% \begin{macrocode}
\newif\ifShellEscape
\newif\ifmiktex \miktexfalse
+\newif\ifpdf \pdffalse
\DeclareOption{shell}{\ShellEscapetrue}
\DeclareOption{noshell}{\ShellEscapefalse}
\DeclareOption{miktex}{\global\miktextrue}
+\DeclareOption{pdf}{\pdftrue}
\ExecuteOptions{shell}
\ProcessOptions\relax
%% test if shell escape really works
\ifShellEscape
\def\tmpfile{/tmp/w18-test-\the\year\the\month\the\day\the\time}
- \ifmiktex%
+ \ifmiktex
\immediate\write18{rem >"\tmpfile"}
\else
\immediate\write18{touch \tmpfile}
@@ -177,19 +186,18 @@
\ifShellEscape
\PackageInfo{dottex}
- {Automatically converting dot/neato files to ps}
+ {Automatically converting dot/neato files}
\else
\PackageWarningNoLine{dottex}
{Shell escape not enabled.\MessageBreak
- You'll need to convert the graphs yourself}
+ You'll need to convert the graphs yourself.}
\fi
\newcounter{fignum}
-\gdef\dotwidth{\textwidth}
% \end{macrocode}
%
% \subsection{\texttt{.dot}/\texttt{.neato} write out}
% \begin{macrocode}
-\def\figname{\jobname-fig\thefignum}
+\def\figname{\jobname-dottex-fig\thefignum}
\def\dotverbatimwrite#1{%
\def\BeforeStream
@@ -236,13 +244,21 @@
%
% \subsection{Environment definition}
% \begin{macrocode}
-\newenvironment{dotpic}{\stepcounter{fignum}%
+\define@key{pic}{width}{\def\dotwidth{#1}}
+\define@key{pic}{height}{\def\dotheight{#1}}
+\newenvironment{dotpic}[1][]{\stepcounter{fignum}%
+ \let\dotwidth\undefined
+ \let\dotheight\undefined
+ \setkeys{pic}{#1}
\xdef\dotCutFile{\figname.dot}
\dotverbatimwrite{\dotCutFile}}
{\enddotverbatimwrite%
\dotgraphicsinclude}
-\newenvironment{neatopic}{\stepcounter{fignum}%
+\newenvironment{neatopic}[1][]{\stepcounter{fignum}%
+ \let\dotwidth\undefined
+ \let\dotheight\undefined
+ \setkeys{pic}{#1}
\xdef\neatoCutFile{\figname.neato}
\neatoverbatimwrite{\neatoCutFile}}
{\endneatoverbatimwrite%
@@ -253,43 +269,127 @@
% \begin{macrocode}
\long\gdef\dotgraphicsprocess{%
\ifShellEscape
- \IfFileExists{\figname.dot}{%
- \immediate\write18{dot -Tps -o \figname.ps \figname.dot}
- \IfFileExists{\figname.ps}{%
- \PackageInfo{dottex}
- {\figname.dot converted}}
- {\PackageWarningNoLine{dottex}
- {Conversion of \figname.dot failed.}}}{}
- \fi}
+ \IfFileExists{\figname.dot}{%
+ \immediate\write18{dot -Tps -o \figname.ps \figname.dot}
+ \IfFileExists{\figname.ps}{%
+ \ifpdf
+ \immediate\write18{ps2epsi \figname.ps \figname.eps}
+ \immediate\write18{epstopdf \figname.eps}
+ \IfFileExists{\figname.pdf}{%
+ \PackageInfo{dottex}
+ {\figname.dot converted}}
+ {\PackageWarningNoLine{dottex}
+ {Conversion of \figname.dot failed.}}
+ \else
+ \PackageInfo{dottex}
+ {\figname.dot converted}
+ \fi}
+ {\PackageWarningNoLine{dottex}
+ {Conversion of \figname.dot failed.}}}{}
+ \fi}
\long\gdef\neatographicsprocess{%
\ifShellEscape
\IfFileExists{\figname.neato}{%
\immediate\write18{neato -Tps -o \figname.ps \figname.neato}
\IfFileExists{\figname.ps}{%
- \PackageInfo{dottex}
- {\figname.neato converted}}
+ \ifpdf
+ \immediate\write18{ps2epsi \figname.ps \figname.eps}
+ \immediate\write18{epstopdf \figname.eps}
+ \IfFileExists{\figname.pdf}{%
+ \PackageInfo{dottex}
+ {\figname.dot converted}}
+ {\PackageWarningNoLine{dottex}
+ {Conversion of \figname.dot failed.}}
+ \else
+ \PackageInfo{dottex}
+ {\figname.neato converted}
+ \fi}
{\PackageWarningNoLine{dottex}
{Conversion of \figname.neato failed.}}}{}
- \fi}
+ \fi}
% \end{macrocode}
%
% \subsection{Graph inclusion}
% \begin{macrocode}
\long\gdef\dotgraphicsinclude{\dotgraphicsprocess%
- \IfFileExists{\figname.ps}{%
- \includegraphics[width=\dotwidth]{\figname}
- }
- {\PackageWarningNoLine{dottex}
- {Please convert \figname.dot manually}}
+ \ifpdf
+ \IfFileExists{\figname.pdf}{%
+ \ifx\dotwidth\undefined
+ \ifx\dotheight\undefined
+ \includegraphics{\figname}
+ \else
+ \includegraphics[height=\dotheight]{\figname}
+ \fi
+ \else
+ \ifx\dotheight\undefined
+ \includegraphics[width=\dotwidth]{\figname}
+ \else
+ \includegraphics[width=\dotwidth,height=\dotheight]{\figname}
+ \fi
+ \fi
+ }
+ {\PackageWarningNoLine{dottex}
+ {Please convert \figname.dot manually}}
+ \else
+ \IfFileExists{\figname.ps}{%
+ \ifx\dotwidth\undefined
+ \ifx\dotheight\undefined
+ \includegraphics{\figname}
+ \else
+ \includegraphics[height=\dotheight]{\figname}
+ \fi
+ \else
+ \ifx\dotheight\undefined
+ \includegraphics[width=\dotwidth]{\figname}
+ \else
+ \includegraphics[width=\dotwidth,height=\dotheight]{\figname}
+ \fi
+ \fi
+ }
+ {\PackageWarningNoLine{dottex}
+ {Please convert \figname.dot manually}}
+ \fi
}
\long\gdef\neatographicsinclude{\neatographicsprocess%
- \IfFileExists{\figname.ps}{%
- \includegraphics[width=\dotwidth]{\figname}
- }
- {\PackageWarningNoLine{dottex}
- {Please convert \figname.neato manually}}
+ \ifpdf
+ \IfFileExists{\figname.pdf}{%
+ \ifx\dotwidth\undefined
+ \ifx\dotheight\undefined
+ \includegraphics{\figname}
+ \else
+ \includegraphics[height=\dotheight]{\figname}
+ \fi
+ \else
+ \ifx\dotheight\undefined
+ \includegraphics[width=\dotwidth]{\figname}
+ \else
+ \includegraphics[width=\dotwidth,height=\dotheight]{\figname}
+ \fi
+ \fi
+ }
+ {\PackageWarningNoLine{dottex}
+ {Please convert \figname.neato manually}}
+ \else
+ \IfFileExists{\figname.ps}{%
+ \ifx\dotwidth\undefined
+ \ifx\dotheight\undefined
+ \includegraphics{\figname}
+ \else
+ \includegraphics[height=\dotheight]{\figname}
+ \fi
+ \else
+ \ifx\dotheight\undefined
+ \includegraphics[width=\dotwidth]{\figname}
+ \else
+ \includegraphics[width=\dotwidth,height=\dotheight]{\figname}
+ \fi
+ \fi
+ }
+ {\PackageWarningNoLine{dottex}
+ {Please convert \figname.neato manually}}
+ \fi
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
index a0f6615d547..2cc5a42fe35 100644
--- a/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
+++ b/Master/texmf-dist/source/latex/flowfram/flowfram.dtx
@@ -1,12 +1,12 @@
%\iffalse
% flowfram.dtx generated using makedtx version 0.9b (c) Nicola Talbot
% Command line args:
-% -src "flowfram.sty=>flowfram.sty"
+% -src "flowfram.sty\Z=>flowfram.sty"
% -doc "docstub.tex"
% -author "Nicola Talbot"
% -dir "source"
% flowfram
-% Created on 2005/7/27 17:00
+% Created on 2005/11/24 14:42
%\fi
%\iffalse
%<*package>
@@ -35,7 +35,7 @@
%<*driver>
\documentclass{ltxdoc}
-\CheckSum{7568}
+\CheckSum{7647}
\PageIndex
\usepackage{url}
@@ -59,8 +59,7 @@ that they were defined. There must be at least one flow frame on
every page.}}
\storeglosentry{static}{name=static frame,description={Frames
-in which text is fixed in place. Static frames are usually
-cleared after each page. The contents are fixed until
+in which text is fixed in place. The contents are fixed until
explicitly changed.}}
\storeglosentry{dynamic}{name=dynamic frame,description={Frames
@@ -111,10 +110,10 @@ refer to the frame by label instead of by its IDN.}}
\end{document}
%</driver>
%\fi
-%\def\filedate{26th July 2005}
-%\def\fileversion{1.0}
+%\def\filedate{24th November 2005}
+%\def\fileversion{1.02}
%\def\filename{flowfram.dtx}
-%\def\docdate{26th July 2005}
+%\def\docdate{24th November 2005}
%
%\title{Documented Source Code for flowfram.sty v\fileversion}
%\author{Nicola L. C. Talbot}
@@ -122,7 +121,7 @@ refer to the frame by label instead of by its IDN.}}
%\maketitle
%
%This is the documented source code for the flowfram package.
-%For a user manual, see \url{flowframuserguide.pdf}.
+%For a user manual, see \url{ffuserguide.pdf}.
%
%\tableofcontents
%
@@ -139,7 +138,7 @@ refer to the frame by label instead of by its IDN.}}
% Declare package, and identify it as a \LaTeXe\ package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{flowfram}[2005/07/23 v1.0]
+\ProvidesPackage{flowfram}[2005/11/24 v1.02]
% \end{macrocode}
% Load packages needed by this package
% \begin{macrocode}
@@ -222,12 +221,22 @@ refer to the frame by label instead of by its IDN.}}
% \end{macrocode}
% Allow provision to prevent rotation in the thumbtabs.
% If no rotation, thumbtab text will be stacked vertically.
+% This will also affect whether or not to rotate \gls{frame}s.
% \begin{macrocode}
\newif\if@ttb@rotate
\@ttb@rotatetrue
\DeclareOption{rotate}{\@ttb@rotatetrue}
\DeclareOption{norotate}{\@ttb@rotatefalse}
% \end{macrocode}
+% Define command that will only rotate box if rotate option
+% set.
+% \begin{macrocode}
+\newcommand{\rotateframe}[2]{\if@ttb@rotate
+\rotatebox{#1}{#2}%
+\else
+#2\relax
+\fi}
+% \end{macrocode}
% Should the thumbtabs include number, title, both or
% neither?
% \begin{macrocode}
@@ -533,6 +542,7 @@ refer to the frame by label instead of by its IDN.}}
\expandafter\gdef\csname @ff@backcol@\romannumeral\c@maxflow\endcsname{{none}}
\expandafter\gdef\csname @ff@pages@\romannumeral\c@maxflow\endcsname{#1}
\expandafter\gdef\csname @ff@offset@\romannumeral\c@maxflow\endcsname{compute}
+\expandafter\gdef\csname @ff@angle@\romannumeral\c@maxflow\endcsname{0}%
\expandafter\gdef\csname @ff@margin@\romannumeral\c@maxflow\endcsname{right}
\ifnum\c@thisframe=0\relax
\ifthenelse{\equal{#1}{all}\TE@or\equal{#1}{odd}}{%
@@ -712,6 +722,11 @@ Invalid value for key 'offset'}{%
'offset' can either be 'compute' (to compute it according
to certain pre-defined rules) or a length}}{}}
% \end{macrocode}
+% Angle to rotate \gls{flow}:
+% \begin{macrocode}
+\define@key{flowframe}{angle}{\def\ff@angle{#1}%
+}
+% \end{macrocode}
% This key is only for \gls{flow}s:
% \begin{macrocode}
\define@key{flowframe}{margin}{%
@@ -797,7 +812,7 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\def\ff@x{}\def\ff@y{}\def\ff@frametype{}\def\ff@col{}\def\ff@style{}%
\def\ff@txtcol{}\def\ff@clear{}\def\ff@offset{}\def\ff@pages{}%
\def\ff@label{}\def\ff@backcol{}\def\ff@evenx{}\def\ff@eveny{}%
-\def\ff@oddx{}\def\ff@oddy{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{columnframe\romannumeral#1}{\ff@frame}}%
@@ -849,6 +864,9 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\ifthenelse{\equal{\ff@offset}{}}{}{%
\expandafter\xdef\csname @ff@offset@\romannumeral#1\endcsname
{\ff@offset}}%
+\ifthenelse{\equal{\ff@angle}{}}{}{%
+\expandafter\xdef\csname @ff@angle@\romannumeral#1\endcsname
+{\ff@angle}}%
\ifthenelse{\equal{\ff@clear}{}}{}{%
\PackageError{flowfram}%
{Key 'clear' not available for flow frames}{}}%
@@ -1038,6 +1056,8 @@ boolean}{You can only specify the values 'true' or 'false'}}}
\gdef\csname @sf@offset@\romannumeral\c@maxstatic\endcsname{%
compute}%
\expandafter
+\gdef\csname @sf@angle@\romannumeral\c@maxstatic\endcsname{0}%
+\expandafter
\def\csname @sf@frametype@\romannumeral\c@maxstatic\endcsname{%
fbox}%
\newboolean{@sf@clear@\romannumeral\c@maxstatic}%
@@ -1162,7 +1182,7 @@ id '#1'}{}\fi}
\newcommand{\@@setstaticframe}[2]{%
\expandafter\expandafter\expandafter
\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname
-\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}%
+\def\ff@frame{}\edef\ff@width{\the\@ff@tmp@x}\def\ff@angle{}%
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
@@ -1218,6 +1238,9 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@offset}{}}{}{%
\expandafter
\xdef\csname @sf@offset@\romannumeral#1\endcsname{\ff@offset}}%
+\ifthenelse{\equal{\ff@angle}{}}{}{%
+\expandafter
+\xdef\csname @sf@angle@\romannumeral#1\endcsname{\ff@angle}}%
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter
\xdef\csname @sf@pages@\romannumeral#1\endcsname{\ff@pages}}%
@@ -1406,6 +1429,8 @@ fbox}%
\gdef\csname @df@style@\romannumeral\c@maxdynamic\endcsname{relax}%
\expandafter
\gdef\csname @df@offset@\romannumeral\c@maxdynamic\endcsname{compute}%
+\expandafter
+\gdef\csname @df@angle@\romannumeral\c@maxdynamic\endcsname{0}%
\newboolean{@df@clear@\romannumeral\c@maxdynamic}%
\setboolean{@df@clear@\romannumeral\c@maxdynamic}{false}%
\@ifnextchar[{\@s@tdynamicframeid{\c@maxdynamic}}%
@@ -1528,7 +1553,8 @@ id '#1'}{}\fi}
\edef\ff@height{\the\@ff@tmp@y}\def\ff@style{}\def\ff@frametype{}%
\def\ff@x{}\def\ff@y{}\def\ff@col{}\def\ff@txtcol{}\def\ff@backcol{}%
\def\ff@clear{}\def\ff@margin{}\def\ff@offset{}\def\ff@pages{}%
-\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}\def\ff@oddx{}\def\ff@oddy{}%
+\def\ff@label{}\def\ff@evenx{}\def\ff@eveny{}%
+\def\ff@oddx{}\def\ff@oddy{}\def\ff@angle{}%
\setkeys{flowframe}{#2}%
\ifthenelse{\equal{\ff@frame}{}}{}{%
\setboolean{dynamicframe\romannumeral#1}{\ff@frame}}%
@@ -1571,6 +1597,9 @@ id '#1'}{}\fi}
\ifthenelse{\equal{\ff@offset}{}}{}{%
\expandafter
\xdef\csname @df@offset@\romannumeral#1\endcsname{\ff@offset}}%
+\ifthenelse{\equal{\ff@angle}{}}{}{%
+\expandafter
+\xdef\csname @df@angle@\romannumeral#1\endcsname{\ff@angle}}%
\ifthenelse{\equal{\ff@pages}{}}{}{%
\expandafter\xdef\csname @df@pages@\romannumeral#1\endcsname{%
\ff@pages}}%
@@ -1722,7 +1751,8 @@ but there are only
% \begin{macrocode}
\newif\if@setfr@mes
\@setfr@mesfalse
-\newcommand{\setframes}{\ifnum\c@thisframe=0\relax
+\newcommand{\setframes}{%
+\ifnum\c@thisframe=0\relax
\PackageWarning{flowfram}{Can't find a flow frame on page 1.
\MessageBreak
Attempting to find the first page with a flow frame}%
@@ -1740,12 +1770,12 @@ Attempting to find the first page with a flow frame}%
\@setfr@mestrue
\edef\ff@txtcol{%
\csname @ff@txtcol@\romannumeral\c@thisframe\endcsname}%
-\@s@tfftextcol}
+\@s@tfftextcol
+}
% \end{macrocode}
-% Some commands and environments may use "\twocolumn"
-% or "\onecolumn" (e.g. theindex environment). At the
-% beginning of the document, redefine these commands
-% to emulate the original effect.
+% Emulate original "\twocolumn" declaration.
+% This is provided for backward compatibilty, and
+% may be removed in later versions.
% \begin{macrocode}
\newcommand{\emulatetwocolumn}[1][]{%
\finishthispage
@@ -1768,6 +1798,8 @@ Attempting to find the first page with a flow frame}%
}
% \end{macrocode}
% Emulate original "\onecolumn" declaration.
+% This is provided for backward compatibilty, and
+% may be removed in later versions.
% \begin{macrocode}
\newcommand{\emulateonecolumn}[1][]{%
\finishthispage
@@ -1798,8 +1830,12 @@ Attempting to find the first page with a flow frame}%
\@onecolumn
\fi
\setframes
-\let\onecolumn\emulateonecolumn
-\let\twocolumn\emulatetwocolumn
+\renewcommand{\onecolumn}[1][]{\PackageWarning{flowfram}{%
+Ignoring \string\onecolumn\space found in document environment.
+Frames must be defined in the preamble}#1}%
+\renewcommand{\twocolumn}[1][]{\PackageWarning{flowfram}{%
+Ignoring \string\twocolumn\space found in document environment.
+Frames must be defined in the preamble}#1}%
}
% \end{macrocode}
% If the document finishes before the last frame on the last
@@ -2096,13 +2132,13 @@ or text might not appear correctly}%
% \end{macrocode}
% Now to find out what kind of range it is. If it is a single
% number, e.g.\ "24", then it will do, e.g.\
-% "\@ff@@getrange24-\@nil".
+% "\@ff@@getrange24-\relax".
% If it is a closed range, e.g. "30-40", it will do , e.g.\
-% "\@ff@@getrange30-40-\@nil". If it is an open range, e.g.\
-% ">25", it will do, e.g.\ "\@ff@@getrange>25-\@nil".
+% "\@ff@@getrange30-40-\relax". If it is an open range, e.g.\
+% ">25", it will do, e.g.\ "\@ff@@getrange>25-\relax".
% \begin{macrocode}
\newcommand{\@ff@getrange}[1]{%
-\expandafter\@ff@@getrange#1-\@nil\end}
+\expandafter\@ff@@getrange#1-\relax\end}
% \end{macrocode}
% The ranges can now be picked out. If the first character
% is a "<" or ">" it is an open ended range, otherwise it
@@ -2123,7 +2159,7 @@ or text might not appear correctly}%
% Get the values for an open ended range with an
% upper bound. A minimum value of "0" is assumed.
% \begin{macrocode}
-\def\@ff@getrangeless<#1-\@nil\end{%
+\def\@ff@getrangeless<#1-\relax\end{%
\c@ffrangenum=#1\relax
\advance\c@ffrangenum by -1\relax
\def\@ff@numstart{0}%
@@ -2132,27 +2168,28 @@ or text might not appear correctly}%
% Get the values for an open ended range with a lower
% bound. A maximum value of "10000" is assumed.
% \begin{macrocode}
-\def\@ff@getrangegreater>#1-\@nil\end{%
+\def\@ff@getrangegreater>#1-\relax\end{%
\c@ffrangenum=#1\relax
\advance\c@ffrangenum by 1\relax
\edef\@ff@numstart{\number\c@ffrangenum}%
\def\@ff@numend{10000}}
% \end{macrocode}
% Determine whether we have a single number or
-% a closed range. If "#2" is "\@nil", it is a single
+% a closed range. If "#2" is "\relax", it is a single
% value, otherwise it is a range.
% \begin{macrocode}
\def\@@ff@getrange#1-#2\end{%
-\ifx#2\@nil
+\ifx\relax#2
\def\@ff@numstart{#1}\def\@ff@numend{#1}%
\else
-\def\@ff@numstart{#1}\@@@ff@getrange#2\end
+\def\@ff@numstart{#1}%
+\@@@ff@getrange#2\end
\fi
}
% \end{macrocode}
% Extract the end value from the closed range.
% \begin{macrocode}
-\def\@@@ff@getrange#1-\@nil\end{%
+\def\@@@ff@getrange#1-\relax\end{%
\def\@ff@numend{#1}}
% \end{macrocode}
% Find the next \gls{flow}. If there are no more flow
@@ -2253,6 +2290,7 @@ adding new one}%
\edef\ff@txtcol{\csname @ff@txtcol@\romannumeral#1\endcsname}%
\edef\ff@backcol{\csname @ff@backcol@\romannumeral#1\endcsname}%
\@ff@setoffset{#1}%
+\rotateframe{\csname @ff@angle@\romannumeral#1\endcsname}{
\ifthenelse{\boolean{columnframe\romannumeral#1}}{%
\@ff@fbox{\csname colwidth\romannumeral#1\endcsname}%
{\csname colheight\romannumeral#1\endcsname}{%
@@ -2262,7 +2300,7 @@ adding new one}%
\@ff@box{\csname colwidth\romannumeral#1\endcsname}%
{\csname colheight\romannumeral#1\endcsname}{%
\expandafter\box\csname column\romannumeral#1\endcsname}%
-}}
+}}}
% \end{macrocode}
% Do the \gls{bbox} for \gls{flow}.
% \begin{macrocode}
@@ -2510,7 +2548,8 @@ adding new one}%
}{}%
}%
\raise\@ff@tmp@y
-\hb@xt@\z@{\expandafter\kern\@ff@tmp@x
+\hb@xt@\z@{%
+\expandafter\kern\@ff@tmp@x
\@fr@meifdraft{\@ff@box{\marginparwidth}%
{\csname colheight\romannumeral#1\endcsname}{}}%
{M:\number#1}\hss}\fi
@@ -2543,6 +2582,7 @@ adding new one}%
\@sf@setoffset{#1}%
\expandafter\expandafter\expandafter
\@ff@getstaticpos\csname @sf@dim@\romannumeral#1\endcsname
+\rotateframe{\csname @sf@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{staticframe\romannumeral#1}}{%
\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}{%
\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}
@@ -2550,7 +2590,7 @@ adding new one}%
}{%
\@ff@box{\@ff@tmp@x}{\@ff@tmp@y}%
{\expandafter\usebox\csname @staticframe@\romannumeral#1\endcsname}%
-}}
+}}}
% \end{macrocode}
% Now for the \gls{bbox}:
% \begin{macrocode}
@@ -2650,6 +2690,7 @@ adding new one}%
\@df@setoffset{#1}%
\expandafter\expandafter\expandafter
\@ff@getstaticpos\csname @df@dim@\romannumeral#1\endcsname
+\rotateframe{\csname @df@angle@\romannumeral#1\endcsname}{%
\ifthenelse{\boolean{dynamicframe\romannumeral#1}}{%
\@ff@fbox{\@ff@tmp@x}{\@ff@tmp@y}%
{\expandafter\expandafter\expandafter
@@ -2661,7 +2702,7 @@ adding new one}%
\expandafter\expandafter\expandafter
\parbox\csname @df@dim@\romannumeral#1\endcsname
{\csname \ff@style\endcsname{\ff@contents}}}%
-}}
+}}}
% \end{macrocode}
% Now for the \gls{bbox}:
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/flowfram/flowfram.ins b/Master/texmf-dist/source/latex/flowfram/flowfram.ins
index 78fb36f401e..2d7240a1103 100644
--- a/Master/texmf-dist/source/latex/flowfram/flowfram.ins
+++ b/Master/texmf-dist/source/latex/flowfram/flowfram.ins
@@ -1,4 +1,4 @@
-% flowfram.ins generated using makedtx version 0.9b 2005/7/27 17:00
+% flowfram.ins generated using makedtx version 0.9b 2005/11/24 14:42
\input docstrip
\preamble
diff --git a/Master/texmf-dist/source/latex/labelcas/labelcas.dtx b/Master/texmf-dist/source/latex/labelcas/labelcas.dtx
index 6ec5108c23c..d3be1f91ac8 100644
--- a/Master/texmf-dist/source/latex/labelcas/labelcas.dtx
+++ b/Master/texmf-dist/source/latex/labelcas/labelcas.dtx
@@ -2,7 +2,7 @@
%
% Copyright (C) 2006 by Ulrich Diez <ulrich.diez@alumni.uni-tuebingen.de>
%
-% This work may be distributed and/or modified under the conditions of
+% This Work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3 of this license
% or (at your option) any later version. The latest version of this
% license is in:
@@ -12,27 +12,59 @@
% and version 1.3 or later is part of all distributions of LaTeX version
% 2003/12/01 or later.
%
+% This Work has the LPPL maintenance status `author-maintained'.
+%
+% The Current Maintainer of this work is Ulrich Diez.
+%
+% This Work consists of the files labelcas.dtx, labelcas.ins, README and
+% the derived files labelcas.sty and labelcas.pdf.
+%
% \fi
%
% \iffalse
-%<labelcas>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<labelcas>\NeedsTeXFormat{LaTeX2e}
%<labelcas>\ProvidesPackage{labelcas}
-%<labelcas> [2006/04/27 v1.07 check label-existence and fork accordingly]
-%
+%<labelcas> [2006/08/14 v1.12 check label-existence and fork accordingly]
%<*driver>
\documentclass[a4paper]{ltxdoc}
+\makeatletter
+\@ifdefinable\saved@wrindex{\global\let\saved@wrindex\@wrindex}
+\makeatother
+\usepackage[colorlinks, linkcolor=linkcolour, urlcolor=linkcolour
+%, draft%
+]{hyperref}
+\usepackage{color}
+\definecolor{linkcolour}{cmyk}{0.64,0,0.95,0.40}% <-Olive Green
\usepackage[DefineLabelcase]{labelcas}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%\OnlyDescription
+\pagestyle{plain}%
+\setlength{\textheight}{52\baselineskip}
+\setlength{\topmargin}{\paperheight}
+\addtolength{\topmargin}{-\textheight}
+\setlength{\topmargin}{.5\topmargin}
+\addtolength{\topmargin}{-1in}
+\addtolength{\topmargin}{-\voffset}
+\addtolength{\topmargin}{-\headheight}
+\addtolength{\topmargin}{-\headsep}
+\setlength{\footskip}{\paperheight}
+\addtolength{\footskip}{-\textheight}
+\setlength{\footskip}{.15\footskip}
+\addtolength{\footskip}{\baselineskip}
+\makeatletter
+\@settopoint{\textheight}
+\@settopoint{\topmargin}
+\@settopoint{\footskip}
+\makeatother
\begin{document}
\DocInput{labelcas.dtx}
\end{document}
%</driver>
% \fi
%
-% \CheckSum{390}
+% \CheckSum{375}
%
% \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
@@ -50,24 +82,123 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
+% \iffalse meta-comment
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+% ! !
+% ! !!! In this TeX-input-file henceforth alignment-tab "&" is !!! !
+% ! !!! used for commenting- and line-breaking-purposes. !!! !
+% ! !
+% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+% \fi
% \catcode`\&=14\relax
-% &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-% & &
-% & !!!!! Henceforth alignment-tab is used for commenting- and !!!!! &
-% & !!!!! line-breaking-purposes in the documentation-parts. !!!!! &
-% & &
-% &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
-%
-% & Put an 's' behind the word 'italic' in the index-prologue:
+%
% \makeatletter
+%
+% & increase \MacroIndent so that 3-digit line-numbers don't stick out:
+%
+% \setlength\MacroIndent{1.5\MacroIndent}&
+%
+% & Add toc-entries and bookmarks to change-history and index, also put
+% & an 's' behind the word 'italic' in the index-prologue:
+%
+% \renewcommand\tableofcontents{&
+% \section*{&
+% \phantomsection
+% \Hy@raisedlink{\pdfbookmark[1]{\contentsname}{section.0}}&
+% \contentsname
+% \@mkboth{\MakeUppercase\contentsname}&
+% {\MakeUppercase\contentsname}&
+% }&
+% \@starttoc{toc}&
+% }&
+%
+% \renewcommand*\glossary@prologue{&
+% \section*{&
+% \phantomsection
+% \customaddcontentsline{toc}&
+% {section}&
+% {Change History}&
+% {\protect\numberline{\protect\null}}&
+% Change History&
+% \@mkboth{\MakeUppercase{Change History}}&
+% {\MakeUppercase{Change History}}&
+% }&
+% }&
+%
% \renewcommand*\index@prologue{&
-% \section*{Index}\markboth{Index}{Index}Numbers written in italics
-% refer to the page where the corresponding entry is described; numbers
-% underlined refer to the \ifcodeline@index code line of the \fi
-% definition; numbers in roman refer to the \ifcodeline@index code
-% lines \else pages \fi where the entry is used.&
+% \section*{&
+% \phantomsection
+% \customaddcontentsline{toc}&
+% {section}&
+% {Index}&
+% {\protect\numberline{\protect\null}}&
+% Index&
+% \@mkboth{\MakeUppercase{Index}}&
+% {\MakeUppercase{Index}}&
+% }&
+% Numbers written in italics refer to the page where the
+% corresponding entry is described; numbers underlined refer to the
+% \ifcodeline@index code line of the \fi definition; numbers in roman
+% refer to the \ifcodeline@index code lines \else pages \fi where the
+% entry is used.&
+% }&
+%
+% \newcommand*\customaddcontentsline[4]{&
+% \begingroup
+% \let\label\@gobble
+% \let\textlatin\@firstofone
+% \ifx\@currentHref\@empty
+% \Hy@Warning{No destination for bookmark of
+% \string\customaddcontentsline,&
+% \MessageBreak destination is added}&
+% \phantomsection
+% \fi
+% \expandafter\ifx csname toclevel@#2\endcsname\relax
+% \begingroup
+% \def\Hy@tempa{#1}&
+% \ifx\Hy@tempa\Hy@bookmarkstype
+% \Hy@WarningNoLine{bookmark level for unknown #2 defaults to 0}&
+% \else
+% \Hy@Info{bookmark level for unknown #2 defaults to 0}&
+% \fi
+% \endgroup
+% \expandafter\gdef\csname toclevel@#2\endcsname{0}&
+% \fi
+% \edef\Hy@toclevel{\csname toclevel@#2\endcsname}&
+% \Hy@writebookmark{\csname the#2\endcsname}{#4#3}{\@currentHref}&
+% {\Hy@toclevel}{#1}&
+% \ifHy@verbose
+% \typeout{&
+% pdftex: bookmark at \the\inputlineno:
+% {\csname the#2\endcsname}{#4#3}{\@currentHref}{\Hy@toclevel}{#1}&
+% }&
+% \fi
+% \addtocontents{#1}&
+% {\protect
+% \customcontentsline{#2}{#3}&
+% {\thepage}{\@currentHref}{#4}}&
+% \endgroup
+% }&
+%
+% \newcommand*\customcontentsline[5]{&
+% \ifx\\#4\\
+% \csname l@#1\endcsname{#5#2}{#3}&
+% \else
+% \ifHy@linktocpage
+% \csname l@#1\endcsname{{#5#2}}&
+% {\hyper@linkstart
+% {link}{#4}{#3}&
+% \hyper@linkend
+% }&
+% \else
+% \csname l@#1\endcsname{#5&
+% \hyper@linkstart
+% {link}{#4}{#2}&
+% \hyper@linkend
+% }{#3}&
+% \fi
+% \fi
% }&
-% \makeatother
%
% & Write the word '\if' from the tocs:
% \DeclareRobustCommand\Outif{\string\if}&
@@ -86,8 +217,24 @@
% \MacroFont\string #1&
% }&
%
-% & Write macro-names with <prefix> into the index:
-% \makeatletter
+% & Write index-entries in main-text:
+% \newcommand*\MacroIndexEntry[1]{&
+% \@bsphack
+% {&
+% \let\special@index\index
+% \ifx\pref\empty
+% \SpecialIndex@{#1}{\encapchar usage}&
+% \else
+% \expandafter\SpecialIndex@
+% \expandafter{&
+% \expandafter<&
+% \pref!>#1}{\encapchar usage}&
+% \fi
+% }&
+% \@esphack
+% }&
+%
+% & Write macro-names with <prefix> into the index in macro-description:
% \renewcommand*\SpecialMainIndex[1]{&
% \@bsphack
% \ifx\pref\empty
@@ -101,6 +248,29 @@
% \@esphack
% }&
%
+% & Write macro-names with <prefix> into the index in implementation:
+% \newcommand*\InsertPrefixedUsageToIndex[2]{&
+% \@bsphack
+% {&
+% \expandafter\edef
+% \expandafter\@tempa
+% \expandafter{&
+% \expandafter\string
+% \csname<#1!>#2\endcsname}&
+% \codeline@indextrue
+% \let\special@index\codeline@wrindex
+% \expandafter\SpecialIndex\expandafter{\@tempa}&
+% }&
+% \@esphack
+% }&
+%
+% & Compensate gap between macrocode-environments if no visible/
+% & printable material is between:
+% \newcommand*\macrocodeitemsep{0pt}&
+% \newcommand*\compensategap{&
+% \ifvmode\unskip\vskip\macrocodeitemsep\fi\@inlabeltrue
+% }&
+%
% & Write macro-names with <prefix> into change-history:
% \newcommand*\Patchsavedatmacroname{&
% \ifx\pref\empty
@@ -112,49 +282,224 @@
% \csname<\pref!>\saved@macroname\endcsname}&
% \fi
% }&
-% \makeatother
%
-% & The <prefix>:
+% & The <prefix>-placeholder:
% \newcommand*\pref{}&
-% \let\pref\empty
%
-% \changes{v1.0}{2006/01/04}{Initial public release}
-% \changes{v1.01}{2006/01/06}{Fixed documentation-inaccuracies}
-% \changes{v1.02}{2006/01/29}{Fixed documentation-inaccuracies}
-% \changes{v1.04}{2006/03/04}{Fixed documentation-inaccuracies}
-% \changes{v1.05}{2006/03/09}{Fixed documentation-inaccuracies}
-% \changes{v1.07}{2006/04/27}{Fixed documentation-inaccuracies}
+% & Type stuff between angles in meta-format in index and change-history
+% & (\anglechange patches \dospecials which is called by \verb to make
+% & angle active also in verbatim-mode):
+% {&
+% \catcode`\<=13\relax
+% \catcode`\>=12\relax
+% \gdef\anglechange{&
+% \let\olddospecials\dospecials
+% \def\dospecials{&
+% \olddospecials
+% \catcode`\>=12
+% \catcode`\<=13
+% \def<####1>{\textrm{\meta{####1}}}&
+% }&
+% }&
+% }&
%
-% \GetFileInfo{labelcas.sty}
+% & create document-title-date from package-filedate
+% \newcommand*\filedatetodate{%
+% \expandafter\@filedatetodate\filedate\@nil
+% }%
+% \@ifdefinable\@filedatetodate{&
+% \def\@filedatetodate#1/#2/#3\@nil{&
+% {&
+% \edef\@tempa{%
+% \ifcase#2\or January\or February\or March\or April\or May&
+% \or June\or July\or August\or September\or October&
+% \or November\or December&
+% \fi
+% \space\number#3, \number#1&
+% }&
+% \expandafter}\expandafter\date\expandafter{\@tempa}&
+% }&
+% }&
%
-% \DoNotIndex{\@empty,\@firstoftwo,\@ifdefinable,\@secondoftwo,\@gobble,&
-% \@nil,\@sptoken,\@temptokena,\toks@,\begingroup,\csname,&
-% \DeclareOption,\DeclareRobustCommand,\def,\edef,\else,&
-% \endcsname,\endgroup,\expandafter,\fi,\futurelet,\global,&
-% \ifx,\let,\long,\newcommand,\ProcessOptions,\relax,\the}&
+% & hyperref-support for index etc:
%
-% \title{&
-% The \textsf{labelcas} package&
-% \thanks{This document corresponds to \textsf{labelcas}~\fileversion,
-% dated \filedate.}&
-% }
-% \author{Ulrich Diez\\ \texttt{ulrich.diez@alumni.uni-tuebingen.de}}
+% \renewcommand*\SpecialIndex[1]{&
+% \@bsphack
+% \special@index{&
+% \expandafter\@gobble
+% \string #1\actualchar
+% \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
+% \encapchar sourceusage&
+% }&
+% \@esphack
+% }&
+%
+% \newcommand*\@DefineIndexEntryFormat[4]{&
+% \expandafter\gdef\csname #4\endcsname##1{&
+% \csname @#4\endcsname##1,\@nnil,\@nnil,&
+% }&
+% \toks@{#1{#2{#3}}}&
+% \expandafter\xdef\csname @#4\endcsname##1,##2,{&
+% \noexpand\ifx\noexpand\@nnil##1&
+% \noexpand\expandafter\noexpand\@gobble
+% \noexpand\else
+% \noexpand\expandafter\noexpand\@firstofone
+% \noexpand\fi
+% {&
+% \noexpand\ifx\noexpand\@nnil##2&
+% \noexpand\expandafter\noexpand\@firstoftwo
+% \noexpand\else
+% \noexpand\expandafter\noexpand\@secondoftwo
+% \noexpand\fi
+% {&
+% \noexpand\bgroup
+% \the\toks@
+% \noexpand\lc@remleadspace,##1, ,,&
+% \csname @#4\endcsname##2,&
+% }&
+% {&
+% \noexpand\bgroup
+% \the\toks@
+% \noexpand\lc@remleadspace,##1, ,,&
+% , \csname @#4\endcsname##2,&
+% }&
+% }&
+% }&
+% }&
+%
+% \newcommand*\DefineIndexEntryFormat[3]{&
+% {&
+% \toks@{{\def\@tempa,##1,}}&
+% \edef\@tempa{\the\toks@}&
+% \toks@{{\egroup\link@sanitize##1-\@nil{#2}}}&
+% \edef\@tempb{\the\toks@}&
+% \expandafter\expandafter
+% \expandafter \@DefineIndexEntryFormat
+% \expandafter\@tempa
+% \@tempb{#3}{#1}&
+% }&
+% }&
+%
+% \@ifdefinable\link@sanitize{&
+% \def\link@sanitize#1-#2\@nil#3{\link@@sanitize#1,\@nil{#3}}&
+% }&
+% \@ifdefinable\link@@sanitize{&
+% \def\link@@sanitize#1,#2\@nil#3{\hyperlink{#3.#1}}&
+% }&
+% \global\let\@wrindex\saved@wrindex
+%
+% \DefineIndexEntryFormat{sourceusage}{line}{#1}&
+% \DefineIndexEntryFormat{main}{line}{\underline{#1}}&
+% \DefineIndexEntryFormat{usage}{page}{\textit{#1}}&
+% \DefineIndexEntryFormat{glossaryusage}{page}{#1}&
+%
+% \let\oldtheCodelineNo\theCodelineNo
+% \renewcommand*\theCodelineNo{&
+% \Hy@raisedlink{&
+% \hypertarget{line.\arabic{CodelineNo}}{}&
+% }&
+% \oldtheCodelineNo
+% }&
+%
+% \renewcommand*\changes@[3]{&
+% \protected@edef\@tempa{&
+% \noexpand\glossary{&
+% #1\levelchar
+% \ifx\saved@macroname\@empty
+% \space\actualchar\generalname
+% \else
+% \expandafter\@gobble\saved@macroname
+% \actualchar\string\verb\quotechar*\verbatimchar
+% \saved@macroname\verbatimchar
+% \fi
+% :\levelchar #3&
+% \noexpand\encapchar glossaryusage&
+% }&
+% }&
+% \@tempa\endgroup
+% \@esphack
+% }&
+%
+% \let\oldtheindex\theindex
+% \def\theindex{&
+% \oldtheindex
+% \let\oldbfseries\bfseries
+% \def\bfseries\hfil##1\hfil{&
+% \phantomsection
+% \oldbfseries\hfil##1\hfil
+% \Hy@raisedlink{\pdfbookmark[2]{##1}{index.##1}}&
+% }&
+% }&
+%
+% & suppress page-number of change-history-item:
+% \@ifdefinable\suppresspage{&
+% \DeclareRobustCommand\suppresspage[3]{\efill}%
+% }&
+%
+% & \nameref without hyperlink (to be used within \hyperref etc):
+% \@ifdefinable\nolinknameref{&
+% \DeclareRobustCommand*\nolinknameref[1]{&
+% \@safe@activestrue
+% \expandafter\real@setref
+% \csname r@#1\endcsname\@thirdoffive{#1}&
+% \@safe@activesfalse
+% }&
+% }&
+%
+% & end of hyperref-support-section
+%
+% \makeatother
%
+% \changes{v1.0}{2006/01/04}%
+% {Initial public release.\suppresspage}
+% \changes{v1.01}{2006/01/06}%
+% {Fixed documentation-inaccuracies.\suppresspage}
+% \changes{v1.02}{2006/01/29}%
+% {Fixed documentation-inaccuracies.\suppresspage}
+% \changes{v1.04, v1.05}{2006/03/04 2006/03/09}%
+% {Fixed documentation-inaccuracies.\suppresspage}
+% \changes{v1.08}{2006/07/10}%
+% {DefineLabelcase-option declared within group for
+% \textsf{\mbox{hyperref}}-compatibility.\suppresspage}
+% \changes{v1.09}{2006/07/16}{Hyperlinks in documentation.\suppresspage}
+% \changes{v1.12}{2006/08/14}%
+% {Fixed documentation-inaccuracies.\suppresspage}
+% \DoNotIndex{\@empty,\@firstofone,\@firstoftwo,\@gobble,\@ifdefinable,&
+% \@nil,\@secondoftwo,\@sptoken,\@temptokena,\toks@,&
+% \begingroup,\csname,\DeclareOption,\DeclareRobustCommand,&
+% \def,\edef,\else,\endcsname,\endgroup,\expandafter,\fi,&
+% \futurelet,\global,\ifx,\let,\long,\newcommand,&
+% \ProcessOptions,\relax,\the}&
+%
+% \GetFileInfo{labelcas.sty}
+% \filedatetodate
+% \title{&
+% The \textsf{\mbox{labelcas}} package&
+% \thanks{&
+% \vtop{\noindent This document corresponds to
+% \mbox{\textsf{labelcas}~\fileversion}, dated \filedate.\newline
+% Usage and distribution under \textsf{\mbox{LPPL}}-conditions. See
+% \hyperref[sec6]{\emph{\ref*{sec6}~\nolinknameref{sec6}}} for more
+% details.&
+% }&
+% }&
+% }&
+% \author{Ulrich Diez}&
% \maketitle
%
% \begin{abstract}
-% \noindent This {\LaTeXe}-package provides macros |\eachlabelcase| and
-% |\lotlabelcase| as a means of forking dependent on whether specific
+% \noindent This \LaTeXe-package provides macros |\eachlabelcase| and
+% |\lotlabelcase| as a means of forking depending on whether specific
% labels are defined in the current document.
% \end{abstract}
%
% \tableofcontents
-% \newpage
%
+% \newpage
% \section{Introduction}\label{sec1}
%
-% The package's name |labelcas| is an eight-letter abbreviation for the
-% phrases ``label'' and ``case''.
+% The package's name \textsf{\mbox{labelcas}} is an eight-letter
+% abbreviation for the phrases ``label'' and ``case''.
%
% There are rare occasions where the author of a document would like to
% have detected whether specific labels are defined/in use within the
@@ -162,34 +507,36 @@
% This package provides the macros |\eachlabelcase| and |\lotlabelcase|
% which might facilitate this task.
%
-% A mechanism for branching dependent on the existence of labels might be
-% handy, e.g., when extracting a ``snippet'' from a large document: In
-% case that within the snippet a label/document-part is referenced which
-% is outside the snippet's scope, ugly |`?'| will intersperse the
-% resulting output-file and warnings about undefined references will
-% accumulate within the log-file.
+% A mechanism for branching depending on whether referencing-labels exist,
+% might be handy, e.g., when extracting a ``snippet'' from a large
+% document: In case that within the snippet a label/document-part is
+% referenced which is outside the snippet's scope, ugly `{\makeatletter
+% \nfss@text{\reset@font\bfseries??}}' will intersperse the resulting
+% output-file and warnings about undefined references will accumulate
+% within the log-file.
%
% By testing the label's existence, you can catch up the error and either
% change the way of referencing (e.g., refer to the snippet's bibliography
% instead) or completely suppress referencing for those cases. (By using
-% \emph{David Carlisle's} |xr|- or |xr-hyper|-package, you can make
-% available labels of the large document to the snippet also. A label not
-% defined in the snippet can be picked up from the large document\dots)
+% \textsf{\mbox{David Carlisle's}} \textsf{xr}- or
+% \textsf{\mbox{xr-hyper}}-package, you can make available labels of the
+% large document to the snippet also. A label not defined in the snippet
+% can be picked up from the large document\dots)
%
% \subsection{Space notation}
%
% When listing some piece of \TeX-source-code, you may need to visibly
% distinguish word-separation from single space-characters. The symbol
% \verb*+ + is chosen whenever it is important to give a visible
-% impression of a space-character in a (possibly \textsl{ASCII}-encoded)
-% \TeX-input-file. {\verb*+ +}\nobreak\(_{x}\) does not represent a
-% character of an input-file but a token which occurs after tokenizing the
-% input. The token's category-code is \(x\), the character-number usually
-% is \(32\), which is the \textsl{ASCII}-number of the space-character.
+% impression of a space-character in a (possibly ASCII-encoded) \TeX-&
+% input-file. {\verb*+ +}\nobreak\(_{x}\) does not represent a character
+% of an input-file but a token which occurs after tokenizing the input.
+% The token's category-code is \(x\), the character-number usually is
+% \(32\), which is the ASCII-number of the space-character.
%
% \section{Package-loading}\label{sec2}
%
-% The package is loaded within in the document-preamble by |\usepackage|.
+% The package is to be loaded in the document-preamble by |\usepackage|.
% \medskip
%
% |\usepackage{labelcas}|~~~or
@@ -197,10 +544,10 @@
% |\usepackage[DefineLabelcase]{labelcas}|.
% \medskip
%
-% The only package-option is |DefineLabelcase|. It's usage is described in
-% section~\ref{sec4} ``Package option---Different spaces, different
-% separators''.
+% The only package-option is |DefineLabelcase|. Its usage is described in
+% section~\hyperref[sec4]{\emph{\ref*{sec4}~\nolinknameref{sec4}}}.
%
+% \newpage
% \section{The macros}\label{sec3}
%
% \subsection{Basic usage}\label{sec3-1}
@@ -261,7 +608,7 @@
% \vtop{&
% \noindent
% 1. all labels are defined,\\
-% 2. none of the labels are defined,\\
+% 2. none of the labels is defined,\\
% 3. some labels are defined/some are undefined,\\
% 4. the list does not contain any label.&
% }&
@@ -301,19 +648,19 @@
% \item Testing for labels which are \textbf{not definable} according to
% the syntax-rules will lead to \TeX-internal error-messages and
% deliver unexpected/unwanted results!
-% \item ``Label- and referencing management'' in {\LaTeXe} is done by
+% \item ``Label- and referencing management'' in \LaTeXe\ is done by
% means of the aux-file, the content of which is gathered and
-% corrected during several {\LaTeX}-runs, and which does not yet
+% corrected during several \LaTeX-runs, and which does not yet
% exist in the first run. So, in the first run, all labels from the
% current document are undefined---when applying |\...labelcase| to
% labels of the current document, it will in any case take at least
-% two {\LaTeX}-runs until everything matches out correctly.
+% two \LaTeX-runs until everything matches out correctly.
% \item It was mentioned that, in the macros |\eachlabelcase| and
% |\lotlabelcase|, space-tokens which surround the argument-&
% triplets/label-names, will be gobbled. There are situations where
% the category-code of the input-character \verb*+ + is changed---&
% e.g., due to a preceding |\obeyspaces| or when using some package
-% where the encoding of \TeX-input-files it is played around with.
+% where the encoding of \TeX-input-files is played around with.
% In such cases, the input-character \verb*+ + does not get
% tokenized as space-token any more but as some \verb*+ +\nobreak&
% \(_{\neq10}\)-token, so that in such cases, triplets/labels in
@@ -324,29 +671,30 @@
% set of these macros where the appropriate token, e.g.,
% \verb*+ +\nobreak\(_{13}\)~(active-space) instead of
% \verb*+ +\nobreak\(_{10}\)~(space-token), is taken into account.
-% How this is done, is described in section~\ref{sec4} ``Package
-% option---Different spaces, different separators''.
+% How this is done, is described in
+% section~\hyperref[sec4]{\emph{\ref*{sec4}~\nolinknameref{sec4}}}.
% \item In the very unlikely case{\makeatletter\footnote{The case is very
-% unlikely because it is a convention in {\LaTeXe} to leave
+% unlikely because it is a convention in \LaTeXe\ to leave
% {\verbatim@font\string\@nil} undefined. If labels are defined in
% terms of macros, these macros are to expand to something that can
% be evaluated by a {\verbatim@font\string\csname\dots\string&
% \endcsname}-construct. If they are to expand to something, they
% must be defined\dots}} that you wish |\lotlabelcase| (or variants
-% thereof\thinspace\footnote{\(_{^\rightarrow}\)section~\ref{sec4}~&
-% ``Package option---Different spaces, different separators''.})&
-% \addtocounter{footnote}{-1} to scan for the label |\@nil|, |\@nil|
+% thereof\thinspace\footnote{\(\rightarrow\)&
+% \hyperref[sec4]{\emph{\ref*{sec4}~\nolinknameref{sec4}}}.})&
+% to scan for the label |\@nil|, |\@nil|
% has to be put in braces and/or has to be surrounded by space-&
% tokens. This is because the internal iterator-macros terminate on
% |\@nil|.
% \item Internally token-registers are used and temporary-macros get
% defined. So the macros |\eachlabelcase| and |\lotlabelcase| (and
-% all variants\footnotemark) are not ``full-expandable''. This
-% means, |\edef| or |\write| or control-sequences the like which
-% evaluate their arguments fully, cannot be applied to them.&
-% \footnote{In any case it cannot be ensured that all arguments
-% supplied are ``full-expandable''\dots} Therefore they are declared
-% robust.
+% all variants&
+% \addtocounter{footnote}{-1}\addtocounter{Hfootnote}{-1}&
+% \footnotemark) are not ``full-expandable''. This means, |\edef| or
+% |\write| or control-sequences the like which evaluate their
+% arguments fully, cannot be applied to them.\footnote{In any case it
+% cannot be ensured that all arguments supplied are
+% ``full-expandable''\dots} Therefore they are declared robust.
% \item |\lotlabelcase| and |\eachlabelcase| can be nested. Inner
% instances will be gathered into the action-queues of outer
% instances.
@@ -365,13 +713,17 @@
% |\expandafter\renewcommand\expandafter\macro\expandafter{\macro}|&
% .\\
% But think about it. These macros don't take arguments!
+% \item If you use the arguments of |\lotlabelcase|/|\eachlabelcase| for
+% defining other referencing-labels, things can easily get very
+% confusing\dots
% \end{itemize}
%
+% \newpage
% \subsubsection{Examples}\label{sec3-1-2}
% \smallskip
%
-% Within this document, only the labels |sec1|, |sec2|, |sec3| and |sec4|
-% are defined.\smallskip
+% Within this document, only the labels |sec1|, |sec2|, |sec3|, |sec4|,
+% |sec5| and |sec6| are defined.\bigskip
%
% \noindent
% \begin{minipage}{\linewidth}
@@ -496,8 +848,18 @@
% }&
% \end{minipage}
%
-% \subsection{Advanced usage (brace-matching,{\ttfamily\selectfont\Outif&
-% \dots\thinspace}, defining macros)}
+% \newpage
+% \subsection{&
+% \texorpdfstring
+% {&
+% Advanced usage (brace-matching, {\ttfamily\selectfont\Outif&
+% \dots\thinspace}, defining macros)&
+% }&
+% {&
+% Advanced usage (brace-matching, {\textbackslash if\dots}, defining
+% macros)&
+% }&
+% }
%
% \begin{itemize}
% \item Braces within the arguments/comma-separated items must be
@@ -538,7 +900,7 @@
% {UNDEF} {a is a\else} {a is b\else} ,
% {sec3} {a is not a\fi.}{a is not b\fi.}, }&
% \end{minipage}
-% \bigskip
+% \medskip
%
% When trying such obscure things, you must be aware that brace/&
% group-nesting is independent from conditional-nesting! You might
@@ -590,7 +952,12 @@
% \medskip
% \end{itemize}
%
-% \section{Package option---Different spaces, different se\-pa\-ra\-tors}&
+% \newpage
+% \section{&
+% \texorpdfstring
+% {Package option---Different spaces, different se\-pa\-ra\-tors}&
+% {Package option\textemdash Different spaces, different separators}&
+% }&
% \label{sec4}
%
% Above was said that space-tokens (\verb*+ +\nobreak\(_{10}\)-tokens)
@@ -606,7 +973,7 @@
% macros with \verb*+ +\nobreak\(_{10}\)-token-delimited arguments.
%
% In normal circumstances, \verb*+ +\nobreak-characters in the input-file
-% which trail a control-word do not get tokenized when {\TeX} ``reads'' an
+% which trail a control-word do not get tokenized when \TeX\ ``reads'' an
% input. So it's kind of a problem to get space-tokens right behind the
% name of a control-word, e.g., as first items of the parameter-text when
% defining macros. A space within braces \verb*+{ }+ does get tokenized as
@@ -617,24 +984,24 @@
% word which is about to be defined. (Henceforth the term \emph{definer&
% -macro} is applied in order to call special attention to the fact that
% defining other control-sequences is the only purpose of such a macro.)
-% A \verb*+ + in the definer-macro's argument gets tokenized while this
+% A \verb*+ + as the definer-macro's argument gets tokenized while this
% argument is used as the first item of the desired control-word's
% parameter-text \(\rightarrow\) the first item of the desired control-&
% word's parameter-text will be a space-token.
%
% \DescribeMacro{\DefineLabelcase}
-% In case of the |labelcas|-package, the problem of getting space-tokens
-% as delimiters right behind control-words, is also solved by implementing
-% such a definer-macro. It is called |\DefineLabelcase| and used for
-% defining both the user-level-macros |\eachlabelcase| and |\lotlabelcase|
-% and the internal-macros |\lc@iterate|, |\lc@remtrailspace| and
-% |\lc@remleadspace|. Usually it is discarded/destroyed when defining
-% these macros has taken place. But you can specify the package-option
-% |DefineLabelcase|. When you do so, |\DefineLabelcase| does not get
-% destroyed, and you can use it for creating ``new variants'' of
-% |\eachlabelcase| and |\lotlabelcase| plus internals while specifying
-% proper space-tokens and separators. |\DefineLabelcase| takes four
-% mandatory arguments:
+% In case of the \textsf{\mbox{labelcas}}-package, the problem of getting
+% space-tokens as delimiters right behind control-words, is also solved by
+% implementing such a definer-macro. It is called |\DefineLabelcase| and
+% used for defining both the user-level-macros |\eachlabelcase| and
+% |\lotlabelcase| and the internal-macros |\lc@iterate|,
+% |\lc@remtrailspace| and |\lc@remleadspace|.
+% Usually it is discarded/destroyed when defining these macros has taken
+% place. But you can specify the package-option |DefineLabelcase|. When
+% you do so, |\DefineLabelcase| does not get destroyed, and you can use it
+% for creating ``new variants'' of |\eachlabelcase| and |\lotlabelcase|
+% plus internals while specifying proper space-tokens and separators.
+% |\DefineLabelcase| takes four mandatory arguments:
% \bigskip
%
% \noindent
@@ -644,26 +1011,30 @@
% \begin{description}
% \item[\textnormal{\meta{space}}] specifies the argument-surrounding
% token that is to be removed. Usually surrounding space-tokens
-% shall be discarded. Default:~\verb*+ +\nobreak\(_{10}\)~(space).
+% shall be discarded. Usually:~\verb*+ +\nobreak\(_{10}\)~(space).
% \item[\textnormal{\meta{delimiter}}] specifies the delimiter/separator.
% Usually the argument-triplets or label-lists are comma-separated.
-% Default:~\verb*+,+\nobreak\(_{12}\)~(comma).
+% Usually:~\verb*+,+\nobreak\(_{12}\)~(comma).
% \item[\textnormal{\meta{prefix}}] specifies the macro-name-prefix. You
% cannot assign the same name at the same time to different
% control-sequences. Therefore, when creating new variants of
% |\eachlabelcase| and |\lotlabelcase|, you have to specify a prefix
% which gets inserted at the beginning of the macro-name. E.g.,
% specifying the prefix |FOO| leads to defining the macro-set:\\
-% |\FOOeachlabelcase|, |\FOOlotlabelcase| (user-macros) and\\
-% |\FOOlc@iterate|, |\FOOlc@remtrailspace|, |\FOOlc@remleadspace|
+% |\FOOeachlabelcase|\MacroIndexEntry{\<prefix!>eachlabelcase},
+% |\FOOlotlabelcase|\MacroIndexEntry{\<prefix!>lotlabelcase}
+% (user-macros) and\\
+% |\FOOlc@iterate|\MacroIndexEntry{\<prefix!>lc@iterate},
+% |\FOOlc@remtrailspace|\MacroIndexEntry{\<prefix!>lc@remtrailspace},
+% |\FOOlc@remleadspace|\MacroIndexEntry{\<prefix!>lc@remleadspace}
% (internal).\\
% The original versions are just called |\eachlabelcase|,
% |\lotlabelcase|, |\lc@iterate|\dots (without a prefix in the
-% macro-name). Default:~(empty).
+% macro-name). Usually:~(empty).
% \item[\textnormal{\meta{global-indicator}:}] In case that this argument
% contains only the token |\global|, defining the new macro-set takes
% place in terms of |\global|. Otherwise the scope is restricted to
-% the current grouping-level. Default:~\verb*+\global+.
+% the current grouping-level. Usually:~\verb*+\global+.
% \end{description}
%
% Don't try weird things like specifying the same token both for
@@ -673,7 +1044,7 @@
% tokens which may be used for separating parameters from each other
% within the parameter-text of a definition! Also please specify the
% \meta{prefix} only in terms of letter-character-tokens! \textbf{There is
-% no error-checking implemented on these things!}
+% no extra error-checking implemented on these things!}
% \bigskip
%
% \noindent
@@ -681,28 +1052,46 @@
% \noindent
% |\begingroup|\\
% |\obeyspaces|\\
-% |\endlinechar=-1\relax|\\
-% |\DefineLabelcase{ }{/}{SPACEOBEYED}{local}%|\\
-% |\SPACEOBEYEDlotlabelcase[\test]{sec1/ sec2 / UNDEFINED /sec3}%|\\
-% |{All labels are defined.}%|\\
-% |{None of the labels is defined.}%|\\
-% |{Some labels are defined, some not.}%|\\
-% |{The list is empty.}%|\\
-% |\global\let\test\test|\\
+% |\endlinechar=-1\relax%|\\
+% \verb*|\DefineLabelcase{ }{/}{SPACEOBEYED}{local}%|\\
+% \verb*|\SPACEOBEYEDlotlabelcase[\test]{sec1/ sec2 / UNDEF /sec3}%|\\
+% \verb*|{All labels are defined.}%|\\
+% \verb*|{None of the labels is defined.}%|\\
+% \verb*|{Some labels are defined, some not.}%|\\
+% \verb*|{The list is empty.}%|\\
+% |\global\let\test\test%|\\
% |\endgroup|\medskip\\
% defines: |\test|:
%\begingroup
%\obeyspaces
-%\endlinechar=-1\relax
+%\endlinechar=-1\relax&
%\DefineLabelcase{ }{/}{SPACEOBEYED}{local}&
-%\SPACEOBEYEDlotlabelcase[\test]{sec1/ sec2 / UNDEFINED /sec3}&
+%\SPACEOBEYEDlotlabelcase[\test]{sec1/ sec2 / UNDEF /sec3}&
%{All labels are defined.}&
%{None of the labels is defined.}&
%{Some labels are defined, some not.}&
%{The list is empty.}&
-%\global\let\test\test
+%\global\let\test\test&
%\endgroup
-% {\makeatletter\verbatim@font\meaning\test}&
+% {&
+% \makeatletter
+% \def\spacereplace#1 #2\@nil{&
+% #1&
+% \def\@tempa{#2}&
+% \ifx\@tempa\@empty
+% \expandafter\@gobble
+% \else
+% \expandafter\@firstofone
+% \fi
+% {\char32\spacereplace#2\@nil}&
+% }&
+% \verbatim@font
+% \expandafter\expandafter
+% \expandafter\spacereplace
+% \expandafter\meaning
+% \expandafter\test
+% \space\@nil
+% }&
% \global\let\test\undefined
% \end{minipage}
% \bigskip
@@ -713,7 +1102,7 @@
% |\begingroup|\\
% |\endlinechar=-1\relax|\\
% |\DefineLabelcase{-}{/}{BAR}{local}%|\\
-% |\BARlotlabelcase[\test]{sec1/-sec2-/--%|\\
+% |\BARlotlabelcase[\test]{sec1/-sec2----/--%|\\
% | ---/sec3}%|\\
% |{All labels are defined.}%|\\
% |{None of the labels is defined.}%|\\
@@ -725,7 +1114,7 @@
% \begingroup
% \endlinechar=-1\relax
% \DefineLabelcase{-}{/}{BAR}{local}&
-% \BARlotlabelcase[\test]{sec1/-sec2-/--&
+% \BARlotlabelcase[\test]{sec1/-sec2----/--&
% ---/sec3}&
% {All labels are defined.}&
% {None of the labels is defined.}&
@@ -760,56 +1149,82 @@
% \endgroup
% \end{minipage}
%
-% \section{Thanks, Acknowledgements}
+% \newpage
+% \section{Thanks, Acknowledgements}\label{sec5}
% \begin{itemize}
% \item Many thanks to all who encouraged me in making the attempt of
% getting things in this package less error-prone.
% \item Thanks to everybody who took the macro-writing challenges
-% presented in the \textbf{INFO-\TeX}-`Around the bend'-department
-% which was initiated back in the early 90's by Michael Downes and
-% regularly took place under his guidance. His summaries of the
-% solutions are archived and on-line available at
-% |http://www.tug.org/tex-archive/info/aro-bend/|. The information
-% therein helps a great deal in understanding {\TeX} in general and
-% learning about basic problem solving strategies---e.g., the
-% removal of leading- and trailing spaces from an (almost) arbitrary
-% token-sequence (exercise.015/answer.015).
+% presented in the \textsf{\mbox{INFO-\TeX}-`Around the bend'}-&
+% department which was initiated back in the early 90's by
+% \textsf{\mbox{Michael Downes}} and regularly took place under his
+% guidance. His summaries of the solutions are archived and online
+% available at \href{http://www.tug.org/tex-archive/info/aro-bend/}&
+% {\textsf{http://www.tug.org/tex-archive/info/aro-bend/}}. The
+% information therein helps a great deal in understanding \TeX\ in
+% general and in learning about basic problem-solving-strategies---&
+% e.g., the removal of leading- and trailing spaces from an (almost)
+% arbitrary token-sequence (exercise.015/answer.015).
% \item Thanks to everybody who provides valuable information at the
-% {\TeX} news groups and mailing lists. I received great help
-% especially at |comp.text.tex|, where my---often trivial---&
-% questions were answered patiently again and again.
+% \TeX-news-groups and mailing-lists. I received great help
+% especially at \textsf{\mbox{comp.text.tex}}, where my---often
+% trivial---questions were answered patiently again and again.
% \item Thanks to the \LaTeX-package authors, not only for providing means
% of achieving special typesetting-goals, but also for hereby
-% delivering informative programming-examples. |labelcas| actually
-% was inspired by \emph{David Carlisle's} |xr-| and |xr-hyper|-&
-% packages which make available the labels of other \LaTeX-documents
-% to the current one.
+% delivering informative programming-examples.
+% \textsf{\mbox{labelcas}} actually was inspired by
+% \textsf{\mbox{David Carlisle's}} \textsf{xr}- and
+% \textsf{\mbox{xr-hyper}}-packages which make available the labels
+% of other \LaTeX-documents to the current one.
% \end{itemize}
%
-% \section{Legal Notes}
+% \section{Legal Notes}\label{sec6}
+%
+% \textsf{\mbox{labelcas}}---Copyright (C) 2006 by \mbox{Ulrich Diez}
+% (\href{mailto:ulrich.diez@alumni.uni-tuebingen.de}&
+% {\textsf{ulrich.diez@alumni.uni-tuebingen.de}})
+% \medskip
%
-% |labelcas| is released under the {\LaTeX} Project Public Licence.
+% \textsf{\mbox{labelcas}} may be distributed and/or modified under the
+% conditions of the \textsf{\LaTeX\ Project Public Licence (LPPL)}, either
+% version 1.3 of this license or (at your option) any later version.&
+% \footnote{The latest version of this license is in
+% \href{http://www.latex-project.org/lppl.txt}&
+% {\textsf{http://www.latex-project.org/lppl.txt}}
+% and version 1.3 or later is part of all distributions of \LaTeX\ version
+% 2003/12/01 or later.}
+% The author and Current Maintainer of this Work is \mbox{Ulrich Diez}.
+% This Work has the LPPL maintenance status `author-maintained' and
+% consists of the files \textsf{\mbox{labelcas.dtx}},
+% \textsf{\mbox{labelcas.ins}}, \textsf{\mbox{README}} and the derived
+% files \textsf{\mbox{labelcas.sty}} and \textsf{\mbox{labelcas.pdf}}.
% \medskip
%
-% Usage of the |labelcas|-package is at your own risk. There is no
-% warranty---neither for documentation nor for any other part of the
-% |labelcas|-package. If something breaks, you may keep the pieces.
+% Usage of the \textsf{\mbox{labelcas}}-package is at your own risk. There
+% is no warranty---neither for the documentation nor for any other part of
+% the \textsf{\mbox{labelcas}}-package. If something breaks, you usually
+% may keep the pieces.
%
-% \StopEventually{\PrintChanges\PrintIndex}
+% \StopEventually{&
+% \let\PrintChanges\relax
+% \PrintIndex
+% }
%
+% \newpage
% \section{Implementation}
%
% \subsection{A note about removing leading and trailing spaces}
%
% The matter of removing trailing spaces from an (almost) arbitrary
-% token-sequence is elaborated in detail by Michael Downes, `Around the
-% Bend \#15, answers', a summary of internet-discussion which took place
-% under his guidance primarily at the \textbf{INFO-\TeX} list, but also in
-% usenet (|comp.text.tex|) and via private e-mail; December 1993. Online
-% archived at:\newline
-% |http://www.tug.org/tex-archive/info/aro-bend/answer.015|.
-%
-% One basic approach suggested therein is using {\TeX}'s scanning of
+% token-sequence is elaborated in detail by \textsf{\mbox{Michael Downes},
+% `Around the Bend \#15, answers'}, a summary of internet-discussion which
+% took place under his guidance primarily at the \textsf{\mbox{INFO-\TeX}
+% list}, but also at \textsf{\mbox{comp.text.tex}} (usenet) and via
+% private e-mail; December 1993. Online archived at
+% \href{http://www.tug.org/tex-archive/info/aro-bend/answer.015}&
+% {\textsf{http://www.tug.org/tex-archive/info/aro-bend/answer.015}}.
+%
+% One basic approach suggested therein is using \TeX's scanning of
% delimited parameters in order to detect and discard the ending space of
% an argument:
% \begin{quote}
@@ -821,17 +1236,17 @@
% have the requisite other member of the pair.
%
% Next consider the possibility that the trailing space is absent:
-% {\TeX} will keep on scanning ahead for the pair \meta{space}&
+% \TeX\ will keep on scanning ahead for the pair \meta{space}&
% \meta{bizarre} until either it finds them or it decides to give up and
% signal a `Runaway argument?' error. So you must add a stop pair to
% catch the runaway argument possibility: a second instance of the
-% bizarre token, preceded by a space. If {\TeX} doesn't find a match at
+% bizarre token, preceded by a space. If \TeX\ doesn't find a match at
% the first bizarre token, it will at the second one.
% \end{quote}
%
% (Look up the macros |\KV@@sp@def|, |\KV@@sp@b|, |\KV@@sp@c| and
-% |\KV@@sp@d| in \emph{David Carlisle's} |keyval|-package for an
-% interesting variation on this approach.)
+% |\KV@@sp@d| in \textsf{\mbox{David Carlisle's} \mbox{keyval}-package}
+% for an interesting variation on this approach.)
% \medskip
%
% When scanning for parameters ~~~|##1|\meta{space}\meta{bizarre}|##2|&
@@ -852,17 +1267,17 @@
% |##2| is empty.
% \end{enumerate}
%
-% So forking can be implemented dependent on the emptiness of |##2|.
+% So forking can be implemented depending on the emptiness of |##2|.
%
-% You can easily prevent the brace-removal in the first case, e.g. by
-% adding (and later removing) something in front of the \meta{stuff where
-% to remove trail-space}.
+% You can easily prevent the brace-removal in the first case, e.g., by
+% adding (and later removing) something (e.g., a space-token) in front of
+% the \meta{stuff where to remove trail-space}.
%
% You can choose \meta{B1}=\meta{bizarre}\meta{space}.
% \medskip
%
-% `Around the Bend \#15, answers' also presents a similar way for the
-% removal of leading spaces from an (almost) arbitrary token-sequence:
+% \textsf{`Around the Bend \#15, answers'} also presents a similar way for
+% the removal of leading spaces from an (almost) arbitrary token-sequence:
% \begin{quote}
% The latter method is perhaps most straightforwardly done as a mirror-&
% image of the method for removing a trailing space: make the delimiter
@@ -872,10 +1287,10 @@
% \end{quote}
%
% When scanning for parameters ~~~|##1|\meta{bizarre}\meta{space}|##2|&
-% \meta{bizarre}\meta{B2}~~~ the sequence:
+% \meta{B2}~~~ the sequence:
% \\
% \meta{bizarre}\meta{stuff where to remove lead-space}\meta{bizarre}&
-% \meta{space}\meta{bizarre}\meta{B2}&
+% \meta{space}\meta{B2}&
% \\
% , you can fork two cases:
% \begin{enumerate}\parskip=0ex\relax
@@ -889,10 +1304,10 @@
% |##2| is empty.
% \end{enumerate}
%
-% Thus forking can be implemented dependent on the emptiness of either of
+% Thus forking can be implemented depending on the emptiness of either of
% the two arguments.
%
-% You can choose \meta{B2}=\meta{bizarre}.
+% You can choose \meta{B2}=\meta{bizarre}\meta{bizarre}.
%
% \subsection{Flow of work}
%
@@ -907,10 +1322,12 @@
% \parskip=0ex\relax\itemsep=.25\baselineskip\relax
% \item The list is passed as an argument to the user-macro.
% \item The list is passed from the user-macro to
-% |\|\meta{prefix}|lc@iterate| whereby a leading \meta{space} is
-% added for brace-removal-protection.
-% \item |\|\meta{prefix}|lc@iterate| recursively iterates on the list-&
-% items until the item \meta{space}|\@nil| occurs:&
+% |\|\meta{prefix}|lc@iterate|\MacroIndexEntry{\<prefix!>lc@iterate}
+% whereby a leading \meta{space} is added for brace-removal-&
+% protection.
+% \item |\|\meta{prefix}|lc@iterate|\MacroIndexEntry{\<prefix!>lc@iterate}
+% recursively iterates on the list-items until the item
+% \meta{space}|\@nil| occurs:&
% {\def\labelenumii{\theenumii)}&
% \settowidth\labelwidth{a)}&
% \leftmarginii=\labelwidth\relax
@@ -918,16 +1335,20 @@
% \begin{enumerate}
% \parskip=0ex\relax\itemsep=0ex\relax
% \makeatletter\@topsep=0ex\relax\makeatother
-% \item If the item
-% (with leading \meta{space} stripped-off) is not empty, it will
-% be passed to
-% \item |\|\meta{prefix}|lc@remtrailspace|. Here trailing \meta{space}
-% is removed recursively. Afterwards, it is passed by
-% |\|\meta{prefix}|lc@remtrailspace| to
-% \item |\|\meta{prefix}|lc@remleadspace| where leading \meta{space}
-% (also the previously inserted one) is removed recursively. After
-% that |\|\meta{prefix}|lc@remleadspace| passes the item to the
-% macro
+% \item The item will be passed to |\|\meta{prefix}|lc@remtrailspace|&
+% \MacroIndexEntry{\<prefix!>lc@remtrailspace}. Here trailing
+% \meta{space} is removed recursively. If after removing
+% trailing-space the result is empty, you can conclude that
+% everything (incl the previously inserted ``brace-removal-&
+% protection-\meta{space}'' was removed as either the item was
+% empty or consisted of a sequence of \meta{space}. If the
+% result does not imply an empty item, it will be passed to
+% \item |\|\meta{prefix}|lc@remleadspace|&
+% \MacroIndexEntry{\<prefix!>lc@remleadspace} where leading
+% \meta{space} (also the previously inserted one) is removed
+% recursively. After that |\|\meta{prefix}|lc@remleadspace|&
+% \MacroIndexEntry{\<prefix!>lc@remleadspace} passes the item to
+% the macro
% \item |\@tempa| for further processing. |\@tempa| at this stage will
% be locally defined within the user-macro. |\@tempa| initiates
% the actual work which (hopefully!) results in adding the
@@ -935,18 +1356,21 @@
% |\@temptokena|.
% \item Before processing the next item in the next iteration-round, a
% leading \meta{space} for brace-removal-protection will be added
-% in front of the remaining list by |\|\meta{prefix}|lc@iterate|.
+% in front of the remaining list by |\|\meta{prefix}|lc@iterate|&
+% \MacroIndexEntry{\<prefix!>lc@iterate}.
% \end{enumerate}\unskip}&
% \item After iterating the list within the user-macro, the routine
-% |\lc@macrodefiner| will check for the user-macro's optional
-% argument and, in case that it is present, modify the action-&
-% queue-register, so that, when flushing it, a macro will be
-% produced instead of queue-execution.
-% \item The final step within the user-macro is flushing the action-&
+% |\lc@macrodefiner|\MacroIndexEntry{\lc@macrodefiner} will check
+% for the user-macro's optional argument and, in case that it is
+% present, modify the action-queue-register, so that, when
+% ``flushing'' it, a macro will be produced instead of queue-&
+% execution.
+% \item The final step within the user-macro is ``flushing'' the action-&
% queue-register.
% \end{enumerate}
% \end{sloppypar}
%
+% \newpage
% \subsection{Code}
%
% \begin{macro}{\DefineLabelcase}
@@ -977,36 +1401,39 @@
% be evaluated within that group, right after defining
% |\DefineLabelcase|. By the option |DefineLabelcase|,
% |\DefineLabelcase| can be ``globalized'' before closing the group:
-% \begin{macrocode}
+% \iffalse
%<*labelcas>
+% \fi
+% \begin{macrocode}
+\begingroup
\DeclareOption{DefineLabelcase}%
{\global\let\DefineLabelcase\DefineLabelcase}%
-\begingroup
\newcommand\DefineLabelcase[4]{%
% \end{macrocode}
% \end{macro}
% \def\pref{prefix}
% \begin{macro}{lc@remtrailspace}
% \Patchsavedatmacroname
-% \changes{v1.01}{2006/01/06}{Let \meta{B1}\ChgEq\meta{bizarre}\nobreak
-% \meta{space}}
-% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism from
-% token-register to \string\verb+\string\@firstoftwo+/\empty
-% \string\verb+\string\@secondoftwo+}
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.01}{2006/01/06}{\meta{B1}\ChgEq\meta{bizarre}\nobreak
+% \meta{space}.}
+% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism to \string
+% \verb+\string\@firstoftwo+/\string\verb+\string\@secondoftwo+.}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+ instead
+% of \string\verb*+\string\newcommand+.}
+% \changes{v1.10}{2006/07/21}{Empty-argument-check added.}
% It is assured that \meta{delimiter} does not occur in the top-level of
% the \meta{stuff where to remove trail-space}, for \meta{delimiter} is
% used in the list for separating the single items of \meta{stuff where
% to remove trail-space} from each other. Therefore you can choose
-% \meta{bizarre}=\meta{delimiter} and \meta{B1}=\meta{delimiter}&
-% \meta{space}:
+% \meta{bizarre}=\meta{delimiter} and \meta{B1}=\meta{bizarre}&
+% \meta{space}=\meta{delimiter}\meta{space}:
% \begin{macrocode}
\expandafter\@ifdefinable\csname#3lc@remtrailspace\endcsname{%
\expandafter\long
\expandafter\def
\csname#3lc@remtrailspace\endcsname##1#1#2##2#2#1{%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@remtrailspace}&
% Above was said that forking can take place depending on emptiness of
% the second argument. The arguments come from the items of the comma-&
% separated list---thus they might contain macro-definitions and/or
@@ -1034,39 +1461,61 @@
\fi
% \end{macrocode}
% The appropriate action in case of no more trailing \meta{space} is
-% removing leading \meta{space}. In this case |##1| is terminated by
-% \meta{bizarre}, so add only \meta{space}\meta{bizarre}\meta{B2} at the
-% end instead of \meta{bizarre}\meta{space}\meta{bizarre}\meta{B2}\\
-% (\meta{B2}=\meta{bizarre}=\meta{delimiter} in
-% |\|\meta{prefix}|lc@remleadspace|):
+% checking if the item is not empty and if so, initiating the removal
+% of leading \meta{space}. In this case |##1| is terminated by
+% \meta{bizarre}. If the item is empty, the leading \meta{space}
+% inserted by the iterator for brace-protection is also removed so that
+% |##1| equals \meta{bizarre}. If the item is not empty, start leading-&
+% \meta{space}-removal, but add only \meta{space}\meta{B2} at the end
+% instead of \meta{bizarre}\meta{space}\meta{B2}---above was said that
+% \meta{B2}=\meta{bizarre}\meta{bizarre}=&
+% \meta{delimiter}\meta{delimiter} in |\|\meta{prefix}|lc@remleadspace|:
% \begin{macrocode}
- {\csname#3lc@remleadspace\endcsname#2##1#1#2#2}%
+ {%
+ {\toks@{##1}\edef\@tempa{\the\toks@}%
+ \toks@{#2}\edef\@tempb{\the\toks@}%
+ \expandafter}%
+ \ifx\@tempa\@tempb
+ \expandafter\@gobble
+ \else
+ \expandafter\@firstofone
+ \fi
+ {\csname#3lc@remleadspace\endcsname#2##1#1#2#2}%
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
+% \begin{macrocode}
+ }%
% \end{macrocode}
% The appropriate action in case of trailing \meta{space} is checking
-% and removing more thereof:
+% and possibly removing more thereof:
% \begin{macrocode}
{\csname#3lc@remtrailspace\endcsname##1#2#1#2#2#1}%
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remtrailspace}&
+% \begin{macrocode}
}%
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{lc@remleadspace}
% \Patchsavedatmacroname
-% \changes{v1.01}{2006/01/06}{Let \meta{B2}\ChgEq\meta{bizarre}}
-% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism from
-% token-register to \string\verb+\string\@firstoftwo+/\empty
-% \string\verb+\string\@secondoftwo+}
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.01}{2006/01/06}{\meta{B2}\ChgEq\meta{bizarre}\meta{bizarre}.}
+% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism to
+% \string\verb+\string\@firstoftwo+/\string\verb+\string\@secondoftwo+.}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+
+% instead of \string\verb*+\string\newcommand+.}
% |\|\meta{prefix}|lc@remleadspace| is similar to
% |\|\meta{prefix}|lc@remtrailspace|, but with \meta{B2}=\meta{bizarre}&
-% =\meta{delimiter}:
+% \meta{bizarre}=\meta{delimiter}\meta{delimiter}:
% \begin{macrocode}
\expandafter\@ifdefinable\csname#3lc@remleadspace\endcsname{%
\expandafter\long
\expandafter\def
\csname#3lc@remleadspace\endcsname##1#2#1##2#2#2{%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
% Above was said that forking can take place e.g., depending on
% emptiness of the first argument. Arguments still come from the list-&
% items, so let's use token-registers for the same reasons as in
@@ -1088,10 +1537,11 @@
\fi
% \end{macrocode}
% The appropriate action in case of leading \meta{space} is checking
-% and removing more thereof:
+% and possibly removing more thereof:
% \begin{macrocode}
{\csname#3lc@remleadspace\endcsname#2##2#2#2}%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
% In case of no more leading \meta{space}, the actual work, which is
% defined in user-macro's |\@tempa|, can be done:
% \begin{macrocode}
@@ -1102,10 +1552,15 @@
% \end{macro}
% \begin{macro}{lc@iterate}
% \Patchsavedatmacroname
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+
+% instead of \string\verb*+\string\newcommand+.}
% \changes{v1.07}{2006/04/27}{Define \string\verb*+\string\@tempa+
-% in terms of \string\verb*+\string\long+}
+% in terms of \string\verb*+\string\long+.}
+% \changes{v1.08}{2006/07/10}{Chan\-ged forking-mechanism to
+% \string\verb+\string\@firstoftwo+/\string\verb+\string\@secondoftwo+.}
+% \changes{v1.09}{2006/07/16}{Chan\-ged forking-mechanism so that
+% two temporary macros suffice.}
+% \changes{v1.10}{2006/07/21}{Empty-argument-check removed.}
% |\|\meta{prefix}|lc@iterate| iterates on arguments which are
% delimited by \meta{delimiter}.
% \begin{macrocode}
@@ -1114,81 +1569,52 @@
\expandafter\def
\csname#3lc@iterate\endcsname##1#2{%
% \end{macrocode}
-% Let's put the \meta{space}, which needs to be inserted for brace-&
-% removal-protection, into a token-register---just in case: Maybe some
-% day somebody might specify weird |\fi|- or multiple-token-\meta{space}
-% or the like&
-% \dots\thinspace:
-% \begin{macrocode}
- \toks@{#1}%
-% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
% Make locally available the arguments as macros:\\
-% |\@tempa|\(=\)current argument without leading \meta{space}\\
-% |\@tempb|\(=\)current argument\\
-% |\@tempc|\(=\)recursion-stop-item\\
-% |\@tempd|\(=\)call for trailing-\meta{space}-removal\\
-% (|\|\meta{prefix}|lc@remleadspace| launches |\@tempa|
-% when no more leading \meta{space} is present---therefore before
-% starting the leading-\meta{space}-removal, |\@tempa| is defined to
-% redefine itself to the desired value)\thinspace:
+% |\@tempa|\(=\)current argument\\
+% |\@tempb|\(=\)recursion-stop-item:
% \begin{macrocode}
\begingroup
- \long\def\@tempa#2####1#2{\toks@{####1}\edef\@tempa{\the\toks@}}%
- \csname#3lc@remleadspace\endcsname#2##1#2#1#2#2%
\toks@{##1}%
- \edef\@tempb{\the\toks@}%
+ \edef\@tempa{\the\toks@}%
\toks@{#1\@nil}%
- \edef\@tempc{\the\toks@}%
- \toks@{\csname#3lc@remtrailspace\endcsname##1#2#1#2#2#1}%
- \edef\@tempd{\the\toks@}%
-% \end{macrocode}
-% Test if the current argument equals the recursion-stop-item:
-% \begin{macrocode}
- \ifx\@tempb\@tempc
+ \edef\@tempb{\the\toks@}%
% \end{macrocode}
-% If so terminate the iteration---do nothing but closing the current
-% group:
+% End the group and test if the current argument equals the
+% recursion-stop-item:
% \begin{macrocode}
- \expandafter\endgroup
+ \expandafter\endgroup\ifx\@tempa\@tempb
+ \expandafter\@gobble
\else
+ \expandafter\@firstofone
+ \fi
% \end{macrocode}
-% Otherwise check---before closing the group---if the current argument
-% minus leading \meta{space} is empty:
-% \begin{macrocode}
- \ifx\@tempa\@empty
-% \end{macrocode}
-% If so, do nothing but ending the group:
+% If not: Start trailing-space-removal\dots, then continue iterating the
+% list and hereby add a preceding \meta{space} to the next item for
+% brace-protection during trailing-\meta{space}-removal in the next run:
% \begin{macrocode}
- \expandafter\endgroup
- \else
+ {%
+ \csname#3lc@remtrailspace\endcsname##1#2#1#2#2#1%
% \end{macrocode}
-% Otherwise launch trailing-\meta{space}-removal:
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remtrailspace}&
% \begin{macrocode}
- \expandafter\expandafter
- \expandafter \endgroup
- \expandafter\@tempd
- \fi
+ \csname#3lc@iterate\endcsname#1%
% \end{macrocode}
-% Then continue iterating the list and hereby add a preceding
-% \meta{space} to the next item for brace-protection during trailing-&
-% \meta{space}-removal in the next run:
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
% \begin{macrocode}
- \csname#3lc@iterate\expandafter\expandafter
- \expandafter\endcsname
- \expandafter\the
- \expandafter\toks@
- \fi
+ }%
}%
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{eachlabelcase}
% \Patchsavedatmacroname
-% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism from
-% token-register to \string\verb+\string\@firstoftwo+/\empty
-% \string\verb+\string\@secondoftwo+}
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.03}{2006/02/21}{Chan\-ged forking-mechanism to
+% \string\verb+\string\@firstoftwo+/\string\verb+\string\@secondoftwo+.}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+
+% instead of \string\verb*+\string\newcommand+.}
% |\|\meta{prefix}|eachlabelcase|'s optional argument is the possibly-&
% to-be-defined control-sequence. The mandatory-argument contains the
% argument-triplet-list.
@@ -1197,6 +1623,7 @@
\expandafter\DeclareRobustCommand
\csname#3eachlabelcase\endcsname[2][]{%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{eachlabelcase}&
% Locally define |\@tempa|---it is called by
% |\|\meta{prefix}|lc@remleadspace| for working on a list-item when all
% surrounding \meta{space} has been removed:
@@ -1205,7 +1632,7 @@
% \end{macrocode}
% The stuff that results from \meta{space}-removing is surrounded by
% \meta{delimiter}. It cannot be processed at this place, as first the
-% triplet needs to be split into it's components by |\@tempb|:
+% triplet needs to be split into its components by |\@tempb|:
% \begin{macrocode}
\long\def\@tempa#2####1#2{%
\@tempb####1#2#1#2#2%
@@ -1240,8 +1667,16 @@
}%
\toks@\expandafter{\the\toks@{########1}}%
\csname#3lc@remleadspace\endcsname#2%
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
+% \begin{macrocode}
}%
\toks@{{####1}}\csname#3lc@remleadspace\endcsname#2%
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
+% \begin{macrocode}
}%
% \end{macrocode}
% Let's clear the register where the action-queue is accumulated:
@@ -1252,6 +1687,7 @@
% \begin{macrocode}
\csname#3lc@iterate\endcsname#1##2#2\@nil#2%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
% In case that the optional argument is specified, the routine
% |\lc@macrodefiner| will modify the register to define a macro:
% \begin{macrocode}
@@ -1266,8 +1702,8 @@
% \end{macro}
% \begin{macro}{lotlabelcase}
% \Patchsavedatmacroname
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+
+% instead of \string\verb*+\string\newcommand+.}
% |\|\meta{prefix}|lotlabelcase|'s optional argument is the possibly-&
% to-be-defined control-sequence. The five mandatory-arguments contain
% the label-list and the actions that shall take place in the cases: All
@@ -1278,6 +1714,7 @@
\expandafter\DeclareRobustCommand
\csname#3lotlabelcase\endcsname[6][]{%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lotlabelcase}&
% Locally define |\@tempa|---it is called by
% |\|\meta{prefix}|lc@remleadspace| for working on a list-item when all
% surrounding \meta{space} has been removed:
@@ -1307,6 +1744,7 @@
% \begin{macrocode}
\csname#3lc@iterate\endcsname#1##2#2\@nil#2%
% \end{macrocode}
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
% Assign the register according to the label-defining-cases which are
% now represented by the definitions of |\@tempb| and |\@tempc| which
% are defined either |\relax| or |empty|:
@@ -1344,19 +1782,59 @@
\ifx\@tempa\@tempb
\expandafter\global\expandafter\let
\csname#3lc@remtrailspace\expandafter\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remtrailspace}&
+% \begin{macrocode}
\csname#3lc@remtrailspace\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remtrailspace}&
+% \begin{macrocode}
\expandafter\global\expandafter\let
\csname#3lc@remleadspace\expandafter\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
+% \begin{macrocode}
\csname#3lc@remleadspace\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@remleadspace}&
+% \begin{macrocode}
\expandafter\global\expandafter\let
\csname#3lc@iterate\expandafter\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
+% \begin{macrocode}
\csname#3lc@iterate\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lc@iterate}&
+% \begin{macrocode}
\expandafter\global\expandafter\let
\csname#3eachlabelcase\expandafter\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{eachlabelcase}&
+% \begin{macrocode}
\csname#3eachlabelcase\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{eachlabelcase}&
+% \begin{macrocode}
\expandafter\global\expandafter\let
\csname#3lotlabelase\expandafter\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lotlabelcase}&
+% \begin{macrocode}
\csname#3lotlabelcase\endcsname
+% \end{macrocode}
+% \compensategap
+% \InsertPrefixedUsageToIndex{prefix}{lotlabelcase}&
+% \begin{macrocode}
\fi
% \end{macrocode}
% Now the definition of |\DefineLabelcase| is complete:
@@ -1378,14 +1856,16 @@
% \end{macrocode*}
% \let\pref\empty
% \begin{macro}{\lc@macrodefiner}
-% \changes{v1.06}{2006/04/20}{Use \string\verb*+\string\@ifdefinable+
-% instead of \string\verb*+\string\newcommand+}
+% \changes{v1.06}{2006/04/20}{\string\verb*+\string\@ifdefinable+
+% instead of \string\verb*+\string\newcommand+.}
+% \changes{v1.11}{2006/08/04}{Unnecessary
+% \string\verb*+\string\expandafter+ removed.}
% There is still the routine left which is applied by the user-macros
-% for having the action-queue-register modified, so that when flushing
-% it, a macro will be produced instead of queue-execution.
-% |\lc@macrodefiner| takes as it's argument the optional argument of a
+% for having the action-queue-register modified, so that when
+% ``flushing'' it, a macro will be produced instead of queue-execution.
+% |\lc@macrodefiner| takes as its argument the optional argument of a
% user-macro. In case that the argument is not empty, the action-queue-&
-% register is modified, so that it's flushing yields the attempt of
+% register is modified, so that ``flushing'' it yields the attempt of
% defining a macro from the argument which expands to the former content
% of the register:
% \begin{macrocode}
@@ -1394,35 +1874,35 @@
\ifx\@tempa\@empty
\else
\@temptokena\expandafter{%
- \expandafter\begingroup
- \expandafter\toks@
- \expandafter\expandafter
- \expandafter {%
- \expandafter\expandafter
- \expandafter \@temptokena
- \expandafter\expandafter
- \expandafter {%
- \expandafter\the
- \expandafter\@temptokena
- \expandafter}%
- \expandafter}%
- \expandafter\@temptokena
- \expandafter{%
- \expandafter\@temptokena
- \expandafter{%
- \the\@temptokena}%
- \@ifdefinable#1{\edef#1{\the\@temptokena}}}%
- \expandafter\expandafter
- \expandafter \endgroup
- \expandafter\the
- \expandafter\@temptokena
- \the\toks@
+ \expandafter\begingroup
+ \expandafter\toks@
+ \expandafter\expandafter
+ \expandafter {%
+ \expandafter\expandafter
+ \expandafter \@temptokena
+ \expandafter\expandafter
+ \expandafter {%
+ \expandafter\the
+ \expandafter\@temptokena
+ \expandafter}%
+ \expandafter}%
+ \expandafter\@temptokena
+ \expandafter{%
+ \expandafter\@temptokena
+ \expandafter{%
+ \the\@temptokena}%
+ \@ifdefinable#1{\edef#1{\the\@temptokena}}}%
+ \expandafter\endgroup
+ \the\expandafter\@temptokena
+ \the\toks@
}%
\fi
}%
-%</labelcas>
% \end{macrocode}
% \end{macro}
-%
+% \iffalse
+%</labelcas>
+% \fi
+% \newpage\anglechange\PrintChanges
% \Finale
\endinput
diff --git a/Master/texmf-dist/source/latex/labelcas/labelcas.ins b/Master/texmf-dist/source/latex/labelcas/labelcas.ins
index 380cc1fc6e9..bbc70e03230 100644
--- a/Master/texmf-dist/source/latex/labelcas/labelcas.ins
+++ b/Master/texmf-dist/source/latex/labelcas/labelcas.ins
@@ -1,7 +1,7 @@
%%
%% Copyright (C) 2006 by Ulrich Diez <ulrich.diez@alumni.uni-tuebingen.de>
%%
-%% This work may be distributed and/or modified under the conditions of
+%% This Work may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
%% or (at your option) any later version. The latest version of this
%% license is in:
@@ -11,7 +11,13 @@
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2003/12/01 or later.
%%
-
+%% This Work has the LPPL maintenance status `author-maintained'.
+%%
+%% The author and Current Maintainer of this Work is Ulrich Diez.
+%%
+%% This Work consists of the files labelcas.dtx, labelcas.ins, README and
+%% the derived files labelcas.sty and labelcas.pdf.
+%%
\input docstrip.tex
\keepsilent
diff --git a/Master/texmf-dist/source/latex/makeplot/makeplot.dtx b/Master/texmf-dist/source/latex/makeplot/makeplot.dtx
index e2c6a448ecf..eec8239864e 100644
--- a/Master/texmf-dist/source/latex/makeplot/makeplot.dtx
+++ b/Master/texmf-dist/source/latex/makeplot/makeplot.dtx
@@ -48,7 +48,7 @@
%</driver>
% \fi
%
-% \CheckSum{1200}
+% \CheckSum{1234}
%
%% \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
@@ -75,8 +75,16 @@
% \@plotFileE,\@plotFileF,\@plotFileG,\@whiteBG}
% \DoNotIndex{\begin,\CurrentOption,\data,\dataplot,\def,\define@choicekey, \define@key,\dif,\factorX,\factorXmakeplot,\factorY,\factorYmakeplot, \drawmargins,\drawmarginsmakeplot,\ff,\fi,\fillcolorWhiteBG, \fillstyleWhiteBG,\footnotesize,\FPadd,\FPdiv,\FPmul,\heightPlotFactor, \heightPlotFactormakeplot,\highY,\hspace,\ifMP@color,\ifMP@drawmargins, \ifnum,\l,\leftX,\linecolorWhiteBG,\linestyleWhiteBG,\linewidthWhiteBG, \llegendXY,\lowY,\makeatletter,\makeatother,\makebox,\MP@colorfalse, \MP@colortrue,\MP@drawmarginsfalse,\MP@drawmarginstrue,\n,\NeedsTeXFormat, \newcommand,\newenvironment,\newif\normalsize,\nr,\nrr,\orgX,\orgXmakeplot, \orgY,\orgYmakeplot,\posx,\posy,\ProvidesPackage,\psframe,\pshlabel, \psline,\psset,\pst@addfams,\psvlabel,\readdata,\relax,\RequirePackage, \rightX,\rotateleft,\rput,\s,\sep,\sepTx,\sepTxlegendXY,\sepY,\sepYleendXY, \sepYy,\slegendXY,\tickHerex,\tickHerey,\ticky,\tickymakeplot,\typeout, \unitX,\unitY,\val,\vall,\var,\w,widthPlot,\widthPlotmakeplot,\ww,\www, \x,\xa,\xaa,\xaaa,\xaDL,\xaDR,\xamakeplot,\xaOrigin,\xaXY,\xb,\xbb,\xc, \xDiff,\xinc,\xmid,\xp,\xUL,\xUR,\xx,\xz,\xzDL,\xzDR,\xzmakeplot,\xzz, \y,\ya,\yaa,\yaaa,\yaDL,\yaDR,\yamakeplot,\yaOrigin,\yDiff,\yinc,\ymid, \yUL,\yUR,\yz,\yzDL,\yzDR,\yzmakeplot,\yzXY,\factorBOUNDARYx, \factorBOUNDARYxmakeplot,\factorBOUNDARYy,\factorBOUNDARYymakeplot, \framearcWhiteBG,\newif,\gridDx,\gridDxmakeplot,\gridDy,\gridDymakeplot, \widthPlot,\sepYlegendXY,\sepTy,\ProcessOptions,\definecolor}
%
+% \changes{v1.0.5}{2005/12/20}{added option big}
+% \changes{v1.0.4}{2005/11/23}{corrected small problem that made labels appear twice in the 'ticky' part}
+% \changes{v1.0.3}{2005/10/24}{added optional parameters to readdata, changed fileplot to listplot command (allows more options from pstricks-add) and corrected a bug related to the option tickyplot}
+% \changes{v1.0.2}{2005/10/04}{rounded some calculated parameters to avoid overflow (tickherex and tickherey)}
+% \changes{v1.0.1}{2005/09/24}{data1.mat and data2.mat files are now generated automatically, thanks to Dan}
% \changes{v1.0}{2005/09/22}{Initial version by Jose-Emilio Vila-Forcen}
%
+%
+%
+%
% \GetFileInfo{makeplot.sty}
%
% \title{A plot package for \LaTeXe\thanks{^^A
@@ -95,6 +103,11 @@
% objective is to create a easy and fast framework to create plots with
% the same style, proper fonts, and just enough parameters.
%
+% \section{Known problems}
+% \begin{itemize}
+% \item Sometimes a combination of numbers in the dimensions of the plot might cause an error in latex. That is because the combination of numbers has caused some kind of overflow. The source of the problem might be in the makeplot package or in the pstricks family (supposed to be solved in v2.64 of pstricks-add). Send an email to the package author with all the data and hopefully you will receive an answer with an update of the package: the workaround solution is to use a different number, a close one to the original numbe might work.
+%
+% \end{itemize}
%
%
% \section{Description}
@@ -150,7 +163,7 @@
% The |makeplot| environment is the starting point to create the plot. The
% command line is as follows:
% \begin{quote}
-% |\begin{makeplot}|\oarg{keys}\marg{legend in Y}\marg{legend in X}
+% |\begin{makeplot}|\oarg{keys}\marg{label in Y}\marg{label in X}
% .....
% |\end{makeplot}|
% \end{quote}
@@ -229,6 +242,25 @@
% \marg{width in mm}
% \end{quote}
%
+% There exist some different ways to write the legends into the box. The easiest one is to use the
+% next commands:
+%
+% \DescribeMacro{\legend[ABCDEFG]f}
+% These macros write the legends into the box in the order of the tex source. Each one has a different
+% line style as it was for the plot. The syntax is:
+% \begin{quote}
+% |\legendCf|\oarg{keys}\marg{text}%
+% \end{quote}
+% where the keys might modify the line style.
+%
+%
+% \DescribeMacro{\legendText}
+% The |\legendText| macro includes some text in the legend without a line:
+% \begin{quote}
+% |\legendText|\oarg{keys}\marg{text}%
+% \end{quote}
+% where the keys are not used, but kept in the definition of the macro for paralelism.
+%
% \section{Record proper Matlab data}
% \index{Matlab}
% Matlab is one of the most famous data processing software in the
@@ -439,32 +471,14 @@
%<*makeplot>
% \end{macrocode}
%
-% There exist some different ways to write the legends into the box. The easiest one is to use the
-% next commands:
-%
-% \DescribeMacro{\legend[ABCDEFG]f}
-% These macros write the legends into the box in the order of the tex source. Each one has a different
-% line style as it was for the plot. The syntax is:
-% \begin{quote}
-% |\legendCf|\oarg{keys}\marg{text}%
-% \end{quote}
-% where the keys might modify the line style.
-%
-%
-% \DescribeMacro{\legendText}
-% The |\legendText| macro includes some text in the legend without a line:
-% \begin{quote}
-% |\legendText|\oarg{keys}\marg{text}%
-% \end{quote}
-% where the keys are not used, but kept in the definition of the macro for paralelism.
%
% \subsection{Headers}
%
% First we test that we got the right format and name the package, and load external packages.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{makeplot}[2005/09/22 %
- v1.0 %
+\ProvidesPackage{makeplot}[2005/12/20 %
+ v1.0.5 %
Plots utility from Jose-Emilio Vila-Forcen]%
\RequirePackage[nomessages]{fp}%
\RequirePackage{pst-plot}%
@@ -482,7 +496,7 @@
\DeclareOption{color}{%
\MP@colortrue%
\typeout{ ------}%
- \typeout{ ------ startPlot package working in color}%
+ \typeout{ ------ makePlot package working in color}%
\typeout{ ------}}%
% \end{macrocode}
% \end{macro}
@@ -497,7 +511,20 @@
\DeclareOption{drawmargins}{%
\MP@drawmarginstrue%
\typeout{ ------}%
- \typeout{ ------ startPlot package drawing the margins}%
+ \typeout{ ------ makePlot package drawing the margins}%
+ \typeout{ ------}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{big}
+% The option | big | put the lines of the plot larger
+% \begin{macrocode}
+\newif\ifMP@big%
+\MP@bigfalse%
+\DeclareOption{big}{%
+ \MP@bigtrue
+ \typeout{ ------}%
+ \typeout{ ------ makePlot package in big size}%
\typeout{ ------}}%
% \end{macrocode}
% \end{macro}
@@ -639,12 +666,16 @@
%
% Default values for the above parameters
% \begin{macrocode}
-\psset{linewidth=0.5pt, Dx=1, Dy=1,%
+\psset{Dx=1, Dy=1,%
width=50, heightFactor=1, startX=0, endX=1, startY=0, endY=1,%
showorigin=true, axesstyle=frame, ticks=all, labels=all, %
factorBoundaryX=1, factorBoundaryY=1, captionY=100, captionX=100, %
- xsubticks=0, subticksize=1, tickwidth=0.2pt, subtickwidth=0.2pt, %
- subtickcolor=black}%
+ xsubticks=0, subticksize=1, subtickcolor=black}%
+\ifMP@big%
+ \psset{tickwidth=0.5pt, subtickwidth=0.5pt, linewidth=1pt}%
+\else%
+ \psset{tickwidth=0.2pt, subtickwidth=0.2pt, linewidth=0.5pt}%
+\fi%
\psset{tickyplot=all}%
\psset{changeEndXsize=0, changeEndXpos=no}%
\ifMP@drawmargins%
@@ -786,37 +817,46 @@
\ifnum \ticky=0%
\psaxes[Ox=\xa,Oy=\ya,Dx=\gridDx,Dy=\gridDy, #1,%
ticksize=-4pt 4pt, subticks=0, subticksize=0,%
- tickwidth=0.5pt, linewidth=0pt, labels=none,%
- axesstyle=axes, linecolor=white, #1, ticks=all]%
+ tickwidth=0.5pt, linewidth=0pt,%
+ axesstyle=axes, linecolor=white, #1, ticks=all, labels=none]%
{-}(\xa,\ya)(\xa,\ya)(\xz,\yz)%
\fi%
\ifnum \ticky=1%
\psaxes[Ox=\xa,Oy=\ya,Dx=\gridDx,Dy=\gridDy, #1,%
ticksize=-4pt 4pt, subticks=0, subticksize=0,%
- tickwidth=0.5pt, linewidth=0pt, labels=none,%
- axesstyle=axes, linecolor=white, #1, ticks=x]%
+ tickwidth=0.5pt, linewidth=0pt,%
+ axesstyle=axes, linecolor=white, #1, ticks=x, labels=none]%
{-}(\xa,\ya)(\xa,\ya)(\xz,\yz)%
\fi%
\ifnum \ticky=2%
\psaxes[Ox=\xa,Oy=\ya,Dx=\gridDx,Dy=\gridDy, #1,%
ticksize=-4pt 4pt, subticks=0, subticksize=0,%
- tickwidth=0.5pt, linewidth=0pt, labels=none,%
- axesstyle=axes, linecolor=white, #1, ticks=y]%
+ tickwidth=0.5pt, linewidth=0pt,%
+ axesstyle=axes, linecolor=white, #1, ticks=y, labels=none]%
{-}(\xa,\ya)(\xa,\ya)(\xz,\yz)%
\fi%
\ifnum \ticky=3%
- \psset{ticks=none}%
\fi%
%
% Put the main axes and the grid
- \psaxes[xticksize=0pt \tickHerex mm, yticksize=0pt \tickHerey mm,%
+ \FPround\tickHerex{\tickHerex}{10}%
+ \FPround\tickHerey{\tickHerey}{10}%
+ \psaxes[xticksize=0mm \tickHerex mm, yticksize=0mm \tickHerey mm,%
Ox=\xa,Oy=\ya,Dx=\gridDx,Dy=\gridDy, #1]%
{-}(\xaOrigin,\yaOrigin)(\xa,\ya)(\xz,\yz)%
+ \def\MP@xa{\xaOrigin}%
+ \def\MP@ya{\yaOrigin}%
+ \def\MP@xz{\xz}%
+ \def\MP@yz{\yz}%
%
% Write the legend of the plot
\rput(\xaa,\ymid){\rotateleft{\fonttitleY #2}}%
\rput(\xmid,\yaa){\fonttitleX #3}%
- \psset{linewidth=1pt}%
+ \ifMP@big%
+ \psset{linewidth=2pt}%
+ \else%
+ \psset{linewidth=1pt}%
+ \fi%
}%
% \end{macrocode}
% \end{macro}
@@ -827,7 +867,7 @@
% \begin{macrocode}
\def\plotFile{\@ifnextchar[\@plotFile{\@plotFile[]}}%
\def\@plotFile[#1]#2{%
- \readdata{\data}{#2}\dataplot[#1]{\data}}%
+ \readdata[#1]{\data}{#2}\listplot[#1]{\data}}%
% \end{macrocode}
% \end{macro}
% And now, a specific function for each linestyle predefined:
@@ -1080,14 +1120,14 @@
% \begin{macrocode}
\def\legendUL{\@ifnextchar[\@legendUL{\@legendUL[]}}%
\def\@legendUL[#1]#2#3{%
- \FPmul\xUL\xa{1}%
- \FPmul\yUL\yz{1}%
+ \FPmul\xUL\MP@xa{1}%
+ \FPmul\yUL\MP@yz{1}%
\legendXY[#1](\xUL,\yUL){#2}{#3}}%
%
\def\legendUR{\@ifnextchar[\@legendUR{\@legendUR[]}}%
\def\@legendUR[#1]#2#3{%
- \FPmul\xUR\xz{1}%
- \FPmul\yUR\yz{1}%
+ \FPmul\xUR\MP@xz{1}%
+ \FPmul\yUR\MP@yz{1}%
\def\sep{0.5}%
\FPdiv\xp\sep\unitX% To separate \sep mm the legend from the axe
\FPmul\xp\xp{2}%
@@ -1101,10 +1141,10 @@
\psset{#1}%
\def\sepY{\sepYlegendXY}%
\def\sepTx{\sepTxlegendXY}%
- \FPmul\xzDL\xz{1}%
- \FPmul\xaDL\xa{1}%
- \FPmul\yzDL\yz{1}%
- \FPmul\yaDL\ya{1}%
+ \FPmul\xzDL\MP@xz{1}%
+ \FPmul\xaDL\MP@xa{1}%
+ \FPmul\yzDL\MP@yz{1}%
+ \FPmul\yaDL\MP@ya{1}%
\FPdiv\sep\sepY{8}%
\FPdiv\sep\sepY{8}%
\FPdiv\sepYy\sepY{1.33} %
@@ -1132,10 +1172,10 @@
\psset{#1}%
\def\sepY{\sepYlegendXY}%
\def\sepTx{\sepTxlegendXY}%
- \FPmul\xzDR\xz{1}%
- \FPmul\xaDR\xa{1}%
- \FPmul\yzDR\yz{1}%
- \FPmul\yaDR\ya{1}%
+ \FPmul\xzDR\MP@xz{1}%
+ \FPmul\xaDR\MP@xa{1}%
+ \FPmul\yzDR\MP@yz{1}%
+ \FPmul\yaDR\MP@ya{1}%
\FPdiv\sep\sepY{8}%
\FPdiv\sepYy\sepY{1.33} %
\FPdiv\x\sep\unitX% To separate \sep mm the legend from the axe
diff --git a/Master/texmf-dist/source/latex/makeplot/makeplot.ins b/Master/texmf-dist/source/latex/makeplot/makeplot.ins
index 66573a165c0..c01d21aa0b0 100644
--- a/Master/texmf-dist/source/latex/makeplot/makeplot.ins
+++ b/Master/texmf-dist/source/latex/makeplot/makeplot.ins
@@ -1,60 +1,62 @@
-%%
-%% Copyright (C) 2005 by Jose Emilio Vila Forcen (jemilio@ieee.org)
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either
-%% version 1.3 of this license or (at your option) any later
-%% version. The latest version of this license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.3 or later is part of all distributions of
-%% LaTeX version 2003/12/01 or later.
-%%
-\input docstrip.tex
-\keepsilent
-\usedir{tex/latex/makeplot}
-\preamble
- Copyright 2004--2005 by Jose Emilio Vila Forcen (jemilio@ieee.org)
-
- All rights reserved.
-
- This work may be distributed and/or modified under the conditions of
- the LaTeX Project Public License, either version 1.3 of this license
- or (at your option) any later version. The latest version of the
- license is in
-
- http://www.latex-project.org/lppl.txt
-
- and version 1.3 or later is part of all distributions of LaTeX
- version 2003/12/01 or later.
-
- This work has the LPPL maintenance status "maintained".
- The Current Maintainer of this work is Jose Emilio Vila Forcen (jemilio@ieee.org).
-
-\endpreamble
-\generate{%
- \askforoverwritefalse%
- \file{makeplot.sty}{\from{makeplot.dtx}{makeplot}}}
-\generate{%
- \askforoverwritefalse
- \file{mptest.tex}{\from{makeplot.dtx}{mptest}}}
-%\generate{%
-% \askforoverwritefalse
-% \file{data1.mat}{\from{makeplot.dtx}{data1}}}
-%\generate{%
-% \askforoverwritefalse
-% \file{data2.mat}{\from{makeplot.dtx}{data2}}}
-\obeyspaces
-\Msg{*********************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the}
-\Msg{* following file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* \space\space makeplot.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file makeplot.dtx}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*********************************************************}
+%%
+%% Copyright (C) 2005 by Jose Emilio Vila Forcen (jemilio@ieee.org)
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2003/12/01 or later.
+%%
+\input docstrip.tex
+\keepsilent
+\usedir{tex/latex/makeplot}
+\preamble
+ Copyright 2004--2005 by Jose Emilio Vila Forcen (jemilio@ieee.org)
+
+ All rights reserved.
+
+ This work may be distributed and/or modified under the conditions of
+ the LaTeX Project Public License, either version 1.3 of this license
+ or (at your option) any later version. The latest version of the
+ license is in
+
+ http://www.latex-project.org/lppl.txt
+
+ and version 1.3 or later is part of all distributions of LaTeX
+ version 2003/12/01 or later.
+
+ This work has the LPPL maintenance status "maintained".
+ The Current Maintainer of this work is Jose Emilio Vila Forcen (jemilio@ieee.org).
+
+\endpreamble
+\generate{%
+ \askforoverwritefalse%
+ \file{makeplot.sty}{\from{makeplot.dtx}{makeplot}}}
+\generate{%
+ \askforoverwritefalse
+ \file{mptest.tex}{\from{makeplot.dtx}{mptest}}}
+\generate{%
+ \askforoverwritefalse
+ \usepostamble\empty
+ \file{data1.mat}{\from{makeplot.dtx}{data1}}}
+\generate{%
+ \askforoverwritefalse
+ \usepostamble\empty
+ \file{data2.mat}{\from{makeplot.dtx}{data2}}}
+\obeyspaces
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space makeplot.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file makeplot.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
\endbatchfile \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/ncctools/afterpackage.dtx b/Master/texmf-dist/source/latex/ncctools/afterpackage.dtx
new file mode 100644
index 00000000000..4fbd30ce141
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ncctools/afterpackage.dtx
@@ -0,0 +1,118 @@
+% \iffalse
+%%
+%% File: afterpackage.dtx Copyright (C) 2005, 2006 by Alexander I. Rozhenko
+%%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{afterpackage}
+%<package> [2006/01/17 v1.1 Apply Commands After Package (NCC)]
+%
+% \changes{v1.0}{2005/12/25}{Initial version}
+% \changes{v1.1}{2006/01/17}{The package renamed to `afterpackage'}
+%
+%<*driver>
+\let\makeindex\relax
+\documentclass{ltxdoc}
+\usepackage{afterpackage}
+\GetFileInfo{afterpackage.sty}
+\begin{document}
+\title{The \textsf{afterpackage} package\thanks{This file
+ has version number \fileversion, last
+ revised \filedate.}}
+\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
+\date{\filedate}
+\maketitle
+\DocInput{afterpackage.dtx}
+\end{document}
+%</driver>
+% \fi
+% The package allows specify what additional commands should be applied
+% to a package after its loading. To describe the usability of
+% the package, consider the task of customization of a number of
+% packages. Let we need to apply some package-specific code after loading
+% packages such as customization of their defaults or hooks.
+% To do this, we need to load all required packages and then apply the
+% related staff to them. But, sometimes loading of all required packages is
+% impossible or unnecessary because packages can have options or some of
+% customized packages are rarely useful.
+%
+% The main idea of using this package is to specify how other packages
+% can be customized in such a way that their customization is applied when
+% and if customized packages are loaded. All the customization is applied
+% in the preamble only.
+%
+% \DescribeMacro\AfterPackage
+% To customize a package, load the \textbf{afterpackage} package and
+% insert any number of the following commands anywhere in the preamble:
+% \begin{quote}
+% |\AfterPackage|\marg{package name}\marg{commands}
+% \end{quote}
+% The command works as follows: it tests the required package to be
+% already loaded; if the package is loaded, it directly applies \meta{commands};
+% otherwise, it collects \meta{commands} in a special macro. The specified
+% macro will be applied later when the respective package will be loaded.
+% This operation is executed when the package loading finishes and all
+% end-of-package hooks are applied. So, the \meta{commands} are applied
+% \emph{after the end} of respective package.
+%
+% \StopEventually{}
+%
+% \section{The Implementation}
+%
+% \begin{macro}{\AfterPackage}
+% The command tests the |\ver@|\meta{filename} command to be
+% defined and considers either collect commands in a special macro
+% or apply them directly.
+% \begin{macrocode}
+%<*package>
+\newcommand*\AfterPackage[1]{%
+ \expandafter\ifx\csname ver@#1.\@pkgextension\endcsname\relax
+ \@ifundefined{#1.\@pkgextension-@dd}{%
+ \expandafter\let\csname#1.\@pkgextension-@dd\endcsname\@empty
+ \expandafter\@onlypreamble\csname#1.\@pkgextension-@dd\endcsname
+ }{}%
+ \wlog{After Package Info: Collect commands for #1\on@line}%
+ \def\@tempa{%
+ \expandafter\g@addto@macro\csname#1.\@pkgextension-@dd\endcsname}%
+ \else
+ \ATP@apply@info{#1}%
+ \let\@tempa\@firstofone
+ \fi
+ \@tempa
+}
+\@onlypreamble\AfterPackage
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@popfilename}
+% To apply collected commands to a package, we use the |\@popfilename| hook.
+% This hook is applied after loading a package. It pops a name of previous
+% package or class which was active before loading a package. We save
+% the original value of |\@popfilename| hook in a special macro and
+% redefine it to execute the |\|\meta{filename}|-@dd| hook before pop of
+% the previous filename.
+% \begin{macrocode}
+\let\ATP@popfilename\@popfilename
+\@onlypreamble\ATP@popfilename
+\def\@popfilename{%
+ \@ifundefined{\@currname.\@currext-@dd}{}{%
+ \ATP@apply@info{\@currname}%
+ \csname\@currname.\@currext-@dd\endcsname
+ \expandafter\let\csname\@currname.\@currext-@dd\endcsname\relax
+ }%
+ \ATP@popfilename
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ATP@apply@info}
+% This information message is logged when commands are applied. Its parameter
+% contains a name of package which commands are customized.
+% \begin{macrocode}
+\def\ATP@apply@info#1{%
+ \wlog{After Package Info: Apply commands to #1\on@line}%
+}
+\@onlypreamble\ATP@apply@info
+%</package>
+% \end{macrocode}
+% \end{macro}
+\endinput
diff --git a/Master/texmf-dist/source/latex/ncctools/dcounter.dtx b/Master/texmf-dist/source/latex/ncctools/dcounter.dtx
index bc0997f5d06..785ce5d9113 100644
--- a/Master/texmf-dist/source/latex/ncctools/dcounter.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/dcounter.dtx
@@ -11,6 +11,7 @@
% \changes{v1.2}{2005/04/25}{Emulate dynamic style for non-dynamic counters}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{dcounter}
\GetFileInfo{dcounter.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/desclist.dtx b/Master/texmf-dist/source/latex/ncctools/desclist.dtx
index b9498e8913e..de6a911f2d9 100644
--- a/Master/texmf-dist/source/latex/ncctools/desclist.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/desclist.dtx
@@ -11,6 +11,7 @@
% \changes{v1.1}{2004/11/23}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{desclist}
\GetFileInfo{desclist.sty}
@@ -29,6 +30,8 @@
% the |description| environment to provide an optional parameter
% as a prototype for calculation the hang indent of the list.
%
+% \tableofcontents
+%
% \section{User Interface}
%
% \DescribeMacro{desclist}
diff --git a/Master/texmf-dist/source/latex/ncctools/extdash.dtx b/Master/texmf-dist/source/latex/ncctools/extdash.dtx
index 7723fa0a5f3..52e192a811d 100644
--- a/Master/texmf-dist/source/latex/ncctools/extdash.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/extdash.dtx
@@ -11,6 +11,7 @@
% \changes{v1.2}{2005/01/29}{Change spaces surround em-dash}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{extdash}
\GetFileInfo{extdash.sty}
@@ -30,6 +31,8 @@
% words dashed by \emph{em-dash}. Some additional commands and
% shortcuts are also introduced.
%
+% \tableofcontents
+%
% \section{User Interface}
%
% \DescribeMacro{\Hyphdash}
@@ -202,7 +205,7 @@
% \begin{macro}{\BarOrDash}
% The commands |\HyphOrDash| and |\BarOrDash| will be called by |\-| and
% |\=| commands. They choose the corresponding shortcut or the original
-% commands saved in |\EXD@hyph| and |EXD@dash|.
+% commands saved in |\EXD@hyph| and |\EXD@dash|.
% \begin{macrocode}
\DeclareRobustCommand{\HyphOrDash}{%
\let\EXD@break\@empty
diff --git a/Master/texmf-dist/source/latex/ncctools/manyfoot.dtx b/Master/texmf-dist/source/latex/ncctools/manyfoot.dtx
index 470a7b605b2..42abc84677c 100644
--- a/Master/texmf-dist/source/latex/ncctools/manyfoot.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/manyfoot.dtx
@@ -30,6 +30,7 @@
% \changes{v1.10}{2005/09/11}{Remove overflow in calculation the fudge factor}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage[para]{manyfoot}
\DeclareNewFootnote{A}
@@ -73,6 +74,8 @@
% for the idea of this improvement). It allows a customization of
% footnote rules to be inserted before footnote levels.
%
+% \tableofcontents
+%
% \section{User Interface}
%
% \DescribeMacro\extrafootnoterule
diff --git a/Master/texmf-dist/source/latex/ncctools/mboxfill.dtx b/Master/texmf-dist/source/latex/ncctools/mboxfill.dtx
index 1a4793b38d8..cd831649fe7 100644
--- a/Master/texmf-dist/source/latex/ncctools/mboxfill.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/mboxfill.dtx
@@ -9,6 +9,7 @@
% \changes{v1.0}{2005/05/13}{This version was uploaded to CTAN}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{mboxfill}
\GetFileInfo{mboxfill.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccbbb.dtx b/Master/texmf-dist/source/latex/ncctools/nccbbb.dtx
index 6f470c3cfd0..2337fdc20db 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccbbb.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccbbb.dtx
@@ -11,6 +11,7 @@
% \changes{v1.1}{2004/11/24}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccbbb}
\GetFileInfo{nccbbb.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccboxes.dtx b/Master/texmf-dist/source/latex/ncctools/nccboxes.dtx
index f0a761fd3d6..da1a1b8ff02 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccboxes.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccboxes.dtx
@@ -15,6 +15,7 @@
% \changes{v1.2}{2005/02/07}{Allow lengthes in the Strut parameter}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccboxes}
\GetFileInfo{nccboxes.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/ncccomma.dtx b/Master/texmf-dist/source/latex/ncctools/ncccomma.dtx
index 8126358aadd..8488370b2f5 100644
--- a/Master/texmf-dist/source/latex/ncctools/ncccomma.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/ncccomma.dtx
@@ -9,6 +9,7 @@
% \changes{v1.0}{2005/02/10}{Initial version}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{ncccomma}
\GetFileInfo{ncccomma.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/ncccropbox.dtx b/Master/texmf-dist/source/latex/ncctools/ncccropbox.dtx
index d562379d492..e0c80dbd484 100644
--- a/Master/texmf-dist/source/latex/ncctools/ncccropbox.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/ncccropbox.dtx
@@ -11,6 +11,7 @@
% \changes{v1.1}{2004/11/24}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{ncccropbox}
\GetFileInfo{ncccropbox.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/ncccropmark.dtx b/Master/texmf-dist/source/latex/ncctools/ncccropmark.dtx
index 54e4d082ebc..735bb5d75ac 100644
--- a/Master/texmf-dist/source/latex/ncctools/ncccropmark.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/ncccropmark.dtx
@@ -12,6 +12,7 @@
% \changes{v1.1}{2004/11/29}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{ncccropmark,watermark}
\GetFileInfo{ncccropmark.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccfancyhdr.dtx b/Master/texmf-dist/source/latex/ncctools/nccfancyhdr.dtx
index dab851e4811..877e367184c 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccfancyhdr.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccfancyhdr.dtx
@@ -17,6 +17,7 @@
% \changes{v1.1}{2004/12/07}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccboxes}
\usepackage[headings]{nccfancyhdr}
@@ -67,6 +68,8 @@
% complicated. All these disadvantages of |fancyhdr| set off me to
% prepare a new version of |fancyhdr| packaged named as the |nccfancyhdr|.
%
+% \tableofcontents
+%
% \section{Using the Package}
%
% \thispagestyle{plain}
@@ -89,7 +92,7 @@
% \end{quote}
% loads the |nccfancyhdr| package and redefines the |plain| and |headings|
% styles on the base of |fancy| page style. It also sets the last style
-% in the list (e.g.\ |headings| style) as a default page style.\pagebreak
+% in the list (e.g.\ |headings| style) as a default page style.
%
% \section{Rule Control}
%
@@ -150,7 +153,7 @@
% expanded on the marginal area. To simplify control of the |\headwidth|,
% two service commands are introduced in the package. The |\normalheaders|
% command sets the |\headwidth| to the |\textwidth|. The
-% |\extendedheaders| enlarged the headers and footers on the whole marginal area:
+% |\extendedheaders| enlarges the headers and footers on the whole marginal area:
% in two-column mode, header and footer are expanded to both margins and, in
% one-column mode, header and footer are expanded to the
% outer margin, but, if reverse margin mode is on, they are expanded to
diff --git a/Master/texmf-dist/source/latex/ncctools/nccfloats.dtx b/Master/texmf-dist/source/latex/ncctools/nccfloats.dtx
index b23f6debe6c..bcf55b5e2e4 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccfloats.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccfloats.dtx
@@ -1,17 +1,21 @@
% \iffalse
%%
-%% File: nccfloats.dtx Copyright (C) 2002--2004 by Alexander I. Rozhenko
+%% File: nccfloats.dtx Copyright (C) 2002--2006 by Alexander I. Rozhenko
%%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{nccfloats}
-%<package> [2004/12/05 v1.1 More Float Management (NCC)]
+%<package> [2006/01/07 v1.2 More Float Management (NCC)]
%
% \changes{v1.00}{2002/03/23}{This version is uploaded to CTAN}
% \changes{v1.01}{2002/05/17}{Handling of side floats improved}
% \changes{v1.1}{2004/12/05}{Width parameters can have units now}
% \changes{v1.1}{2004/12/05}{Documentation was prepared}
+% \changes{v1.2}{2006/01/07}{Extend |\FloatStyle| syntax}
+% \changes{v1.2}{2006/01/07}{Cover base floats with |\FloatStyle|}
+% \changes{v1.2}{2006/01/07}{Introduce |\newminifloat| command}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{desclist,nccfloats}
\GetFileInfo{nccfloats.sty}
@@ -30,26 +34,47 @@
% The standard \LaTeX\ floating environments, namely |figure|
% and |table|, allow user to place floating material in a
% document. But they do not introduce a style in which this
-% material must be prepared. In this package, envelop commands are
-% developed which join a style with a float and more
-% features are introduced, namely
-% mini-figures, mini-tables, side-figures, and side-tables.
+% material must be formatted. In this package, styles are
+% joined with floats and mini-floats are introduced. Mini-floats
+% are prepared at a mini-page and allow captions within.
+% Basing on mini-floats, a number of service commands for
+% figures and tables are defined. The ability to create
+% other types of mini-floats is introduced with the
+% |\newminifloat| command.
+%
+% \tableofcontents
%
% \section{Basic Commands}
%
-% \DescribeMacro{\FloatingStyle}
-% The |\FloatingStyle|\marg{style} command sets a style of
-% floats in the document. It affects on the material prepared with
-% commands described below. The default style is
+% \DescribeMacro{\FloatStyle}
+% The |\FloatStyle|\oarg{type}\marg{style} command sets a style for
+% the float of the given \meta{type}. If the \meta{type} is omitted,
+% the default style is specified. It will be applied to a float or
+% mini-float if no specialized style was defined.
+% This command is available in the preamble only.
+%
+% To specify the style of a mini-float and of service commands based on it,
+% add the `|mini|' prefix to the float type. The default styles are
% \begin{quote}
-% |\FloatingStyle{\footnotesize\centering}|
+% |\FloatStyle{}|\\
+% |\FloatStyle[minifigure]{\footnotesize\centering}|\\
+% |\FloatStyle[minitable]{\footnotesize\centering}|
% \end{quote}
-% This command is available in the preamble only.
+% This means that the formatting of floats prepared with standard
+% |figure| and |table| environments does not changed, but service
+% commands based on mini-figures and mini-tables use a special
+% formatting with |\footnotesize| font and the centered alignment.
+%
+% \DescribeMacro\normalfloatstyle
+% This command is applied inside floats or mini-floats to reset
+% formatting style of subsequent floating material to the standard
+% formatting with paragraph alignment and the normal font of
+% normal size.
%
% \DescribeMacro{\minifig}
% \DescribeMacro{\minitabl}
% We start with the basic commands, namely |\minifig| and
-% |\minitabl|. They prepare a material in a minipage and allow
+% |\minitabl|. They prepare a material in a mini-page and allow
% using the |\caption| command in the body. Their syntax is
% similar to the |\parbox| command:
% \begin{quote}
@@ -57,11 +82,11 @@
% |\minitabl|\oarg{pos}\oarg{height}\oarg{inner-pos}\marg{width}\marg{body}
% \end{quote}
% The \meta{pos} is a vertical alignment parameter for
-% minipage (|t|, |b|, or |c|) with respect to
-% surrounding text; the \meta{height} is a minipage height
+% mini-page (|t|, |b|, or |c|) with respect to
+% surrounding text; the \meta{height} is a mini-page height
% required; the \meta{inner-pos} is a vertical alignment
-% of text inside the minipage (|t|, |b|, |c|, or |s|);
-% and the \meta{width} is the minipage width.
+% of text inside the mini-page (|t|, |b|, |c|, or |s|);
+% and the \meta{width} is the mini-page width.
% The \meta{body} is prepared in the style specified by the
% |\FloatingStyle| command and can contain the |\caption| command inside.
%
@@ -87,17 +112,17 @@
% |\sidetabl|\oarg{pos}|(|$w_1$|)(|$w_2$|)|\marg{table}\marg{text}\\
% |\sidetabl*|\oarg{pos}|(|$w_1$|)(|$w_2$|)|\marg{table}\marg{text}
% \end{quote}
-% For simplicity, we further use the term \textit{minifloat\/} for the
+% We use the term \textit{mini-float} for the
% small illustrating material (figure or table), however
% taking into account that it is not a float at all. It is inserted in
% the main flow next to a paragraph box specified in the last
% parameter of above described commands.
%
-% The no-star forms of above described commands place a minifloat
+% The no-star forms of above described commands place a mini-float
% next to the specified text on the outer side of page (to the
% right for odd page and to the left for even page). In two-column
-% or one-side mode, minifloat is always posed to the right. The
-% star-forms provide the reverse placement. By default, minifloat
+% or one-side mode, mini-float is always posed to the right. The
+% star-forms provide the reverse placement. By default, mini-float
% is vertically centered with respect to the text and the
% |\strut| command is inserted at the beginning and at the end
% of the \meta{text} to provide normal baseline
@@ -107,14 +132,14 @@
% All parameters in square and round brackets are optional and mean
% the following:
% \begin{desclist}{}{}[\meta{pos}]
-% \item[\meta{pos}] specifies minifloat alignment (|t|,
+% \item[\meta{pos}] specifies mini-float alignment (|t|,
% |b|, or |c|; default is |c|) with respect to text
% box and can contain additional chars controlling the text body
% preparation: |j| means the last line of the text to be
% justified to the right and |n| means suppressing of struts
% insertion (they should be inserted manually if necessary);
%
-% \item[$w_1$] is the width of minifloat; and
+% \item[$w_1$] is the width of mini-float; and
%
% \item[$w_2$] is the width of the text box.
% \end{desclist}
@@ -123,16 +148,16 @@
% the width value is considered as a multiple of |\unitlength|
% (similarly to the use of length dimensions in the picture environment).
%
-% If both width parameters are absent, the widths are calculated as\linebreak
-% |(\linewidth-1.5em)/2|. If $w_2$ is absent, the text body
-% width is calculated as |\linewidth-|$w_1$|-1.5em|.
+% If both width parameters are absent, the width of both mini-float and
+% text body is calculated as |(\linewidth-1.5em)/2|. If $w_2$ is absent,
+% the text body width is calculated as |\linewidth-|$w_1$|-1.5em|.
%
% The placement of side-floats in the document consists in the following
% steps:
% \begin{enumerate}
% \item Decide where you want to insert a side-float;
% \item Insert a |\sidefig| or |\sidetabl| command after a word that finishes
-% the line before the future side-float position;
+% the line before the supposed side-float position;
% \item Specify a width of float in its parameter and set the top alignment
% as the \meta{pos} parameter (e.g.\ |\sidefig[t](|$w_1$|)|);
% \item Prepare the side-float in the first mandatory parameter of the command
@@ -142,24 +167,24 @@
% \item Find what part of the text is redundant in the \meta{text} parameter;
% \item Move it after the close brace;
% \item If the same paragraph continues after the close brace, add the |j|
-% letter to the \meta{pos} parameter. Also change the top alignment
-% to the centered alignment;
+% letter to the \meta{pos} parameter. Also change the |t| alignment
+% to |c| alignment in the \meta{pos} parameter;
% \item Translate the document once more;
% \item If the side-float has a wrong placement (this can appear when paragraph
% with a side-float begins at the end of page), insert the star after
-% the side-float command.
+% the side-float command and translate the document once more.
% \end{enumerate}
%
% \DescribeMacro{\ifleftsidefloat}
% While preparing a side-float, it is sometimes necessary to
-% provide conditional placement depending on the side a minifloat
+% provide conditional placement depending on the side a mini-float
% is posed. The command
% \begin{quote}
% |\ifleftsidefloat|\marg{left-clause}\marg{right-clause}
% \end{quote}
% provides this. It is useful in parameters of |\sidefig| or
% |\sidetabl| and processes \meta{left-clause} if the
-% minifloat is posed to the left and \meta{right-clause}
+% mini-float is posed to the left and \meta{right-clause}
% otherwise.
%
% Side-floats can be also used within floating environments to pos
@@ -188,7 +213,7 @@
%
% The |\fig| and |\tabl| commands envelop the |figure|
% and |table| environments respectively. Their star-forms
-% envelop corresponding starred |figure*| or |table*| environments.
+% envelop |figure*| or |table*| environments respectively.
%
% \section{Two Floating Figures or Tables Side by Side}
%
@@ -217,8 +242,30 @@
%
% In the |\tabls| command, boxes of the left and right bodies are
% top-aligned, but, in the |\figs| command, the bottom alignment is
-% used. The star-forms of this commands are based on the corresponding
-% starred |figure*| or |table*| environments.
+% used. The star-forms of this commands are based on the |figure*|
+% or |table*| environments respectively.
+%
+% \section{Declare a Mini-float and Service Commands}
+%
+% \DescribeMacro\newminifloat
+% If a new type of float is introduced, the respective mini-float
+% and service commands can be helpful for it. To prepare them, use
+% the following declaration:
+% \begin{quote}
+% |\newminifloat|\marg{gen}\marg{type}\marg{placement}\marg{pos}
+% \end{quote}
+% Here \meta{gen} is a root for command names to be generated, \meta{type}
+% is a float type, \meta{placement} is a default placement on the page,
+% and \meta{pos} is a vertical alignment for pair of floats.
+%
+% This command declares 4 commands: |\mini|\meta{gen}, |\side|\meta{gen},
+% |\|\meta{gen}, and |\|\meta{gen}|s|. For example, the commands
+% described in previous sections are declared as follows:
+% \begin{quote}
+% |\newminifloat{fig}{figure}{ht}{b}|\\
+% |\newminifloat{tabl}{table}{ht}{t}|
+% \end{quote}
+%
% \StopEventually{}
%
% \section{The Implementation}
@@ -230,31 +277,74 @@
\RequirePackage{nccboxes}[2002/03/20]
% \end{macrocode}
%
+% \subsection{Float Style}
+%
% \begin{macro}{\FloatStyle}
-% \begin{macro}{\minifig}
-% \begin{macro}{\minitabl}
-% At the first, we define the basic commands.
+% |\FloatStyle|\oarg{type}\marg{style} specifies a style for
+% a given float type.
% \begin{macrocode}
-\newcommand*{\FloatStyle}[1]{\def\NCC@fltstyle{#1}}
+\newcommand*{\FloatStyle}[2][]{%
+ \expandafter\def\csname NCC@fltstyle@#1\endcsname{#2}}
\@onlypreamble\FloatStyle
-\newcommand{\minifig}{\begingroup\def\@captype{figure}\NCC@minifloat}
-\newcommand{\minitabl}{\begingroup\def\@captype{table}\NCC@minifloat}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@setfltstyle}
+% |\NCC@setfltstyle|\marg{prefix} applies a style for a
+% float of |\@captype| type. While selection a style to be
+% applied it adds the given \meta{prefix} to the float type.
+% \begin{macrocode}
+\def\NCC@setfltstyle#1{%
+ \edef\@tempa{NCC@fltstyle@#1\@captype}%
+ \@ifundefined{\@tempa}{\NCC@fltstyle@}{\csname\@tempa\endcsname}%
+}
+% \end{macrocode}
+% We add this style with empty prefix to the |\@floatboxreset|
+% hook which is applied at the end of preamble of a float.
+% \begin{macrocode}
+\g@addto@macro\@floatboxreset{\NCC@setfltstyle{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\normalfloatstyle}
+% Reset a float style to par-box formatting with normal font of the
+% normal size.
+% \begin{macrocode}
+\newcommand\normalfloatstyle{%
+ \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
+ \parfillskip\@flushglue \let\\\@normalcr
+ \reset@font \normalsize
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{The Kernel}
+%
+% \begin{macro}{\NCC@minifloat}
+% The base for mini-floats
+% \begin{quote}
+% |\NCC@minifloat|\oarg{pos}\oarg{height}\oarg{inner-pos}\marg{width}\marg{body}
+% \end{quote}
+% It finishes a mini-float with extra |\endgroup| command.
+% A |\@captype| should be specified before it.
+% \begin{macrocode}
\newcommand*\NCC@minifloat[1][c]{%
\@ifnextchar[{\NCC@mflt{#1}}{\NCC@@mflt{#1}\relax[s]}}
\def\NCC@mflt#1[#2]{%
\@ifnextchar[{\NCC@@mflt{#1}{#2}}{\NCC@mflt{#1}{#2}[#1]}}
\long\def\NCC@@mflt#1#2[#3]#4#5{%
- \@iiiminipage{#1}{#2}[#3]{#4}\normalfont
- \NCC@fltstyle #5\endminipage\endgroup
+ \@iiiminipage{#1}{#2}[#3]{#4}\normalfloatstyle
+ \NCC@setfltstyle{mini}#5\endminipage\endgroup
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\NCC@pair}
-% The |\NCC@pair|\marg{c1}\marg{c2}\marg{def-dist}\marg{def-place}|*|\oarg{place}|(|$w_1$|)(|$w_2$|)|
-% command executes \meta{c1}\marg{place}|{|$w_1$|}{|$w_2$|}| if star is absent or
+% The command
+% \begin{quote}
+% |\NCC@pair|\marg{c1}\marg{c2}\marg{def-dist}\marg{def-place}|*|\oarg{place}|(|$w_1$|)(|$w_2$|)|
+% \end{quote}
+% executes \meta{c1}\marg{place}|{|$w_1$|}{|$w_2$|}| if star is absent or
% \meta{c2}\marg{place}|{|$w_1$|}{|$w_2$|}| if star presents.
% Four first parameters are mandatory. Others a optional.
% The \meta{def-dist} parameter contains a default distance
@@ -275,15 +365,12 @@
%
% \begin{macro}{\NCC@setwidth}
% The |\NCC@setwidth|\marg{register}\marg{width} command sets
-% the given \meta{width} to the dimen \meta{register}. If units
+% the given \meta{width} for the \meta{register}. If units
% in \meta{width} are omitted, the |\unitlength| unit is used.
% In other words, if \meta{width} is a real number, it is considered
% as a multiple of |\unitlength|.
% \begin{macrocode}
-\def\NCC@setwidth#1#2{%
- \afterassignment\NCC@setwidth@#1#2\unitlength\relax
-}
-\def\NCC@setwidth@#1\relax{}
+\def\NCC@setwidth#1#2{\@defaultunits#1#2\unitlength\relax\@nnil}
% \end{macrocode}
% \end{macro}
%
@@ -315,8 +402,10 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Side Floats}
+%
% \begin{macro}{\ifleftsidefloat}
-% This command is used in parameters of |\sidefig| or |\sidetabl|.
+% This command is used in parameters of side-floats.
% \begin{macrocode}
\newif\ifNCC@smfltleft
\newcommand{\ifleftsidefloat}{%
@@ -329,15 +418,22 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\sidefig}
-% \begin{macro}{\sidetabl}
+% \begin{macro}{\NCC@sidemfloat}
+% The command
+% \begin{quote}
+% |\NCC@sidemfloat|\marg{command}|*|\oarg{pos}|(|$w_1$|)(|$w_2$|)|\marg{mini-float}\marg{text}
+% \end{quote}
+% is used for preparing a side-float. The \meta{command} parameter
+% contains a |\mini|\meta{gen} command. The \meta{pos} parameter
+% specifies vertical alignment and additional flags. The
+% $w_1$ and $w_2$ parameters (if present) specify widthes of
+% \meta{mini-float} and \meta{text} boxes. Starred version
+% reverses the position of side-float and text boxes.
% The implementation of these commands is based
% on the |\NCC@pair| command that parses all optional
% parameters. Finally the |\NCC@smflt| command is
% executed.
% \begin{macrocode}
-\newcommand{\sidefig}{\NCC@sidemfloat{\minifig}}
-\newcommand{\sidetabl}{\NCC@sidemfloat{\minitabl}}
\def\NCC@sidemfloat#1{%
\NCC@smfltleftfalse
\if@twocolumn \else
@@ -352,16 +448,14 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\NCC@smflt}
-% The |\NCC@smflt|\marg{command}\marg{pos}|{|$w_1$|}{|$w_2$|}|\marg{minifloat}\marg{text}
-% prepares a side-float. The \meta{command} parameter contains
-% a |\minifig| or |\minitabl| command. The \meta{pos} parameter
-% specifies vertical alignment and additional flags. The
-% $w_1$ and $w_2$ parameters (if present) specify widthes of
-% \meta{minifloat} and \meta{text} boxes. The |\@tempdimc| register
-% contains the default distance between the minifloat and text.
+% The command
+% \begin{quote}
+% |\NCC@smflt|\marg{command}\marg{pos}|{|$w_1$|}{|$w_2$|}|\marg{mini-float}\marg{text}
+% \end{quote}
+% prepares a side-float. The |\@tempdimc| register
+% contains the default distance between the mini-float and text.
% \begin{macrocode}
\long\def\NCC@smflt#1#2#3#4#5#6{%
% \end{macrocode}
@@ -437,15 +531,19 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\fig}
-% \begin{macro}{\tabl}
-% The implementation of these commands is quite simple:
+% \subsection{Service Commands}
+%
+% \begin{macro}{\NCC@float}
+% The command
+% \begin{quote}
+% |\NCC@float|\marg{type}\marg{def-place}|*|\oarg{placement}|(|$w$|)|\marg{body}
+% \end{quote}
+% is the envelope for a mini-float inside a float. The \meta{def-place}
+% is the default placement specifier.
% \begin{macrocode}
-\newcommand{\fig}{\NCC@float{figure}}
-\newcommand{\tabl}{\NCC@float{table}}
-\def\NCC@float#1{\@ifstar{\NCC@flt{#1*}}{\NCC@flt{#1}}}
-\def\NCC@flt#1{\@ifnextchar[{\NCC@flt@{#1}}{\NCC@flt@{#1}[ht]}}
-\def\NCC@flt@#1[#2]{\begin{#1}[#2]\centering
+\def\NCC@float#1#2{\@ifstar{\NCC@flt{#1*}{#2}}{\NCC@flt{#1}{#2}}}
+\def\NCC@flt#1#2{\@ifnextchar[{\NCC@flt@{#1}}{\NCC@flt@{#1}[#2]}}
+\def\NCC@flt@#1[#2]{\begin{#1}[#2]\normalfloatstyle\centering
\@ifnextchar({\NCC@@flt{#1}}{\NCC@@flt{#1}()}}
\long\def\NCC@@flt#1(#2)#3{%
\if!#2!\@tempdima\linewidth \else \NCC@setwidth\@tempdima{#2}\fi
@@ -454,33 +552,37 @@
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
-% \begin{macro}{\figs}
-% \begin{macro}{\tabls}
-% The implementation of these commands is based
+% \begin{macro}{\NCC@floats}
+% The command
+% \begin{quote}
+% |\NCC@floats|\marg{type}\marg{pos}\marg{def-place}|*|\oarg{placement}|(|$w_1$|)(|$w_2$|)|\\
+% | |\marg{body1}\marg{body2}
+% \end{quote}
+% is the envelope for a pair of mini-floats inside a float. The implementation
+% of these commands is based
% on the |\NCC@pair| command that parses all optional
% parameters. Finally the |\NCC@flts| command is
% executed.
% \begin{macrocode}
-\newcommand{\figs}{\NCC@floats{figure}b}
-\newcommand{\tabls}{\NCC@floats{table}t}
-\def\NCC@floats#1#2{%
- \NCC@pair{\NCC@@flts{#1}{#2}}{\NCC@@flts{#1*}{#2}}{1em}{ht}}
+\def\NCC@floats#1#2#3{%
+ \NCC@pair{\NCC@@flts{#1}{#2}}{\NCC@@flts{#1*}{#2}}{1em}{#3}}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\NCC@flts}
-% The |\NCC@flts|\marg{env}\marg{pos}\marg{placement}|{|$w_1$|}{|$w_2$|}|\marg{body1}\marg{body2}
-% command prepares a pair of floats within \meta{env} environment.
-% The \meta{pos} contains relative alignment of floats.
+% The command
+% \begin{quote}
+% |\NCC@flts|\marg{type}\marg{pos}\marg{placement}|{|$w_1$|}{|$w_2$|}|\marg{body1}\marg{body2}
+% \end{quote}
+% prepares a pair of floats within \meta{type} environment.
+% The \meta{pos} contains relative vertical alignment of floats.
% The $w_1$ and $w_2$ parameters (if present) specify widthes of
% floats. The |\@tempdimc| register contains the default distance
% between floats.
% \begin{macrocode}
\long\def\NCC@@flts#1#2#3#4#5#6#7{%
- \begin{#1}[#3]\NCC@wcalc{#4}{#5}%
+ \begin{#1}[#3]\normalfloatstyle\NCC@wcalc{#4}{#5}%
\begingroup\NCC@minifloat[#2]\@tempdima{#6}%
\nobreak\hskip\@tempdimc
\begingroup\NCC@minifloat[#2]\@tempdimb{#7}%
@@ -489,9 +591,57 @@
% \end{macrocode}
% \end{macro}
%
-% Defaults:
+% \subsection{Declare a New Mini-float and Service Commands}
+%
+% \begin{macro}{\newminifloat}
+% The command
+% \begin{quote}
+% |\newminifloat|\marg{gen}\marg{type}\marg{def-place}\marg{pos}
+% \end{quote}
+% declares a new mini-float and 3 service commands.
+% \begin{macrocode}
+\newcommand*\newminifloat[4]{%
+ \edef\@tempa{%
+% \end{macrocode}
+% Prepare |\mini|\meta{gen} definition:
+% \begin{macrocode}
+ \noexpand\newcommand\expandafter\noexpand\csname mini#1\endcsname{%
+ \noexpand\begingroup\noexpand\def\noexpand\@captype{#2}%
+ \noexpand\NCC@minifloat}%
+% \end{macrocode}
+% Prepare |\side|\meta{gen} definition:
+% \begin{macrocode}
+ \noexpand\newcommand\expandafter\noexpand\csname side#1\endcsname{%
+ \noexpand\NCC@sidemfloat{%
+ \expandafter\noexpand\csname mini#1\endcsname}}%
+% \end{macrocode}
+% Prepare |\|\meta{gen} definition:
+% \begin{macrocode}
+ \noexpand\newcommand\expandafter\noexpand\csname #1\endcsname{%
+ \noexpand\NCC@float{#2}{#3}}%
+% \end{macrocode}
+% Prepare |\|\meta{gen}|s| definition:
+% \begin{macrocode}
+ \noexpand\newcommand\expandafter\noexpand\csname #1s\endcsname{%
+ \noexpand\NCC@floats{#2}{#4}{#3}}%
+ }%
+% \end{macrocode}
+% Define all commands:
+% \begin{macrocode}
+ \@tempa
+}
+\@onlypreamble\newminifloat
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Base Mini-floats and Defaults}
+%
% \begin{macrocode}
-\FloatStyle{\footnotesize\centering}
+\newminifloat{fig}{figure}{ht}{b}
+\newminifloat{tabl}{table}{ht}{t}
+\FloatStyle{}
+\FloatStyle[minifigure]{\footnotesize\centering}
+\FloatStyle[minitable]{\footnotesize\centering}
%</package>
% \end{macrocode}
\endinput
diff --git a/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx b/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
index 29e2d82d251..c428928314b 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccfoots.dtx
@@ -11,6 +11,7 @@
% \changes{v1.2}{2005/02/03}{\NCC@makemark rename to \NCC@makefnmark}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccfoots}
\GetFileInfo{nccfoots.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccmath.dtx b/Master/texmf-dist/source/latex/ncctools/nccmath.dtx
index 78512699c7d..5007e8e92b4 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccmath.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccmath.dtx
@@ -18,6 +18,7 @@
% \changes{v1.2}{2005/02/21}{Avoid conflicts with the |array| package}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccmath,desclist}
\GetFileInfo{nccmath.sty}
@@ -41,6 +42,8 @@
% |equation| environment. All options are passed
% to the |amsmath| package.
%
+% \tableofcontents
+%
% \section{Improvement to the amsmath}
%
% \DescribeMacro{eqnarray}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccparskip.dtx b/Master/texmf-dist/source/latex/ncctools/nccparskip.dtx
index 24ac87568d3..dc340ce731e 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccparskip.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccparskip.dtx
@@ -11,6 +11,7 @@
% \changes{v1.1}{2004/12/08}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccparskip}
\SetParskip{6pt plus 1pt minus .4pt}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccpic.dtx b/Master/texmf-dist/source/latex/ncctools/nccpic.dtx
index 37cd498e7ed..0fd12072fcc 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccpic.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccpic.dtx
@@ -14,6 +14,7 @@
% \changes{v1.2}{2005/03/06}{Correct extension lists}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccpic,desclist}
\GetFileInfo{nccpic.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccrules.dtx b/Master/texmf-dist/source/latex/ncctools/nccrules.dtx
index 3e613426a5d..0542215c436 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccrules.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccrules.dtx
@@ -9,6 +9,7 @@
% \changes{v1.0}{2005/05/13}{This version was uploaded to CTAN}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccrules}
\newfootnoterule{starred}{\mboxfill[1.5\width][s]{$*$}}
@@ -37,6 +38,8 @@
% rule with an arbitrary contents and |\newfootnotedashrule| creates
% a footnote rule based on dash rule.
%
+% \tableofcontents
+%
% \section{User Interface}
%
% \subsection{Dash Rules}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccsect.dtx b/Master/texmf-dist/source/latex/ncctools/nccsect.dtx
index 980915c91a0..0729288c8ea 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccsect.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccsect.dtx
@@ -1,10 +1,10 @@
% \iffalse
%%
-%% File: nccsect.dtx Copyright (C) 2002--2005 by Alexander I. Rozhenko
+%% File: nccsect.dtx Copyright (C) 2002--2006 by Alexander I. Rozhenko
%%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{nccsect}
-%<package> [2005/06/15 v1.3 Extended Section, Caption, and TOC Handling (NCC)]
+%<package> [2006/01/19 v1.5 Extended Section, Caption, and TOC Handling (NCC)]
%
% \changes{v1.00}{2002/02/01}{This version is uploaded to CTAN}
% \changes{v1.01}{2002/02/08}{\NCC@thetocchapter hook added}
@@ -21,7 +21,7 @@
% \changes{v1.2}{2005/04/15}{Compatibility with the supertabular package added}
% \changes{v1.2}{2005/04/15}{Compatibility with the longtable package added}
% \changes{v1.2}{2005/05/20}{Introduce |\beforechapter| hook}
-% \changes{v1.2}{2005/05/20}{Add |\StartHromTextArea| and |\StartFromHeaderArea|}
+% \changes{v1.2}{2005/05/20}{Add |\StartFromTextArea| and |\StartFromHeaderArea|}
% \changes{v1.2}{2005/05/21}{Add |\epigraph| and |\epigraphparameters|}
% \changes{v1.2}{2005/05/22}{Add |\captionstyle| and related staff}
% \changes{v1.2}{2005/05/22}{Add |\TOCMarginDrift|}
@@ -29,15 +29,46 @@
% \changes{v1.2}{2005/06/08}{Set |\@twocolumnfalse| in before-chapter hook}
% \changes{v1.2}{2005/06/08}{Allow sectioning in |\beforechapter| hook}
% \changes{v1.3}{2005/06/15}{Fixed bug with using |\applystyle| command}
+% \changes{v1.4}{2005/12/26}{Conditionally define |\StartFromTextArea| and |\StartFromHeaderArea|}
+% \changes{v1.4}{2005/12/28}{|\sectionstyle| now has a |type| parameter}
+% \changes{v1.4}{2005/12/28}{New section styles: hangparindent, hangparindent*}
+% \changes{v1.4}{2005/12/28}{|\NCC@makechapfinal| hook introduced}
+% \changes{v1.4}{2005/12/28}{|\NCC@makeparttitle|, |\NCC@makechaptitle| hooks}
+% \changes{v1.4}{2005/12/28}{The scope of declarations in |\@svsec| is localized}
+% \changes{v1.4}{2005/12/28}{|\aftersectionvspace| introduced}
+% \changes{v1.4}{2005/12/29}{Add |\DeclarePart| and |\DeclareTOCPart| commands}
+% \changes{v1.4}{2005/12/30}{Make the package completely independent on standard commands}
+% \changes{v1.4}{2005/12/31}{Add more hooks and fix |\MakeUppercase| related bugs}
+% \changes{v1.4}{2006/01/01}{Introduce |\RunningSectionSuffux| command}
+% \changes{v1.4}{2006/01/01}{Introduce |\NCC@preparesectag| hook}
+% \changes{v1.4}{2006/01/01}{Remove |\NCC@defaultsectag| hook}
+% \changes{v1.4}{2006/01/01}{|\NCC@nexttocnum|, |\NCC@preparetocnum| hooks}
+% \changes{v1.4}{2006/01/03}{The |\norunningsuffix| modifier introduced}
+% \changes{v1.5}{2006/01/06}{Introduce |\SetTOCStyle| and |\ChapterPrefixStyle|}
+% \changes{v1.5}{2006/01/17}{Replace addtopackage to afterpackage}
+% \changes{v1.5}{2006/01/17}{Remove \protect before \numberline, because it is robust now}
+% \changes{v1.5}{2006/01/19}{Allow caption width be greater than a line width}
+% \changes{v1.5}{2006/01/19}{Compatibility with the xtab package added}
+% \changes{v1.5}{2006/01/19}{Add |\newplainsectionstyle|, |\newhangsectionstyle|}
+% \changes{v1.5}{2006/01/19}{Add |\adjustsectionmargins|}
+% \changes{v1.5}{2006/01/19}{Introduce |centerlast| section style}
+% \changes{v1.5}{2006/01/19}{Introduce |\sectiontagsuffix| command}
+% \changes{v1.5}{2006/01/19}{Introduce |\captiontagsuffix| command}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccsect,nccboxes,desclist}
\GetFileInfo{nccsect.sty}
+\newhangsectionstyle{margin}{2in}[r]{-2in}{0pt plus 1fil}
+\newhangsectionstyle{list}{1in}{0pt}{1in plus 1fil}
+\newplainsectionstyle{flushright}{0pt}[r]{1in plus 1fil}{0pt}
\begin{document}
\title{The \textsf{nccsect} package\thanks{This file
has version number \fileversion, last
- revised \filedate.}}
+ revised \filedate.}\ \thanks{Great thanks to Denis G. Samsonenko
+ \texttt{<d.g.samsonenko@gmail.com>} who proposed many significant
+ improvements to the package.}}
\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
\date{\filedate}
\maketitle
@@ -46,16 +77,18 @@
%</driver>
% \fi
%
+% \tableofcontents
+%
% \section{The Scope and Objectives}
%
-% The package changes the implementation of sections, captions,
-% and toc-entries in the \LaTeX\ kernel. The reasons for the changes
+% The package provides a new implementation of sections, captions,
+% and toc-entries independent on the \LaTeX\ kernel. The reasons for this
% are concerned with the following disadvantages of the
% standard \LaTeX\ implementation:
%
% \paragraph{1} Standard \LaTeX\ sectioning commands can prepare
% display sections in the single style: justified paragraph
-% with hand indented number. To change this style to another
+% with hang indented number. To change this style to another
% one (centered, par-indented, or else), you need
% to re-implement the internal |\@sect| command. It is no
% control for this style on user's level.
@@ -95,7 +128,7 @@
% It is much better to calculate the skips in toc-entries on the
% base of prototyping technique instead of hard-coding them
% with absolute values. Moreover, the skips for nested sections
-% must depend on of higher level skips. For example, if we
+% must depend on higher level skips. For example, if we
% change skips for a section entry, the skips for subsection entries
% should be adjusted automatically.
%
@@ -111,9 +144,9 @@
% The table below shows sectioning commands provided with standard
% \LaTeX\ classes. Every section has a \textit{level\/} (an integer
% number). Sections can be printed in one of two modes:
-% \textit{display\/} or \textit{run-in\/} mode. Display section is
-% prepared as a separate justified paragraph having a hand indent if a
-% section has a number. Run-in section starts a paragraph.
+% \textit{display\/} or \textit{running\/} mode. Display section is
+% prepared as a separate justified paragraph having a hang indent if a
+% section has a number. Running section starts a paragraph.
% \begin{center}\catcode`|=12
% \small\tabcolsep=10pt
% \renewcommand\cboxstyle{\footnotesize}
@@ -127,8 +160,8 @@
% \cs{section} & 1 & display \\
% \cs{subsection} & 2 & display \\
% \cs{subsubsection} & 3 & display \\
-% \cs{paragraph} & 4 & run-in \\
-% \cs{subparagraph} & 5 & run-in \\
+% \cs{paragraph} & 4 & running \\
+% \cs{subparagraph} & 5 & running \\
% \hline
% \end{tabular}\footnotetext[1]{The \cs{part} command has zero level
% in article-like classes and has the negative level in book-like
@@ -138,15 +171,15 @@
% \end{center}
%
% \DescribeMacro\startsection
-% The package redefines all standard sectioning commands except
-% the |\part| command in the book-like class. Along with the
+% The package redefines all standard sectioning commands. Along with the
% commands shown in the table above, you can use the following
% uniform notations:
% \begin{quote}
% |\startsection|\marg{level}\oarg{toc-entry}\marg{title}\quad or\\
% |\startsection|\marg{level}|*|\marg{title}
% \end{quote}
-% The \meta{level} is a level of section. The first command
+% The \meta{level} is a level of section. A negative level produces
+% a part. The first command
% produces a numbered section (if~the numbering depth allows this)
% and the last one produces a section without number.
% As for the standard \LaTeX\ sectioning, the first variant of
@@ -162,20 +195,48 @@
%
% \bigskip
% \DescribeMacro\sectionstyle
-% The |\sectionstyle|\marg{style} command allows change
-% a style of subsequent display sections. The following styles
-% are predefined:
-% \begin{desclist}{\tt}{ \rm\hfill---}[hangindent*]\itemsep=0mm
-% \item[hangindent] standard LaTeX style (default).
-% \item[hangindent*] the same as |hangindent|, but ragged right.
-% \item[parindent] section titles are indented on |\parindent|.
-% \item[parindent*] the same as |parindent|, but ragged right.
-% \item[center] section titles are centered.
+% The |\sectionstyle|\oarg{type}\marg{style} command allows change
+% a style of subsequent display sections of the given \meta{type}:
+% \begin{desclist}{\tt}{\quad}[subsubsection]\itemsep=0mm
+% \item[main] the section of zero level (|\part| or |\chapter|);
+% \item[section] the |\section|;
+% \item[subsection] the |\subsection|;
+% \item[subsubsection] the |\subsubsection|;
+% \item[paragraph] the |\paragraph|;
+% \item[subparagraph] the |\subparagraph|;
+% \item[section@vi] the section of 6th level, and so on.
+% \end{desclist}
+% If the \meta{type} parameter is omitted, the command acts on
+% all subsequent display sections expect those having a specialized style.
+% The following styles are predefined:
+% \begin{desclist}{\tt}{\quad}[hangparindent*]\itemsep=0mm
+% \item[hangindent] standard LaTeX style (default);
+% \item[hangindent*] the same as |hangindent|, but ragged right;
+% \item[parindent] title indented on |\parindent|;
+% \item[parindent*] the same as |parindent|, but ragged right;
+% \item[hangparindent] |\parindent| indented with hang number;
+% \item[hangparindent*] the same as |hangparindent|, but ragged right;
+% \item[center] centered title;
+% \item[centerlast] justified title without indent whose last line is centered.
% \end{desclist}
% You can apply the |\sectionstyle| so many times in the document
% as you want. This command complies with standard \LaTeX\ scoping
% rules.
%
+% \bigskip
+% \textbf{NOTE}: The section style acts on display sections that were
+% prepared with the dynamic alignment (see Section~\ref{s:decl}). By default,
+% the sections of levels from 0 to 3 have the dynamic alignment. The
+% section of zero level has no hang indentation.
+%
+% \bigskip
+% \DescribeMacro\sectiontagsuffix
+% The |\sectiontagsuffix|\oarg{type}\marg{style} command allows change
+% a suffix inserted after number tag for sections of the given \meta{type}.
+% If the \meta{type} parameter is omitted, the command acts on
+% all subsequent sections expect those having a specialized tag suffix.
+%
+% \bigskip
% \DescribeMacro\indentaftersection
% \DescribeMacro\noindentaftersection
% The paragraph indentation after a display section is controlled with
@@ -184,7 +245,39 @@
% indentation after section. The commands act on the subsequent
% display sections in the scope of their use.
%
-% The customization of a number tag and running head of a concrete
+% \DescribeMacro\aftersectionvspace
+% If a document contains two subsequent sectioning commands (for example,
+% |\section| and |\subsection|) the distance between their titles is
+% equal to the skip after the first sectioning command. Sometimes
+% it is necessary to insert another vertical space here. To override
+% the space inserted between sections, use the command
+% \begin{quote}
+% |\aftersectionvspace|\marg{distance}
+% \end{quote}
+% This command replaces the space inserted by a previous sectioning
+% command with the |\vspace|\marg{distance}. It works in the only case when
+% goes right after a command producing a display section. Otherwise, the
+% specified \meta{distance}
+% is ignored. The following example shows how to customize the
+% |\subsection| command in such a way that the distance between it and
+% a previous |\section| will be |3ex plus .5ex minus .2ex|:
+% \begin{quote}
+% |\renewcommand\subsection{%|\\
+% | \aftersectionvspace{3ex plus .5ex minus .2ex}%|\\
+% | \startsection{2}}|
+% \end{quote}
+%
+% \DescribeMacro\adjustsectionmargins
+% Margins of a display section can be adjusted using the command
+% \begin{quote}
+% |\adjustsectionmargins|\marg{left skip}\marg{right skip}
+% \end{quote}
+% The \meta{left skip} and \meta{right skip} are added to the left and
+% right margins of the subsequent section if it is a display section.
+% Otherwise, this command is ignored.
+%
+% \bigskip
+% \textbf{Modifiers.} The customization of a number tag and running head of a concrete
% section is provided with so-call \textit{modifiers}. A modifier
% is a command acting on the nearest sectioning command going after it.
% Usually, the modifiers are placed just before a sectioning command.
@@ -192,29 +285,29 @@
% If the next sectioning command is starred, modifiers are ignored.
%
% \DescribeMacro\norunninghead
-% The |\norunninghead| command suppresses generation of running head for the
+% The |\norunninghead| modifier suppresses generation of running head for the
% next non-starred section, i.e.\ it skips the call of section mark command
% in the next section.
%
% \DescribeMacro\runninghead
-% The |\runninghead|\marg{running-title} command overrides a text going to the
+% The |\runninghead|\marg{running-title} modifier overrides a text going to the
% running head when a new non-starred section starts and an appropriate\linebreak
% |\pagestyle| is in use. This command has higher priority
% than the |\norunninghead|.
%
% \DescribeMacro\noheadingtag
-% The |\noheadingtag| command suppresses a number tag in the next section,
+% The |\noheadingtag| modifier suppresses a number tag in the next section,
% but all other attendant actions are executed (writing to the aux-file and
% updating the running head).
%
% \DescribeMacro\headingtag
-% The |\headingtag|\marg{tag} command overrides a number tag in the next
+% The |\headingtag|\marg{tag} modifier overrides a number tag in the next
% section. It has the higher priority than |\noheadingtag|. Overridden
% section tag can be referred with the |\label| command.
% All fragile commands in the overridden tag should be protected.
%
% \DescribeMacro{\headingtag*}
-% The |\headingtag*|\marg{tag} command prepares a number tag as is, ignoring
+% The |\headingtag*|\marg{tag} modifier prepares a number tag as is, ignoring
% the tag style, prefix, and suffix. The aux-file and running head are not
% updated in this case.
%
@@ -236,65 +329,183 @@
% |\caption*|\marg{title}
% \end{quote}
% The first one works in the same manner as the standard \LaTeX\ |\caption|
-% command. Its star-version prepares a caption without number and preceding
+% command. Its starred version prepares a caption without number and preceding
% words `Figure' or `Table'.
%
% You can use line breaking commands in captions. But in this case,
% you need to set the optional \meta{toc-entry} parameter to avoid
% translation errors.
%
-% \DescribeMacro\captionstyle
-% \DescribeMacro\captiontagstyle
-% \DescribeMacro\captionwidth
% Caption appearance can be customized. You can customize ether all caption
% types or only selected caption type. The following commands do this:
% \begin{quote}
% |\captionstyle|\oarg{type}\marg{style}\\
% |\captiontagstyle|\oarg{type}\marg{style}\\
+% |\captiontagsuffix|\oarg{type}\marg{suffix}\\
% |\captionwidth|\oarg{type}\marg{length}
% \end{quote}
-% If |type| is omitted, these commands are applied to all types (out of floats)
-% or to the current type (inside a float). If both typed and non-typed
-% cases are specified for a float type, typed case has a
-% precedence before non-typed one. The |\captionstyle| specifies a style
+% If \meta{type} is omitted and these commands appear out of float
+% environments, they are applied to all types.
+% A command without \meta{type} applied within a float environment
+% is considered as a command having the type of this environment. Typed
+% version of a command has a precedence before a non-typed one.
+%
+% \medskip\noindent
+% \DescribeMacro\captionstyle
+% specifies a style
% the caption text will be formatted:
-% \begin{desclist}{\tt}{}[centerlast]
+% \begin{desclist}{\tt}{\quad}[centerlast]\itemsep=0mm
% \item[default] standard \LaTeX's style,
-% \item[para] simple paragraph,
+% \item[para] simple paragraph without paragraph indent,
% \item[left] all lines are flushed left,
% \item[center] all lines are centered,
% \item[right] all lines are flushed right, or
% \item[centerlast] as |para|, but the last line is centered.
% \end{desclist}
-% The |\captiontagstyle| specifies a position of caption tag:
-% \begin{desclist}{\tt}{}[centerlast]
-% \item[para] tag is formatted together with text;
-% \item[left] tag is adjusted to the left in a separate line;
-% \item[center] tag is centered in a separate line; or
+%
+% \medskip\noindent
+% \DescribeMacro\captiontagstyle
+% specifies a position of caption tag:
+% \begin{desclist}{\tt}{\quad}[centerlast]\itemsep=0mm
+% \item[para] tag is formatted together with text,
+% \item[left] tag is adjusted to the left in a separate line,
+% \item[center] tag is centered in a separate line, or
% \item[right] tag is adjusted to the right in a separate line.
% \end{desclist}
-% The |\captionwidth| specifies a width of caption. Defaults:
+%
+% \medskip\noindent
+% \DescribeMacro\captiontagsuffix
+% specifies a suffix after caption tag.
+%
+% \medskip\noindent
+% \DescribeMacro\captionwidth
+% specifies a width of caption.
+%
+% \medskip\noindent
+% Defaults:
% \begin{quote}
% |\captionstyle{default}|\\
% |\captiontagstyle{para}|\\
+% |\captiontagsuffix{:\hspace{0.7em plus 0.2em minus 0.1em}}|\\
% |\captionwidth{\linewidth}|
% \end{quote}
%
-% \bigskip
% \textbf{NOTE}: The above-described section modifiers can be used with non-starred
% captions. Although, the |\runninghead| and |\norunninghead| commands
% have no sense with captions, but you can do them working if define
-% a |\figuremark| or |\tablemark| command.
+% a |\figuremark{}| or |\tablemark{}| command.
%
-% \section{Declare Sections and Captions}
+% \bigskip
+% \DescribeMacro\SetTOCStyle
+% The |\SetTOCStyle|\marg{declarations} command allows customize
+% the table of contents and other content lists. For example, the declaration
+% \begin{quote}
+% |\SetTOCStyle{\small}|
+% \end{quote}
+% specifies that content lists will be prepared with the |\small| font.
+% This command is allowed in the preamble only.
+%
+% \DescribeMacro\ChapterPrefixStyle
+% The appearance of Chapter/Appendix prefix in a table of contents and
+% in a running head can be customized using the command
+% \begin{quote}
+% |\ChapterPrefixStyle|\marg{appearance list}
+% \end{quote}
+% The \meta{appearance list} can contain up to two words, namely
+% |header| and/or |toc|, delimited with a comma. Using them, you can
+% set a prefix-style for the header and/or the table of contents, respectively.
+% By default, the prefix-style is specified for the header only. This command
+% is allowed for book-like classes in which the |\chapter| command is
+% defined. It can be used in the preamble only.
+%
+% \section{Create New Section Styles}
+%
+% Along with 8 predefined section styles, you can easy create more styles.
+%
+% \DescribeMacro\newplainsectionstyle
+% The command
+% \begin{quote}
+% |\newplainsectionstyle|\marg{name}\marg{indent}\oarg{pos}\\
+% | |\marg{left skip}\marg{right skip}
+% \end{quote}
+% creates a new paragraph-like section style with the given \meta{name}.
+% It has the \meta{indent} paragraph indent
+% and margins specified with \meta{left skip} and \meta{right skip} lengths.
+% To prepare a centered style, the optional \meta{pos} parameter
+% should be equal to |[c]|. In this case, left and right margins must
+% have an additional |1fil| glue. If optional parameter is |[r]|, the
+% left margin must have an additional |1fil| glue.
+%
+% Four of predefined section styles are created using this command as follows:
+% \begin{quote}
+% |\newplainsectionstyle{parindent}{0pt}{\parindent}{0pt}|\\
+% |\newplainsectionstyle{parindent*}{0pt}{\parindent}{0pt plus 1fil}|\\
+% |\newplainsectionstyle{center}{0pt}[c]{0pt plus 1fil}{0pt plus 1fil}|\\
+% |\newplainsectionstyle{centerlast}{0pt}[c]{0pt plus 1fil}{0pt plus -1fil}|
+% \end{quote}
+%
+% \DescribeMacro\newhangsectionstyle
+% The command
+% \begin{quote}
+% |\newhangsectionstyle|\marg{name}\marg{min tag width}\oarg{pos}\\
+% | |\marg{left skip}\marg{right skip}
+% \end{quote}
+% creates a new hang-indented section style with the given \meta{name}.
+% The \meta{min tag width} length specifies a minimum width of the section
+% tag. If a width of section tag is less than this parameter value,
+% a white space will be inserted surround the tag to have the required
+% width. The method of inserting a white space is the same as in the
+% |\makebox| command. It is controlled with the optional \meta{pos}
+% parameter (|l|, |c|, or |r|; |l| default). Other parameters have
+% the same meaning as in the previous command.
+%
+% Four of predefined section styles are created using this command as follows:
+% \begin{quote}
+% |\newhangsectionstyle{hangindent}{0pt}{0pt}{0pt}|\\
+% |\newhangsectionstyle{hangindent*}{0pt}{0pt}{0pt plus 1fil}|\\
+% |\newhangsectionstyle{hangparindent}{0pt}{\parindent}{0pt}|\\
+% |\newhangsectionstyle{hangparindent*}{0pt}{\parindent}{0pt plus 1fil}|
+% \end{quote}
+%
+% The following examples shows possibilities of these commands:
+%
+% \skipwritingtoaux
+% \sectionstyle[subsection]{margin}
+% \subsection{This subsection was prepared in the margin style}
+%
+% The definition of the |margin| style is the following:
+% \begin{quote}
+% |\newhangsectionstyle{margin}{2in}[r]{-2in}{0pt plus 1fil}|
+% \end{quote}
+%
+% \skipwritingtoaux
+% \sectionstyle[subsection]{list}
+% \subsection{This subsection was prepared in the list style}
+%
+% The definition of the |list| style is the following:
+% \begin{quote}
+% |\newhangsectionstyle{list}{1in}{0pt}{1in plus 1fil}|
+% \end{quote}
+%
+% \skipwritingtoaux
+% \sectionstyle[subsection]{flushright}
+% \subsection{This subsection was prepared in the flushright style}
+%
+% The definition of the |flushright| style is the following:
+% \begin{quote}
+% |\newplainsectionstyle{flushright}{0pt}[r]{1in plus 1fil}{0pt}|
+% \end{quote}
+% \sectionstyle[subsection]{hangindent}
+%
+% \section{Declare Sections and Captions\label{s:decl}}
%
% \DescribeMacro\DeclareSection
% To define or redefine a section or caption command, you can use
% in the preamble of your document the
% following command:
% \begin{quote}
-% |\DeclareSection|\marg{level}\marg{type}\oarg{indent}\marg{prefix}\\
-% | |\marg{beforeskip}\marg{afterskip}\marg{style}
+% |\DeclareSection|\marg{level}\marg{type}\oarg{indent}\marg{prefix}\marg{beforeskip}\\
+% | |\marg{afterskip}\marg{style}
% \end{quote}
% \begin{desclist}{}{}[\meta{beforeskip}]
% \item[\meta{level}] a section level number. Zero and negative values
@@ -319,7 +530,7 @@
% \item[\meta{beforeskip}] the skip to leave above the heading.
%
% \item[\meta{afterskip}] if positive, then the skip to leave below
-% the heading, else negative of skip to leave to right of run-in
+% the heading, else negative of skip to leave to right of running
% heading. The negative value is allowed for positive section levels
% only.
%
@@ -337,8 +548,8 @@
% To declare a display section having dynamic alignment controlled with the
% |\sectionstyle| command, use the star-version of the previous command:
% \begin{quote}
-% |\DeclareSection*|\marg{level}\marg{type}\marg{prefix}\\
-% | |\marg{beforeskip}\marg{afterskip}\marg{style}
+% |\DeclareSection*|\marg{level}\marg{type}\marg{prefix}\marg{beforeskip}\\
+% | |\marg{afterskip}\marg{style}
% \end{quote}
% A negative \meta{afterskip} has no meaning in this case.
%
@@ -360,13 +571,13 @@
% \end{quote}
% Here we declare the table caption command with zero skip
% before it and |10pt| skip after it. On contrary, the
-% figure caption command produced |10pt| skip before it
+% figure caption command produces |10pt| skip before it
% and zero skip after it. The |\section| command is declared with
% dynamic horizontal alignment. It is prepared in the |\Large|
% font with everything bold.
%
% \DescribeMacro\SectionTagSuffix
-% The |\SectionTagSuffix|\marg{suffix} command specifies a suffix
+% The |\SectionTagSuffix|\marg{suffix} command specifies a default suffix
% inserted after a section number tag. For example, the command
% \begin{quote}
% |\SectionTagSuffix{.\quad}|
@@ -375,12 +586,22 @@
% Sections of 0th level ignore this suffix. The default tag is |\quad|.
% The command can be used in the preamble only.
%
+% \DescribeMacro\RunningSectionSuffix
+% The |\RunningSectionSuffix|\marg{suffix} command specifies a suffix
+% inserted after a running section title right before the skip after
+% section. It can be used in the preamble only.
+% The default value is an empty suffix.
+%
+% \DescribeMacro\norunningsuffix
+% To remove the suffix after a running section, put the
+% |\norunningsuffix| modifier in the parameter of running section.
+%
% \DescribeMacro\CaptionTagSuffix
-% The |\CaptionTagSuffix|\marg{suffix} command specifies a suffix
+% The |\CaptionTagSuffix|\marg{suffix} command specifies a default suffix
% inserted after a caption number tag. It can be used in the preamble only.
% The default caption tag is:
% \begin{quote}
-% |\CaptionTagSuffix{:\hskip .7em plus .2em minus .1em}|
+% |\CaptionTagSuffix{:\hspace{0.7em plus 0.2em minus 0.1em}}|
% \end{quote}
%
% \section{Declare TOC-Entries}
@@ -400,7 +621,7 @@
% $-1$ means |\l@figure|; $-2$ means |\l@table|. If level
% is greater than 5, the name of toc-entry command is
% generated as |\l@section@|\meta{level-in-roman},
-% i.e., the 6th level toc-entry is |\l@section@vi|.
+% i.e., the toc-entry of 6th level is |\l@section@vi|.
%
% \item[\meta{action}] commands applied before entry is produced (usually empty).
%
@@ -409,7 +630,7 @@
% \item[\meta{prototype}] prototype of number for alignment the toc-entry body.
% The hang indent of this toc-entry will be equal to the width of
% \begin{quote}
-% \meta{prefix}\meta{prototype}\meta{numberline-suffix}.
+% \meta{style}|{|\meta{prefix}\meta{prototype}\meta{numberline-suffix}|}|
% \end{quote}
%
% \item[\meta{style}] commands to set a style. The last command in this argument
@@ -417,7 +638,8 @@
% argument. The produced entry will be supplied as the
% argument to this command. So setting it to, say,
% |\bfseries\MakeUppercase| would produce bold,
-% uppercase entry. This style is applied to the number also.
+% uppercase entry. This style is applied to the number also and to the
+% page number.
% To apply different styles to the text of entry and to its page
% number, use in this parameter the command
% \begin{quote}
@@ -590,10 +812,108 @@
% |\StartFromHeaderArea| command at the beginning of page.
% Such action is useful in epigraphs: the first chapter's page usually
% has an empty header and positioning an epigraph from the header
-% is the good practice.
+% is the good practice.{\sloppy\par}
+%
+% \section{Declare Part}
+%
+% The |\part| command in book-like classes is the only sectioning command
+% that cannot be prepared with the |\DeclareSection| command. So, we add
+% special declarations to provide parts in books with features of other
+% sectioning commands.
+%
+% \DescribeMacro\DeclarePart
+% To redefine the |\part| in books, use the following declaration:
+% \begin{quote}
+% |\DeclarePart|\marg{before}\marg{after}\marg{prefix}\marg{style}
+% \end{quote}
+% \begin{desclist}{}{}[\meta{before}]
+% \item[\meta{before}] an action applied before a part at the beginning of
+% page. It usually specifies a vertical skip |\vfil| and a
+% paragraph style to be applied to the part number tag and title.
+% \item[\meta{after}] an action applied after the part. It usually contains
+% |\vfil| and page finishing commands.
+% \item[\meta{prefix}] a prefix inserted before a part tag. It contains
+% style commands to be applied to the tag and the |\vspace| command
+% specifying a distance between the part tag and title.
+% The |\partname| command goes right after the prefix.
+% \item[\meta{style}] a style to be applied to the part title. It can end
+% with |\MakeUppercase|.
+% \end{desclist}
+%
+% The default declaration of the |\part| is the following:
+% \begin{quote}
+% |\DeclarePart{\StartFromTextArea\vfil\centering}%|\\
+% | {\vfil\newpage \if@twoside\if@openright|\\
+% | \mbox{}\thispagestyle{empty}\newpage\fi\fi}%|\\
+% | {\vspace{4ex}\huge\bff}{\Huge\bff}|
+% \end{quote}
+% The |\StartFromTextArea| command prevents ignoring a vertical space
+% at the beginning of page. All paragraphs of part title are centered
+% horizontally using the |\centering| declaration, and the title
+% is centered vertically using |\vfil| commands
+% before and after it. A page after the part is made empty in two-side
+% mode if it is even. The space after the part tag is set to |4ex|.
+%
+% In Russian typesetting tradition, the part can be prepared in the
+% same manner as a chapter, i.e.\ a text going after a part is prepared
+% on the same page with the part title. It is easy to re-declare
+% the part in such style.
+% Let us start a part from the header and delimit it from the text
+% with a decorative line. The following declaration does this:
+% \begin{quote}
+% |\DeclarePart{\StartFromHeaderArea\centering}|\\
+% | {\vspace{2mm}\noindent\hrulefill\par|\\
+% | \addvspace{5mm}}|\\
+% | {\vspace{.5em}\LARGE\bff}{\Huge\bff}|
+% \end{quote}
+% But when a chapter goes right after a part, we need to place the part and
+% chapter titles together
+% on the same page. This can be applied using the |\beforechapter| hook:
+% \begin{quote}
+% |\beforechapter{\part|\marg{part title}|}|\\
+% |\chapter|\marg{chapter title}
+% \end{quote}
+% Modifiers stored in the parameter of |\beforechapter| hook will act on
+% the |\part| command. Modifiers outside of |\beforechapter| will act on
+% the |\chapter| command.
+%
+% \DescribeMacro\DeclareTOCPart
+% To produce a toc-entry command for a part, the following declaration is
+% specified for book-like classes:
+% \begin{quote}
+% |\DeclareTOCPart|\marg{action}\oarg{afterskip}\marg{prefix}\marg{prototype}\marg{style}
+% \end{quote}%
+% \begin{desclist}{}{}[\meta{afterskip}]
+% \item[\meta{action}] an action applied before the part toc-entry. It usually
+% a skip before part. It is recommended to prepare it with |\NCC@secskip|
+% command.
+% \item[\meta{afterskip}] a skip after this entry. If it is omitted,
+% the default |\NCC@runskip| value is applied after this entry.
+% \item[\meta{prefix}] a prefix inserted before a part tag (usually empty).
+% \item[\meta{prototype}] a prototype of part tag used for calculation the
+% hang indent in this entry.
+% \item[\meta{style}] a style applied to the whole text of entry and to
+% the page number. The |\MakeUppercase| is allowed to finish this
+% parameter. The |\applystyle| command can be used inside it to
+% apply different styles to the toc-entry and the page number.
+% \end{desclist}
+%
+% The default declaration of the part toc-entry is the following:
+% \begin{quote}
+% |\DeclareTOCPart{\NCC@secskip{4ex \@plus .2ex}%|\\
+% | \def\@dotsep{1000}}%|\\
+% | {}{\partname\ II}{\large\bff}|\\
+% \end{quote}
%
% \section{The Implementation}
%
+% The \textbf{afterpackage} package is used to add compatibility
+% commands.
+% \begin{macrocode}
+%<*package>
+\RequirePackage{afterpackage}
+% \end{macrocode}
+%
% \begin{macro}{\NCC@secskip}
% \begin{macro}{\NCC@runskip}
% The package shares the following commands with the
@@ -605,7 +925,6 @@
% We protect the definitions of these commands with testing
% the |nccthm| package to be already loaded.
% \begin{macrocode}
-%<*package>
\@ifpackageloaded{nccthm}{}{%
\def\NCC@secskip#1{%
\if@noskipsec \leavevmode \fi \par
@@ -630,7 +949,7 @@
% \subsection{The Kernel}
%
% We start with declaring the section controls (modifiers):
-% \begin{desclist}{\tt}{\hfill}[NCC@nosecmark]\raggedright
+% \begin{desclist}{\tt}{\hfill}[NCC@secstartag]\raggedright
% \item[NCC@nosectag] is true if |\noheadingtag| is applied;
% \item[NCC@secstartag] is true if |\headingtag*|\marg{tag} is applied;
% \item[\cs{NCC@sectag}] saves a value of the |\headingtag| parameter;
@@ -705,8 +1024,8 @@
% The command uses the following hooks that must be prepared
% before its call:
% \begin{desclist}{}{}[\cs{NCC@make}\marg{action}]
-% \item[\cs{NCC@makesectag}\marg{value}] produces a tag using the
-% given value;
+% \item[\cs{NCC@makesectag}\marg{value}] produces a tag in |\@svsec|
+% using the given value;
%
% \item[\cs{NCC@make}\marg{action}] makes a section or caption heading
% and applies the \meta{action} after heading. Before the call
@@ -840,43 +1159,73 @@
% \end{macro}
%
% \begin{macro}{\SectionTagSuffix}
-% The |\SectionTagSuffix|\marg{suffix} sets a suffix after a section tag:
+% The |\SectionTagSuffix|\marg{suffix} sets a default suffix after
+% a section tag.
% \begin{macrocode}
\newcommand*{\SectionTagSuffix}[1]{\def\NCC@asecnum{#1}}
\@onlypreamble\SectionTagSuffix
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\NCC@defaultsectag}
-% This command restores the making tag command to its default
-% value.
+% \begin{macro}{\sectiontagsuffix}
+% |\sectiontagsuffix|\oarg{type}\marg{suffix} changes a suffix after section
+% tag that will be used for sections of the given
+% \meta{type}. If \meta{type} is omitted, the specified suffix will be used
+% in text flow for all sections having no special suffix.
% \begin{macrocode}
-\def\NCC@makesectag@default#1{#1\NCC@asecnum}
-\def\NCC@defaultsectag{\let\NCC@makesectag\NCC@makesectag@default}
-\NCC@defaultsectag
+\newcommand*\sectiontagsuffix[2][]{%
+ \expandafter\def\csname NCC@asecnum@#1\endcsname{\def\NCC@asecnum{#2}}%
+}
+\let\NCC@asecnum@\@empty
+\def\NCC@setsectionsuffix#1{%
+ \edef\@tempa{NCC@asecnum@\NCC@secname{#1}}%
+ \@ifundefined{\@tempa}{%
+ \let\NCC@asecnumset\NCC@asecnum@
+ }{%
+ \expandafter\let\expandafter\NCC@asecnumset\csname\@tempa\endcsname
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\RunningSectionSuffix}
+% The |\RunningSectionSuffix|\marg{suffix} sets a suffix after a title
+% of a running section:
+% \begin{macrocode}
+\newcommand*{\RunningSectionSuffix}[1]{\def\NCC@asectitle{\unskip#1}}
+\@onlypreamble\RunningSectionSuffix
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@preparesectag}
+% The |\NCC@preparesectag|\marg{style}\marg{before} hook prepares the
+% |\NCC@makesectag| command:
+% \begin{macrocode}
+\def\NCC@preparesectag#1#2{\def\NCC@makesectag##1{#1#2##1\NCC@asecnum}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NCC@secname}
% The |\NCC@secname|\marg{level} command generates section name
-% (|section|,\linebreak |subsection|, \ldots,
+% (|main|, |section|, |subsection|, \ldots,
% or |section@vi|, |section@vii|, \ldots\ for new section levels).
% This name is used as the second parameter of the |\addcontentsline|
-% command and in the declarations of toc-entries.
+% command, in the declarations of toc-entries, and in the style
+% selection command.
% \begin{macrocode}
\def\NCC@secname#1{%
- \ifcase#1\relax \or section\or subsection\or subsubsection\or
+ \ifcase#1main\or section\or subsection\or subsubsection\or
paragraph\or subparagraph\else section@\romannumeral#1\fi
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@startsection}
-% The |\@startsection| command
-% has the same syntax as the original \LaTeX\ version:
+% \begin{macro}{\NCC@startsection}
+% The |\NCC@startsection| command
+% has the same syntax as its non-NCC prototype:
% \begin{quote}
-% |\@startsection|\marg{type}\marg{level}\marg{indent}\marg{beforeskip}\\
-% | |\marg{afterskip}\marg{style}
+% |\NCC@startsection|\marg{type}\marg{level}\marg{indent}\marg{beforeskip}\\
+% | |\marg{afterskip}\marg{style}
% \end{quote}
% but works in a bit different way: it ignores the sign of
% \meta{beforeskip}. In the original version the testing
@@ -884,18 +1233,18 @@
% But we change this mode using |\indentaftersection| and
% |\noindentaftersection| macros.
% \begin{macrocode}
-\def\@startsection#1#2#3#4#5#6{%
+\def\NCC@startsection#1#2#3#4#5#6{%
\@tempskipa #4\relax
\ifdim \@tempskipa <\z@ \@temskipa -\@tempskipa \fi
\NCC@secskip \@tempskipa
- \secdef{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}{\@ssect{#3}{#4}{#5}{#6}}%
+ \secdef{\NCC@sect{#1}{#2}{#3}{#4}{#5}{#6}}{\NCC@ssect{#3}{#4}{#5}{#6}}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NCC@makesec}
-% We save the interface of |\@ssect| and |\@sect| commands, but
-% change their implementation. They are based on the following
+% The interface of |\NCC@ssect| and |\NCC@sect| commands is similar to their
+% \LaTeX's prototypes. They are based on the following
% command:
% \begin{quote}
% |\NCC@makesec|\marg{indent}\marg{style}\marg{heading}\marg{afterskip}\marg{action}
@@ -903,47 +1252,41 @@
% In fact, there are two versions of this command:
% the traditional version, |\NCC@makesect|, and the
% version with dynamic control of section style,\linebreak |\NCC@makesecx|.
-% The first one is the default version. To be sure, that this
-% version will be used by default, we every time let
-% the |\NCC@makesec| to be equal to |\NCC@makesect| after
-% a section is produced.
+% One of them should be selected before applying the |\NCC@ssect| and |\NCC@sect|
+% commands.
% \end{macro}
%
-% \begin{macro}{\@ssect}
+% \begin{macro}{\NCC@ssect}
% The starred form of section:
% \begin{quote}
-% |\@ssect|\marg{indent}\marg{beforeskip}\marg{afterskip}\marg{style}\marg{heading}
+% |\NCC@ssect|\marg{indent}\marg{beforeskip}\marg{afterskip}\marg{style}\marg{heading}
% \end{quote}
% \begin{macrocode}
-\def\@ssect#1#2#3#4#5{%
+\def\NCC@ssect#1#2#3#4#5{%
\let\@svsec\@empty
\NCC@makesec{#1}{#4}{#5}{#3}{}%
\NCC@sec@reset@controls
- \let\NCC@makesec\NCC@makesect
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@sect}
+% \begin{macro}{\NCC@sect}
% The base form of section:
% \begin{quote}
-% |\@sect|\marg{type}\marg{level}\marg{indent}\marg{beforeskip}\marg{afterskip}\marg{style}\\
-% | |\oarg{toc-entry}\marg{heading}
+% |\NCC@sect|\marg{type}\marg{level}\marg{indent}\marg{beforeskip}\marg{afterskip}\marg{style}\\
+% | |\oarg{toc-entry}\marg{heading}
% \end{quote}
% \begin{macrocode}
-\def\@sect#1#2#3#4#5#6[#7]#8{%
+\def\NCC@sect#1#2#3#4#5#6[#7]#8{%
\def\NCC@make{\NCC@makesec{#3}{#6}{#8}{#5}}%
\NCC@makesection{#1}{#2}{#7}{%
\addcontentsline{toc}{\NCC@secname{#2}}{%
\ifnum #2>\c@secnumdepth \else
- \protect\numberline{\csname the#1\endcsname}%
+ \numberline{\csname the#1\endcsname}%
\fi
#7%
}%
}%
- \let\NCC@makesec\NCC@makesect
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
@@ -958,46 +1301,211 @@
\@tempskipa #4\relax
\ifdim \@tempskipa>\z@
\begingroup \normalfont
- #2{\@hangfrom{\hskip #1\relax\@svsec}%
- \interlinepenalty \@M\ignorespaces #3\@@par}%
+ \NCC@asecnumset
+% \end{macrocode}
+% The |\NCC@secttitle|\marg{style}\marg{tag}\marg{title} hook prepares
+% traditional display section:
+% \begin{macrocode}
+ \NCC@secttitle{#2}{\NCC@hangfrom{\hskip #1\relax\@svsec}}%
+ {\interlinepenalty \@M\ignorespaces #3\@@par}
\endgroup
#5%
\else
- \def\@svsechd{{\normalfont #2{\hskip #1\relax
- \@svsec\ignorespaces #3}}#5}%
+% \end{macrocode}
+% The |\NCC@secptitle|\marg{style}\marg{tag}\marg{title} hook prepares
+% running section. The |\norunningsuffix| modifier applied in the
+% parameter of running section removes a suffix after section title.
+% \begin{macrocode}
+ \def\@svsechd{{\normalfont
+ \NCC@asecnumset
+ \def\norunningsuffix{\protect\NCC@nosecsuffix}%
+ \NCC@secptitle{#2}{\hskip #1\relax{\@svsec}}%
+ {\ignorespaces #3\NCC@asectitle}#5}}%
\fi
\@xsect{#4}%
}
-\let\NCC@makesec\NCC@makesect
+\def\NCC@secttitle#1#2#3{#1{#2#3}}
+\def\NCC@secptitle#1#2#3{#1{#2#3}}
+\newcommand*\norunningsuffix{}
+\def\NCC@nosecsuffix{\let\NCC@asectitle\@empty}
% \end{macrocode}
% \end{macro}
%
-% \subsection{Make Sections with Dynamic Control}
+% \subsection{Create Section Styles}
+%
+% \begin{macro}{\NCC@hangfrom}
+% |\NCC@hangfrom|\marg{section tag} works as
+% the \LaTeX's |\@hangfrom| command, but its margins can be adjusted
+% with the |\adjustsectionmargins| command.
+% \begin{macrocode}
+\def\NCC@hangfrom{%
+ \NCC@setsecmargins{\z@skip}{\z@skip}\NCC@hangsecstyle{\z@}{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@setsecmargins}
+% |\NCC@setsecmargins|\marg{left skip}\marg{right skip} sets
+% section margins and applies the hook that can be defined by the
+% |\adjustsectionmargins| command.
+% \begin{macrocode}
+\def\NCC@setsecmargins#1#2{%
+ \leftskip\z@skip \rightskip\z@skip
+ \parfillskip\@flushglue
+ \let\\\@normalcr
+ \NCC@adjsecmargins{#1}{#2}%
+ \NCC@secmarginshook
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@adjsecmargins}
+% |\NCC@adjsecmargins|\marg{left skip}\marg{right skip} adjusts
+% section margins. The |\parfillskip| value is also adjusted to
+% a difference between stretchabilities of the \meta{left skip}
+% and the \meta{right skip}. Using this trick, we can easy specify
+% the |centerlast| style just setting the stretchability of the
+% \meta{right skip} as a negation of the \meta{left skip} stretchability.
+% To extract a stretchability from a skip, we simply add it multiplied
+% by |-1| (while multiplication the stretchability is removed!).
+% \begin{macrocode}
+\def\NCC@adjsecmargins#1#2{%
+ \setlength\@tempskipa{#1}\advance\leftskip\@tempskipa
+ \setlength\@tempskipb{#2}\advance\rightskip\@tempskipb
+ \advance\@tempskipa -1\@tempskipa \advance\@tempskipb -1\@tempskipb
+ \advance\@tempskipa -\@tempskipb \advance\parfillskip\@tempskipa
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@hangsecstyle}
+% |\NCC@hangsecstyle|\marg{min tag width}\marg{pos}\marg{section tag}
+% starts a hang paragraph and prints its tag. The \meta{min tag width}
+% specifies a minimum width of hang indent and \meta{pos} specifies
+% an alignment of \meta{section tag} (|l|, |c|, |r|) if its width
+% is less than the minimum width.
+% \begin{macrocode}
+\def\NCC@hangsecstyle#1#2#3{%
+ \setlength\@tempdima{#1}%
+ \setbox\@tempboxa\hbox{#3}%
+ \ifdim \wd\@tempboxa > \@tempdima
+ \hangindent\wd\@tempboxa \noindent \box\@tempboxa
+ \else
+ \hangindent\@tempdima
+ \noindent \makebox[\@tempdima][#2]{\unhbox\@tempboxa}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\adjustsectionmargins}
+% |\adjustsectionmargins|\marg{left skip}\marg{right skip}
+% defines the |\NCC@secmarginshook| macro to be applied after
+% margins are set. To be sure this hook will be applied only once,
+% we release it in the |\NCC@sec@reset@controls| hook.
+% \begin{macrocode}
+\newcommand*\adjustsectionmargins[2]{%
+ \NCC@global\def\NCC@secmarginshook{\NCC@adjsecmargins{#1}{#2}}
+}
+\g@addto@macro\NCC@sec@reset@controls{%
+ \NCC@global\let\NCC@secmarginshook\@empty
+}
+\let\NCC@secmarginshook\@empty
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\NCC@sec}
% A style of sections having dynamic control is defined by the
% |\NCC@sec|\marg{tag} hook. This hook is applied inside a group
-% preparing a heading.
+% preparing a heading. All section style commands redefine this hook.
% \end{macro}
%
-% \begin{macro}{\sectionstyle}
-% The |\sectionstyle|\marg{style} changes a style of display sections.
-% In fact, it calls the |\NCC@sec@|\meta{style} command.
+% \begin{macro}{\newplainsectionstyle}
+% |\newplainsectionstyle|\marg{name}\marg{indent}\oarg{pos}\marg{left skip}\marg{right skip}
% \begin{macrocode}
-\newcommand*{\sectionstyle}[1]{%
- \@ifundefined{NCC@sec@#1}%
- {\PackageError{nccsect}{Unknown section style `#1'}{}}%
- {\csname NCC@sec@#1\endcsname}%
+\newcommand*\newplainsectionstyle[2]{%
+ \@ifnextchar[{\NCC@newplainsec{#1}{#2}}{\NCC@newplainsec{#1}{#2}[l]}%
}
-\def\NCC@sec@hangindent{\def\NCC@sec##1{\@hangfrom{##1}}}
-\@namedef{NCC@sec@hangindent*}{%
- \def\NCC@sec##1{\@hangfrom{##1}\rightskip\@flushglue}%
+\def\NCC@newplainsec#1#2[#3]#4#5{%
+ \def\@tempa{#3}\def\@tempb{c}%
+ \ifx\@tempa\@tempb
+ \expandafter\newcommand\csname NCC@sec@#1\endcsname
+ {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}%
+ \let\\\@centercr \advance\parfillskip -\@flushglue
+ \setlength\parindent{#2}}}%
+ \else
+ \def\@tempb{r}%
+ \ifx\@tempa\@tempb
+ \expandafter\newcommand\csname NCC@sec@#1\endcsname
+ {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}%
+ \let\\\@centercr \advance\parfillskip -\@flushglue
+ \advance\parfillskip -\@flushglue
+ \setlength\parindent{#2}}}%
+ \else
+ \expandafter\newcommand\csname NCC@sec@#1\endcsname
+ {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}\setlength\parindent{#2}}}%
+ \fi
+ \fi
}
-\def\NCC@sec@parindent{\def\NCC@sec##1{\@hangfrom\indent##1}}
-\@namedef{NCC@sec@parindent*}{%
- \def\NCC@sec##1{\@hangfrom\indent\rightskip\@flushglue##1}%
+\@onlypreamble\newplainsectionstyle
+\@onlypreamble\NCC@newplainsec
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\newhangsectionstyle}
+% |\newhangsectionstyle|\marg{name}\marg{min tag width}\oarg{pos}\marg{left skip}\marg{right skip}
+% \begin{macrocode}
+\newcommand*\newhangsectionstyle[2]{%
+ \@ifnextchar[{\NCC@newhangsec{#1}{#2}}{\NCC@newhangsec{#1}{#2}[l]}%
+}
+\def\NCC@newhangsec#1#2[#3]#4#5{%
+ \expandafter\newcommand\csname NCC@sec@#1\endcsname
+ {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}\NCC@hangsecstyle{#2}{#3}}}%
+}
+\@onlypreamble\newhangsectionstyle
+\@onlypreamble\NCC@newhangsec
+% \end{macrocode}
+% \end{macro}
+%
+% Specify predefined section styles. The |\@flushglue| is equal to |0pt plus 1fil|.
+% \begin{macrocode}
+\newhangsectionstyle{hangindent}{\z@}{\z@skip}{\z@skip}
+\newhangsectionstyle{hangindent*}{\z@}{\z@skip}{\@flushglue}
+\newhangsectionstyle{hangparindent}{\z@}{\parindent}{\z@skip}
+\newhangsectionstyle{hangparindent*}{\z@}{\parindent}{\@flushglue}
+\newplainsectionstyle{parindent}{\z@}{\parindent}{\z@skip}
+\newplainsectionstyle{parindent*}{\z@}{\parindent}{\@flushglue}
+\newplainsectionstyle{center}{\z@}[c]{\@flushglue}{\@flushglue}
+\newplainsectionstyle{centerlast}{\z@}[c]{\@flushglue}{-\@flushglue}
+% \end{macrocode}
+%
+% \subsection{Make Sections with Dynamic Control}
+%
+% \begin{macro}{\sectionstyle}
+% The |\sectionstyle|\oarg{type}\marg{style} changes a style
+% for display sections of the given \meta{type}.
+% \begin{macrocode}
+\newcommand*{\sectionstyle}[2][]{%
+ \@ifundefined{NCC@sec@#2}{%
+ \PackageError{nccsect}{Unknown section style `#2'}{}%
+ }{%
+ \expandafter\def\csname NCC@secstyle@#1\endcsname{%
+ \csname NCC@sec@#2\endcsname
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@setsectionstyle}
+% The |\NCC@setsectionstyle|\marg{level} set a style for the
+% given section level. If a style for the given level is
+% undefined, the default style is selected.
+% \begin{macrocode}
+\def\NCC@setsectionstyle#1{%
+ \edef\@tempa{NCC@secstyle@\NCC@secname{#1}}%
+ \@ifundefined{\@tempa}{\NCC@secstyle@}{\csname\@tempa\endcsname}%
}
-\def\NCC@sec@center{\def\NCC@sec##1{\centering##1}}
% \end{macrocode}
% \end{macro}
%
@@ -1010,15 +1518,30 @@
% \begin{macrocode}
\def\NCC@makesecx#1#2#3#4#5{%
\begingroup\normalfont
- #2{\NCC@sec{\@svsec}\interlinepenalty \@M\ignorespaces #3\@@par}%
+ \NCC@asecnumset
+% \end{macrocode}
+% The |\NCC@secxtitle|\marg{style}\marg{tag}\marg{title} hook prepares
+% display section with dynamic control. The |\NCC@sec| macro is protected
+% to prevent its expansion by |\MakeUppercase|.
+% \begin{macrocode}
+ \NCC@secxtitle{#2}{\protect\NCC@sec{\@svsec}}
+ {\interlinepenalty \@M\ignorespaces #3\@@par}%
\endgroup #5%
\par \nobreak \vskip #4\relax \@afterheading \ignorespaces
}
+\def\NCC@secxtitle#1#2#3{#1{#2#3}}
% \end{macrocode}
% \end{macro}
%
% \subsection{Make the Main Section}
%
+% \begin{macro}{\partmark}
+% Define the |\partmark| if it is undefined yet.
+% \begin{macrocode}
+\providecommand*\partmark[1]{\markboth{}{}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\NCC@startmainsec}
% The main section is a section of zero level.
% It is prepared with the following command:
@@ -1036,42 +1559,40 @@
% The case of an article-like class. Zero-level section is the |\part|.
% \begin{macrocode}
\def\NCC@startmainsec#1#2#3#4#5{%
- \def\NCC@makesectag##1{\leavevmode#2\partname\nobreakspace##1}%
+ \NCC@preparesectag{\leavevmode#2}{\partname\nobreakspace}%
\NCC@secskip{#3}%
- \secdef{\@part{#1}{#4}{#5}}{\@spart{#1}{#4}{#5}}%
+ \secdef{\NCC@part{#1}{#4}{#5}}{\NCC@spart{#1}{#4}{#5}}%
}
% \end{macrocode}
%
-% \begin{macro}{\@spart}
+% \begin{macro}{\NCC@spart}
% Prepare the starred version of part:
% \begin{quote}
-% |\@spart|\marg{alignment}\marg{afterskip}\marg{style}\marg{heading}
+% |\NCC@spart|\marg{alignment}\marg{afterskip}\marg{style}\marg{heading}
% \end{quote}
% \begin{macrocode}
- \def\@spart#1#2#3#4{%
+ \def\NCC@spart#1#2#3#4{%
\let\@svsec\@empty
\NCC@makepart{#1}{#3}{#4}{#2}{}%
\NCC@sec@reset@controls
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@part}
+% \begin{macro}{\NCC@part}
% Prepare the non-starred version of part:
% \begin{quote}
-% |\@part|\marg{alignment}\marg{afterskip}\marg{style}\oarg{toc-entry}\marg{heading}
+% |\NCC@part|\marg{alignment}\marg{afterskip}\marg{style}\oarg{toc-entry}\marg{heading}
% \end{quote}
% \begin{macrocode}
- \def\@part#1#2#3[#4]#5{%
+ \def\NCC@part#1#2#3[#4]#5{%
\def\NCC@make{\NCC@makepart{#1}{#3}{#5}{#2}}%
\NCC@makesection{part}{\z@}{#4}{%
\addcontentsline{toc}{part}{%
- \ifnum \c@secnumdepth>\m@ne \protect\numberline{\thepart}\fi
+ \ifnum \c@secnumdepth>\m@ne \numberline{\thepart}\fi
#4%
}%
}%
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
@@ -1085,18 +1606,36 @@
% \begin{macrocode}
\def\NCC@makepart#1#2#3#4#5{%
\begingroup \normalfont
- \ifx\@svsec\@empty \else #1{\@svsec\@@par}\nobreak \fi
- \interlinepenalty \@M #1{#2{#3}\@@par}%
+ \NCC@asecnumset
+ \NCC@makeparttitle{#1}{#2}{#3}%
\endgroup
#5%
\par\nobreak \vskip #4\relax \@afterheading \ignorespaces
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\partmark}
-% Define the |\partmark| if it is undefined before.
+%
+% \begin{macro}{\NCC@makeparttitle}
+% This command makes a part title itself. The |\NCC@secmain| hook contains
+% the dynamic alignment style or nothing.
+% \begin{quote}
+% |\NCC@makeparttitle|\marg{alignment}\marg{style}\marg{heading}
+% \end{quote}
+% \begin{macrocode}
+ \def\NCC@makeparttitle#1#2#3{%
+ \ifx\@svsec\@empty \else
+ \NCC@secmain#1{\let\NCC@asecnum\@empty\@svsec\@@par}\nobreak
+ \fi
+ \interlinepenalty \@M \NCC@secmain#1{#2{#3\@@par}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@partsection}
+% Define the |\NCC@partsection| to be equal to the |\NCC@mainsection| command
+% which will be specified later when a main section will be declared.
% \begin{macrocode}
- \providecommand*\partmark[1]{\markboth{}{}}
+ \def\NCC@partsection{\NCC@mainsection}
}{
% \end{macrocode}
% \end{macro}
@@ -1105,69 +1644,67 @@
% \begin{macrocode}
\def\NCC@startmainsec#1#2#3#4#5{%
\NCC@startchap
- \def\NCC@makesectag##1{\leavevmode#2\@chapapp\nobreakspace##1}%
- \secdef{\@chapter{#1}{#3}{#4}{#5}}{\@schapter{#1}{#3}{#4}{#5}}%
+ \NCC@preparesectag{\leavevmode#2}{\@chapapp\nobreakspace}%
+ \secdef{\NCC@chapter{#1}{#3}{#4}{#5}}{\NCC@schapter{#1}{#3}{#4}{#5}}%
}
% \end{macrocode}
%
-% \begin{macro}{\beforechapter}
-% The |\beforechapter|\marg{something} hook is applied to the nearest
-% chapter. An empty value of its parameter means no hook.
+% \begin{macro}{\NCC@startchap}
+% The start chapter hook:
% \begin{macrocode}
- \newcommand\beforechapter[1]{\gdef\NCC@beforechapter{#1}}
- \beforechapter{}
+ \def\NCC@startchap{%
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}\global\@topnum\z@
+ }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@schapter}
+% \begin{macro}{\NCC@schapter}
% Prepare the starred version of chapter:
% \begin{quote}
-% |\@schapter|\marg{alignment}\marg{beforeskip}\marg{afterskip}\marg{style}\marg{heading}
+% |\NCC@schapter|\marg{alignment}\marg{beforeskip}\marg{afterskip}\marg{style}\marg{heading}
% \end{quote}
% \begin{macrocode}
- \def\@schapter#1#2#3#4#5{%
+ \def\NCC@schapter#1#2#3#4#5{%
\let\@svsec\@empty
\NCC@makechapter{#1}{#2}{#4}{#5}{#3}{}%
\NCC@sec@reset@controls
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@chapter}
+% \begin{macro}{\NCC@chapter}
% Prepare the non-starred version of chapter:
% \begin{quote}
-% |\@chapter|\marg{alignment}\marg{beforeskip}\marg{afterskip}\marg{style}\\
-% | |\oarg{toc-entry}\marg{heading}
+% |\NCC@chapter|\marg{alignment}\marg{beforeskip}\marg{afterskip}\marg{style}\\
+% | |\oarg{toc-entry}\marg{heading}
% \end{quote}
% It uses the |\NCC@infloats|\marg{action} hook that applies the specified
% action for all registered float types.
% \begin{macrocode}
- \def\@chapter#1#2#3#4[#5]#6{%
+ \def\NCC@chapter#1#2#3#4[#5]#6{%
\@ifundefined{if@mainmatter}{}{\if@mainmatter\else\noheadingtag\fi}%
\def\NCC@make{\NCC@makechapter{#1}{#2}{#4}{#6}{#3}}%
\NCC@makesection{chapter}{\z@}{#5}{%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}{%
\ifnum \c@secnumdepth>\m@ne
- \protect\numberline{\NCC@thetocchapter}\fi
+ \numberline{\NCC@thetocchapter}\fi
#5%
}%
\NCC@infloats{\addtocontents{\@nameuse{ext@\@captype}}%
{\protect\runinsectionskip}}%
}%
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\NCC@startchap}
-% The start chapter hook:
+% \begin{macro}{\beforechapter}
+% The |\beforechapter|\marg{something} hook is applied to the nearest
+% chapter. An empty value of its parameter means no hook.
% \begin{macrocode}
- \def\NCC@startchap{%
- \if@openright\cleardoublepage\else\clearpage\fi
- \thispagestyle{plain}\global\@topnum\z@
- }
+ \newcommand\beforechapter[1]{\gdef\NCC@beforechapter{#1}}
+ \beforechapter{}
% \end{macrocode}
% \end{macro}
%
@@ -1193,13 +1730,36 @@
\else
\NCC@makechaphead{#1}{#2}{#3}{#4}{#5}%
\fi
- #6%
+ \NCC@makechapfinal{#6}%
\@afterheading
\ignorespaces
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\NCC@makechapfinal}
+% \begin{macro}{\NCC@makechapfinalgobble}
+% The |\NCC@makechapfinal| hook applies a final action which can contain the
+% |\chaptermark| command. Its default value is to put the parameter as is.
+% If you let this command to be equal to the |\NCC@makechapfinalgobble|, the
+% chapter mark will contain no chapter name.
+% \begin{macrocode}
+ \let\NCC@makechapfinal\@firstofone
+ \def\NCC@makechapfinalgobble#1{%
+ \let\NCC@makechapmark\NCC@makemark
+ \def\NCC@makemark{%
+ \let\NCC@temp\@chapapp
+ \let\@chapapp\@gobble
+ \NCC@makechapmark
+ \let\@chapapp\NCC@temp
+ }%
+ #1%
+ }
+ \@onlypreamble\NCC@makechapfinalgobble
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\NCC@makechaphead}
% This command makes a chapter head:
% \begin{quote}
@@ -1209,7 +1769,7 @@
% \begin{macrocode}
\def\NCC@makechaphead#1#2#3#4#5{%
\ifx\NCC@beforechapter\@empty
- \StartFromTextArea \vspace{#2}%
+ \StartFromTextArea \vskip #2%
\else
\begingroup
\@twocolumnfalse
@@ -1220,14 +1780,31 @@
\beforechapter{}%
\fi
\begingroup \normalfont
- \ifx\@svsec\@empty \else #1{\@svsec\@@par}\fi
- \interlinepenalty \@M #1{#3{#4}\@@par}%
+ \NCC@asecnumset
+ \NCC@makechaptitle{#1}{#3}{#4}%
\endgroup
\par\nobreak \vskip #5\relax
}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\NCC@makechaptitle}
+% This command makes a chapter title itself:
+% \begin{quote}
+% |\NCC@makechaptitle|\marg{alignment}\marg{style}\marg{heading}
+% \end{quote}
+% The |\NCC@secmain| hook contains the dynamic alignment style
+% or nothing.
+% \begin{macrocode}
+ \def\NCC@makechaptitle#1#2#3{%
+ \ifx\@svsec\@empty \else
+ \NCC@secmain#1{\let\NCC@asecnum\@empty\@svsec\@@par}%
+ \fi
+ \interlinepenalty \@M \NCC@secmain#1{#2{#3\@@par}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\epigraph}
% \begin{macro}{\epigraphparameters}
% \begin{quote}
@@ -1268,23 +1845,144 @@
\leavevmode\box\@tempboxa
\@end@tempboxa
}
-}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \subsection{Make Part in Book-like Classes}
+%
+% \begin{macro}{\NCC@startpart}
+% The start-part hook:
+% \begin{macrocode}
+ \def\NCC@startpart{%
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \thispagestyle{plain}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@spart}
+% Prepare the starred version of part:
+% \begin{quote}
+% |\NCC@spart|\marg{before}\marg{after}\marg{style}\marg{heading}
+% \end{quote}
+% \begin{macrocode}
+ \def\NCC@spart#1#2#3#4{%
+ \let\@svsec\@empty
+ \NCC@makepart{#1}{#3}{#4}{#2}{}%
+ \NCC@sec@reset@controls
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@part}
+% Prepare the non-starred version of part:
+% \begin{quote}
+% |\NCC@part|\marg{before}\marg{after}\marg{style}\oarg{toc-entry}\marg{heading}
+% \end{quote}
+% \begin{macrocode}
+ \def\NCC@part#1#2#3[#4]#5{%
+ \def\NCC@make{\NCC@makepart{#1}{#3}{#5}{#2}}%
+ \NCC@makesection{part}{\m@ne}{#4}{%
+ \addcontentsline{toc}{part}{%
+ \ifnum \c@secnumdepth>-2
+ \numberline{\NCC@thetocpart}\fi
+ #4%
+ }%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@thetocpart}
+% The following hook allows redefine the appearance of part name
+% in the TOC:
+% \begin{macrocode}
+ \def\NCC@thetocpart{\thepart}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@makepart}
+% This command makes a part:
+% \begin{quote}
+% |\NCC@makepart|\marg{before}\marg{style}\marg{heading}\marg{after}\marg{action}
+% \end{quote}
+% The |\@svsec| is either |\@empty| or contains a part tag.
+% \begin{macrocode}
+ \def\NCC@makepart#1#2#3#4#5{%
+ \if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi
+ \begingroup\normalfont
+ \NCC@asecnum@
+ \NCC@makeparttitle{#1}{#2}{#3}%
+ \endgroup
+ \NCC@makepartfinal{#5}#4%
+ \if@tempswa \twocolumn \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@makepartfinal}
+% \begin{macro}{\NCC@makepartfinalgobble}
+% The |\NCC@makepartfinal| hook applies a final action which can contain the
+% |\partmark| command. Its default value is to put the parameter as is.
+% If you let this command to be equal to the |\NCC@makepartfinalgobble|, the
+% chapter mark will contain no chapter name.
+% \begin{macrocode}
+ \let\NCC@makepartfinal\@firstofone
+ \def\NCC@makepartfinalgobble#1{%
+ \let\NCC@makepartmark\NCC@makemark
+ \def\NCC@makemark{%
+ \let\NCC@temp\partname
+ \let\partname\@gobble
+ \NCC@makepartmark
+ \let\partname\NCC@temp
+ }%
+ #1%
+ }
+ \@onlypreamble\NCC@makepartfinalgobble
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\NCC@makeparttitle}
+% This command makes a part title itself:
+% \begin{quote}
+% |\NCC@makeparttitle|\marg{before}\marg{style}\marg{heading}
+% \end{quote}
+% \begin{macrocode}
+ \def\NCC@makeparttitle#1#2#3{#1%
+ \ifx\@svsec\@empty \else
+ {\let\NCC@asecnum\@empty\@svsec\@@par}\nobreak \fi
+ \interlinepenalty \@M #2{#3\@@par}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Make Captions}
%
% \begin{macro}{\CaptionTagSuffix}
-% The |\CaptionTagSuffix|\marg{suffix} sets a suffix after a caption tag:
+% |\CaptionTagSuffix|\marg{suffix} sets a default suffix after caption tag:
% \begin{macrocode}
\newcommand*{\CaptionTagSuffix}[1]{\def\NCC@acapnum{#1}}
\@onlypreamble\CaptionTagSuffix
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\captiontagsuffix}
+% |\captiontagsuffix|\oarg{type}\marg{suffix} changes a suffix after caption
+% tag.
+% \begin{macrocode}
+\newcommand*\captiontagsuffix[2][]{%
+ \NCC@prepare@capkey{suffix}{#1}{\def\NCC@acapnum{#2}}%
+}
+\let\NCC@capsuffix@\@empty
+% \end{macrocode}
+% \end{macro}
+
+%
% \begin{macro}{\captionstyle}
-% The |\captionstyle|\oarg{type}\marg{style} selects a style to be applied
+% |\captionstyle|\oarg{type}\marg{style} selects a style to be applied
% to the caption text. Three styles are available now: |default|, |center|,
% and |centerlast|.
% \begin{macrocode}
@@ -1295,7 +1993,7 @@
% \end{macro}
%
% \begin{macro}{\captiontagstyle}
-% The |\captiontagstyle|\oarg{type}\marg{style} selects a style of caption tag:
+% |\captiontagstyle|\oarg{type}\marg{style} selects a style of caption tag:
% |right| or |para|.
% \begin{macrocode}
\newcommand*\captiontagstyle[1][]{%
@@ -1305,11 +2003,11 @@
% \end{macro}
%
% \begin{macro}{\captionwidth}
-% The |\captionwidth|\oarg{type}\marg{length} specifies a caption width.
-% Default width is |\linewidth|.
+% The |\captionwidth|\oarg{type}\marg{length} specifies a caption width
+% in |\@tempdima|. Default width is |\linewidth|.
% \begin{macrocode}
\newcommand*\captionwidth[2][]{%
- \NCC@prepare@capkey{width}{#1}{\setlength{\hsize}{#2}}%
+ \NCC@prepare@capkey{width}{#1}{\setlength{\@tempdima}{#2}}%
}
% \end{macrocode}
% \end{macro}
@@ -1377,7 +2075,6 @@
\let\@svsec\@empty
\NCC@makecaption{#3}{#1}{#4}{#2}{}%
\NCC@sec@reset@controls
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
@@ -1395,12 +2092,11 @@
\let\centering\@empty
\addcontentsline{\@nameuse{ext@\@captype}}{\@captype}{%
\ifnum \c@secnumdepth>\m@ne
- \protect\numberline{\@nameuse{the\@captype}}\fi
+ \numberline{\@nameuse{the\@captype}}\fi
#4%
}%
\endgroup
}%
- \NCC@defaultsectag
}
% \end{macrocode}
% \end{macro}
@@ -1427,8 +2123,9 @@
% Put caption in a parbox aligned at the top line.
% \begin{macrocode}
\ifnum\@tempcnta=\z@ \else
- \vtop{\NCC@apply@cap{width}\@parboxrestore
- \NCC@apply@cap{tag}{#3}\@@par}\par
+ \NCC@apply@cap{suffix}%
+ \NCC@apply@cap{width}%
+ \NCC@vtopcap{\@parboxrestore\NCC@apply@cap{tag}{#3}\@@par}\par
% \end{macrocode}
% We avoid insert zero skip after parbox to allow captions of
% side-by-side figures to be aligned at their top line.
@@ -1442,6 +2139,48 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\NCC@vtopcap}
+% |\NCC@vtopcap|\marg{text} places a text in a vertical
+% top-aligned box. Its width is prepared in |\@tempdima|
+% before this macro. If its width is greater than the
+% |\linewidth|, we allow overlap the box out of line.
+% The overlapping directions are calculated from stretches of
+% paragraph marginal skips.
+% \begin{macrocode}
+\def\NCC@vtopcap#1{%
+ \ifdim\@tempdima>\linewidth
+ \@tempskipa \leftskip \advance\@tempskipa -1\@tempskipa
+ \@tempskipb \rightskip \advance\@tempskipb \parfillskip
+ \advance\@tempskipb -1\@tempskipb
+ \vtop{\hb@xt@\linewidth{%
+ \NCC@ifzeroskip\@tempskipa{}{\hss}%
+ \vtop{\hsize\@tempdima#1}%
+ \NCC@ifzeroskip\@tempskipb{}{\hss}%
+ }}%
+ \else
+ \vtop{\hsize\@tempdima#1}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@ifzeroskip}
+% |\NCC@ifzeroskip|\marg{register}\marg{true-clause}\marg{false-clause}
+% executes the \meta{true-clause} if the value of skip register
+% is exactly zero skip without stretchability. Otherwise, the
+% \meta{false-clause} is executed.
+% \begin{macrocode}
+\def\NCC@ifzeroskip#1{%
+ \edef\@tempa{\the#1}\edef\@tempb{\the\z@skip}%
+ \ifx\@tempa\@tempb
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\NCC@makecaptag@para}
% The |\NCC@makecaptag@para|\marg{text} prepares run-in tag.
% \begin{macrocode}
@@ -1534,8 +2273,7 @@
% last line centered.
% \begin{macrocode}
\long\def\NCC@makecapstyle@centerlast#1{%
- \leftskip\z@\@plus 1fil%
- \rightskip\z@\@plus -1fil%
+ \leftskip\@flushglue \rightskip -\@flushglue
\parfillskip\z@\@plus 2fil\relax#1%
}
% \end{macrocode}
@@ -1603,13 +2341,21 @@
\def\NCC@dsect#1#2[#3]#4#5#6#7{%
\ifnum#1>\z@
\expandafter\def\csname NCC@section\romannumeral#1\endcsname{%
- \def\NCC@makesectag####1{#4####1\NCC@asecnum}%
+ \NCC@setsectionsuffix{#1}%
+ \NCC@preparesectag{#4}{}%
\let\NCC@makesec\NCC@makesect
- \@startsection{#2}{#1}{#3}{#5}{#6}{#7}}%
+ \NCC@startsection{#2}{#1}{#3}{#5}{#6}{#7}}%
\else
\ifnum#1=\z@
\def\NCC@mainsection{%
- \NCC@startmainsec{\@hangfrom{\hskip #3}\rightskip\@flushglue}%
+ \NCC@setsectionsuffix\z@
+ \let\NCC@secmain\@empty
+% \end{macrocode}
+% The empty |\NCC@secmain| means standard alignment of main section
+% \begin{macrocode}
+ \NCC@startmainsec{%
+ \NCC@hangfrom{\hskip #3}\NCC@adjsecmargins{}\@flushglue
+ \ignorespaces}%
{#4}{#5}{#6}{#7}%
}%
\else
@@ -1627,19 +2373,30 @@
% \begin{quote}
% |\NCC@dsecx|\marg{level}\marg{type}\marg{prefix}\marg{beforeskip}\marg{afterskip}\marg{style}
% \end{quote}
-% It can be also used for generation of captions.
+% It can also be used for generation of captions.
% \begin{macrocode}
\def\NCC@dsecx#1#2#3#4#5#6{%
\ifnum#1>\z@
\expandafter\def\csname NCC@section\romannumeral#1\endcsname{%
- \def\NCC@makesectag####1{#3####1\NCC@asecnum}%
+ \NCC@setsectionsuffix{#1}%
+ \NCC@setsectionstyle{#1}%
+ \NCC@preparesectag{#3}{}%
\let\NCC@makesec\NCC@makesecx
- \@startsection{#2}{#1}{\z@}{#4}{#5}{#6}}%
+ \NCC@startsection{#2}{#1}{\z@}{#4}{#5}{#6}}%
\else
\ifnum#1=\z@
+% \end{macrocode}
+% The non-empty |\NCC@secmain| hook means the dynamic alignment.
+% We also redefine the dynamic section style |\NCC@sec| in such a way that the
+% right skip stretchability will be |1fil| if the section style has
+% no flush glue.
+% \begin{macrocode}
\def\NCC@mainsection{%
- \NCC@startmainsec{\NCC@sec{}\rightskip\@flushglue}%
- {#3}{#4}{#5}{#6}%
+ \NCC@setsectionsuffix\z@
+ \NCC@setsectionstyle\z@
+ \let\NCC@secsave\NCC@sec \let\NCC@sec\NCC@secflush
+ \def\NCC@secmain{\protect\NCC@sec{}}%
+ \NCC@startmainsec{}{#3}{#4}{#5}{#6}%
}%
\else
\NCC@dsecf{#2}{#3}{#4}{#5}{#6}%
@@ -1650,6 +2407,27 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\NCC@secflush}
+% |\NCC@secflush|\marg{tag} applies a section style saved in the
+% |\NCC@secsave| macro and adjusts |\rightskip| and |\parfillskip|
+% if left and right margins have no stretchability in sum.
+% To adjust the right skip, we do the same tricks as in
+% |\NCC@adjsecmargins|.
+% \begin{macrocode}
+\def\NCC@secflush#1{\NCC@secsave{#1}%
+ \@tempskipa\leftskip \advance\@tempskipa\rightskip
+ \advance\@tempskipa -1\@tempskipa
+ \NCC@ifzeroskip\@tempskipa{%
+ \@tempskipa 1\rightskip \advance\@tempskipa -\rightskip
+ \advance\@tempskipa \@flushglue
+ \advance\rightskip \@tempskipa
+ \advance\parfillskip -\@tempskipa
+ }{}%
+ \ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\NCC@dsecf}
% This command declares captions of floats:
% \begin{quote}
@@ -1667,6 +2445,28 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\DeclarePart}
+% In book-like classes, a part is declared in a special way:
+% \begin{quote}
+% |\DeclarePart|\marg{before}\marg{after}\marg{prefix}\marg{style}
+% \end{quote}
+% Long parameters are allowed in this declaration.
+% \begin{macrocode}
+\@ifundefined{chapter}{}{%
+ \newcommand\DeclarePart[4]{%
+ \def\NCC@partsection{%
+ \NCC@startpart
+ \NCC@preparesectag{\leavevmode#3}{\partname\nobreakspace}%
+ \secdef{\NCC@part{#1}{#2}{#4}}{\NCC@spart{#1}{#2}{#4}}%
+ }%
+ }
+ \@onlypreamble\DeclarePart
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Caption Patches}
+%
% \begin{macro}{\@makecaption}
% We emulate here the |\@makecaption{\fnum@|\meta{type}|}|\marg{caption}
% command to provide the compatibility with packages using it.
@@ -1686,29 +2486,50 @@
% \end{macrocode}
% \end{macro}
%
-% Add patches to the |supertabular| and |longtable| packages if they are used:
+% Add patch to the \textbf{supertabular} package:
% \begin{macrocode}
-\AtBeginDocument{%
- \@ifpackageloaded{supertabular}{%
- \long\def\ST@caption#1[#2]#3{\par%
- \addcontentsline{\csname ext@#1\endcsname}{#1}%
- {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+\AfterPackage{supertabular}{%
+ \long\def\ST@caption#1[#2]#3{\par%
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup\centering
\def\@captype{#1}%
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
- }%
- }{}%
- \@ifpackageloaded{longtable}{%
- \def\LT@makecaption#1#2#3{%
- \LT@mcol\LT@cols c{\hbox to\z@{\hss
- \parbox[t]\LTcapwidth{\def\@captype{table}%
- \ifx#1\@gobble \NCC@cap@table*{#3}%
- \else \@makecaption{\fnum@table}{#3}%
- \fi
- }%
- \hss
- }}%
- }%
- }{}%
+ \endgroup
+ }
+}
+% \end{macrocode}
+%
+% Add patch to the \textbf{xtab} package:
+% \begin{macrocode}
+\AfterPackage{xtab}{%
+ \long\def\ST@caption#1[#2]#3{\par%
+ \@initisotab
+ \addcontentsline{\csname ext@#1\endcsname}{#1}%
+ {\numberline{\csname the#1\endcsname}{\ignorespaces #2}}%
+ \begingroup\centering
+ \def\@captype{#1}%
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+ \endgroup
+ \global\advance\ST@pageleft -\PWSTcapht
+ \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}%
+ }
+}
+% \end{macrocode}
+%
+% Add patch to the \textbf{longtable} package:
+% \begin{macrocode}
+\AfterPackage{longtable}{%
+ \def\LT@makecaption#1#2#3{%
+ \LT@mcol\LT@cols c{\hbox to\z@{\hss
+ \parbox[t]\LTcapwidth{\centering\def\@captype{table}%
+ \ifx#1\@gobble \NCC@cap@table*{#3}%
+ \else \@makecaption{\fnum@table}{#3}%
+ \fi
+ }%
+ \hss
+ }}%
+ }
}
% \end{macrocode}
%
@@ -1723,8 +2544,7 @@
% \begin{macrocode}
\newcommand*{\DeclareTOCEntry}[5]{%
\@ifnextchar[{\NCC@dtoc{#1}{#2}{#3}{#4}{#5}}%
- {\NCC@dtoc{#1}{#2}{#3}{#4}{#5}%
- [{#3#4\let\NCC@do\@firstoftwo\NCC@atocnum}]}%
+ {\NCC@dtoc{#1}{#2}{#3}{#4}{#5}[\NCC@nexttocnum{#3}{#4}]}%
}
\def\NCC@dtoc#1#2#3#4#5[#6]{%
% \end{macrocode}
@@ -1749,7 +2569,7 @@
\if@tempswa
\@tempcnta#1\relax
\@tempcnta -\@tempcnta
- \PackageError{nccsect}
+ \PackageError{nccsect}%
{Float type registration number \the\@tempcnta\space
is out of range}{}%
\fi
@@ -1774,15 +2594,65 @@
\@tempa{\NCC@tocentry{#1}{#2}{#3}{#4}{#5}}%
% \end{macrocode}
% Prepare in the |\l@tocskip@|\meta{next-level-in-roman} command
-% the left margin adjustment command:
+% the left margin adjustment command. The
+% |\NCC@tocnumprototype|\marg{style}\marg{prototype} hook
+% applies a style to the prototype of toc-entry number.
% \begin{macrocode}
\@tempcnta #1\relax \advance\@tempcnta\@ne
\expandafter\def\csname l@tocskip@\romannumeral\@tempcnta
- \endcsname{\NCC@tocadj{#5{#6}}}%
+ \endcsname{\NCC@tocadj{\NCC@tocnumprototype{#5}{#6}}}%
\fi
}
\@onlypreamble\DeclareTOCEntry
\@onlypreamble\NCC@dtoc
+\def\NCC@nexttocnum#1#2{#1#2\NCC@atocnum}
+\def\NCC@tocnumprototype#1#2{\let\applystyle\@firstoftwo#1{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@tocadj}
+% The command increases |\@tempdimb| on the width of the argument:
+% \begin{macrocode}
+\def\NCC@tocadj#1{%
+ \settowidth\@tempdima{\let\NCC@atocdo\@firstoftwo#1}%
+ \advance\@tempdimb\@tempdima
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareTOCPart}
+% Part toc-entry declaration in book-like classes. If optional
+% \meta{afterskip} is omitted, the default |\NCC@runskip| value
+% is applied after this entry.
+% \begin{quote}
+% |\DeclareTOCPart|\marg{action}\oarg{afterskip}\marg{prefix}\marg{prototype}\marg{style}
+% \end{quote}
+% \begin{macrocode}
+\@ifundefined{chapter}{}{%
+ \newcommand*\DeclareTOCPart[1]{%
+ \@ifnextchar[{\NCC@dtocpart{#1}}{\NCC@dtocpart{#1}[\NCC@runskip]}%
+ }
+ \def\NCC@dtocpart#1[#2]#3#4#5{%
+ \def\l@part##1##2{%
+ \NCC@tocentry{-1}{%
+% \end{macrocode}
+% We temporary add |1fil| to the toc right margin to prepare
+% a ragged right toc-entry.
+% \begin{macrocode}
+ \TOCMarginDrift{1fil}%
+% \end{macrocode}
+% Breaks before part are preferred.
+% \begin{macrocode}
+ \addpenalty{-\@highpenalty}#1%
+ }{#3}{#4}{#5}{##1}{\hss##2}%
+ \nobreak \vskip #2\relax
+ \@nobreaktrue
+ \everypar{\@nobreakfalse\everypar{}}%
+ }%
+ }
+ \@onlypreamble\DeclareTOCPart
+ \@onlypreamble\NCC@dtocpart
+}
% \end{macrocode}
% \end{macro}
%
@@ -1807,19 +2677,21 @@
{\@nameuse{l@tocskip@\romannumeral \@tempcnta}%
\advance\@tempcnta\m@ne}%
% \end{macrocode}
-% Prepare the |\NCC@maketocnum|\marg{tag} command creating
+% The |\NCC@preparetocnum|\marg{style}\marg{prefix} hook prepares
+% the |\NCC@maketocnum|\marg{tag} command creating
% a number-line tag:
% \begin{macrocode}
- \def\NCC@maketocnum##1{\NCC@do{#5}{}{#3##1\NCC@atocnum}}%
+ \NCC@preparetocnum{#5}{#3}%
% \end{macrocode}
% Calculate the hang indent value in |\@tempdima|:
% \begin{macrocode}
- \settowidth\@tempdima{\let\NCC@do\@firstoftwo\NCC@maketocnum{#4}}%
+ \settowidth\@tempdima{\let\NCC@atocdo\@firstoftwo\NCC@maketocnum{#4}}%
% \end{macrocode}
-% Produce the toc-entry:
+% Produce the toc-entry. The |\NCC@tocentrytitle|\marg{style}\marg{title}
+% hook applies the style to the toc-entry title.
% \begin{macrocode}
\@dottedtocline{#1}{\@tempdimb}{\@tempdima}%
- {\let\NCC@do\@secondoftwo#5{\ignorespaces#6\unskip}}%
+ {\let\NCC@atocdo\@secondoftwo\NCC@tocentrytitle{#5}{#6\unskip}}%
{\let\applystyle\@secondoftwo#5{#7}}%
% \end{macrocode}
% Allow break after toc-entry:
@@ -1828,13 +2700,10 @@
\endgroup
\fi
}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\NCC@tocadj}
-% The command increases |\@tempdimb| on the width of the argument:
-% \begin{macrocode}
-\def\NCC@tocadj#1{\settowidth\@tempdima{#1}\advance\@tempdimb\@tempdima}
+\def\NCC@preparetocnum#1#2{%
+ \def\NCC@maketocnum##1{\NCC@atocdo{#1}{}{#2##1\NCC@atocnum}}%
+}
+\def\NCC@tocentrytitle#1#2{#1{\ignorespaces#2}}
% \end{macrocode}
% \end{macro}
%
@@ -1843,7 +2712,7 @@
% if the width of tag is greater than |\@tempdima|. The
% tag is prepared with the |\NCC@maketocnum|\marg{tag} command.
% \begin{macrocode}
-\def\numberline#1{%
+\DeclareRobustCommand*\numberline[1]{%
\setbox\@tempboxa\hbox{\NCC@maketocnum{#1}}%
\ifdim \wd\@tempboxa > \@tempdima
\box\@tempboxa
@@ -1860,7 +2729,8 @@
% We must define it because the |\numberline| command must
% work out of scope of toc-entries.
% \begin{macrocode}
-\def\NCC@maketocnum#1{#1\let\NCC@do\@secondoftwo\NCC@atocnum}
+\def\NCC@maketocnum#1{#1\NCC@atocnum}
+\let\NCC@atocdo\@secondoftwo
% \end{macrocode}
% \end{macro}
%
@@ -1868,17 +2738,17 @@
% The |\NumberlineSuffix|\marg{calc-suffix}\marg{actual-suffix}
% command saves suffices inserted after number tag in the |\numberline|
% command. It saves it in the |\NCC@atocnum| hook as parameters of
-% |\NCC@do| command. Letting the last one to |\@firstoftwo| or
+% |\NCC@atocdo| command. Letting the last one to |\@firstoftwo| or
% |\@secondoftwo|, we select the \meta{calc-suffix} or \meta{actual-suffix}
% respectively.
% \begin{macrocode}
-\newcommand*{\NumberlineSuffix}[2]{\def\NCC@atocnum{\NCC@do{#1}{#2}}}
+\newcommand*{\NumberlineSuffix}[2]{\def\NCC@atocnum{\NCC@atocdo{#1}{#2}}}
\@onlypreamble\NumberlineSuffix
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\TOCMarginDrift}
-% The |\TOCMarginDrift|\marg{drift} specifies a drift of right margin
+% The |\TOCMarginDrift|\marg{drift} specifies allowed drift of right margin
% in TOC.
% \begin{macrocode}
\newcommand*\TOCMarginDrift[1]{%
@@ -1886,7 +2756,6 @@
\ifx\@tempa\@empty \let\NCC@tocdrift\@empty
\else \def\NCC@tocdrift{\@plus #1\relax}\fi
}
-\TOCMarginDrift{}
% \end{macrocode}
% \end{macro}
%
@@ -1897,16 +2766,6 @@
% \begin{macrocode}
\newcommand*{\PnumPrototype}[1]{\def\NCC@pnum{#1}\NCC@setpnum}
\@onlypreamble\PnumPrototype
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\NCC@setpnum}
-% The |\NCC@setpnum| command calculates the page number widths in
-% |\@pnumwidth| and the toc right margin in |\@tocrmarg|.
-% If the toc-style is customizable, we recommend to apply this
-% command right after toc-styling commands to update margins
-% for the new toc-style.
-% \begin{macrocode}
\def\NCC@setpnum{%
\settowidth\@tempdima{\NCC@pnum}%
\edef\@pnumwidth{\the\@tempdima}%
@@ -1916,29 +2775,46 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Service and Defaults}
-%
-% \begin{macro}{\StartFromTextArea}
-% The command is applied at the beginning of page
-% to set current position exactly at the first line
-% of text area.
+% \begin{macro}{\SetTOCStyle}
+% The toc-style hook is embedded into the |\@starttoc| command.
+% We also recalculate the page number prototype and update
+% margins when a toc starts.
% \begin{macrocode}
-\newcommand\StartFromTextArea{\par
- {\parskip\z@ \strut\par}\vskip -\baselineskip
+\newcommand*{\SetTOCStyle}[1]{\def\NCC@tocstyle{#1}}
+\@onlypreamble\SetTOCStyle
+\let\NCC@latexstarttoc\@starttoc
+\def\@starttoc#1{%
+ \begingroup
+ \normalfont \NCC@tocstyle \NCC@setpnum
+ \NCC@latexstarttoc{#1}%
+ \endgroup
}
% \end{macrocode}
% \end{macro}
%
+% \subsection{Service and Defaults}
+%
+% \begin{macro}{\StartFromTextArea}
% \begin{macro}{\StartFromHeaderArea}
-% The command is applied at the beginning of page
-% to set current position exactly at the header line.
-% \begin{macrocode}
-\newcommand\StartFromHeaderArea{%
- \StartFromTextArea
- \vskip -\headsep \vskip -\ht\strutbox
+% These commands are applied at the beginning of page
+% to set current position exactly at the first line
+% of text area or at the header line, respectively.
+% Both these commands are defined in two packages: in this one and in
+% the \textbf{textarea}. To be sure that the commands are specified
+% in these packages only, we mutually test packages to be loaded.
+% \begin{macrocode}
+\@ifpackageloaded{textarea}{}{%
+ \newcommand\StartFromTextArea{\par
+ {\parskip\z@ \strut\par}\vskip -\baselineskip
+ }
+ \newcommand\StartFromHeaderArea{%
+ \StartFromTextArea
+ \vskip -\headsep \vskip -\ht\strutbox
+ }
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\bff}
% The |\bff| command tries to set everything bold.
@@ -1947,8 +2823,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\aftersectionvspace}
+% This command eliminates a vertical space inserted after a previous
+% section and inserts a vertical space specified.
+% \begin{macrocode}
+\newcommand*\aftersectionvspace[1]{%
+ \ifvmode \if@nobreak
+ \vskip -\lastskip \vskip #1\relax
+ \fi \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\startsection}
-% Define the |\startsection| command:
+% Define the |\startsection| command. In article-class,
+% both zero and negative levels refer to the same part section.
% \begin{macrocode}
\newcommand*{\startsection}[1]{%
\ifnum#1>\z@
@@ -1957,7 +2846,7 @@
\ifnum#1=\z@
\def\@tempa{\NCC@mainsection}%
\else
- \def\@tempa{\part}%
+ \def\@tempa{\NCC@partsection}%
\fi
\fi
\@tempa
@@ -1965,13 +2854,16 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\part}
% \begin{macro}{\section}
% \begin{macro}{\subsection}
% \begin{macro}{\subsubsection}
% \begin{macro}{\paragraph}
% \begin{macro}{\subparagraph}
-% Set aliases for the positive section levels:
+% Set aliases for almost all section levels, except chapter.
+% The part is called here as a section of a negative level.
% \begin{macrocode}
+\def\part{\startsection\m@ne}
\def\section{\startsection\@ne}
\def\subsection{\startsection\tw@}
\def\subsubsection{\startsection\thr@@}
@@ -1983,6 +2875,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\caption}
% Redefine the |\caption| command. We do this at the beginning
@@ -2014,13 +2907,13 @@
% \end{macrocode}
% \end{macro}
%
-% Register standard floats:
+% Registration of standard floats:
% \begin{macrocode}
\RegisterFloatType{figure}
\RegisterFloatType{table}
% \end{macrocode}
%
-% Declare all sections and captions except the main section:
+% Declare all sections and captions except the part and chapter:
% \begin{macrocode}
\DeclareSection{-2}{table}{}{\z@}{10pt}{}
\DeclareSection{-1}{figure}{}{10pt}{\z@}{}
@@ -2040,11 +2933,8 @@
\@ifundefined{chapter}{
% \end{macrocode}
%
-% \begin{macro}{\part}
-% Declare the main section and toc-entries for the
-% article-like style:
+% Declare the part and toc-entries for the article-like style:
% \begin{macrocode}
- \def\part{\startsection\z@}
\DeclareSection*0{part}{\Large\bff}%
{5ex \@plus 1ex \@minus .2ex}%
{4ex \@plus .2ex}{\huge\bff}
@@ -2056,17 +2946,43 @@
\DeclareTOCEntry3{}{}{9.9.9}{}
}{
% \end{macrocode}
+%
+% \begin{macro}{\ChapterPrefixStyle}
+% Specify the appearance of chapter prefix in the toc and the header.
+% \begin{macrocode}
+ \newcommand*{\ChapterPrefixStyle}[1]{%
+ \def\NCC@thetocchapter{\thechapter}%
+ \let\NCC@makechapfinal\NCC@makechapfinalgobble
+ \@for\@tempa:=#1\do{%
+ \@ifundefined{NCC@chapin@\@tempa}{%
+ \PackageError{nccsect}{Unknown style `\@tempa'\MessageBreak
+ Only the `toc' and `header' styles are allowed}{}%
+ }{\csname NCC@chapin@\@tempa\endcsname}%
+ }%
+ }
+ \def\NCC@chapin@toc{\def\NCC@thetocchapter{\@chapapp\ \thechapter}}
+ \def\NCC@chapin@header{\let\NCC@makechapfinal\@firstofone}
+ \@onlypreamble\ChapterPrefixStyle
+ \@onlypreamble\NCC@chapin@toc
+ \@onlypreamble\NCC@chapin@header
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\chapter}
-% Declare the main section, toc-entries for the
+% Declare the part, the chapter, toc-entries for the
% book-like style, and specify default epigraph parameters:
% \begin{macrocode}
\def\chapter{\startsection\z@}
+ \DeclarePart{\StartFromTextArea\vfil\centering}%
+ {\vfil\newpage \if@twoside\if@openright
+ \mbox{}\thispagestyle{empty}\newpage\fi\fi}%
+ {\vspace{4ex}\huge\bff}{\Huge\bff}
\DeclareSection*0{chapter}{\vspace{3ex}\huge\bff}{10ex}%
{8ex \@plus .2ex}{\Huge\bff}
\DeclareTOCEntry{-2}{}{}{9.9}{}% table
\DeclareTOCEntry{-1}{}{}{9.9}{}% figure
+ \DeclareTOCPart{\NCC@secskip{4ex \@plus .2ex}\def\@dotsep{1000}}
+ {}{II}{\large\bff}
\DeclareTOCEntry0{\runinsectionskip\def\@dotsep{1000}%
\aftergroup\penalty\aftergroup\@highpenalty}{}{9}{\bff}
\DeclareTOCEntry1{}{}{9.9}{}[9.9]
@@ -2090,12 +3006,15 @@
\noindentaftersection
\sectionstyle{hangindent}
\SectionTagSuffix{\quad}
+\RunningSectionSuffix{}
\captionwidth{\linewidth}
\captionstyle{default}
\captiontagstyle{para}
\CaptionTagSuffix{:\hskip .7em \@plus .2em \@minus .1em}
\NumberlineSuffix{\quad}{\enskip}
\PnumPrototype{99}
+\TOCMarginDrift{}
+\SetTOCStyle{}
%</package>
% \end{macrocode}
\endinput
diff --git a/Master/texmf-dist/source/latex/ncctools/nccstretch.dtx b/Master/texmf-dist/source/latex/ncctools/nccstretch.dtx
index 8d942ef80e6..f4d53ea7e32 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccstretch.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccstretch.dtx
@@ -9,6 +9,7 @@
% \changes{v1.0}{2004/11/30}{This version was uploaded to CTAN}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccstretch}
\GetFileInfo{nccstretch.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/nccthm.dtx b/Master/texmf-dist/source/latex/ncctools/nccthm.dtx
index 033ec5d7d84..deb6b6ac1b7 100644
--- a/Master/texmf-dist/source/latex/ncctools/nccthm.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/nccthm.dtx
@@ -17,6 +17,7 @@
% \changes{v1.1}{2004/12/16}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{desclist}
\usepackage[blackqed,whiteqed]{nccthm}
@@ -42,10 +43,12 @@
%</driver>
% \fi
%
+% \tableofcontents
+%
% \section{Overview}
%
% This is yet another extension of the \LaTeX\ theorem making
-% environment. Further, we'll call the \textit{theorem\/}
+% environment. Further, we'll call the \textit{theorem}
% any mathematical statement consisting of one or more paragraphs,
% and starting with a header containing an optional number.
% A theorem is set off from the main text with an extra space.
@@ -56,7 +59,7 @@
% |nccthm| package is distinct in the following:
%
% \paragraph{1} All new theorem environments generated with the
-% |nccthm| package use the \textit{dynamic counters\/} (see |dcounter|
+% |nccthm| package use the \textit{dynamic counters} (see |dcounter|
% package from this bungle for more details). As a result, this allows
% a package writer to generate predefined theorems
% and do not think on how they will be numbered, because the
@@ -85,30 +88,30 @@
% \paragraph{2} We have divided all theorem modification features into
% three orthogonal groups.
%
-% A \textit{type\/} defines font shapes used in the theorem.
-% Two types are predefined: \textit{theorem\/} and \textit{remark}.
+% A \textit{type} defines font shapes used in the theorem.
+% Two types are predefined: \textit{theorem} and \textit{remark}.
% You can define more types or redefine existing types.
%
-% A \textit{mode\/} defines the precedence of number in the header.
+% A \textit{mode} defines the precedence of number in the header.
% In standard mode, a number goes after a theorem title.
% The reverse mode (number starts header), named here the
-% \textit{APAR\/} mode, is special. All theorems using this mode
+% \textit{APAR} mode, is special. All theorems using this mode
% are counted with the same |apar| counter. To generate theorems
% in the standard mode, the |\newtheorem| command is used.
-% The |\newtheorem*| command is used for generation \textit{apar\/}
+% The |\newtheorem*| command is used for generation \textit{apar}
% theorems.
%
-% A \textit{style\/} specifies the appearance of theorems.
+% A \textit{style} specifies the appearance of theorems.
% It consists of three modifiers: \textit{breaking},
% \textit{indentation},
% and \textit{marginal numbering}. The breaking modifier determines
% the separation of theorem header from theorem body (run-in header
% or line break after header). The indentation modifier has two
-% values: \textit{noindent\/} and \textit{parindent}. It
+% values: \textit{noindent} and \textit{parindent}. It
% defines an indentation style of a theorem header.
% The marginal numbering modifier affects on apar theorems:
-% in \textit{margin\/} style, the number of an apar theorem
-% is typed on margins; in \textit{nomargin\/}
+% in \textit{margin} style, the number of an apar theorem
+% is typed on margins; in \textit{nomargin}
% style, the number starts a paragraph.
%
% The breaking modifier is controlled with special commands but other
@@ -165,7 +168,6 @@
% as its tag (|\tag*{\qedsymbol}| when use the
% |amsmath| package).
%
-%
% \DescribeMacro{\blackqed}
% \DescribeMacro{\blackqedsymbol}
% If you load the package with the `|blackqed|' option, two
diff --git a/Master/texmf-dist/source/latex/ncctools/ncctools.ins b/Master/texmf-dist/source/latex/ncctools/ncctools.ins
index 065bff23055..63ed2a13b02 100644
--- a/Master/texmf-dist/source/latex/ncctools/ncctools.ins
+++ b/Master/texmf-dist/source/latex/ncctools/ncctools.ins
@@ -1,4 +1,4 @@
-%% Copyright 1998--2004 by Alexander I. Rozhenko.
+%% Copyright 1998--2006 by Alexander I. Rozhenko.
%%
%% This file is part of the `ncctools' bundle.
%%
@@ -39,6 +39,7 @@ see the README file distributed with the ncctools bundle.
%%%%%%%%%%%%%% Generate packages
+\SimplePackage{afterpackage}
\SimplePackage{dcounter}
\SimplePackage{desclist}
\SimplePackage{extdash}
@@ -59,7 +60,9 @@ see the README file distributed with the ncctools bundle.
\SimplePackage{nccsect}
\SimplePackage{nccstretch}
\SimplePackage{nccthm}
+\SimplePackage{textarea}
\SimplePackage{tocenter}
+\SimplePackage{topsection}
\SimplePackage{watermark}
\Msg{***********************************************************}
diff --git a/Master/texmf-dist/source/latex/ncctools/textarea.dtx b/Master/texmf-dist/source/latex/ncctools/textarea.dtx
new file mode 100644
index 00000000000..b19e259ace7
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ncctools/textarea.dtx
@@ -0,0 +1,236 @@
+% \iffalse
+%%
+%% File: textarea.dtx Copyright (C) 2005 by Alexander I. Rozhenko
+%%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{textarea}
+%<package> [2005/12/26 v1.0 Text area control (NCC)]
+%
+% \changes{v1.0}{2005/12/26}{Initial version}
+%
+%<*driver>
+\let\makeindex\relax
+\documentclass{ltxdoc}
+\usepackage{textarea}
+\GetFileInfo{textarea.sty}
+\begin{document}
+\title{The \textsf{textarea} package\thanks{This file
+ has version number \fileversion, last
+ revised \filedate.}}
+\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
+\date{\filedate}
+\maketitle
+\DocInput{textarea.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% The package allows expand the text area of a document on other
+% areas: footer, header, and margin. There are two ways for such
+% expansion --- temporary expansion of a current page on the header using
+% a special negative vertical skip, or global change of page layout
+% parameters with possibility of later restoration them to the original
+% values. All these actions should be applied at the beginning of page.
+%
+% \section{User Interface}
+%
+% \DescribeMacro\StartFromTextArea
+% Applied at the beginning of page, it allows using the non-starred
+% form of the |\vspace| command after it. The introduced command provides
+% exact vertical skips at the beginning of page. Unlike it, the standard
+% \LaTeX's |\vspace*| command skips more space at the beginning of page
+% than it is required in its parameter. So, using the
+% |\StartFromTextArea| command prevents
+% incorrect spacing at the beginning of page.
+%
+% \DescribeMacro\StartFromHeaderArea
+% Applied at the beginning of page, it adjusts the beginning of text area
+% to the header area by inserting a negative vertical skip. The header
+% of this page should be empty. Otherwise, the consequent text will
+% overprint the header.
+%
+% \DescribeMacro{\ExpandTextArea\oarg{hfm}}
+% Expands the text area on other areas of page by changing page layout
+% parameters. It can be used in one-column mode only.
+% The letters in optional argument mean the following: |h| (header),
+% |f| (footer), and |m| (margins). If an optional argument is omitted
+% or equals to |[*]|, the temporary expansion to the header is applied
+% with the |\StartFromHeaderArea| command. Anyway, you can use the
+% non-starred form of the |\vspace| command after expansion of the
+% text area.
+%
+% When a text area is expanded (non-temporary), the repeated call of
+% this command is disallowed.
+%
+% \DescribeMacro\RestoreTextArea
+% Restores page layout parameters to their previous values. After that,
+% the |\ExpandTextArea| command can be applied again.
+%
+% \DescribeMacro\NCC@restoretextarea
+% This hook can be used to provide an automatic restoration of the text
+% area. In \textbf{ncc} class, we use it as follows: set it empty at
+% the beginning of |titlepage| environment and call this command at
+% the end of |titlepage| environment. So, if the text area will be
+% expanded within the |titlepage| environment, it will be automatically
+% restored at the end of it.
+%
+% \StopEventually{}
+%
+% \section{The Implementation}
+%
+% \begin{macro}{\StartFromTextArea}
+% \begin{macro}{\StartFromHeaderArea}
+% Both these commands are defined in two packages: in this and in
+% \textbf{nccsect}. To be sure that the commands are specified
+% in these packages only, we mutually test packages to be loaded.
+% \begin{macrocode}
+%<*package>
+\@ifpackageloaded{nccsect}{}{%
+ \newcommand\StartFromTextArea{\par
+ {\parskip\z@ \strut\par}\vskip -\baselineskip
+ }
+ \newcommand\StartFromHeaderArea{%
+ \StartFromTextArea
+ \vskip -\headsep \vskip -\ht\strutbox
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\RestoreTextArea}
+% This command is usually empty. But it is globally redefined
+% when the layout of page is modified by the |\ExpandTextArea|
+% command.
+% \begin{macrocode}
+\newcommand*\RestoreTextArea{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ExpandTextArea}
+% This command should be applied at the beginning of page
+% in one-column mode only.
+% \begin{macrocode}
+\newcommand*\ExpandTextArea[1][*]{%
+ \if@twocolumn
+ \PackageError{textarea}%
+ {The \string\ExpandTextArea\space command\MessageBreak
+ cannot work in two-column mode}{}%
+% \end{macrocode}
+% Test for temporary expansion mode and do it.
+% \begin{macrocode}
+ \else
+ \def\@tempa{*}\edef\@tempb{#1}%
+ \ifx\@tempa\@tempb
+ \StartFromHeaderArea
+% \end{macrocode}
+% Otherwise, apply the permanent expansion but in the only case if
+% it was not already applied.
+% \begin{macrocode}
+ \else
+ \ifx\RestoreTextArea\@empty
+% \end{macrocode}
+% |\NCC@|\meta{x} hooks will be applied right here to modify the layout and
+% |\NCC@resore@|\meta{x} hooks will applied later when the original layout
+% will be restored.
+% \begin{macrocode}
+ \let\NCC@h\@empty \global\let\NCC@restore@h\@empty
+ \let\NCC@f\@empty \global\let\NCC@restore@f\@empty
+ \let\NCC@m\@empty \global\let\NCC@restore@m\@empty
+% \end{macrocode}
+% Analyze letters in the optional parameter and prepare the respective hooks.
+% The first parameter in all adjustment commands is a sign of adjustment:
+% the empty value means adjust and the minus sign means restore.
+% \begin{macrocode}
+ \expandafter\@tfor\expandafter\@tempa\expandafter:\expandafter=#1\do{%
+ \if h\@tempa
+ \def\NCC@h{\NCC@adjusttoheader{}}%
+ \gdef\NCC@restore@h{\NCC@adjusttoheader-}%
+ \else
+ \if f\@tempa
+ \def\NCC@f{\NCC@adjusttofooter{}}%
+ \gdef\NCC@restore@f{\NCC@adjusttofooter-}%
+ \else
+ \if m\@tempa
+ \if@reversemargin \@tempcnta\@ne \else \@tempcnta\tw@ \fi
+ \edef\NCC@m{\noexpand\NCC@adjusttomargin{}{\the\@tempcnta}}%
+ \xdef\NCC@restore@m{\noexpand\NCC@adjusttomargin-{\the\@tempcnta}}%
+ \fi
+ \fi
+ \fi
+ }%
+% \end{macrocode}
+% Modify the layout, apply the |\StartFromTextArea| command, and prepare
+% the |\RestoreTextArea| command and the auto-restoration hook.
+% \begin{macrocode}
+ \NCC@h\NCC@f\NCC@m
+ \StartFromTextArea
+ \gdef\RestoreTextArea{%
+ \NCC@restore@h\NCC@restore@f\NCC@restore@m
+ \global\let\RestoreTextArea\@empty
+ }%
+ \def\NCC@restoretextarea{\RestoreTextArea}%
+ \fi
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@adjusttoheader}
+% Adjust text height parameters and |\topmargin|.
+% \begin{macrocode}
+\def\NCC@adjusttoheader#1{%
+ \@tempdima #1\headheight
+ \advance\@tempdima #1\headsep
+ \global\advance\textheight\@tempdima
+ \global\advance\topmargin-\@tempdima
+ \global\@colht\textheight
+ \global\@colroom\textheight
+ \global\vsize\textheight
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@adjusttofooter}
+% Adjust text height parameters.
+% \begin{macrocode}
+\def\NCC@adjusttofooter#1{%
+ \global\advance\textheight#1\footskip
+ \global\@colht\textheight
+ \global\@colroom\textheight
+ \global\vsize\textheight
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@adjusttomargin}
+% Adjust text width parameters, |\oddsidemargin| or
+% |\evensidemargin|. The second parameter specifies
+% the mode of marginal notes: reverse (1) or normal (2) margins.
+% \begin{macrocode}
+\def\NCC@adjusttomargin#1#2{%
+ \@tempdima #1\marginparwidth
+ \advance\@tempdima #1\marginparsep
+ \@tempcnta#2%
+ \ifodd\@tempcnta
+ \global\advance\oddsidemargin -\@tempdima
+ \else
+ \global\advance\evensidemargin -\@tempdima
+ \fi
+ \global\advance\textwidth\@tempdima
+ \global\columnwidth\textwidth
+ \global\linewidth\textwidth
+ \global\hsize\textwidth
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NCC@restoretextarea}
+% Text area auto-restoration hook.
+% \begin{macrocode}
+\let\NCC@restoretextarea\@empty
+%</package>
+% \end{macrocode}
+% \end{macro}
+\endinput
diff --git a/Master/texmf-dist/source/latex/ncctools/tocenter.dtx b/Master/texmf-dist/source/latex/ncctools/tocenter.dtx
index 4246b929346..21193964f78 100644
--- a/Master/texmf-dist/source/latex/ncctools/tocenter.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/tocenter.dtx
@@ -10,6 +10,7 @@
% \changes{v1.1}{2004/12/09}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{tocenter}
\GetFileInfo{tocenter.sty}
diff --git a/Master/texmf-dist/source/latex/ncctools/topsection.dtx b/Master/texmf-dist/source/latex/ncctools/topsection.dtx
new file mode 100644
index 00000000000..905b702f94f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/ncctools/topsection.dtx
@@ -0,0 +1,133 @@
+% \iffalse
+%%
+%% File: topsection.dtx Copyright (C) 2005 by Alexander I. Rozhenko
+%%
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{topsection}
+%<package> [2005/12/24 v1.0 Top section definition (NCC)]
+%
+% \changes{v1.0}{2005/12/24}{Initial version}
+%
+%<*driver>
+\let\makeindex\relax
+\documentclass{ltxdoc}
+\usepackage{topsection}
+\GetFileInfo{topsection.sty}
+\begin{document}
+\title{The \textsf{topsection} package\thanks{This file
+ has version number \fileversion, last
+ revised \filedate.}}
+\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
+\date{\filedate}
+\maketitle
+\DocInput{topsection.dtx}
+\end{document}
+%</driver>
+% \fi
+% \DescribeMacro\topsection
+% This package implements an unnumbered top-level section
+% (chapter in books and reports or section in articles):
+% \begin{quote}
+% |\topsection|\marg{title}
+% \end{quote}
+% Such a section is used when table of contents, index, or
+% bibliography are prepared. So, the |\topsection| command can
+% be used to make such definitions or redefinitions to be independent
+% on class in use. The command definition is compatible with standard
+% \textbf{article}, \textbf{book}, and \textbf{report} classes
+% and also with the \textbf{ncc} class.
+%
+% \DescribeMacro\@iftopchapter
+% To distinguish what type of top section is used, the following
+% conditional command is also specified:
+% \begin{quote}
+% |\@iftopchapter|\marg{chapter-clause}\marg{section-clause}
+% \end{quote}
+% The \meta{chapter-clause} is executed if top section is the |\chapter|.
+% Otherwise, the \meta{section-clause} is executed.
+%
+% If the \textbf{nccsect}
+% package is used together with this package, the top-section title
+% is also written to the aux-file. To avoid this,
+% use |\skipwritingtoaux| modifier just before the top section.
+%
+% \StopEventually{}
+%
+% \section{The Implementation}
+%
+% At first, we provide |\@mkboth| command to be sure that
+% it is defined (in \textbf{ncc} class |\@mkboth| useless and
+% so it does not defined here). If it does not exist yet, its
+% default value will be equal to \LaTeX's |\@gobbletwo| command.
+% \begin{macrocode}
+%<*package>
+\providecommand\@mkboth[2]{}
+% \end{macrocode}
+%
+% \begin{macro}{\NCC@topsection}
+% \begin{macro}{\@iftopchapter}
+% The |\NCC@topsection| macro contains a command to be used as a
+% top section. To select an appropriate command, we test the
+% |\chapter| command to be defined. The |\@iftopchapter| macro is
+% also specified here.
+% \begin{macrocode}
+\newcommand\@iftopchapter[2]{}
+\@ifundefined{chapter}{%
+ \def\NCC@topsection{\section}%
+ \let\@iftopchapter\@secondoftwo
+}{%
+ \def\NCC@topsection{\chapter}%
+ \let\@iftopchapter\@firstoftwo
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\topsection}
+% Now we define the |\topsection| command. When the package is loaded,
+% we specify the command to be a new one. Its real definition
+% is done at the beginning of document when all packages are
+% already loaded and an appropriate decision can be selected.
+% \begin{macrocode}
+\newcommand*\topsection[1]{}
+\AtBeginDocument{%
+% \end{macrocode}
+% If the \textbf{nccsect} package is in use, we define the |\topsection|
+% command using the basic form of the corresponding sectioning command.
+% The |\noheadingtag| modifier turns off the top-section numbering.
+% In the definition, we test the |\@mkboth| command to be equal to
+% |\@gobbletwo|. This situation appears in two cases: when the page
+% style other than |headings| is used or when the \textbf{ncc} class
+% is loaded. In the last case, the appropriate page header is already
+% specified in sectioning command with corresponding mark-command
+% (|\chaptermark| or |\sectionmark| updates both headers by the same
+% manner). So, in both these cases we need not use the |\@mkboth|.
+% But in other cases we specify the header mark in standard way
+% and use the |\norunninghead| modifier to skip updating headers
+% inside the sectioning command.
+% \begin{macrocode}
+ \@ifpackageloaded{nccsect}{%
+ \renewcommand*\topsection[1]{%
+ \ifx\@mkboth\@gobbletwo
+ \noheadingtag \NCC@topsection{#1}%
+ \else
+ \norunninghead
+ \noheadingtag \NCC@topsection{#1}%
+ \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
+ \fi
+ }%
+% \end{macrocode}
+% When the \textbf{nccsect} package does not loaded, the top-section
+% definition uses just the same technique as in standard classes.
+% \begin{macrocode}
+ }{%
+ \renewcommand*\topsection[1]{%
+ \NCC@topsection*{#1}%
+ \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%
+ }%
+ }%
+}
+%</package>
+% \end{macrocode}
+% \end{macro}
+\endinput
diff --git a/Master/texmf-dist/source/latex/ncctools/watermark.dtx b/Master/texmf-dist/source/latex/ncctools/watermark.dtx
index b48d728720d..81f9404646b 100644
--- a/Master/texmf-dist/source/latex/ncctools/watermark.dtx
+++ b/Master/texmf-dist/source/latex/ncctools/watermark.dtx
@@ -13,6 +13,7 @@
% \changes{v1.1}{2004/12/09}{Documentation was prepared}
%
%<*driver>
+\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{watermark,nccboxes}
\GetFileInfo{watermark.sty}
diff --git a/Master/texmf-dist/source/latex/poemscol/poemscol.dtx b/Master/texmf-dist/source/latex/poemscol/poemscol.dtx
index 90f00abd417..531b736625e 100644
--- a/Master/texmf-dist/source/latex/poemscol/poemscol.dtx
+++ b/Master/texmf-dist/source/latex/poemscol/poemscol.dtx
@@ -18,7 +18,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{poemscol}
-%<package> [2006/04/25 v2.49 poemscol file]
+%<package> [2006/05/19 v2.51 poemscol file]
%
%<*driver>
\documentclass{ltxdoc}
@@ -32,7 +32,7 @@
%</driver>
% \fi
%
-% \CheckSum{5584}
+% \CheckSum{5976}
%
% \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
@@ -171,6 +171,25 @@
% white space after the title with pmclsidepar). Added marginal
% reference commands for sequences and sequence sections. Fixed
% errors in manual. }
+% \changes{v2.50}{2006/05/13}{Added marginal
+% reference commands for poem sections, poem subtitles, epigraphs,
+% and dedications. These commands no longer require an addition label
+% command to set the label to which they refer. Added commands to
+% make marginal references to the pages in notes sections where
+% comments on individual lines may be found, for textual notes,
+% explanatory notes, emendations, and user-defined notes. Added
+% commands for changing the names of the Table of Contents, the
+% various endnotes sections, and the running headers for the contents
+% and endnotes sections, in order to facilitate editions of works in
+% languages other than English.}
+% \changes{v2.51}{2006/05/22}{Changed prose section environment so
+% that it does not always assume that the modulo for line numbers in
+% prose is the same as the number in verse. Corrected a problem with
+% alignment of line numbers in the prosesectionnoreset environment.
+% Added commands to support generation of multiple indices using the
+% splitindex package. Fixed a variety of small bugs, including a
+% newly introduced one in the correction to textual notes for quoted
+% verse.}
% \GetFileInfo{poemscol.sty}
%
% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother}
@@ -206,13 +225,13 @@
% \textsc, \unskip}
% \setcounter{IndexColumns}{2}
% \MakeShortVerb{|}
-% \def\fileversion{2.49}
-% \def\filedate{9 May 2006}
-% \def\docdate{9 May 2006}
+% \def\fileversion{2.51}
+% \def\filedate{22 May 2006}
+% \def\docdate{22 May 2006}
% \title{Typesetting Poetry Collections with \textsf{poemscol}\thanks{This document
% corresponds to \textsf{poemscol}~\fileversion, dated \filedate.}}
% \author{John Burt \\ \texttt{burt@brandeis.edu}}
-% \date{May 9, 2006}
+% \date{May 22, 2006}
% \maketitle
% \begin{abstract}
% \textsf{poemscol} provides macros for \LaTeX\ for setting
@@ -340,6 +359,9 @@
% preamble, or at least is loaded after those packages upon which it
% depends.
%
+% If you are planning to generate multiple indices, substitute
+% \textsf{splitindex} for \textsf{makeidx} in your list of packages.
+%
%
% \subsection{~Prose sections}
% If you plan to number lines in prose contexts, and to make textual
@@ -400,7 +422,17 @@
% |\leftsidepar|, and |\rightsidepar| to |\pmclsidepar|,
% |\pmclleftsidepar| and |\pmclrightsidepar| respectively. If you
% used any of these commands in your files, you will need to change
-% their names.
+% their names.
+%
+% Up to version 2.5 the |\definenewnotetype| command took four
+% arguments, using the third argument for both the running header for
+% the notes section and for the entry in the table of contents. In
+% order to make it easier to handle titles in languages other than
+% English I have found it necessary to separate these two uses, so
+% |\definenewnotetype| now takes five arguments. You will need to
+% retrofit files that use the old version of this command. You can
+% see the details at section \ref{definingnewnotes}, page
+% \pageref{definingnewnotes}.
%
% \subsection{~Incompatibility with \textsf{memoir} and \textsf{verse}}
% Unfortunately, \textsf{poemscol} is not compatible with the
@@ -861,7 +893,10 @@
% you may need to run your file through \LaTeX\ after running
% MakeIndex, to put the entry for the index into your table of
% contents. |\putpoemindex| inputs the formatted index, and adds an entry
-% for it into the table of contents.
+% for it into the table of contents. Use |\putmultiplepoemindex| if
+% you are making several indices. For instructions about
+% |\putmultiplepoemindex| see section \ref{multipleindex},
+% p.~\pageref{multipleindex}.
%
% \begin{sloppypar}\DescribeMacro{\puttextnotes}
% \DescribeMacro{\putemendations}
@@ -925,8 +960,54 @@
% ``the'' in the title. It also enables you to distinguish titles
% from first lines (by italicizing them), and to include typesetting
% information (such as italicization) in titles or first lines without
-% messing up their sort order.
-%
+% messing up their sort order.
+%
+% \subsection{Making Multiple Indices}\label{multipleindex}
+% \textsf{poemscol} can work with \textsf{splitindex} to generate
+% more than one index. You might, for instance, wish a separate index
+% of titles and index of first lines, or an index of proper names. To
+% do this, call \textsf{splitindex} in your list of packages. Then,
+% in your preamble, declare the indices you are planning to use, e.g.
+% |\newindex[Index of Titles]{idx}|
+% |\newindex[Index of First Lines]{fir}|
+% |\newindex[Onomastic Index]{ono}|. The second argument is the
+% ``shortcut'' defined by \textsf{splitindex}, and will be used to
+% mark index entries in your text (see below), and as the extension
+% for the external index files used by MakeIndex.
+%
+% Then mark up individual entries. Some entries (in the example
+% above, the ``Index of Titles'' examples) can be marked up with
+% |\index| just as if you were using only one index. Entries for
+% other indices should be marked using the |\sindex| command from
+% \textsf{splitindex}, as follows
+% \begin{verbatim}
+% \sindex[fir]{Of Man's first disobedience and the fruit}
+% \end{verbatim}
+% where the
+% first argument is the ``shortcut'' and the second is the index
+% entry. If you are loading \textsf{splitindex} with the
+% \textsf{split} option, the different types of index entry will be
+% sent to separate output streams, which each must be processed separately
+% with MakeIndex. \TeX\ has only a limited number of such output
+% streams, however, so it is probably wiser not to choose that
+% option, but to use splitindex.tex, splitindex.pl, or one of the
+% other means provided with the \textsf{splitindex} package to break
+% up the index into the separate parts, each of which must be
+% processed with MakeIndex separately.
+%
+% To include the indices, and to add entries for them to the table of
+% contents, issue |\putmultiplepoemindex| for each one.
+% |\putmultiplepoemindex| takes four arguments, which are: 1. The
+% three letter ``shortcut'' used by |\splitindex|, 2. The title of
+% the Index on its first page, 3. The running header for that index
+% section, and 4. The name of the section as you wish it to appear in
+% the Table of Contents. So, for instance
+% \begin{verbatim}
+% \putmultipleindex{fir}{INDEX OF FIRST LINES]{Index of First
+% Lines}{First Line Index} \end{verbatim}
+% includes an index with shortcut ``fir,'' title ``INDEX OF FIRST
+% LINES,'' running header ``Index of First Lines,'' and contents
+% entry ``First Line Index.''
% \section{Collections with multiple volumes}
% \DescribeEnv{volumetitlepage} \DescribeEnv{maintitlepage}
% The |\volumetitlepage| environment is an
@@ -1110,7 +1191,11 @@
% individual textnote follows the verse. It's only a problem if the
% last thing in the note is quoted verse, and the note is not the
% last one
-% on that poem.)
+% on that poem.) The command should set it flush as it is, but I have
+% found odd cases I can't understand in which that doesn't work, so
+% the command has an optional argument, which should
+% be the additional length you need to adjust the next line by to make it flush.
+% The default is 0pt.
% |\quotedversecorrectionexplanatory| and
% |\quotedversecorrectionemendation| should follow explanatory notes
% or emendations that end with snippets of verse. These three
@@ -1212,8 +1297,10 @@
% \DescribeMacro{\definenewnotetype} The |\definenewnotetype| macro
% can be used to create new kinds of endnote, in case the kinds
% \textsf{poemscol} defined are not enough. |\definenewnotetype|
-% takes four arguments. They are \begin{enumerate}
-% \item A base name used to construct \begin{itemize}
+% takes five arguments. They are
+% \begin{enumerate}
+% \item A base name used to construct
+% \begin{itemize}
% \item some |\if| variables (e.g. |\ifmynoteson| to see whether you are
% collecting ``mynotes'', and |\ifnomynoteyet| to see whether you
% have written a ``mynote'' for a particular poem yet). \textsf{poemscol}
@@ -1234,7 +1321,11 @@
% \item The name of the |\put| command (e.g. |\putmynotes|) which closes
% the external file for the notes section, reads it back in to your
% document, and adds an entry in the table of contents for that notes
-% section. This command will always be plural. \end{itemize}
+% section. This command will always be plural. \item The name of the
+% |\margref| command for putting a marginal mark next to a line
+% giving the page number in the apparatus where a note is to be found
+% (e.g. |\margrefmynote|)
+% \end{itemize}
% \item The extension for the external file which will hold the notes
% as you generate them. ``Emendations'' for instance, are written to
% an external file called |\jobname.emd| The file name will always
@@ -1244,14 +1335,18 @@
% setting running a file called ``myfile.tex'' through \LaTeX\,
% |\jobname.emd| translates to ``myfile.emd.'')
% \item The title of the notes section as you wish it to appear in
-% the running header and in the table of contents (e.g.
+% the running header (e.g.
% ``Emendations'').
% \item The title of the notes section as you wish it to appear on
% the first page of the notes section (e.g. ``EMENDATIONS'').
+% \item The title of the notes section as you wish it to appear in
+% the table of contents.
% \end{enumerate}
%
-% So, for instance,
-% |\definenewnotetype{xyznote}{xyz}{Xyznotes}{XYZNOTES}| creates the
+% So, for instance,\begin{verbatim}
+% \definenewnotetype{xyznote}{xyz}{Xyznotes to}{XYZNOTES}{Xyznotes}
+% \end{verbatim}
+% creates the
% booleans |\ifxyznoteson| and |\ifnoxyznoteyet|, the commands |\xyznote|,
% |\literalxyznote|, |\prosexyznote|, |\pmxyznote|, and |\putxyznotes| (and, although you don't ever
% have to use it explicitly, |\firstxyznote|) the output channel xyznotes,
@@ -1310,7 +1405,7 @@
% booleans which set the style of footnotes from |\emendation| and
% |\explanatory| respectively. By default, footnotes from
% |\emendation| are set in ``para'' mode, and footnotes from
-% |\explanatory| are set in ``plain'' mode. To change the explanatory
+% |\explanatory| are set in ``plain'' mode. g explanatory
% footnotes from plain to para mode, for instance, issue
% |\global\explanfootnotesparatrue|. Counterintuitive as it sounds,
% you must issue this \emph{before} issuing |\textnotesatfoot| (or the
@@ -1385,6 +1480,11 @@
% this point, and adds an entry for the index to external file for the
% table of contents.
%
+% \DescribeMacro{\putmultiplepoemindex} If you are generating
+% several indices using \textsf{splitindex} |\putmultiplepoemindex|
+% reads in one of them at this point. For instructions about this
+% command, see section \ref{multipleindex}, p.~\pageref{multipleindex}.
+%
% \DescribeMacro{\finish} The
% |\finish| macro is deprecated but still available. It is
% designed to be placed just before |\end{document}| (which, in fact,
@@ -1680,12 +1780,23 @@
% first, the title of the poem, second, the label used by the
% |\label| command on the page of the notes section to which the
% title refers. So, you would issue the poem title command this way:
-% |\poemtitle{Los desvelados}{EP_LosDesvelados_AC}|, following the
-% title with |\sources{\label{EP_LosDesvelados_AC}|. Instructions are
+% |\poemtitle{Los desvelados}{EP_LosDesvelados_AC}|. Up to version 2.49
+% of \textsf{poemscol} you had to be sure to define the label in the
+% notes sections by issuing |\sources{\label{EP_LosDesvelados_AC}}|.
+% This is no longer necessary, and |\JHpoemtitle| defines both the
+% |\label| and the |\pageref|. Instructions are
% given in section \ref{JHpoemtitle}, p.~\pageref{JHpoemtitle} for how to
% construct similar commands for sequences, sequence sections, and so
% on.
%
+% \begin{sloppypar}
+% The following related commands are defined already
+% |\JHsequencetitle|, |\JHsequencefirstsectiontitle|,
+% |\JHsequencesectiontitle|, |\JHsequencesubsectiontitle|,
+% |\JHpoemsectiontitle|, |\JHpoemfirstsectiontitle|,
+% |\JHpoemsubtitle|, |\JHepigraph|, |\JHprosesectiontitle|, and
+% |\JHdedication|.\end{sloppypar}
+%
% If you are using |\JHpoemtitle| and its siblings, you need to be
% sure to add \textsf{mparhack} to your package list. You can prevent
% the marginal reference from switching sides on alternate pages by issuing
@@ -1700,6 +1811,46 @@
% |\setmargpoemtitle{}{}| is a more general version of
% |\JHpoemtitle{}{}|, with the second argument being any commands you
% want to be issued while the title is being processed.
+%
+% \DescribeMacro{\margreftextnote}
+% Another feature of Altenberg's Heredia edition is a marginal mark
+% attached to lines to which text notes refer showing where in the
+% apparatus a comment upon that line is to be found.
+% |\margreftextnote| sets a label in the textual notes section, and
+% set a marginal note with a page reference to that label. Issue
+% |\margreftextnote| \emph{before} issuing the |\verseline| or
+% |\end{stanza}| that closes the line to which it refers. (The textual
+% note itself can be an ordinary |\textnote|, and should be place, as
+% usual, \emph{after} the |\verseline| or |\end{stanza}|.
+%
+% |\margreftextnote| generates its own label, so there is no need to
+% make up one yourself.
+%
+% |\margreftextnote| uses |\marginpar| rather
+% that |\pmclsidepar| to set the note, because I had to use
+% |\marginpar| for |\JHpoemtitle| and its siblings, and I wanted the
+% whole family of markers to be controlled by the same settings. You
+% use the settings that control the behavior of |\marginpar| (e.g.
+% |\mparswitch| and |\reversemarginpar|) to control the behavior of
+% these marks.
+%
+% \begin{sloppypar}
+% If you define a new endnote type using |\definenewnotetype|,
+% |\definenewnotetype| will also define a new |\margref| command to go
+% with it.\end{sloppypar}
+%
+% \DescribeMacro{\setmargrefmarker} Altenberg's edition used a ding
+% from the pifonts collection in the marginal marks made by
+% |\margreftextnote| and its siblings. I have set the default to
+% |\dag|, so as not to depend upon yet another style package. You can
+% choose another mark using |\setmargrefmarker| (e.g.
+% |\setmargrefmarker{\ding{228}}|).
+%
+% \DescribeMacro{\margrefemendation} |\margrefemendation| is a
+% version of |\margreftextnote| for emendations.
+%
+% \DescribeMacro{\margrefexplanatory}|\margrefexplanatory| is a
+% version of |\margreftextnote| for explanatory notes.
%
% \subsection{~Visual formatting}
% \DescribeMacro{\longpage}
@@ -1992,6 +2143,7 @@
% |\prosetextnote[]{}{}| is, with an optional argument (for use with
% line ranges, as usual), and two mandatory arguments (the first a
% label to capture the line number, the second the lemma and comment).
+
% |\proseaccidental| and |\prosetsaccidental| take only the two mandatory arguments, since
% by definition an accidental variant is confined to one line.
%
@@ -2261,7 +2413,67 @@
% \synchroref{Oh what can ail thee, knight at arms?}\verseline
% \end{verbatim}
%
-% \section{A sample driver file}
+% \section{Using \textsf{poemscol} in a Multilingual World}
+%
+% \begin{sloppypar}
+% \DescribeMacro{\changecontentsname}
+% By default, \textsf{poemscol} uses English language titles for such
+% things as the Table of Contents, the Explanatory Notes, and so on,
+% and uses English language running headers. As of version 2.5 these
+% are easily changed. To change the name of the Table of Contents
+% (the default is CONTENTS) to Inhaltsverzeichnis, issue
+% |\changecontentsname{Inhaltsverzeichnis}|. To change the running
+% header on contents pages, issue
+% |\changecontentsheader{your header}|.\end{sloppypar}
+%
+% \begin{sloppypar}
+% \DescribeMacro{\changenotesname} To change the name for the endnote
+% section for textual notes (the default is TEXTUAL NOTES), issue
+% |\changenotesname{your version}|. To change the running header (by
+% default ``Textual Notes to'') issue
+% |\changenotesheader{your version}|.
+% To change the name for
+% the textual notes in the table of contents issue
+% |\changetextnotescontentsname{your version}|.
+% \DescribeMacro{\changesinglepageabbrev}
+% \DescribeMacro{\changemultiplepageabbrev}
+% Running headers refer to single pages with the English
+% abbreviation ``p.'' and to multiple pages with the English
+% abbreviation ``pp.'' To change these issue
+% |\changesinglepageabbrev{new abbrev}| or
+% |\changemultiplepageabbrev{new abbrev}| respectively. The ultimate
+% outcome is to translate a header of the form ``Textual Notes to
+% pp.~xx-yy'' to the form appropriate for your language.\end{sloppypar}
+%
+% \begin{sloppypar}
+% \DescribeMacro{\changeemendationsname} To change the name for the endnote
+% section for emendations (the default is EMENDATIONS), issue
+% |\changeemendationsname{your version}|. To change the running header (by
+% default ``Emendations to'') issue
+% |\changeemendationsheader{your version}|. To change the name for
+% the emendations in the table of contents issue
+% |\changeemendationscontentsname{your version}.|\end{sloppypar}
+%
+%\begin{sloppypar}
+% \DescribeMacro{\changeexplanationsname} To change the name for the endnote
+% section for explanatory notes (the default is EXPLANATORY NOTES), issue
+% |\changeexplanationsname{your version}|. To change the running header (by
+% default ``Explanatory Notes to'') issue
+% |\changeexplanationsheader{your version}|.
+% To change the name for
+% the explanatory notes in the table of contents issue
+% |\changeexplanationscontentsname{your version}|.\end{sloppypar}
+%
+% \begin{sloppypar} \DescribeMacro{\changepoemindexname} To change the name
+% for the index (the default is ``Index of Titles and First Lines'', issue
+% |\changepoemindexname{your version}|. To change the running
+% header (the default is ``Index of Titles and First Lines'') issue
+% |\changepoemindexheader{your version}|. To change the contents
+% entry for the index (the default is ``Index of Titles and First Lines'')
+% issue
+% |\changepoemindexcontentsname{your version}|.\end{sloppypar}
+%
+%\section{A sample driver file}
%
% If you are compiling a collected poems, you are probably preparing your
% volume from many files. You may (or may not) wish to subdivide your
@@ -2926,10 +3138,16 @@
% where a stanza break falls on a page break. In the notes sections,
% they set the running headers.
% \begin{macrocode}
+\newtoks{\singlepageabbrev}
+\singlepageabbrev={p.}
+\newcommand{\changesinglepageabbrev}[1]{\singlepageabbrev={#1}}
+\newtoks{\multiplepageabbrev}
+\newcommand{\changemultiplepageabbrev}[1]{\multiplepageabbrev={#1}}
+\multiplepageabbrev{pp.}
\newcommand{\mymarks}{%
\ifthenelse{\equal{\firstmark}{\botmark}}%
- {\unskip to p.~\firstmark}% if equal
- {\unskip to pp.~\firstmark--\botmark}}%if not equal
+ {\unskip ~\the\singlepageabbrev~\firstmark}% if equal
+ {\unskip ~\the\multiplepageabbrev~\firstmark--\botmark}}%if not equal
\newcommand{\poemdotfill}{\dotfill}
% \end{macrocode}
% \end{macro}
@@ -3244,19 +3462,10 @@
% \begin{macro}{\verselinenumberstoright}
% \begin{macrocode}
\newcommand{\verselinenumberstoleft}{%
-% \catcode`\@=11%
-% \@mparswitchfalse%
-% \catcode`\@=12%
-% \reversemarginpar%
\setlength{\marginparsep}{18pt}%
\setlength{\marginparwidth}{10pt}%
\numbersswitchfalse\numbersrightfalse}
\newcommand{\verselinenumberstoright}{%
-% \catcode`\@=11%
-% \@mparswitchfalse%
-% \catcode`\@=12%
-% \normalmarginpar%
- % \setlength{\marginparsep}{-18pt}%
\setlength{\marginparsep}{18pt}%
\setlength{\marginparwidth}{10pt}%
\numbersswitchfalse\numbersrighttrue}
@@ -3268,21 +3477,16 @@
% \begin{macro}{\verselinenumbersouter}
% \begin{macrocode}
\newcommand{\verselinenumbersswitch}{%
-% \catcode`\@=11%
-% \@mparswitchtrue%
-% \catcode`\@=12% %
\strictpagechecktrue%
\setlength{\marginparsep}{18pt}%
\setlength{\marginparwidth}{10pt}%
\numbersswitchtrue\numbersrightfalse\pmclsideparswitchtrue}
\newif\ifnumbersgutter \numbersgutterfalse%
\newcommand{\verselinenumbersgutter}{\verselinenumbersswitch%
-%\normalmarginpar
\pmclreversesideparfalse%
\numbersguttertrue%
}
\newcommand{\verselinenumbersouter}{\verselinenumbersswitch%
-%\reversemarginpar%
\pmclreversesidepartrue%
\numbersgutterfalse}
% \end{macrocode}
@@ -3322,8 +3526,6 @@
% \begin{macrocode}
\newif\ifspeciallinelock
\speciallinelockfalse
-% \newcommand{\verseline}{\nolinebreak\incrementverselinenumber
-% \nolinebreak\\}
\newcommand{\verseline}{\ifspeciallinelock%
\relax\else%
\nolinebreak\incrementverselinenumber%
@@ -3519,6 +3721,14 @@
% |\makepoemcontents| Alternatively, you can issue |\makepoemcontents{}| with its
% optional argument, putting the page number in the argument.
% \begin{macrocode}
+\newtoks{\contentsname}
+\contentsname={CONTENTS}
+\newtoks{\contentsheadername}
+\contentsheadername={Contents}
+\newcommand{\changecontentsname}[1]{%
+\contentsname={#1}}
+\newcommand{\changecontentsheader}[1]{%
+\contentsheadername={#1}}
\newcommand{\makepoemcontents}[1][5]{\global\poemcontentsontrue
\newwrite\poemcontents
\immediate\openout\poemcontents=\jobname.ctn
@@ -3528,15 +3738,14 @@
\pagenumbering{roman}
\setcounter{page}{#1}
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
-\fancyhead[CO]{{\small{\em Contents}}}
-\fancyhead[CE]{{\small{\em Contents}}}
+\fancyhead[CO]{{\small{\em \the\contentsheadername}}}
+\fancyhead[CE]{{\small{\em \the\contentsheadername}}}
\fancyfoot{}
\backmattersink
\begin{center}{\normalfont \backmatterheaderfont
-CONTENTS}\end{center}
+\the\contentsname}\end{center}
\lefthyphenmin=2\backmatterafterheadersink\tolerance=500\language=0}
\literalcontents{ \relax}}
-
% \end{macrocode}
% \end{macro}
@@ -3551,6 +3760,15 @@ CONTENTS}\end{center}
% label for sending the page number of the textual notes to the table of
% contents.
% \begin{macrocode}
+\newtoks{\notesname}
+\notesname={TEXTUAL NOTES}
+\newcommand{\changenotesname}[1]{\notesname={#1}}
+\newtoks{\notesheadername}
+\notesheadername={Textual Notes to}
+\newcommand{\changenotesheader}[1]{\notesheadername={#1}}
+\newtoks{\textnotescontentsname}
+\textnotescontentsname={Textual Notes}
+\newcommand{\changetextnotescontentsname}[1]{\textnotescontentsname={#1}}
\newcommand{\maketextnotes}{\global\textnotesontrue
\global\verselinenumberstrue
\newwrite\textnotes
@@ -3561,12 +3779,12 @@ CONTENTS}\end{center}
\fancyhead{}
\fancyfoot{}
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
-\fancyhead[CO]{{\small{\em Textual Notes~\mymarks}}}
-\fancyhead[CE]{{\small{\em Textual Notes~\mymarks}}}
+\fancyhead[CO]{{\small{\em \the\notesheadername~\mymarks}}}
+\fancyhead[CE]{{\small{\em \the\notesheadername~\mymarks}}}
\fancyfoot[C]{}
\mark{3}
\backmattersink
-\begin{center}{\normalfont \backmatterheaderfont TEXTUAL NOTES}\end{center}
+\begin{center}{\normalfont \backmatterheaderfont \the\notesname}\end{center}
\label{textualnotes}
\lefthyphenmin=2\backmatterafterheadersink\tolerance=500\language=0
\normalfont \backmattertextfont}
@@ -3577,6 +3795,16 @@ CONTENTS}\end{center}
% \begin{macro}{\makeemendations}
% Next, the emendations section:
% \begin{macrocode}
+\newtoks{\emendationsname}
+\emendationsname={EMENDATIONS}
+\newcommand{\changeemendationsname}[1]{\emendationsname={#1}}
+\newtoks{\emendationsheadername}
+\emendationsheadername={Emendations to}
+\newcommand{\changeemendationsheader}[1]{\emendationsheadername={#1}}
+\newtoks{\emendationscontentsname}
+\emendationscontentsname={Emendations}
+\newcommand{\changeemendationscontentsname}[1]{%
+\emendationscontentsname={#1}}
\newcommand{\makeemendations}{\global\emendationsontrue
\newwrite\emendations
\global\verselinenumberstrue
@@ -3586,13 +3814,13 @@ CONTENTS}\end{center}
\thispagestyle{volumetitlestyle}}
\fancyhead{}
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
-\fancyhead[CO]{{\small{\em Emendations~\mymarks}}}
-\fancyhead[CE]{{\small{\em Emendations~\mymarks}}}
+\fancyhead[CO]{{\small{\em \the\emendationsheadername~\mymarks}}}
+\fancyhead[CE]{{\small{\em \the\emendationsheadername~\mymarks}}}
\fancyfoot{}
\mark{3}
\backmattersink
\begin{center}{\normalfont \backmatterheaderfont
- EMENDATIONS}\end{center}
+ \the\emendationsname}\end{center}
\label{emendationnotes}
\lefthyphenmin=2\backmatterafterheadersink\tolerance=500\language=0
\normalfont \backmattertextfont}
@@ -3603,6 +3831,16 @@ CONTENTS}\end{center}
% \begin{macro}{\makeexplanatorynotes}
% And the explanatory notes:
% \begin{macrocode}
+\newtoks{\explanationsname}
+\explanationsname={EXPLANATORY NOTES}
+\newcommand{\changeexplanationsname}[1]{\explanationsname={#1}}
+\newtoks{\explanationsheadername}
+\explanationsheadername={Explanatory Notes to}
+\newcommand{\changeexplanationsheader}[1]{\explanationsheadername={#1}}
+\newtoks{\explanationscontentsname}
+\explanationscontentsname={Explanatory Notes}
+\newcommand{\changeexplanationscontentsname}[1]{%
+\explanationscontentsname={#1}}
\newcommand{\makeexplanatorynotes}{\global\explanontrue
\global\verselinenumberstrue
\newwrite\explanations
@@ -3611,13 +3849,13 @@ CONTENTS}\end{center}
{\pagestyle{volumetitlestyle}\cleardoublepage}
\thispagestyle{volumetitlestyle}}
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
-\fancyhead[CO]{{\small{\em Explanatory Notes~\mymarks}}}
-\fancyhead[CE]{{\small{\em Explanatory Notes~\mymarks}}}
+\fancyhead[CO]{{\small{\em \the\explanationsheadername~\mymarks}}}
+\fancyhead[CE]{{\small{\em \the\explanationsheadername~\mymarks}}}
\fancyfoot{}
\mark{3}
\backmattersink
\begin{center}{\normalfont \backmatterheaderfont
- EXPLANATORY NOTES}\end{center}
+ \the\explanationsname}\end{center}
\label{explanatorynotes}
\lefthyphenmin=2\backmatterafterheadersink\tolerance=500\language=0
\normalfont \backmattertextfont }
@@ -3627,14 +3865,15 @@ CONTENTS}\end{center}
% Auxiliary commands for note and title sections
% \begin{macrocode}
+%
\newcommand{\@pagemarktotextnotes}[1]{%
\immediate\write\textnotes{\string\setcounterfrompageref\string{notepageholdertitle\string}%
-\string{#1\string}}%
-\immediate\write\textnotes{\string\mark
+\string{#1\string}\string\unskip}%
+\immediate\write\textnotes{\string\mark%
\string{\string\thenotepageholdertitle\string}}%
}
\newcommand{\@poempagetotextnotes}[1]{%
- \immediate\write\textnotes{\string\par\string\argpageref\string{#1\string}}%
+\immediate\write\textnotes{\string\par\string\argpageref\string{#1\string}\string\unskip}%
\@pagemarktotextnotes{#1}}
\newcommand{\@poemtitletotextnotes}[1]{\literaltextnote{\textbf{#1}}}
% \end{macrocode}
@@ -3694,8 +3933,6 @@ CONTENTS}\end{center}
\putpagenumberinnotesfalse
\c@ntentsinfo{#1}{\contentsindentone}{\contentsvolumefont}
{\contentsindenttwoamount}
-% \literalcontents{\vspace{5pt}\par\nobreak}
-% \literaltextnote{\notesvolumetitlepenalty\bigskip\par}
\t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak}
\putpagenumberincontentstrue
\putpagenumberinnotestrue}
@@ -3708,7 +3945,6 @@ CONTENTS}\end{center}
\c@ntentsinfo{#1}{\contentsindentone}{\contentsvolumefont}
{\contentsindenttwoamount}
\literalcontents{\vspace{5pt}\par\nobreak}
-% \literaltextnote{\notesvolumetitlepenalty\bigskip\par}
\t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak}
\putpagenumberincontentstrue
\putpagenumberinnotestrue}
@@ -3865,7 +4101,6 @@ CONTENTS}\end{center}
% \relax
\fi\fi
}
-
\newcommand{\poemtitle}[1]{%
\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
@@ -3873,6 +4108,15 @@ CONTENTS}\end{center}
{\contentsindenttwoamount}%
\t@xtnotesinfo{#1}%
}
+\newcommand{\poemtitlenocontents}[1]{%
+\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
+{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
+\t@xtnotesinfo{#1}%
+}
+\newcommand{\poemtitlebaretitle}[1]{%
+\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
+{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\poemtitleitalic} Poems with italic titles or other
@@ -4386,12 +4630,13 @@ CONTENTS}\end{center}
}
% \end{macrocode}
% \begin{macro}{\setmargpoemtitle}
-% Titles with a marginal reference to the notes, as in Altenberg's
+% Titles with a marginal reference to the notes giving the page in
+% the notes where a comment on the poem appears, as in Altenberg's
% Heredia edition.\label{JHpoemtitle} |\setmargpoemtitle| takes as
% its second argument anything you want to add to the line while the
% title is being processed. |\JHpoemtitle| is just
% |\setmargpoemtitle| with the second argument passed to |\JHlabel|,
-% which actually makes the label
+% which actually makes the marginal mark.
% \begin{macrocode}
\newcommand{\setmargpoemtitle}[2]{%
\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
@@ -4399,6 +4644,7 @@ CONTENTS}\end{center}
\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}%
{\contentsindenttwoamount}%
\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
}
\newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}%
{#2}%
@@ -4413,15 +4659,34 @@ CONTENTS}\end{center}
% \begin{macro}{\JHpoemtitle} Macros to set marginal line
% references.
% \begin{macrocode}
+% \newcommand{\JHpoemtitle}[2]{%
+% \setmargpoemtitle{#1}{\JHlabel{#2}}%
+% }
\newcommand{\JHpoemtitle}[2]{%
-\setmargpoemtitle{#1}{\JHlabel{#2}}%
-}
+\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
+{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
+{\JHlabel{#2}}%
+\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}%
+{\contentsindenttwoamount}%
+\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
+}
+\newcommand{\JHprosesectiontitle}[2]{%
+\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
+{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}%
+{\JHlabel{#2}}%
+\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}%
+{\contentsindenttwoamount}%
+\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
+}
\newcommand{\JHlabel}[1]{%
-\marginpar{{\scriptsize{\dag~p.~\pageref{#1}}}}}
+\marginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\JHsequencetitle} Macros to set marginal line
-% references for sequences and sequence sections.
+% \begin{macro}{\JHsequencetitle} Macros to set marginal page
+% references for sequences, sequence sections, poem sections, poem
+% subtitles, dedications, and epigraphs.
% \begin{macrocode}
\newcommand{\JHsequencetitle}[2]{%
\set@margp@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont}%
@@ -4432,6 +4697,7 @@ CONTENTS}\end{center}
{\contentsindenttwoamount}%
\putpagenumberincontentstrue%
\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
}
\newcommand{\JHsequencesectiontitle}[2]{%
\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}%
@@ -4440,6 +4706,7 @@ CONTENTS}\end{center}
\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}%
{\contentsindentthreeamount}%
\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
}
\newcommand{\JHsequencefirstsectiontitle}[2]{%
\set@margp@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont}%
@@ -4448,6 +4715,80 @@ CONTENTS}\end{center}
\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}%
{\contentsindentthreeamount}%
\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
+}
+\newcommand{\JHpoemsectiontitle}[2]{%
+\set@margp@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont}%
+{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}%
+{\titleindentamount}{\JHlabel{#2}}%
+\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}%
+{\contentsindentthreeamount}%
+\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
+}
+\newcommand{\JHpoemfirstsectiontitle}[2]{%
+\set@margp@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}%
+{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}%
+{\titleindentamount}{\JHlabel{#2}}%
+\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}%
+{\contentsindentthreeamount}%
+\t@xtnotesinfo{#1}%
+\sources{\label{#2}}%
+}
+\newcommand{\JHsequencesectionsubtitle}[2]{%
+\set@margp@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}%
+{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}%
+{\titleindentamount}{\JHlabel{#2}}%
+\sources{\label{#2}}%
+}
+\newcommand{\JHpoemsubtitle}[2]{\JHsequencesectionsubtitle{#1}{#2}
+}
+\newcommand{\JHdedication}[2]{\nopagebreak\afterpoemtitleskip\begin{epigraphquote}%
+\emph{#1}\JHlabel{#2}\end{epigraphquote}%
+\sources{\label{#2}}\afterpoemtitleskip\nopagebreak}
+\newcommand{\JHepigraph}[2]{\nopagebreak\afterpoemtitleskip\begin{epigraphquote}%
+\emph{#1}\JHlabel{#2}\end{epigraphquote}%
+\sources{\label{#2}}\afterpoemtitleskip\nopagebreak}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\margreftextnote} Macros to set marginal page
+% references showing where in the apparatus a comment upon the
+% marked line is to be found. |\margrefspecial{}| is for occasions
+% when you might need to set the label by hand. For instance, suppose
+% you have several textnotes on a line, and the note you wish to draw
+% attention to is on a different page from the other notes.
+% |\margreftextnote| under those circumstances will point only to the
+% first note. Use |\margrefspecial| to point to the other note,
+% giving |\margrefspecial| a unique argument, and opening that note
+% with a \label{} command using the same argument.
+%
+% \begin{macrocode}
+\newcounter{margrefnumber}
+\setcounter{margrefnumber}{1}
+\newtoks{\margrefmarker}
+\margrefmarker={\dag}
+\newcommand{\setmargrefmarker}[1]{\margrefmarker={#1}}
+\newcommand{\makemargreflabel}{\string\label\string{margref\themargrefnumber\string}}
+\newcommand{\setmargref}
+{\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}
+}
+\newcommand{\margreftextnote}{%
+\iftextnoteson\addtocounter{margrefnumber}{1}%
+\immediate\write\textnotes{\makemargreflabel}%
+\setmargref\else\relax\fi%
+}
+\newcommand{\margrefexplanatory}{%
+\ifexplanon\addtocounter{margrefnumber}{1}%
+\immediate\write\explanations{\makemargreflabel}%
+\setmargref\else\relax\fi%
+}
+\newcommand{\margrefemendation}{%
+\ifemendationson\addtocounter{margrefnumber}{1}%
+\immediate\write\emendations{\makemargreflabel}%
+\setmargref\else\relax\fi%
+}
+\newcommand{\margrefspecial}[1]{%
+\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{#1}}}
}
% \end{macrocode}
% \end{macro}
@@ -4862,7 +5203,7 @@ CONTENTS}\end{center}
\xdef#1{\the\toks@}%
\endgroup}
\makeatother
-\newcommand{\definenewnotetype}[4]{%
+\newcommand{\definenewnotetype}[5]{%
% 1. make an if and set it to true by default. make an if for the first
% instance of the command per poem and set it to false
% Thanks to Igor Pechtchanski and Ulrich Schwarz.
@@ -4973,11 +5314,19 @@ CONTENTS}\end{center}
\immediate\expandafter\closeout\csname #1s\endcsname
\expandafter\input \jobname.#2
\ifpoemcontentson
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ #3}
- \immediate\write\poemcontents{\string~ / \string~\ \string\pageref{#1notes} \string\par}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\ #5}
+ \immediate\write\poemcontents{\string~ \string\contentsleaders
+ \string~\ \string\pageref{#1notes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
}
+% 10. command for making a marginal mark at a line, giving the page
+% number in the apparatus where a note is to be found
+\expandafter\newcommand\csname margref#1\endcsname{%
+\addtocounter{margrefnumber}{1}
+\immediate\write\expandafter\csname #1s\endcsname{\makemargreflabel}%
+\setmargref
+}
}
% \end{macrocode}
% \end{macro}
@@ -5004,14 +5353,18 @@ CONTENTS}\end{center}
\newcommand{\prosesectiontitlenotitle}[1]{\poemtitlenotitle{#1}}
% \end{macrocode}
% Next, environments for prose sections. The environment resets (or
-% doesn't, in the second case) the marginal line number, at sets the
-% modulo line number to that prevailing in verse sections.
+% doesn't, in the second case) the marginal line number. The
+% default modulo line number is that prevailing in verse sections,
+% but you can change it at will.
% \begin{macrocode}
-\newenvironment{prosesection}
-{\resetlinenumber\begin{linenumbers}%
\setcounter{prosemodulo}{\value{lineindexrepeat}}%
\addtocounter{prosemodulo}{1}%
-\modulolinenumbers[\value{prosemodulo}]%
+\ifx\modulolinenumbers\undefined%
+ \relax\else
+\modulolinenumbers[\value{prosemodulo}]% if lineno is called
+\fi
+\newenvironment{prosesection}
+{\resetlinenumber\begin{linenumbers}%
\renewcommand{\linenumberfont}{\scriptsize}%
\ifnumbersright\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}%
%\else\ifnumbersswitch\switchlinenumbers\setlength{\linenumbersep}{\marginparsep}%
@@ -5025,10 +5378,16 @@ CONTENTS}\end{center}
{\end{linenumbers}}
\newenvironment{prosesectionnoreset}
{\begin{linenumbers}%
-\setcounter{prosemodulo}{\value{lineindexrepeat}}%
-\addtocounter{prosemodulo}{1}%
-\modulolinenumbers[\value{prosemodulo}]%
-\renewcommand{\linenumberfont}{\scriptsize}}{\end{linenumbers}}
+\renewcommand{\linenumberfont}{\scriptsize}
+\ifnumbersright\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}%
+%\else\ifnumbersswitch\switchlinenumbers\setlength{\linenumbersep}{\marginparsep}%
+\else\ifnumbersswitch\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}%
+\else\leftlinenumbers*\setlength{\linenumbersep}{\marginparsep}%
+\addtolength{\linenumbersep}{5pt}% seems about right
+\fi\fi
+% \noemendyettrue%
+% \noexplainyettrue%
+}{\end{linenumbers}}
% \end{macrocode}
%
% Set up commands for notes sections.
@@ -5251,17 +5610,11 @@ r@#2\endcsname{}{}\@nil
\newcommand{\setpmmodulo}[1]{\setcounter{pmmodulo}{#1}%
\addtocounter{pmmodulo}{-1}%
}
-\newcommand{\pmnumberstoleft}{%\catcode`\@=11%
-% \@mparswitchfalse%
-% \catcode`\@=12%
-% \reversemarginpar%
+\newcommand{\pmnumberstoleft}{%\catcode`\@=11%
\numbersswitchfalse\numbersrightfalse%
\setlength{\marginparsep}{18pt}%
}
\newcommand{\pmnumberstoright}{%\catcode`\@=11%
-% \@mparswitchfalse%
-% \catcode`\@=12%
-% \normalmarginpar%
\numbersswitchfalse\numbersrighttrue%
\setlength{\marginparsep}{-18pt}
% \setlength{\marginparsep}{18pt}
@@ -5270,17 +5623,11 @@ r@#2\endcsname{}{}\@nil
\setlength{\marginparsep}{18pt}%
}
\newcommand{\pmnumbersgutter}{%\catcode`\@=11%
-% \@mparswitchtrue%
-% \catcode`\@=12%
-% \normalmarginpar%
\pmnumbersswitch%
\pmclreversesideparfalse\numbersguttertrue%
\setlength{\marginparsep}{18pt}%
}
\newcommand{\pmnumbersouter}{%\catcode`\@=11%
-% \@mparswitchtrue%
-% \catcode`\@=12%
-% \reversemarginpar%
\pmnumbersswitch%
\pmclreversesidepartrue\numbersgutterfalse%
\setlength{\marginparsep}{18pt}%
@@ -5326,10 +5673,6 @@ r@#2\endcsname{}{}\@nil
{ \putpmsentencenumber\nobreak%
\setcounter{pmindexcount}{0}%
}{\relax}%
-% \ifnum\thepmindexcount>\thepmmodulo%
-% \putpmsentencenumber\nobreak%
-% \setcounter{pmindexcount}{0}%
-% \fi%
\fi%
% create header for notes if any are to occur
\ifpmparas%
@@ -5430,10 +5773,6 @@ r@#2\endcsname{}{}\@nil
{ \putpmsentencenumberfour\nobreak%
\setcounter{pmindexcount}{0}%
}{\relax}%
-% \ifnum\thepmindexcount>\thepmmodulo%
-% \putpmsentencenumberfour\nobreak%
-% \setcounter{pmindexcount}{0}%
-% \fi%
\fi%
% create header for notes if any are to occur
\ifpmparas%
@@ -5708,16 +6047,18 @@ r@#2\endcsname{}{}\@nil
% end, which will be interpreted as a paragraph break when the file is
% read back in by \LaTeX. These kludges correct that problem.
% \begin{macrocode}
-\newcommand{\quotedversecorrectiontextnote}
-{\iftextnoteson\immediate\write
-\textnotes{\string\par\string\noindent\string\kern-\parindent}\fi}% a bad kludge
-\newcommand{\quotedversecorrectionemendation}
-{\ifemendationson\immediate\write
-\emendations{\string\par\string\noindent\string\kern-\parindent}\fi}% a bad kludge
-\newcommand{\quotedversecorrectionexplanatory}
-{\ifexplanon\immediate\write
-\explanations{\string\par\string\noindent\string\kern-\parindent}\fi}% a bad kludge
-
+\newcommand{\quotedversecorrectiontextnote}[1][0pt]
+{\iftextnoteson%
+\immediate\write\textnotes{\string\noindent\string\kern-#1}%
+\fi}
+\newcommand{\quotedversecorrectionemendation}[1][0pt]
+{\ifemendationson%
+\immediate\write\emendations{\string\noindent\string\kern-#1}%
+\fi}
+\newcommand{\quotedversecorrectionexplanatory}[1][0pt]
+{\ifexplanon%
+\immediate\write\explanations{\string\noindent\string\kern-#1}%
+\fi}
% \end{macrocode}
% \subsection{~Marking stanza breaks on page turns} Use the macro
@@ -5905,13 +6246,6 @@ r@#2\endcsname{}{}\@nil
\leavevmode
\cleartoverso
\paralleltextstrue
-% \def\makeatletter{\catcode`\@11\relax}
-% \def\makeatother{\catcode`\@12\relax}
-% \makeatletter
-% \@mparswitchfalse
-% \makeatother
-% \reversemarginpar
-% \setlength{\marginparsep}{-36pt}
\renewenvironment{poem}{\raggedright
\language=255%no hyphenation in verse
\noemendyettrue
@@ -5936,7 +6270,6 @@ r@#2\endcsname{}{}\@nil
\inpoemfalse\mark{\relax}
\goodbreak\afterpoemskip%\bigskip
\fi\fi }
-
\renewenvironment{stanza}{\penalty-100\instanzatrue\mark{\nostanzaatbottomvalue\ }}
% must end stanza if parallel text. Don't worry,
% begin recto page and begin verso page will
@@ -6220,27 +6553,29 @@ r@#2\endcsname{}{}\@nil
% \poemcontents{\string~ / \string~\ \string\pageref{abbreviations} \string\par}
% \immediate\write\poemcontents{\string\par \string\smallskip}
\ifemendationson
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ Emendations}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\
+ \the\emendationscontentsname}
\immediate\write
\poemcontents{\string~ / \string~\ \string\pageref{emendationnotes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
\iftextnoteson
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ Textual Notes}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\
+ \the\textnotescontentsname}
\immediate\write
\poemcontents{\string~ / \string~\ \string\pageref{textualnotes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
\ifexplanon
\immediate\write
-\poemcontents{\string\contentspoemtitlefont\ Explanatory Notes}
+\poemcontents{\string\contentspoemtitlefont\ \the\explanationscontentsname}
\immediate\write
\poemcontents{\string~ / \string~\ \string\pageref{explanatorynotes}}
\fi
\ifindexingon
\immediate\write\poemcontents{\string\par \string\smallskip}
\immediate\write
-\poemcontents{\string\contentspoemtitlefont\ Index of Titles and First Lines}
+\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname}
\immediate\write
\poemcontents{\string~ / \string~\ \string\pageref{indexpage}\string\par}
\fi
@@ -6316,9 +6651,10 @@ wherever such spaces are lost in pagination.
\input \jobname.emd
\ifpoemcontentson
\ifemendationson
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ Emendations}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\ \the\emendationscontentsname}
\immediate\write
- \poemcontents{\string~ / \string~\ \string\pageref{emendationnotes} \string\par}
+ \poemcontents{\string~ \string\contentsleaders \string~\
+ \string\pageref{emendationnotes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
\fi
@@ -6338,9 +6674,10 @@ wherever such spaces are lost in pagination.
\input \jobname.enx
\ifpoemcontentson
\ifexplanon
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ Explanatory Notes}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\ \the\explanationscontentsname}
\immediate\write
- \poemcontents{\string~ / \string~\ \string\pageref{explanatorynotes} \string\par}
+ \poemcontents{\string~ \string\contentsleaders \string~\
+ \string\pageref{explanatorynotes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
\fi
@@ -6360,9 +6697,10 @@ wherever such spaces are lost in pagination.
\input \jobname.ent
\ifpoemcontentson
\iftextnoteson
- \immediate\write\poemcontents{\string\contentspoemtitlefont\ Textual Notes}
+ \immediate\write\poemcontents{\string\contentspoemtitlefont\ \the\textnotescontentsname}
\immediate\write
- \poemcontents{\string~ / \string~\ \string\pageref{textualnotes} \string\par}
+ \poemcontents{\string~ \string\contentsleaders \string~\
+ \string\pageref{textualnotes} \string\par}
\immediate\write\poemcontents{\string\par \string\smallskip}
\fi
\fi
@@ -6376,19 +6714,55 @@ wherever such spaces are lost in pagination.
% into the table of contents.
%
% \begin{macrocode}
+\newtoks{\poemindexname}
+\poemindexname={Index of Titles and First Lines}
+\newcommand{\changepoemindexname}[1]{\poemindexname={#1}}
+\newtoks{\poemindexheadername}
+\poemindexheadername={Index of Titles and First Lines}
+\newcommand{\changepoemindexheader}[1]{\poemindexheadername={#1}}
+\newtoks{\poemindexcontentsname}
+\poemindexcontentsname={Index of Titles and First Lines}
+\newcommand{\changepoemindexcontentsname}[1]{\poemindexcontentsname={#1}}
\newcommand{\putpoemindex}{\ifindexingon
\printindex
\fi
\ifpoemcontentson\ifindexingon
\immediate\write\poemcontents{\string\par \string\smallskip}
\immediate\write
-\poemcontents{\string\contentspoemtitlefont\ Index of Titles and First Lines}
+\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname}
\immediate\write
-\poemcontents{\string~ / \string~\ \string\pageref{indexpage}\string\par}
+\poemcontents{\string~\string\contentsleaders \string~\ \string\pageref{indexpage}\string\par}
\fi\fi}
+\newcommand{\putmultiplepoemindex}[4]{%
+\ifindexingon
+\poemindexname={#2}
+\poemindexheadername={#3}
+\poemindexcontentsname={#4}
+\poemindexlabelname={#4}
+\printindex[#1][#2]
+\fi
+\ifpoemcontentson\ifindexingon
+ \immediate\write\poemcontents{\string\par \string\smallskip}
+ \immediate\write
+\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname}
+ \immediate\write
+\poemcontents{\string~ \string\contentsleaders \string~\
+\string\pageref{\the\poemindexlabelname}\string\par}
+ \fi\fi
+}
+\newcommand{\noteaboutstanzamarkpage}{\begin{volumetitlepage}
+%\thispagestyle{volumetitlestyle}
+\vspace{106pt}
+\begin{center}
+{\poemtitlefont Note}
+\end{center}
+
+\noindent The symbol \stanzaatbottomvalue\ is used to indicate
+a space between sections of a poem
+wherever such spaces are lost in pagination.
+\end{volumetitlepage}}
% \end{macrocode}
% \end{macro}
-
% \subsection{~Visual formatting} The ideal in \LaTeX\ is to separate
% content markup and formatting as completely as possible. In the text
% itself you simply mark the logical units (a poem, a title, a stanza,
@@ -6437,23 +6811,25 @@ wherever such spaces are lost in pagination.
% \begin{macro}{theindex}
% And the environment for the index:
% \begin{macrocode}
+\newtoks{\poemindexlabelname}
+\poemindexlabelname={indexpage}
+\newcommand{\changepoemindexlabelname}[1]{\poemindexlabelname={#1}}
\renewenvironment{theindex}
{{\par\clearpage{\pagestyle{volumetitlestyle}\cleardoublepage}
\thispagestyle{volumetitlestyle}}
\makeatletter
\def\pmclidxitem{\par\hangindent 1em}
-% \makeatother
\fancyhead[RO,LE]{{\small\textrm{\thepage}}}
-\fancyhead[CO]{{\small{\em Index of Titles and First Lines}}}
-\fancyhead[CE]{{\small{\em Index of Titles and First Lines}}}
+\fancyhead[CO]{{\small{\em \the\poemindexheadername}}}
+\fancyhead[CE]{{\small{\em \the\poemindexheadername}}}
\fancyfoot{}
- \label{indexpage}
+ \label{\the\poemindexlabelname}
\lefthyphenmin=2\tolerance=500\language=0
\normalfont \backmattertextfont
\raggedright
\begin{multicols}
{2}[\backmattersink\begin{center}{\normalfont
-\backmatterheaderfont INDEX OF TITLES AND FIRST LINES}\end{center}
+\backmatterheaderfont \the\poemindexname}\end{center}
\backmatterafterheadersink]%
\let\item\pmclidxitem}
{\end{multicols}\clearpage}
@@ -6480,4 +6856,5 @@ wherever such spaces are lost in pagination.
{\endlist}
% \end{macrocode}
% \Finale
-\endinput \ No newline at end of file
+\endinput
+--------------060108090809060900030409--
diff --git a/Master/texmf-dist/source/latex/screenplay/screenplay.dtx b/Master/texmf-dist/source/latex/screenplay/screenplay.dtx
index a497fa1de4c..7f2e7bfe77a 100644
--- a/Master/texmf-dist/source/latex/screenplay/screenplay.dtx
+++ b/Master/texmf-dist/source/latex/screenplay/screenplay.dtx
@@ -34,7 +34,7 @@
%</dtx>
%<driver>\ProvidesFile{screenplay.drv}
% \fi
-%\ProvidesFile{screenplay}[2006/09/27 v1.487
+%\ProvidesFile{screenplay}[2006/09/30 v1.496
% LaTeX2e Draft Screenplay document class
% (C)2006 John Pate
% released under the GNU General Public License]
@@ -42,7 +42,10 @@
%<*driver>
\documentclass{article}
\usepackage{doc}
-\usepackage[dvips,letterpaper]{geometry}
+\usepackage[dvips,letterpaper,pdfauthor=John\ Pate,
+pdftitle=A\ LaTeX2e\ class\ for\ Draft\ Screenplays,
+pdfsubject=LaTeX2e\ class\ documentation\ and\ source\ (C)2006\ John\ Pate]
+{hyperref}
\RecordChanges
\CodelineIndex
\begin{document}
@@ -53,13 +56,18 @@
%
% \CheckSum{295}
% \changes{1.0.0}{2006 Sep 23}{initial version of \texttt{.dtx}, class date
-% \texttt{[2006/09/23]}}
-% \changes{1.0.1}{2006 Sep 24}{minor code changes, revision to documentation}
+% \texttt{[2006/09/23], v1.457}}
+% \changes{1.0.1}{2006 Sep 24}{minor code changes, revision to documentation,
+% v1.461}
% \changes{1.0.2}{2006 Sep 26}{minor code changes, revision to documentation,
-% added \texttt{test} file, % \texttt{example} file, to \texttt{.dtx},
-% amended \texttt{.ins}}
+% added \texttt{test} file, \texttt{example} file, to \texttt{.dtx},
+% amended \texttt{.ins}, v1.465}
% \changes{1.0.3}{2006 Sep 27}{minor code changes, revision to documentation,
-% added change history}
+% added change history, v1.487}
+% \changes{1.0.4}{2006 Sep 28}{enabled hyperlinks in documentation, v1.491}
+% \changes{1.0.5}{2006 Sep 29}{minor code changes, revision to documentation,
+% v1.494}
+% \changes{1.0.6}{2006 Sep 30}{fixed typos, v1.496}
%
% \MakeShortVerb{\|}
%
@@ -130,8 +138,9 @@
% \item\texttt{COPYING}---GNU General Public License
% \end{itemize}
%
-% If not, get \texttt{screenplay.zip} via
-% \texttt{http://dvc.org.uk/sacrific.txt/screenplay.zip}
+% If not, get \texttt{screenplay.zip} via, \\
+% \href{http://dvc.org.uk/sacrific.txt/screenplay.zip}%
+% {\texttt{http://dvc.org.uk/sacrific.txt/screenplay.zip}}
%
% You use the command, \\
% \texttt{> latex screenplay.ins} \\
@@ -149,14 +158,16 @@
% \texttt{test.pdf}.
%
% Make sure everything in the printing chain can deal properly
-% with \emph{letter paper}. Print out your version of
-% \texttt{test} and the provided \texttt{test.pdf} (on letter
-% paper of course!) and compare them. The two printouts should
-% be dimensionally identical. If you have an old, or broken,
-% version of \texttt{dvips} you'll need to fix it before you
-% proceed further.
+% with 8.5ins by 11ins letter paper. Print out your
+% version of \texttt{test} and the provided \texttt{test.pdf}
+% (on letter paper of course!) and compare them. The two
+% printouts should be dimensionally identical. The left margin
+% should measure as \emph{exactly} 1.5ins. If not you have
+% an old version of \texttt{dvips} and/or your printer driver
+% is configured incorrectly and you'll need to fix things before
+% you proceed further.
%
-% \section{Some example bits of markup}
+% \section{Some example markup}
%
% Although \texttt{screenplay.cls} builds on the standard \TeX\ document
% class \texttt{article}, it is not intended you pass it any options
@@ -164,12 +175,12 @@
% The formatting required is minimalist. \texttt{screenplay.cls} will
% issue an error message if you use any options.
%
-% |\documentclass{screenplay}[2006/09/27]| \\
+% |\documentclass{screenplay}[2006/09/30]| \\
% is your first command, you can give the optional date argument in
% case of any earlier copies of \texttt{screenplay.cls} lying around.
% I'll try not to break things retro-actively with later revisions
% but this can't be guaranteed. Per this revision, anything marked
-% with |[2006/09/23]| or later will produce the expected results.
+% with \texttt{[2006/09/23]} or later will produce the expected results.
%
% Your second command is, of course\ldots\\
% |\begin{document}|
@@ -228,10 +239,10 @@
% formatting. You may need to insert linebreaks manually even
% where `|Overfull \hbox|' warnings are absent. You'll know
% when it is necessary by spotting extra vertical whitespace in
-% the document. |example.tex| demonstrates this, read through
-% the raw |.tex| file and try modifying it as indicated.
-% It's likely you will have to put a quite a few linebreaks
-% manually into dialogue text due to the restricted margins.
+% the document. \texttt{example.tex} demonstrates this, read through
+% the raw \texttt{.tex} file and try modifying it as indicated.
+% It's likely you will have to put quite a few linebreaks
+% `by hand' into dialogue text due to the restricted margins.
%
% \textbf{Do not put in pagebreaks until you have really, really,
% really finished editing.}
@@ -252,21 +263,25 @@
% Yes, that's the English (or for that matter French and Canadian)
% ``centre'' not ``center'' in a stunning break from tradition.
%
-% For further enlightenment, you should scrutinise the raw text of
+% For further enlightenment, you should scrutinise the markup of
% \texttt{example.tex} and peruse \textbf{The Coding}
% section of this document.
%
% You can see a completed script marked-up
% via \LaTeXe\ and formatted with \texttt{screenplay.cls}
-% at \texttt{http://dvc.org.uk/sacrific.txt/}.
+% at \href{http://dvc.org.uk/sacrific.txt/}%
+% {\texttt{http://dvc.org.uk/sacrific.txt/}}.
% There is also, at time of writing, a ``work-in-progress'' script
% that has had manual linebreaks inserted but not manual pagebreaks.
%
% \section{Specs from the Academy}
%
-% Be sure to read and inwardly digest,
-% \texttt{http://www.oscars.org/nicholl/format.html}
-% and view, \texttt{http://www.oscars.org/nicholl/script.pdf},
+% Be sure to read, carefully, and inwardly digest, \\
+% \href{http://www.oscars.org/nicholl/format.html}%
+% {\texttt{http://www.oscars.org/nicholl/format.html}} \\
+% and view, \\
+% \href{http://www.oscars.org/nicholl/script.pdf}%
+% {\texttt{http://www.oscars.org/nicholl/script.pdf}}, \\
% the model document.
%
% \begin{itemize}
@@ -300,7 +315,7 @@
%
% \section{The Coding}
%
-% \texttt{screenplay.cls v1.487} was tested with\ldots
+% \texttt{screenplay.cls v1.496} was tested with\ldots
% \begin{itemize}
% \item pdfe\TeX\ 3.141592-1.21a-2.2 (\Web2C\ 7.5.4)
% \item \texttt{dvips(k)} 5.95a
@@ -320,7 +335,7 @@
% \end{macrocode}
% Say it like it is\ldots
% \begin{macrocode}
-\ProvidesClass{screenplay}[2006/09/27 v1.487
+\ProvidesClass{screenplay}[2006/09/30 v1.496
LaTeX2e Draft Screenplay document class
(C)2006 John Pate
released under the GNU General Public License]
@@ -329,12 +344,12 @@
% \begin{macrocode}
\DeclareOption*{%
\PackageError{screenplay}{Unwanted option '\CurrentOption'}%
- {There are no options available for class screenplay v1.487}}
+ {There are no options available for class screenplay v1.496}}
\ProcessOptions\relax
% \end{macrocode}
% |ifthen| needed for testing for optional args\ldots
% \begin{macrocode}
-\RequirePackage{ifthen}
+\RequirePackage{ifthen}[2001/05/26]
% \end{macrocode}
% Use \texttt{article} class for its base functionality,
% \emph{must} be
@@ -346,13 +361,14 @@
% \texttt{geometry} package makes dvips/pdf do the right thang
% for letter paper\ldots
% \begin{macrocode}
-\RequirePackage[dvips,letterpaper]{geometry}
+\RequirePackage[dvips,letterpaper]{geometry}[2002/07/08]
% \end{macrocode}
% \ldots and make sure your printer driver knows letter.
% Yes, you \emph{must} use American 8.5"x11" letter
% paper---stationers in the UK call it `quarto' paper,
% see\ldots\\
-% \texttt{http://www.gwydir.demon.co.uk/jo/units/print.htm}
+% \href{http://www.gwydir.demon.co.uk/jo/units/print.htm}%
+% {\texttt{http://www.gwydir.demon.co.uk/jo/units/print.htm}}
% \begin{macrocode}
\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}
@@ -361,7 +377,7 @@
% \emph{Must} have \texttt{Courier} as font (may cause warnings about
% font stuff, ignore)\ldots
% \begin{macrocode}
-\RequirePackage{courier}
+\RequirePackage{courier}[2004/09/15]
\renewcommand*\familydefault{\ttdefault}
% \end{macrocode}
% Can load hyphenation ability for non-standard font\ldots
@@ -487,7 +503,7 @@
% This must be the first command after |\begin{document}|.
%
% \begin{macro}{\nicholl}
-% |\nicholl{title of your magnum opus}|
+% |\nicholl{title of your magnum opus}| \\
% for Nicholl Competition---just the title, not bolded\ldots
% \begin{macrocode}
\newcommand{\nicholl}[1]{
@@ -514,8 +530,8 @@
% \end{macrocode}
%
% \begin{macro}{\titleauthor}
-% |\titleauthor| |[year]| |{title}| |{author's name}|
-% |{contact details\\email etc}|
+% |\titleauthor| |[year]| |{title}| |{author's name}| \\
+% |{contact details\\email etc}| \\
% the copyright notice doesn't fit the spec so optional\dots if you
% put it on the web though \copyright\ certainly won't hurt!
% \begin{macrocode}
@@ -565,8 +581,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\tilteextra}
-% |\titleextra{extra blurb}| |{title}| |{author's name}|
-% |{contact details\\email etc}|
+% |\titleextra{extra blurb}| |{title}| |{author's name}| \\
+% |{contact details\\email etc}| \\
% for title page---author details with extra blurb
% not recommended by \texttt{script.pdf} but by popular request,
% apparently some people like to put in copyright and
@@ -598,11 +614,10 @@
% \end{macro}
% \textbf{Dialogue blocks}\ldots
% \begin{macro}{\paren}
-% |\paren{hello world}|
-% parenthetical within dialogue environment stage dirs\ldots
-% only for \emph{very short} text (directions) within dialogue
-% environment, the optional argument is for internal use
-% \emph{only}\ldots
+% |\paren{hello world}| \\
+% parenthetical within dialogue environment\ldots
+% only for \emph{very short} text (directions) within dialogue,
+% the optional argument is for internal use \emph{only}\ldots
% \begin{macrocode}
\newcommand{\paren}[2][\\]{%
#1\parentab\parbox[t]{\parenwidth}{\raggedright(#2)\parenkludge}\\
@@ -739,8 +754,7 @@
% \textbf{Title Over}
%
% \begin{macro}{titleover env}
-% Title Over\ldots\\
-% |\begin{titleover}| \ \ldots\ |\end{titleover}|
+% |\begin{titleover}| \ \ldots\ |\end{titleover}| \\
% as pseudo dialogue environment (think ``Star Wars'')
% the optional argument is for internal use \emph{only}\ldots
% \begin{macrocode}
@@ -775,9 +789,8 @@ TITLE OVER:\\
% \end{macrocode}
% \end{macro}
% \begin{macro}{\centretitle}
-% titleover for short text
-% |\centretitle| |{short text}|
-% most often a date\ldots
+% |\centretitle| |{short text}| \\
+% titleover for short text most often a date\ldots
% \begin{macrocode}
\newcommand{\centretitle}[1]{
@@ -794,7 +807,7 @@ TITLE OVER:
% \textbf{Other spiffy macros}
%
% \begin{macro}{\fadein}
-% |\fadein|
+% |\fadein| \\
% always the \emph{first} thing in your script, for some reason\ldots
% \begin{macrocode}
\newcommand{\fadein}{
@@ -807,7 +820,7 @@ FADE IN:
% \end{macrocode}
% \end{macro}
% \begin{macro}{\fadeout}
-% |\fadeout|
+% |\fadeout| \\
% always the last thing in your script, for some reason\ldots
%
% \begin{macrocode}
@@ -866,7 +879,8 @@ FADE IN:
%
% The test file \texttt{test.tex} shows \texttt{screenplay}
% markup applied to ``FOR A FEW DAYS MORE''
-% (\texttt{http://www.oscars.org/nicholl/script.pdf})
+% (\href{http://www.oscars.org/nicholl/script.pdf}%
+% {\texttt{http://www.oscars.org/nicholl/script.pdf}})
% and the \texttt{test.pdf} file was generated from that.
%
% A printout of the first page \texttt{script.pdf} and
@@ -901,7 +915,7 @@ FADE IN:
%% see http://www.dvc.org.uk/sacrific.txt/
%% for more information on the document class.
%%
-\documentclass{screenplay}[2006/09/27]
+\documentclass{screenplay}[2006/09/30]
\begin{document}
\titleauthor{For a Few Days More}{April Rider}
{April Rider\\
@@ -959,7 +973,7 @@ comes.
%\fi
%\iffalse
%<*example>
-\documentclass{screenplay}[2006/09/27]
+\documentclass{screenplay}[2006/09/30]
\begin{document}
%% cover page, this command has to go first ...
%% choose one of \titleauthor, \titleextra, \nicholl ...
diff --git a/Master/texmf-dist/source/latex/verse/verse.dtx b/Master/texmf-dist/source/latex/verse/verse.dtx
index 99873ab3569..a4395e105fa 100644
--- a/Master/texmf-dist/source/latex/verse/verse.dtx
+++ b/Master/texmf-dist/source/latex/verse/verse.dtx
@@ -1,11 +1,9 @@
% \iffalse meta-comment
%
-%
% verse.dtx
% Author: Peter Wilson (herries dot press at earthlink dot net)
% Herries Press
-% (or at: pandgwilson at earthlink dot net)
-% Copyright 2001--2005 Peter R. Wilson
+% Copyright 2001--2006 Peter R. Wilson
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -20,8 +18,6 @@
%
% This work consists of the files listed in the README file.
%
-%
-%
%<*driver>
\documentclass{ltxdoc}
\usepackage{alltt}
@@ -37,7 +33,7 @@
%
% \fi
%
-% \CheckSum{483}
+% \CheckSum{524}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -88,6 +84,7 @@
% \changes{v2.2}{2002/07/18}{Added interstanza spacing}
% \changes{v2.21}{2004/03/21}{Made compatible with hangul package}
% \changes{v2.22}{2005/08/22}{Made compatible with hyperref package}
+% \changes{v2.3}{2006/01/14}{Added switch for linenumber side}
%
% \def\dtxfile{verse.dtx}
% ^^A \def\fileversion{v1.0}
@@ -102,6 +99,7 @@
% \def\fileversion{v2.2} \def\filedate{2002/07/18}
% \def\fileversion{v2.21} \def\filedate{2004/03/21}
% \def\fileversion{v2.22} \def\filedate{2005/08/22}
+% \def\fileversion{v2.3} \def\filedate{2006/01/14}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -338,6 +336,19 @@
% \DescribeMacro{\vindent}
% When a verse line is too long to fit within the typeblock it is
% wrapped onto the next line with a space, given by the value of the
+% length \cs{vindent}.
+%
+% \DescribeMacro{\leftmargini}
+% All verse lines have a minimum indent given by the length \cs{leftmargini}
+% which also applies to any list environment. To change the minimum
+% indent for verses do something along the lines:
+% \begin{verbatim}
+% \newlength{\saveleftmargini}
+% \setlength{\saveleftmargini}{\leftmargini}
+% \setlength{\leftmargini}{-1em}% for example to outdent verse
+% % verses
+% \setlength{\leftmargini}{\saveleftmargini}% restore original value
+% \end{verbatim}
%
% \DescribeMacro{\stanzaskip}
% The length |\stanzaskip| controls the spacing between stanzas.
@@ -366,10 +377,22 @@
% any numbering.
%
% \DescribeMacro{\thepoemline}
+% \DescribeMacro{\verselinenumfont}
+% Lines are numbered via \cs{thepoemline} which defaults to typesetting
+% arabic numerals via: \\
+% \verb?\renewcommand*{\thepoemline}{\arabic{poemline}}? \\
+% The particular font is defined by \cs{verselinenumfont}\marg{font-spec}.
+% The default is: \\
+% \verb?\verselinenumfont{\rmfamily}? \\
+%
% \DescribeMacro{\vrightskip}
-% Lines are numbered via |\thepoemline| which defaults to typesetting normal
-% sized arabic numerals. These are typeset at the distance |\vrightskip| into
-% the right margin.
+% \DescribeMacro{\verselinenumbersleft}
+% \DescribeMacro{\verselinenumbersright}
+% By default the numbers are typeset at the distance \cs{vrightskip} into the
+% right margin.
+% If you want line numbers set at the left use the \cs{verselinenumbersleft}
+% declaration. To revert to the default use \cs{verselinenumbersright}.
+%
%
% \DescribeMacro{\\}
% Within the |verse| environment, the macro |\\| must be used at the
@@ -570,27 +593,27 @@
% \poemtitle{In the beginning}
% \settowidth{\versewidth}{And objects at rest tended to remain at rest}
% \begin{verse}[\versewidth]
-% Then God created Newton, \\
-% And objects at rest tended to remain at rest, \\
-% And objects in motion tended to remain in motion, \\
+% Then God created Newton, \\*
+% And objects at rest tended to remain at rest, \\*
+% And objects in motion tended to remain in motion, \\*
% And energy was conserved
% and momentum was conserved
-% and matter was conserved \\
+% and matter was conserved \\*
% And God saw that it was conservative.
% \end{verse}
% \attrib{Possibly from \textit{Analog}, circa 1950}
% \end{verbatim}
%
-% \enlargethispage{\baselineskip}
+% \clearpage
% \poemtitle{In the beginning}
% \settowidth{\versewidth}{And objects at rest tended to remain at rest}
% \begin{verse}[\versewidth]
-% Then God created Newton, \\
-% And objects at rest tended to remain at rest, \\
-% And objects in motion tended to remain in motion, \\
+% Then God created Newton, \\*
+% And objects at rest tended to remain at rest, \\*
+% And objects in motion tended to remain in motion, \\*
% And energy was conserved
% and momentum was conserved
-% and matter was conserved \\
+% and matter was conserved \\*
% And God saw that it was conservative.
% \end{verse}
% \attrib{Possibly from \textit{Analog}, circa 1950}
@@ -876,22 +899,35 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\verselinenumfont}
+% \begin{macro}{\vlvnumfont}
+% Set the font for line numbers.
+% \changes{v2.3}{2006/01/14}{Added \cs{verselinenumfont} and \cs{vlvnumfont}}
+% \begin{macrocode}
+\newcommand*{\verselinenumfont}[1]{\def\vlnumfont{#1}}
+\verselinenumfont{\rmfamily}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\getmodulo@vs}
% This returns either nothing or a poem line number for printing.
% \changes{v2.0}{2002/03/24}{Added \cs{getmodulo@vs}}
% \begin{macrocode}
-\newcommand{\getmodulo@vs}{{\@tempcnta\c@poemline
+\newcommand{\getmodulo@vs}{\bgroup
+ \@tempcnta\c@poemline
\ifnum\c@modulo@vs<\@ne % no line numbers
\else
\ifnum\c@modulo@vs<\tw@ % number every line
- \thepoemline
+ \vlnumfont\thepoemline
\else
\divide\@tempcnta\c@modulo@vs
\multiply\@tempcnta\c@modulo@vs
- \ifnum\@tempcnta=\c@poemline\thepoemline\fi
+ \ifnum\@tempcnta=\c@poemline\vlnumfont\thepoemline\fi
\fi
\fi
-}}
+\egroup}
% \end{macrocode}
% \end{macro}
@@ -976,12 +1012,14 @@
% \end{macro}
%
% \begin{macro}{\verselinebreak}
-% Break a verse line by inserting |\newline|.
+% Break a verse line by inserting \cs{newline}.\footnote{In an email to me
+% dated 2006/01/13 Aaron Rendahl pointed out that this should include
+% an \cs{ignorespaces}.}
% \changes{v2.0}{2002/03/24}{Modified \cs{verselinebreak}}
% \changes{v2.1}{2002/03/28}{Modified \cs{verselinebreak}}
+% \changes{v2.3}{2006/01/14}{Added \cs{ignorespaces} to \cs{verselinebreak}}
% \begin{macrocode}
-\newcommand{\verselinebreak}[1][\z@]{\newline\hspace*{#1}% extra verseindent
-}
+\newcommand*{\verselinebreak}[1][\z@]{\newline\hspace*{#1}\ignorespaces}
% \end{macrocode}
% \end{macro}
%
@@ -1013,6 +1051,29 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@vstypelinenumright}
+% \begin{macro}{\@vstypelinenumleft}
+% \begin{macro}{\verselinenumbersright}
+% \begin{macro}{\verselinenumbersleft}
+% These control the typesetting of verse linenumbers to the
+% right and to the left of the verse. Default is to set them at
+% the right.
+% \changes{v2.3}{2006/01/14}{Added left/right switching line numbers}
+% \begin{macrocode}
+\newcommand*{\@vstypelinenumright}{%
+ \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}}
+\newcommand*{\@vstypelinenumleft}{%
+ \hfill\rlap{\kern-\textwidth\kern-\vrightskip\getmodulo@vs}}
+\newcommand*{\verselinenumbersright}{\def\@vstypelinenum{\@vstypelinenumright}}
+\newcommand*{\verselinenumbersleft}{\def\@vstypelinenum{\@vstypelinenumleft}}
+\verselinenumbersright
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\@vscentercr}
% This puts the poem line number in the margin, increments
% the line numbers, and then deals with the options. It is based
@@ -1022,11 +1083,13 @@
% \changes{v1.1}{2001/08/03}{Changed definition of \cs{@centercrplus}}
% \changes{v2.0}{2002/03/24}{Renamed \cs{@centercrplus} as \cs{@vscentercr}}
% \changes{v2.0}{2002/03/24}{Major rewrite of \cs{@vscentercr} and friends}
-% \changes{v2.1}{2002/03/28}{Added greater than character to \cs{@vscentercr}}
+% \changes{v2.1}{2002/03/28}{Added greater than character to \cs{@vscentercr}}%
+% \changes{v2.3}{2006/01/14}{Used \cs{@vstypelinenum} in \cs{@vscentercr}}
% \begin{macrocode}
\newcommand{\@vscentercr}{%
\ifhmode \unskip\else \@nolnerr\fi
- \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}%
+ \@vstypelinenum%
+%%%% \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}%
% \end{macrocode}
% For |>| call |\verselinebreak| to process it.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/verse/verse.ins b/Master/texmf-dist/source/latex/verse/verse.ins
index de7824296aa..c01e47a65be 100644
--- a/Master/texmf-dist/source/latex/verse/verse.ins
+++ b/Master/texmf-dist/source/latex/verse/verse.ins
@@ -1,7 +1,7 @@
%% verse.ins
%% Author: Peter Wilson (herries dot press at earthlink dot net
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2006 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -32,7 +32,7 @@
-----------------------------------------------------------------
Author: Peter Wilson (herries dot press at earthlink dot net)
Herries Press
- Copyright 2001--2005 Peter R. Wilson
+ Copyright 2001--2006 Peter R. Wilson
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/source/latex/xcolor/xcolor.dtx b/Master/texmf-dist/source/latex/xcolor/xcolor.dtx
index 04fc084392c..92b4ea5e712 100644
--- a/Master/texmf-dist/source/latex/xcolor/xcolor.dtx
+++ b/Master/texmf-dist/source/latex/xcolor/xcolor.dtx
@@ -17,8 +17,8 @@
%%
%</package>
%<*extract|driver|test1|test2|test3|test4>
-\def\XCfileversion{v2.06}%
-\def\XCfiledate{2005/10/15}%
+\def\XCfileversion{v2.09}%
+\def\XCfiledate{2005/12/21}%
%</extract|driver|test1|test2|test3|test4>
%
% This file may be distributed and/or modified under the
@@ -33,7 +33,7 @@
%
% \fi
%
-% \CheckSum{4242}
+% \CheckSum{4875}
%
% \DoNotIndex{\def,\gdef,\edef,\xdef,\long,\let}
% \DoNotIndex{\ifnum,\ifdim,\iftrue,\iffalse,\ifx,\ifcase,\else,\or,\fi}
@@ -106,8 +106,8 @@
[\GinDriver,hyperindex=false,bookmarks,bookmarksopen,bookmarksopenlevel=1,%
pdftitle={xcolor \XCfileversion{} (\XCfiledate)},pdfauthor={Dr. Uwe Kern},%
pdfsubject={Color extensions for LaTeX and pdfLaTeX},%
- pdfkeywords={xcolor,color,colour,model,tint,tone,shade,spot,latex,pdftex,dvips,%
- conversion,blend,mix,mask,separation,rgb,cmy,cmyk,hsb,gray,html,wave}]{hyperref}
+ pdfkeywords={xcolor,color,colour,model,tint,tone,shade,harmony,spot,latex,pdftex,dvips,%
+ conversion,blend,mix,mask,separation,rgb,cmy,cmyk,hsb,gray,html,wave,thsb,wheel}]{hyperref}
\OnlyDescription
\EnableCrossrefs
\CodelineIndex
@@ -142,6 +142,7 @@
\generate{
\ukfile0{xcolor}{package}{LaTeX color extensions}
\ukfile2{svgnam}{svgnames}{Predefined colors according to SVG 1.1}
+\ukfile2{x11nam}{x11names}{Predefined colors according to Unix/X11}
\ukfile1{xcolor1}{test1}{Color conversion test}
\ukfile1{xcolor2}{test2}{Pstricks color test}
\ukfile1{xcolor3}{test3}{Color logging test}
@@ -172,6 +173,7 @@
% \DeclareRobustCommand*\Meta{\@ifstar{\@Metatrue\@Meta}{\@Metafalse\@Meta}}
% \newcommand*\@Meta[2][]{\meta{#2}\@ifxempty{#1}{}{\ensuremath{\mskip-1mu\rule[-.4ex]{0pt}{1ex}_{#1}}}\if@Meta\index{arguments\levelchar\meta{#2}\string|usage}\fi}
% \def\DescribeArg#1{\leavevmode\@bsphack\marginpar{\raggedleft\Meta*{#1}}\@esphack\ignorespaces}
+% \def\DescribeFunc#1{\leavevmode\@bsphack\marginpar{\raggedleft\Function{#1}\strut}\@esphack\ignorespaces}
%
% \makeatother
%
@@ -180,11 +182,13 @@
% \def\Program#1{\textsf{\itshape#1}\index{programs\levelchar\textsf{\itshape#1}\string|usage}}
% \def\Model#1{\textsf{\bfseries#1}\index{color models\levelchar\textsf{\bfseries#1}\string|usage}}
% \def\nModel#1{`#1'\index{color models\levelchar`#1'\string|usage}}
+% \def\pModel#1{\textbf{\itshape #1}}
% \def\People#1#2{#1 #2\index{people\levelchar#2, #1\string|usage}}
% \newcommand*\Color[2][+]{\textsl{#2}\ifx#1+\index{color names\levelchar\textsl{#2}\string|usage}\fi}
% \def\Option#1{\texttt{#1}\index{package options\levelchar\texttt{#1}\string|usage}}
% \def\Key#1{\textit{#1}\index{keys\levelchar\textit{#1}\string|usage}}
% \def\File#1{\texttt{#1}\index{files\levelchar\texttt{#1}\string|usage}}
+% \def\Function#1{\textit{#1}\index{color functions\levelchar\textit{#1}\string|usage}}
% \def\Op#1#2{#1\nolimits_{\,\Model{#2}}}
% \def\med{\mathop{\textrm{med}}}
% \def\mix{\mathop{\textrm{mix}}}
@@ -204,6 +208,7 @@
% \def\ItoR#1{\Delta_{#1}}
% \def\bbbN{\textrm{I\kern-.333ex N}}
% \def\bbbR{\textrm{I\kern-.333ex R}}
+% \def\Circ{\textsuperscript{$\circ$}}
%
% \newdimen\XCdim
%
@@ -232,7 +237,7 @@
% \begin{abstract}
% \noindent
% \XC{} provides easy driver-independent access to several kinds of colors, tints, shades, tones, and mixes of arbitrary colors by means of color expressions like |\color{red!50!green!20!blue}|.
-% It allows to select a document-wide target color model and offers tools for automatic color schemes, conversion between nine color models, alternating table row colors, color blending and masking, and color separation.
+% It allows to select a document-wide target color model and offers tools for automatic color schemes, conversion between twelve color models, alternating table row colors, color blending and masking, color separation, and color wheel calculations.
% \end{abstract}
%
% \phantomsection\pdfbookmark[1]{\contentsname}{toc}
@@ -298,9 +303,10 @@
% where |white|, |black|, and |gray| are model-specific constants, see table \vref{tab.const}.
% Further we define the term
% \begin{itemize}
-% \item \textbf{complement}: a color $C^*$ that yields \Color{white} if superposed with the original color $C$.
+% \item \textbf{complement}: a color $C^*$ that yields \Color{white} if superposed with the original color $C$,
% \end{itemize}
-% See section \vref{sec.cnv} for details.
+% knowing that there are also different concepts of complementarity in place (e.g., opposite colors on \emph{color wheels}).
+% See section \vref{sec.cnv} for calculation details and section \vref{sec.harmony} for some remarks on color wheels.
%
%
%
@@ -314,6 +320,40 @@
%
%
%
+% \subsection{Color wheels and color harmony}\label{sec.harmony}
+%
+% There has been a long history of placing colors (hues) on wheels in order to discuss theoretical or practical color issues (e.g., \People{Isaac}{Newton}, \People{Johann Wolfgang von}{Goethe}).
+% One reason may be that the circle itself is a natural tool to demonstrate common relationships as well as opposite properties.
+%
+% Nowadays, there exists some confusion about notions, since both major areas related to color --- art and graphics design on one hand, scientific color theory on the other hand --- tend to use the same words to describe color properties, however meaning sometimes very different facts!
+% Thus, the appearance of color wheels differs as well as the meaning of concepts like `primary' or `complementary' colors.
+%
+%
+% \paragraph{Typical color wheel construction}
+% First, three \emph{primary colors} are placed at 0\Circ, 120\Circ, 240\Circ (artists often choose \Color{red}, \Color{yellow}, \Color{blue}, whereas color scientists might prefer \Color{red}, \Color{green}, \Color{blue}).
+% Next, three \emph{secondary colors} are put at 60\Circ, 180\Circ, 300\Circ.
+% Then, six \emph{tertiary colors} may be placed in between (30\Circ, 90\Circ, \dots).
+% This is why color wheels are frequently described to consist of twelve equidistant colors, although the algorithm can be repeated arbitrarily often.
+%
+%
+% \paragraph{Color harmonies derived from a wheel}
+% We start with an arbitrary color wheel:
+% \begin{itemize}
+% \item \textbf{complementary colors} have a distance of 180\Circ{} on the wheel,
+% \item \textbf{color triads} consist of three colors in 120\Circ{} steps,
+% \item \textbf{color tetrads} consist of four colors in 90\Circ{} steps.
+% \end{itemize}
+% We assume now that the wheel is partitioned into $2n$ sectors of equal size:
+% \begin{itemize}
+% \item \textbf{split complementary colors} of a given color are the two immediate neighbours of its complementary color, characterised by the positions $\frac{n\pm1}{2n}\cdot360^\circ$,
+% \item \textbf{analogous colors} to a given color are its two or four neighbours, characterised by the positions $\pm\frac{1}{2n}\cdot360^\circ$ and $\pm\frac{2}{2n}\cdot360^\circ$.
+% \end{itemize}
+% Given these methods to generate `color harmonies', we conclude that the results depend heavily on how we constructed the wheel!
+% Moreover, the choice of $n$ will affect the visual results as well.
+% Examples are shown in figure \vref{fig.harmony}.
+%
+%
+%
%
% \clearpage
% \section{The User Interface}
@@ -337,9 +377,9 @@
% \begin{itemize}
% \item options that determine the color driver as explained in \cite{dpc} and \cite{color}, currently: \Option{dvips}, \Option{xdvi}, \Option{dvipdf}, \Option{dvipdfm}, \Option{dvipdfmx}, \Option{pdftex}, \Option{dvipsone}, \Option{dviwindo}, \Option{emtex}, \Option{dviwin}, \Option{oztex}, \Option{textures}, \Option{pctexps}, \Option{pctexwin}, \Option{pctexhp}, \Option{pctex32}, \Option{truetex}, \Option{tcidvi}, \Option{vtex}, \Option{xetex},
% \item options that determine the target color model\footnote{Section \vref{sec.tgt} explains how this setting can be overridden at any point in a document.} (\Option{natural}, \Option{rgb}, \Option{cmy}, \Option{cmyk}, \Option{hsb}, \Option{gray}, \Option{RGB}, \Option{HTML}, \Option{HSB}, \Option{Gray}) or disable colored output (\Option{monochrome}),
-% \item options that control whether and how certain sets of predefined colors are being loaded: \Option{dvipsnames}, \Option{dvipsnames*}, \Option{svgnames}, \Option{svgnames*},
+% \item options that control whether and how certain sets of predefined colors are being loaded: \Option{dvipsnames}, \Option{dvipsnames*}, \Option{svgnames}, \Option{svgnames*}, \Option{x11names}, \Option{x11names*},
% \item options that determine which other packages are to be loaded (\Option{table}, \Option{fixpdftex}, \Option{pst}\footnote{\label{fnt.pst}This option will soon become obsolete, since recent \File{pstricks.sty} versions do load \XC, whereas \Package{pstcol} is no longer needed.}) or supported (\Option{hyperref}),
-% \item options that determine the behaviour of other commands: \Option{prologue}, \Option{showerrors}, \Option{hideerrors},
+% \item options that determine the behaviour of other commands: \Option{prologue}, \Option{kernelfbox}, \Option{xcdraw}, \Option{noxcdraw}, \Option{showerrors}, \Option{hideerrors},
% \item obsolete options: \Option{override}, \Option{usenames}, \Option{nodvipsnames}.
% \end{itemize}
% All available package options (except driver selection and obsolete options) are listed in table \vref{tab.opt}.
@@ -377,6 +417,7 @@
% \hline
% \Option{dvipsnames}, \Option{dvipsnames*}& Load a set of predefined colors.\footnotemark[1]\\
% \Option{svgnames}, \Option{svgnames*}& Load a set of predefined colors according to \Index{SVG} 1.1.\footnotemark[1]\\
+% \Option{x11names}, \Option{x11names*}& Load a set of predefined colors according to \Index{Unix}/\Index{X11}.\footnotemark[1]\\
% \hline
% \Option{table}& Load the \Package{colortbl} package, in order to use the tools for coloring rows, columns, and cells within tables.\\
% \Option{fixpdftex}& Load the \Package{pdfcolmk} package, in order to improve |pdftex|'s color behaviour (see section \vref{sec.fixpdftex}).\\
@@ -384,10 +425,15 @@
% \Option{hyperref}& Support the \Package{hyperref} package in terms of color expressions by defining additional keys (see section \vref{sec.hyperref}).\\
% \hline
% \Option{prologue}& Write prologue information to \File{.xcp} file for every color definition (as described in section \vref{sec.prologue}).\\
+% \hline
+% \Option{kernelfbox}& Use \LaTeX{} kernel method to draw \texttt{\string\f(rame)box} frames\footnotemark[2].\\
+% \Option{xcdraw}& Use driver-specific commands to draw frames and color boxes.\footnotemark[2]\\
+% \Option{noxcdraw}& (Default.) Use generic code to draw frames and color boxes.\footnotemark[2]\\
+% \hline
% \Option{showerrors}& (Default.) Display an error message if an undefined color is being used (same behaviour as in the original \LCP).\\
% \Option{hideerrors}& Display only a warning if an undefined color is being used, and replace this color by \Color{black}.\\
% \hline\hline
-% \multicolumn2{c}{\footnotemark[1]\,these options are explained in section \vref{sec.additionalcolors}}\\
+% \multicolumn2{c}{\footnotemark[1]\,See section \vref{sec.additionalcolors}.\quad \footnotemark[2]\,See section \vref{sec.fbox}.}\\
% \hline
% \end{tabularx}
% \end{adjustwidth}
@@ -424,6 +470,8 @@
% \Model{cmy} & cyan, magenta, yellow & \left[0,1\right]^3&& \\
% \Model{cmyk} & cyan, magenta, yellow, black & \left[0,1\right]^4&& \\
% \Model{hsb} & hue, saturation, brightness & \left[0,1\right]^3&& \\
+% \Model{Hsb} & hue\Circ\!, saturation, brightness & \left[0,H\right]\times\left[0,1\right]^2&$H=$& $\mkern-15mu\rangeHsb$\\
+% \Model{tHsb} & hue\Circ\!, saturation, brightness & \left[0,H\right]\times\left[0,1\right]^2&$H=$& $\mkern-15mu\rangeHsb$\\
% \Model{gray} & gray & \left[0,1\right]&& \\
% \Model{RGB} & Red, Green, Blue & \{0,1,\dots,L\}^3& $L\,=$& $\mkern-15mu\rangeRGB$\\
% \Model{HTML} & RRGGBB & \{\texttt{000000},\dots,\texttt{FFFFFF}\}&& \\
@@ -431,7 +479,7 @@
% \Model{Gray} & Gray & \{0,1,\dots,N\}& $N\,=$& $\mkern-15mu\rangeGray$\\
% \Model{wave} & lambda \emph{(nm)}& \left[363,814\right]&& \\
% \hline\hline
-% \multicolumn5{c}{$L,M,N$ are positive integers}\\
+% \multicolumn5{c}{$L,M,N$ are positive integers; $H$ is a positive real number}\\
% \hline
% \end{tabular}
% \end{table}
@@ -443,9 +491,10 @@
% Here is a simple interface to pass commands that should be executed at the end of the \XCP{} (immediately before the initialising |\color{black}| is executed).
% Just say |\def\xcolorcmd|\marg{commands} at some point before \XC{} is loaded.
%
-% Example: assuming that |a.tex| is a complete \LaTeX{} document, the command
-% |latex \def\xcolorcmd{\colorlet{black}{red}}\input{a}|
+% Example: assuming that |a.tex| is a complete \LaTeX{} document, a command like
+% `|latex \def\xcolorcmd{\colorlet{black}{red}}\input{a}|'
% at the console generates a file |a.dvi| with all occurences of \Color{black} being replaced by \Color{red}, without the necessity to change the source file itself.
+% (The exact spelling of the console command might vary across operating systems and \TeX{} distributions.)
%
%
%
@@ -453,20 +502,59 @@
%
% \subsubsection{Supported color models}
%
-% The list of supported color models is given in table \vref{tab.mod}.
+% The list of supported color models and their parameter ranges is given in table \vref{tab.mod}.
% We emphasize that this color support is independent of the chosen driver.
%
% `Color model support' also means that it is possible to specify colors directly with their parameters, e.g., by saying |\textcolor[cmy]{0.7,0.5,0.3}{foo}| (\textcolor[cmy]{0.7,0.5,0.3}{foo}) or |\textcolor[HTML]{AFFE90}{foo}| (\textcolor[HTML]{AFFE90}{foo}).
-% It is noteworthy that the \Model{HTML} model accepts any combination of the characters \texttt0--\texttt9, \texttt A--\texttt F, \texttt a--\texttt f, as long as the string has a length of exactly 6~characters.
-% However, outputs of conversions to \Model{HTML} will always consist of numbers and \emph{uppercase} letters.
%
+% \paragraph{\Model{rgb}, \Model{cmyk}, \Model{hsb}, \Model{gray}}
+% These are the models supported by \Index{PostScript} directly.
+% We therefore refer to \cite{plrm} for a description of their properties and relations.
+% There is a special command
% \DescribeMacro\adjustUCRBG
-% There is a special command to fine-tune the mechanisms of \emph{undercolor-removal} and \emph{black-generation} during conversion to the \Model{cmyk} model, see section \vref{sec.cmy2cmyk} for details.
+% to fine-tune the mechanisms of \emph{undercolor-removal} and \emph{black-generation} during conversion to the \Model{cmyk} model, see section \vref{sec.cmy2cmyk} for details.
%
+% \paragraph{\Model{cmy}}
+% This is mainly a model for intermediary calculation steps.
+% With respect to that, it is a simple complement of \Model{rgb}.
+% As far as visualisation is concerned, \Model{cmy} is treated as \Model{cmyk} with $k=0$.
+%
+% \paragraph{\Model{HTML}}
+% This is a model derived from \Model{rgb} in order to enable input of color parameters from web pages or CSS files.
+% Therefore, it is not really a color model of its own right, but rather a user interface for convenience.
+% It is worth mentioning that \Model{HTML} accepts any combination of the characters |0|--|9|, |A|--|F|, |a|--|f|, as long as the string has a length of exactly 6~characters.
+% However, outputs of conversions to \Model{HTML} will always consist of numbers and \emph{uppercase} letters.
+%
+% \paragraph{\Model{Hsb}, \Model{tHsb}}
+% Firstly, \Model{Hsb} is a `user interface' model, mapping $\emph{hue}\in[0,1]$ onto $\emph{hue\Circ}\in[0,H]$, where $H$ is given by |\def\rangeHsb|\marg{H}.
+% \DescribeMacro\rangeHsb
+% Thus, if $H=360$, we can think of a circle or wheel to specify the \emph{hue\Circ} parameter.
+% Secondly, \Model{Hsb} is the basis for \Model{tHsb}, also named \pModel{tuned} \Model{Hsb}, which enables the user to apply a piecewise linear transformation on \emph{hue\Circ} by shifting selected \emph{hue\Circ} values forward or backward on the circle.
+% This transformation is defined by |\def\rangetHsb{|$x_1,y_1;x_2,y_2;\dots$|}|
+% \DescribeMacro\rangetHsb
+% which specifies that $\emph{hue\Circ}=x_1$ in \Model{tHsb} means $\emph{hue\Circ}=y_1$ in \Model{Hsb}, etc.
+% For example, \Color{yellow} is at 60\Circ{} in the \Model{Hsb} circle (\Color{red} being at 0\Circ), however, in most color wheels used by artists, \Color{yellow} is at 120\Circ.
+% Therefore, a `|120,60|' entry would make sense if we planned to replicate an artist's color wheel via \Model{tHsb}.
+% See section \vref{sec.tHsb2Hsb} for the exact transformation formula and further restrictions, and section \vref{sec.harmony} for color wheels and color harmonies.
+% Figure \vref{fig.tHsb} may serve for comparison purposes.
+%
+% Example: `|\def\rangetHsb{|\texttt{\rangetHsb}|}|' is in fact \XC's default setting.
+%
+% \paragraph{\Model{wave}}
+% With this model we try to make wavelengths transformable to standard color models, in order to approximate the visual appearance of light waves.
+% While the visible spectrum covers a range of approximately 400--750\,nm, the implementation in \XC{} generally allows for all real `wavelengths' $\lambda$ that have an absolute value less than \csname strip@pt\endcsname\maxdimen{} (the biggest number \TeX{} can represent as a dimension).
+% However, the probability of getting any non-black color outside the range of $\lambda\in[363,814]$ is exactly zero.
+% Therefore, figure \vref{fig.spectrum} illustrates only the mentioned wavelength interval.
+% Note that it is not possible to convert other models to \Model{wave} in a sensible way, since the latter covers only a limited range of colors.
+%
+% \paragraph{\Model{RGB}, \Model{HSB}, \Model{Gray}}
+% These are derived models, turning the continuous $[0,1]$ parameter ranges of \Model{rgb}, \Model{hsb}, and \Model{gray} to finite sets of integers; we therefore use the term \emph{integer models}.
+% The constants $L, M, N$ of table \ref{tab.mod} are defined via the commands |\def\rangeRGB|\marg{L},
% \DescribeMacro\rangeRGB
+% |\def\rangeHSB|\marg{M},
% \DescribeMacro\rangeHSB
+% and |\def\rangeGray|\marg{N}.
% \DescribeMacro\rangeGray
-% For the \emph{integer models} \Model{RGB}, \Model{HSB}, and \Model{Gray}, the constants $L, M, N$ of table \ref{tab.mod} are defined via the commands |\def\rangeRGB|\marg{L}, |\def\rangeHSB|\marg{M}, and |\def\rangeGray|\marg{N}.
% Changes of these constants can be done \emph{before} or \emph{after} the \XCP{} is loaded, e.g.,
% \label{ex.range}\begin{verbatim}
% \documentclass{article}
@@ -515,12 +603,13 @@
%
% \begin{table}[p]\caption{Arguments and terminology}\label{tab.term}
% \def\RS{\ensuremath{\to}\space}
-% \small\raggedleft
+% \footnotesize\raggedleft
% \extrarowheight2pt
% \begin{adjustwidth}{-2.5cm}{}
% \advance\textwidth2.5cm
+% \tabcolsep.25em
% \rowcolors{3}{tablerowcolor}{}
-% \begin{tabularx}{\textwidth}{l@{ }X}
+% \begin{tabularx}{\textwidth}{lX}
% \hline
% \rowcolor{tableheadcolor}
% \em Element & \em Replacement string\\
@@ -543,11 +632,13 @@
% \Meta*{core model}& \RS `|rgb|', `|cmy|', `|cmyk|', `|hsb|', `|gray|'\hfill(\emph{core models})\\
% \Meta*{num model}& \RS \Meta{core model}\newline
% \RS `|RGB|', `|HTML|', `|HSB|', `|Gray|'\hfill(\emph{integer models})\newline
-% \RS `|wave|'\hfill(\emph{real model})\\
+% \RS `|Hsb|', `|tHsb|', `|wave|'\hfill(\emph{decimal models})\\
% \Meta*{model}& \RS \Meta{num model}\hfill(\emph{numerical models})\newline
% \RS `|named|'\hfill(\emph{pseudo model})\\
-% \Meta*{model-list}& \RS \Meta[1]{model}|/|\Meta[2]{model}|/.../|\Meta[m]{model} \hfill(\emph{multiple models})\\
+% \Meta*{model-list}& \RS \Meta[1]{model}|/|\Meta[2]{model}|/.../|\Meta[m]{model} \hfill(\emph{multiple models})\newline
+% \RS \Meta{core model}|:|\Meta[1]{model}|/|\Meta[2]{model}|/.../|\Meta[m]{model}\\
% \Meta*{spec}& \RS comma-separated list of numerical values\hfill(\emph{explicit specification})\newline
+% \RS space-separated list of numerical values\hfill(\emph{explicit specification})\newline
% \RS name of a `named' color\hfill(\emph{implicit specification})\\
% \Meta*{spec-list}& \RS \Meta[1]{spec}|/|\Meta[2]{spec}|/.../|\Meta[m]{spec} \hfill(\emph{multiple specifications})\\
% \Meta*{type}& \RS \Meta{empty}\newline
@@ -562,19 +653,23 @@
% \RS |!!|\Meta{plus}\hfill(\emph{series step})\newline
% \RS |!![|\Meta{num}|]|\hfill(\emph{series access})\\
% \hline
-% \Meta*{ext expr}& \RS \Meta{core model}|,|\Meta{div}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|!|\Meta[k]{dec}\newline
-% \RS \Meta{core model}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|!|\Meta[k]{dec}\\
+% \Meta*{ext expr}& \RS \Meta{core model}|,|\Meta{div}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|,|\Meta[k]{dec}\newline
+% \RS \Meta{core model}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|,|\Meta[k]{dec}\\
% \hline
-% \Meta*{color}& \RS \Meta{name}\newline
-% \RS \Meta{expr}\newline
-% \RS \Meta{ext expr}\\
+% \Meta*{func expr}& \RS |>|\Meta{function}|,|\Meta[1]{arg}|,|\Meta[2]{arg}|,...,|\Meta[j]{arg}\hfill(\emph{color function expression})\\
+% \Meta*{function}& \RS `|wheel|', `|twheel|'\hfill(\emph{color functions})\\
+% \hline
+% \Meta*{color}& \RS \Meta{color expr}\Meta[1]{func expr}\Meta[2]{func expr}|...|\Meta[i]{func expr}\\
+% \Meta*{color expr}& \RS \Meta{name}\newline
+% \RS \Meta{expr}\newline
+% \RS \Meta{ext expr}\\
% \hline\hline
% \rowcolor{white}
% Remarks:& Each \RS denotes a possible replacement string for the element in the left column;
-% however, further restrictions may apply --- depending on the context.
+% however, further context-dependent restrictions may apply.
% See main text for details.
-% A string `|foo|' is always to be understood without the quotes.\newline
-% $k,l,m,n$ denote positive integers, $m\le8$.\\
+% A string `|foo|' is always to be understood without the quotes.
+% $i,j,k,l,m,n$ denote non-negative integers, $k,l,m,n>0$, $m\le8$.\\
% \hline
% \end{tabularx}
% \end{adjustwidth}
@@ -619,8 +714,8 @@
% \DescribeArg{core model}
% \DescribeArg{num model}
% \DescribeArg{model}
-% The differentiation between \emph{core models} (\Model{rgb}, \Model{cmy}, \Model{cmyk}, \Model{hsb}, \Model{gray}), \emph{integer models} (\Model{RGB}, \Model{HTML}, \Model{HSB}, \Model{Gray}), and \emph{pseudo models} (currently \nModel{named}, \nModel{ps}) has a simple reason: core models with their parameter ranges based on the unit interval $[0,1]$ are best suited for all kinds of calculations, whereas the purpose of the integer models is mainly to facilitate the input of parameters, followed by some transformation into one of the core models.
-% Finally, the real model \Model{wave} (which approximates the visual appearance of light waves) and the pseudo model \nModel{named} have a special status, since they are `calculation-averse': it is usually only possible to convert such a color into one of the other models, but not the other way round.
+% The differentiation between \emph{core models} (\Model{rgb}, \Model{cmy}, \Model{cmyk}, \Model{hsb}, \Model{gray}), \emph{integer models} (\Model{RGB}, \Model{HTML}, \Model{HSB}, \Model{Gray}), \emph{decimal models} (\Model{Hsb}, \Model{tHsb}, \Model{wave}) and \emph{pseudo models} (currently \nModel{named}, \nModel{ps}) has a simple reason: core models with their parameter ranges based on the unit interval $[0,1]$ are best suited for all kinds of calculations, whereas the purpose of the integer models is mainly to facilitate the input of parameters, followed by some transformation into one of the core models.
+% Finally, the decimal models \Model{Hsb} and \Model{tHsb} are special-purpose versions of \Model{hsb}, whereas \Model{wave} and the pseudo model \nModel{named} have a special status, since they are `calculation-averse': it is usually only possible to convert such a color into one of the other models, but not the other way round.
% Even worse for the pseudo model \nModel{ps}: since such colors contain \Index{PostScript} code, they are absolutely intransparent for \TeX.
%
%
@@ -629,7 +724,7 @@
% The \Meta{spec} argument --- which specifies the parameters of a color --- obviously depends on the underlying color model.
% We differentiate between \emph{explicit} and \emph{implicit} specification, the former referring to numerical parameters as explained in table \vref{tab.mod}, the latter --- ideally --- referring to driver-provided names.
%
-% Examples: `|.1,.2,.3|', `|0.56789|', `|89ABCD|', `|ForestGreen|'.
+% Examples: `|.1,.2,.3|', `|.1 .2 .3|', `|0.56789|', `|89ABCD|', `|ForestGreen|'.
%
%
% \paragraph{Multiple models and specifications}
@@ -640,8 +735,9 @@
% First, \Meta{model-spec} is being reconciled with the current target model (as set by a package option or the |\selectcolormodel| command); in case there is no exact match, the first model of the list is chosen.
% Then, the corresponding color specification will be selected from \Meta{spec-list}, such that we arrive at a proper $(\Meta{model}, \Meta{spec})$ pair.
% Therefore, in the actual executed color definition there is no ambiguity anymore.
+% The extended form \Meta{core model}|:|\Meta[1]{model}|/|\Meta[2]{model}|/.../|\Meta[m]{model} causes an immediate conversion of the relevant \Meta{spec} to \Meta{core model}; an unknown target model will be silently ignored here.
%
-% Examples: `|rgb/cmyk/named/gray|', `|0,0,0/0,0,0,1/Black/0|'.
+% Examples: `|rgb/cmyk/named/gray|', `|0,0,0/0,0,0,1/Black/0|', `|rgb:cmy/hsb|'.
%
%
% \paragraph{The type argument}
@@ -654,7 +750,7 @@
% \DescribeArg{prefix}
% \DescribeArg{mix expr}
% \DescribeArg{postfix}
-% These expressions serve as a tool to easily specify a certain form of cascaded color mixing which is described in detail in section \vref{sec.expr-meaning}.
+% These expressions serve as a tool to easily specify a certain form of cascaded color mixing which is described in detail in section~\ref{sec.expr-meaning}.
% The \Meta{prefix} argument controls whether the color following thereafter or its complement will be relevant:
% an odd number of minus signs indicates that the color resulting from the remaining expression has to be converted into its complementary color.
% An \emph{incomplete mix expression} is just an abbreviation for a \emph{complete mix expression} with $\Meta[n]{name} = |white|$, in order to save some keystrokes in the case of tints.
@@ -681,8 +777,19 @@
% Examples: `|rgb:red,1|', `|cmyk:red,1;-green!25!blue!60,11.25;blue,-2|'.
%
%
+% \paragraph{Function expressions}
+% \DescribeArg{func expression}
+% \DescribeArg{function}
+% These expressions extend the functionality of \emph{standard} or \emph{extended} expressions by taking the result of such an expression to perform additional calculations.
+% The number of arguments may vary between different functions, see section \vref{sec.functions} for details.
+%
+% Examples: `|>wheel,30|', `|>wheel,30,|', `|>twheel,1,12|', `|>twheel,-11,12|'.
+%
+%
+%
% \paragraph{Colors}
% \DescribeArg{color}
+% \DescribeArg{color expr}
% Finally, \Meta{color} is the `umbrella' argument, covering the different concepts of specifying colors.
% This means, whenever there is a \Meta{color} argument, the full range of names and expressions, as explained above, may be used.
%
@@ -718,7 +825,7 @@
%
% An \emph{extended color expression}
% \begin{gather*}
-% \Meta{core model}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|!|\Meta[k]{dec}
+% \Meta{core model}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|,|\Meta[k]{dec}
% \end{gather*}
% mimes color mixing as painters do it: specify a list of colors, each with a \Meta{dec} factor attached to.
% For such an \Meta{ext expr}, each standard color expression \Meta[\kappa]{expr} will be converted to \Meta{core model}, then the resulting vector is multiplied by $\Meta[\kappa]{dec}/\Meta{div}$, where
@@ -732,7 +839,7 @@
% Note that this mechanism can also be used to display an individual color (expression) in a certain color model: |\color{rgb:yellow,1}| results in such a conversion.
% The general form
% \begin{gather*}
-% \Meta{core model}|,|\Meta{div}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|!|\Meta[k]{dec}
+% \Meta{core model}|,|\Meta{div}|:|\Meta[1]{expr}|,|\Meta[1]{dec}|;|\Meta[2]{expr}|,|\Meta[2]{dec}|;...;|\Meta[k]{expr}|,|\Meta[k]{dec}
% \end{gather*}
% does the same operation with the only difference that the divisor \Meta{div} is being specified instead of calculated.
% In the above example, we get a shaded version \testclr{rgb,9:red,4;green,2;yellow,1} by saying |\color{rgb,9:red,4;green,2;yellow,1}|.
@@ -740,6 +847,26 @@
% However, the mapping of equation (\ref{eq.U}) takes care of such cases.
%
%
+% \subsubsection{Color functions}\label{sec.functions}
+%
+% Color functions take a comma-separated list of arguments, and they serve to transform the \emph{given color} (i.e., the result of all calculations prior to the function call) into a new color.
+%
+% \paragraph{Color wheel calculations}
+% \DescribeFunc{wheel}
+% \DescribeFunc{twheel}
+% Arguments: \Meta{angle} or \Meta{angle}|,|\Meta{full circle}, the former being an abbreviataion of \Meta{angle}|,\rangeHsb|.
+% These functions allow to calculate related colors by harmonic relations based on color wheels (cf.~section \vref{sec.harmony}).
+% The second argument \Meta{full circle} declares how many units a full circle consists of, the first argument states by how many units the given color has to be rotated.
+% To this end, the given color is first converted to \Model{Hsb} (in case of \Function{wheel}), yielding \emph{hue\Circ}, \emph{saturation}, and \emph{brightness}, respectively.
+% Then
+% \begin{gather}
+% \displaystyle\emph{hue\Circ} := \emph{hue\Circ} + \frac{\Meta{angle}}{\Meta{full circle}}\cdot H, \qquad \emph{hue} := u\Bigl( \frac{\emph{hue\Circ}}{H} \Bigr)
+% \end{gather}
+% where $u$ is the range-reduction function of equation~(\ref{eq.U}) and $H = \texttt{\string\rangeHsb}$.
+% With \emph{saturation} and \emph{brightness} left untouched, the final model is \Model{hsb}.
+% The \Function{twheel} function works similarly, but its arguments refer to \Model{tHsb} instead of \Model{Hsb}.
+% Examples are shown in figure \vref{fig.harmony}.
+%
%
% \subsection{Predefined colors}
%
@@ -760,10 +887,19 @@
% In the latter case, individual color names have to be activated by |\definecolors| or |\providecolors| commands, as described in section \vref{sec.deferred}, before they can be applied in a document.
% \begin{itemize}
% \item \Option{dvipsnames}/\Option{dvipsnames*} loads a set of 68 \Model{cmyk} colors as defined in the |dvips| driver. However, these colors may be used in all supported drivers.
-% \item \Option{svgnames}/\Option{svgnames*} loads a set of 147 \Model{rgb} color names\footnote{In fact, these names represent 138 different colors.} according to the \Index{SVG}~1.1 specification \cite{svg}\footnote{Actually, the cited specification lists only lowercase names, and the original definitions are given in \Model{RGB} parameters, converted to \Model{rgb} by the author.}.
+% \item \Option{svgnames}/\Option{svgnames*} loads a set of 151 \Model{rgb} color names\footnote{In fact, these names represent 141 different colors.} according to the \Index{SVG}~1.1 specification \cite{svg}\footnote{Actually, the cited specification lists only lowercase names, and the original definitions are given in \Model{RGB} parameters, converted to \Model{rgb} by the author.}, enhanced by~4 names taken from the file \File{rgb.txt} which is part of \Index{Unix}/\Index{X11} distributions.
+% \item \Option{x11names}/\Option{x11names*} loads a set of 317 \Model{rgb} color names\footnote{These names represent 315 different colors.} that are basically variations of a subset of the \Index{SVG} set mentioned before, according to the file \File{rgb.txt} which is part of \Index{Unix}/\Index{X11} distributions\footnote{Again, the original definitions are given in \Model{RGB} parameters, converted to \Model{rgb} by the author.}.
+% We describe now how to access all 752 color names of \File{rgb.txt} without much effort:
+% \begin{itemize}
+% \item Load \Option{x11namees} as well as \Option{svgnames}.
+% \item Capitalise initials and skip blanks: \Color[-]{DarkSlateGray} instead of \Color[-]{dark slate gray}.
+% \item \Index{X11} names without numbers are identical to the corresponding \Index{SVG} colors, except in 5~cases:
+% use \Color{Gray0}, \Color{Grey0}, \Color{Green0}, \Color{Maroon0}, \Color{Purple0} instead of \Color[-]{Gray}, \Color[-]{Grey}, \Color[-]{Green}, \Color[-]{Maroon}, \Color[-]{Purple} to obtain the original \Index{X11} colors.
+% \item For $N=0,1,\dots,100$ use `|[gray]{|$N/100$|}|' or `|black!|$100-N$' instead of \Color[-]{grayN} or \Color[-]{greyN}.
+% \end{itemize}
% \end{itemize}
% The color names and corresponding displays are listed in section \vref{sec.names}.
-% Note that --- due to some overlap in the names --- the option order is important, if you plan to use more than one of these sets.
+% Section \vref{sec.clash} describes how to deal with name clashs while using both \Option{svgnames} and \Option{dvipsnames} in the same document.
% See also \cite{chroma} for a systematic set of color and mix examples.
%
%
@@ -815,10 +951,11 @@
% \begin{itemize}
% \item |\definecolor{red}{rgb}{1,0,0}|,
% \item |\definecolor{red}{rgb/cmyk}{1,0,0/0,1,1,0}|,
+% \item |\definecolor{red}{hsb:rgb/cmyk}{1,0,0/0,1,1,0}|,
% \item |\definecolor[named]{Black}{cmyk}{0,0,0,1}|,
% \item |\definecolor{myblack}{named}{Black}|,
% \end{itemize}
-% where the last command is equivalent to |\colorlet{myblack}{Black}| (see below); the second command defines \Color{red} in the \Model{rgb} or \Model{cmyk} model, depending on the current setting of the \emph{target model}.
+% where the last command is equivalent to |\colorlet{myblack}{Black}| (see below); the second command defines \Color{red} in the \Model{rgb} or \Model{cmyk} model, depending on the current setting of the \emph{target model}, whereas the third will additionally transform the color to \Model{hsb} prior to saving.
% Note that there is a special \Package{pstricks} version as described in section \vref{sec.pstricks}.
%
% \medskip
@@ -930,21 +1067,22 @@
%
% \subsubsection{Standard color commands}
%
-% Here is the list of user-level color commands, as known from the \LCP, but with an extended syntax for the colors:\\
+% Here is the list of user-level color commands, as known from the \LCP, but with an extended syntax for the colors, allowing for expressions etc.:\\
% \DescribeMacro\color\marg{color}\\
-% \oarg{model}\marg{spec}\\
+% \oarg{model-list}\marg{spec-list}\\
+% Switches to the color given either by name/expression or by model/specification.
+% This color will stay in effect until the end of the current \TeX\ group.\\
% \DescribeMacro\textcolor\marg{color}\marg{text}\\
-% \oarg{model}\marg{spec}\marg{text}\\
-% \DescribeMacro\colorbox\marg{color}\marg{text}\\
-% \oarg{model}\marg{spec}\marg{text}\\
-% \DescribeMacro\fcolorbox\marg{frame color}\marg{background color}\marg{text}\\
-% \oarg{model}\marg{frame spec}\marg{background spec}\marg{text}\\
+% \oarg{model-list}\marg{spec-list}\marg{text}\\
+% are just alternative syntax for |\color|, in which the groups are added implicitly.
+% Thus \meta{text} appears in the specified color, but then the color reverts to its previous value.
+% Additionally, it calls |\leavevmode| to ensure the start of horizontal mode.\\
% \DescribeMacro\pagecolor\marg{color}\\
-% \oarg{model}\marg{spec}\\
-% Hence, the formal difference to the \LCP{} is that color \emph{expressions} may be used instead of pure color \emph{names}.
-% A previous section explains how color expressions are constructed.
+% \oarg{model-list}\marg{spec-list}\\
+% Specifies the background color for the current, and all following, pages.
+% It is a global declaration which does not respect \TeX\ groups.
%
-% Remark: all of these commands except |\color| require that the \Meta{color} resp.{} \Meta{spec} arguments are put into curly braces |{}|, even if they are buried in macros.
+% Remark: all of these commands except |\color| require that the \Meta{color} resp.\ \Meta{spec} arguments are put into curly braces |{}|, even if they are buried in macros.
%
% For example, after |\def\foo{red}|, one may say |\color\foo|, but one should always write |\textcolor{\foo}{bar}| instead of |\textcolor\foo{bar}| in order to avoid strange results.
%
@@ -952,6 +1090,43 @@
% However, one can turn the expression into a name via |\colorlet| and try to use that name instead.
%
%
+% \subsubsection{Colored boxes}\label{sec.fbox}
+%
+% \DescribeMacro\colorbox\marg{color}\marg{text}\\
+% \oarg{model-list}\marg{spec-list}\marg{text}\\
+% Takes the same argument forms as |\textcolor|, but the color specifies the \emph{background} color of the box.\\
+% \DescribeMacro\fcolorbox\marg{frame color}\marg{background color}\marg{text}\\
+% \oarg{model-list}\marg{frame spec-list}\marg{background spec-list}\marg{text}\\
+% \oarg{fr.~model-list}\marg{fr.~spec-list}\oarg{backgr.~model-list}\marg{backgr.~spec-list}\marg{text}\\
+% \marg{frame color}\oarg{background model-list}\marg{background spec-list}\marg{text}\\
+% Puts a frame of the first color around a box with a background specified by the second color.
+% If only the first optional argument is given, it specifies the color model for both colors.
+% Besides the possibility to specify color \emph{expressions} as arguments, |\fcolorbox| now offers more flexibility for its arguments than the \LC{} version:
+% \begin{itemize}
+% \item \fcolorbox{gray}{yellow}{test} |\fcolorbox{gray}{yellow}{test}|,
+% \item \fcolorbox[cmyk]{0,0,0,0.5}{0,0,1,0}{test} |\fcolorbox[cmyk]{0,0,0,0.5}{0,0,1,0}{test}|,
+% \item \fcolorbox[gray]{0.5}[wave]{580}{test} |\fcolorbox[gray]{0.5}[wave]{580}{test}|,
+% \item \fcolorbox{gray}[wave]{580}{test} |\fcolorbox{gray}[wave]{580}{test}|.
+% \end{itemize}
+% Additionally, |\fcolorbox| uses a new approach to frame drawing, which is an extension of \People{Donald}{Arseneau}'s suggestion in bug report latex/3655 \cite{fbox}.
+% The main difference to \LaTeX's implementation is that box construction and frame drawing are split into separate operations, such that the frame is drawn \emph{after} the box contents has been constructed.
+% This ensures that the frame is always on top of the box.
+% \People{Donald}{Arseneau} improved speed as well as memory requirements of this approach.
+% Furthermore, a new macro is introduced:
+%
+% \DescribeMacro\boxframe\marg{width}\marg{height}\marg{depth}\\
+% Draws a frame with a linewidth of |\fboxrule|.
+% Returns a |\hbox| with outer dimensions \meta{width}, \meta{height}, \meta{depth}.
+% By this approach, a frame-primitive may also be provided by a driver file, in order to exploit driver-specific drawing facilities (see below).
+% Again, this macro was optimised by \People{Donald}{Arseneau}.
+%
+% The new frame approach is used for |\fcolorbox| as well as \LaTeX's |\fbox| and |\framebox| commands, unless the \Option{kernelfbox} option is specified, which returns to \LaTeX's original definitions of |\f(rame)box|.
+%
+% Option \Option{xcdraw} uses \Index{PostScript} commands to draw frames and color boxes in case of the \Option{dvips} driver and \Index{PDF} code to draw frames in case of the \Option{pdftex} and \Option{dvipdfm} drivers.
+% This is still experimental code that may confuse \File{.dvi} viewers.
+% The opposite option \Option{noxcdraw} forces usage of the generic (driver-independent) code.
+%
+%
% \subsubsection{Using the current color}
%
% Within a color expression, `.' serves as a placeholder for the current color.
@@ -972,11 +1147,12 @@
%
% \DescribeMacro\testcolor
% \marg{color}\\
-% \oarg{model}\marg{spec}\\
+% \oarg{model-list}\marg{spec-list}\\
% Each |\testcolor| command generates a table row, containing a display sample plus the respective parameters for each of the models.
% If the column-model matches the model of the color in question, its parameters are underlined.
% Note that this command is only available within the |testcolors| environment.
-% See figure \vref{fig.testcolors} for an example.
+%
+% For applications see figure \vref{fig.testcolors} and figures \ref{fig.tHsb}, \ref{fig.harmony}.
%
%
%
@@ -1152,6 +1328,7 @@
%
%
%
+%
% \subsection{Border colors for hyperlinks}\label{sec.hyperref}
%
% The \Package{hyperref} package offers all kinds of support for hyperlinks, pdfmarks etc.
@@ -1255,10 +1432,24 @@
% Converts a color, given by the \Meta{spec} in model \Meta{model}, into \Meta{target model} and stores the new color specification in |\cmd|.
% \Meta{target model} must be of type \Meta{num model}, whereas \Meta{model} may also be `named', in which case \Meta{spec} is simply the name of the color.
%
+% Example: |\convertcolorspec{cmyk}{0.81,1,0,0.07}{HTML}\tmp| acts like |\def| |\tmp{1F00ED}|.
+%
%
%
% \subsection{Problems and solutions}
%
+% \subsubsection{Name clashs between \Option{dvipsnames} and \Option{svgnames}}\label{sec.clash}
+%
+% Due to the fixed option processing order (which does not depend on the order how the options were specified in the |\usepackage| command), the \Option{svgnames} colors will always overrule \Option{dvipsnames} colors with identical names.
+% This can lead to undesired results if both options are used together.
+% For instance, \Color{Fuchsia} yields \testclr[cmyk]{0.47,0.91,0,0.08} under the regime of \Option{dvipsnames} and \testclr[rgb]{1,0,1} with respect to \Option{svgnames}.
+% However, there is a simple trick --- based on \emph{deferred color definition} --- that allows us to use colors from both sets in the desired way:
+% \begin{verbatim}
+% \usepackage[dvipsnames*,svgnames]{xcolor}
+% \definecolors{Fuchsia}
+% \end{verbatim}
+% Now all colors from the \Index{SVG} set are available (except \Color{Fuchsia}) plus \Color{Fuchsia} from the other set.
+%
% \subsubsection{Page breaks and pdf\TeX}\label{sec.fixpdftex}
%
% Since pdf\TeX{} does not maintain a \emph{\Index{color stack}} --- in contrast to \Program{dvips} --- a typical problem is the behaviour of colors in the case of page breaks, as illustrated by the following example:
@@ -1333,6 +1524,7 @@
% \testcolor{-cyan!50!magenta}
% \testcolor[cmyk]{0,0,1,0.5}
% \testcolor[cmyk]{0,0,.5,.5}
+% \testcolor[rgb:cmyk]{0,0,.5,.5}
% \end{testcolors}
% \end{adjustwidth}
% \vspace*{3ex}
@@ -1345,6 +1537,7 @@
% \testcolor{-cyan!50!magenta}
% \testcolor[cmyk]{0,0,1,0.5}
% \testcolor[cmyk]{0,0,.5,.5}
+% \testcolor[rgb:cmyk]{0,0,.5,.5}
% \end{testcolors}
% \end{verbatim}
% \end{adjustwidth}
@@ -1645,6 +1838,261 @@
% \arrayrulecolor{black}
% \end{figure}
%
+%
+% \begin{figure}[htbp]\caption{\Model{Hsb} and \Model{tHsb}: \emph{hue\Circ} in $15^\circ$ steps}\label{fig.tHsb}
+% \begin{adjustwidth}{-2.5cm}{}
+% \footnotesize\sffamily\raggedleft
+% \extrarowheight.5pt
+% \begin{testcolors}[rgb,cmyk,hsb,Hsb,tHsb]
+% \testcolor[Hsb]{0,1,1}
+% \testcolor[Hsb]{15,1,1}
+% \testcolor[Hsb]{30,1,1}
+% \testcolor[Hsb]{45,1,1}
+% \testcolor[Hsb]{60,1,1}
+% \testcolor[Hsb]{75,1,1}
+% \testcolor[Hsb]{90,1,1}
+% \testcolor[Hsb]{105,1,1}
+% \testcolor[Hsb]{120,1,1}
+% \testcolor[Hsb]{135,1,1}
+% \testcolor[Hsb]{150,1,1}
+% \testcolor[Hsb]{165,1,1}
+% \testcolor[Hsb]{180,1,1}
+% \testcolor[Hsb]{195,1,1}
+% \testcolor[Hsb]{210,1,1}
+% \testcolor[Hsb]{225,1,1}
+% \testcolor[Hsb]{240,1,1}
+% \testcolor[Hsb]{255,1,1}
+% \testcolor[Hsb]{270,1,1}
+% \testcolor[Hsb]{285,1,1}
+% \testcolor[Hsb]{300,1,1}
+% \testcolor[Hsb]{315,1,1}
+% \testcolor[Hsb]{330,1,1}
+% \testcolor[Hsb]{345,1,1}
+% \testcolor[Hsb]{360,1,1}
+% \noalign{\medskip}
+% \testcolor[tHsb]{0,1,1}
+% \testcolor[tHsb]{15,1,1}
+% \testcolor[tHsb]{30,1,1}
+% \testcolor[tHsb]{45,1,1}
+% \testcolor[tHsb]{60,1,1}
+% \testcolor[tHsb]{75,1,1}
+% \testcolor[tHsb]{90,1,1}
+% \testcolor[tHsb]{105,1,1}
+% \testcolor[tHsb]{120,1,1}
+% \testcolor[tHsb]{135,1,1}
+% \testcolor[tHsb]{150,1,1}
+% \testcolor[tHsb]{165,1,1}
+% \testcolor[tHsb]{180,1,1}
+% \testcolor[tHsb]{195,1,1}
+% \testcolor[tHsb]{210,1,1}
+% \testcolor[tHsb]{225,1,1}
+% \testcolor[tHsb]{240,1,1}
+% \testcolor[tHsb]{255,1,1}
+% \testcolor[tHsb]{270,1,1}
+% \testcolor[tHsb]{285,1,1}
+% \testcolor[tHsb]{300,1,1}
+% \testcolor[tHsb]{315,1,1}
+% \testcolor[tHsb]{330,1,1}
+% \testcolor[tHsb]{345,1,1}
+% \testcolor[tHsb]{360,1,1}
+% \end{testcolors}
+% \end{adjustwidth}
+% \end{figure}
+%
+%
+% \begin{figure}[htbp]\caption{Color harmony}\label{fig.harmony}
+% \begin{adjustwidth}{-2.5cm}{}
+% \small\sffamily\raggedleft
+% \extrarowheight1.5pt
+% \begin{testcolors}[rgb,cmyk,Hsb,tHsb]
+% \noalign{\smallskip}
+% \rlap{\em complementary colors (two-color harmony):}\\
+% \testcolor{yellow>wheel,1,2}
+% \testcolor{yellow}
+% \testcolor{yellow>twheel,1,2}
+% \noalign{\medskip}
+% \rlap{\em color triad (three-color harmony):}\\
+% \testcolor{yellow>wheel,2,3}
+% \testcolor{yellow>wheel,1,3}
+% \testcolor{yellow}
+% \testcolor{yellow>twheel,1,3}
+% \testcolor{yellow>twheel,2,3}
+% \noalign{\medskip}
+% \rlap{\em color tetrad (four-color harmony):}\\
+% \testcolor{yellow>wheel,3,4}
+% \testcolor{yellow>wheel,2,4}
+% \testcolor{yellow>wheel,1,4}
+% \testcolor{yellow}
+% \testcolor{yellow>twheel,1,4}
+% \testcolor{yellow>twheel,2,4}
+% \testcolor{yellow>twheel,3,4}
+% \noalign{\medskip}
+% \rlap{\em split complementary colors:}\\
+% \testcolor{yellow>wheel,7,12}
+% \testcolor{yellow>wheel,5,12}
+% \testcolor{yellow}
+% \testcolor{yellow>twheel,5,12}
+% \testcolor{yellow>twheel,7,12}
+% \noalign{\medskip}
+% \rlap{\em analogous (adjacent) colors:}\\
+% \testcolor{yellow>wheel,11,12}
+% \testcolor{yellow>wheel,10,12}
+% \testcolor{yellow>wheel,2,12}
+% \testcolor{yellow>wheel,1,12}
+% \testcolor{yellow}
+% \testcolor{yellow>twheel,1,12}
+% \testcolor{yellow>twheel,2,12}
+% \testcolor{yellow>twheel,10,12}
+% \testcolor{yellow>twheel,11,12}
+% \end{testcolors}
+% \end{adjustwidth}
+% \end{figure}
+%
+% \end{adjustwidth}
+%
+%
+% \clearpage
+%
+% \begin{adjustwidth}{-2.5cm}{}
+% \raggedcolumns\columnsep2.5em
+%
+% \section{Colors by Name}\label{sec.names}
+%
+% \begin{multicols}{5}[\subsection{Base Colors}\label{sec.basenam}]
+% \footnotesize\def\0#1{\Testclr{#1}{#1}}
+% \0{black}
+% \0{blue}
+% \0{brown}
+% \0{cyan}
+% \0{darkgray}
+% \0{gray}
+% \0{green}
+% \0{lightgray}
+% \0{magenta}
+% \0{olive}
+% \0{orange}
+% \0{pink}
+% \0{purple}
+% \0{red}
+% \0{violet}
+% \0{white}
+% \0{yellow}
+% \end{multicols}
+%
+%
+% \begin{multicols}{5}[\subsection{Colors via \Option{dvipsnames}}\label{sec.dvipsnam}]
+% \footnotesize\def\0#1{\Testclr{#1}{#1}}
+% \0{Apricot}
+% \0{Aquamarine}
+% \0{Bittersweet}
+% \0{Black}
+% \0{Blue}
+% \0{BlueGreen}
+% \0{BlueViolet}
+% \0{BrickRed}
+% \0{Brown}
+% \0{BurntOrange}
+% \0{CadetBlue}
+% \0{CarnationPink}
+% \0{Cerulean}
+% \0{CornflowerBlue}
+% \0{Cyan}
+% \0{Dandelion}
+% \0{DarkOrchid}
+% \0{Emerald}
+% \0{ForestGreen}
+% \0{Fuchsia}
+% \0{Goldenrod}
+% \0{Gray}
+% \0{Green}
+% \0{GreenYellow}
+% \0{JungleGreen}
+% \0{Lavender}
+% \0{LimeGreen}
+% \0{Magenta}
+% \0{Mahogany}
+% \0{Maroon}
+% \0{Melon}
+% \0{MidnightBlue}
+% \0{Mulberry}
+% \0{NavyBlue}
+% \0{OliveGreen}
+% \0{Orange}
+% \0{OrangeRed}
+% \0{Orchid}
+% \0{Peach}
+% \0{Periwinkle}
+% \0{PineGreen}
+% \0{Plum}
+% \0{ProcessBlue}
+% \0{Purple}
+% \0{RawSienna}
+% \0{Red}
+% \0{RedOrange}
+% \0{RedViolet}
+% \0{Rhodamine}
+% \0{RoyalBlue}
+% \0{RoyalPurple}
+% \0{RubineRed}
+% \0{Salmon}
+% \0{SeaGreen}
+% \0{Sepia}
+% \0{SkyBlue}
+% \0{SpringGreen}
+% \0{Tan}
+% \0{TealBlue}
+% \0{Thistle}
+% \0{Turquoise}
+% \0{Violet}
+% \0{VioletRed}
+% \0{White}
+% \0{WildStrawberry}
+% \0{Yellow}
+% \0{YellowGreen}
+% \0{YellowOrange}
+% \end{multicols}
+%
+%
+% \makeatletter
+% \def\ColorList#1#2#3#4{\begin{multicols}{#1}[\subsection{Colors via \Option{#2names}}\label{sec.#2nam}]
+% \footnotesize
+% \def\preparecolorset
+% {\def\XC@@cmd[####1]####2####3####4{\definecolor[####1]{@test}{####3}{####4}#4{@test}{####2}}\@testopt{\XC@definecolorset}{}}
+% \edef\restore{\catcode`\noexpand\%\the\catcode`\%\relax}
+% \catcode`\%14\relax\input{#3nam.def}\restore
+% \end{multicols}}
+% \makeatother
+%
+% \ColorList4{svg}{svg}\Testclr
+% \medskip
+% \begin{adjustwidth}{1cm}{1cm}
+% \footnotesize\raggedright Duplicate colors:
+% \Color[-]{Aqua} = \Color[-]{Cyan},
+% \Color[-]{Fuchsia} = \Color[-]{Magenta};
+% \Color[-]{Navy} = \Color[-]{NavyBlue};
+% \Color[-]{Gray} = \Color[-]{Grey},
+% \Color[-]{DarkGray} = \Color[-]{DarkGrey},
+% \Color[-]{LightGray} = \Color[-]{LightGrey},
+% \Color[-]{SlateGray} = \Color[-]{SlateGrey},
+% \Color[-]{DarkSlateGray} = \Color[-]{DarkSlateGrey},
+% \Color[-]{LightSlateGray} = \Color[-]{LightSlateGrey},
+% \Color[-]{DimGray} = \Color[-]{DimGrey}.
+% \par
+% Colors taken from \Index{Unix}/\Index{X11}:
+% \Color[-]{LightGoldenrod},
+% \Color[-]{LightSlateBlue},
+% \Color[-]{NavyBlue},
+% \Color[-]{VioletRed}.
+% \end{adjustwidth}
+%
+% \ColorList4{x11}{x11}\Testclr
+% \medskip
+% \begin{adjustwidth}{1cm}{1cm}
+% \footnotesize\raggedright Duplicate colors:
+% \Color[-]{Gray0} = \Color[-]{Grey0},
+% \Color[-]{Green0} = \Color[-]{Green1}.
+% \end{adjustwidth}
+%
% \end{adjustwidth}
%
%
@@ -1847,6 +2295,8 @@
% \Model{cmy}& $(0,0,0)$ & $(1,1,1)$ & $(\frac12,\frac12,\frac12)$ \\[2pt]
% \Model{cmyk}& $(0,0,0,0)$ & $(0,0,0,1)$ & $(0,0,0,\frac12)$ \\[2pt]
% \Model{hsb}& $(h,0,1)$ & $(h,0,0)$ & $(h,0,\frac12)$ \\[2pt]
+% \Model{Hsb}& $(h^\circ,0,1)$ & $(h^\circ,0,0)$ & $(h^\circ,0,\frac12)$ \\[2pt]
+% \Model{tHsb}& $(h^\circ,0,1)$ & $(h^\circ,0,0)$ & $(h^\circ,0,\frac12)$ \\[2pt]
% \Model{gray}& $1$ & $0$ & $\frac12$ \\[2pt]
% \Model{RGB}& $(L,L,L)$ & $(0,0,0)$ & $(\lfloor\frac {L+1}2\rfloor,\lfloor\frac {L+1}2\rfloor,\lfloor\frac {L+1}2\rfloor)$ \\[2pt]
% \Model{HTML}& \texttt{FFFFFF}& \texttt{000000}& \texttt{808080}\\[2pt]
@@ -1858,33 +2308,37 @@
%
%
% \begin{table}[p]\caption{Color conversion pairs}\label{tab.cnv}
-% \centering\small
+% \begin{adjustwidth}{-2.5cm}{}
+% \small\raggedleft
% \def\Em#1{\Model{#1}}
% \def\sp{\hbox to3em{\hfil$\ast$\hfil}}
% \def\id{\textrm{id}}
% \extrarowheight1pt
% \tabcolsep3pt
% \rowcolors{3}{tablerowcolor}{}
-% \begin{tabular}{c*9{>{\sffamily}c}}
+% \begin{tabular}{c*{11}{>{\sffamily}c}}
% \rowcolor{tableheadcolor}
% \hline
% \emph{from/to}&
-% \Em{rgb}& \Em{cmy}& \Em{cmyk}& \Em{hsb}& \Em{gray}& \Em{RGB}& \Em{HTML}& \Em{HSB}& \Em{Gray}\\
-% \Em{rgb}& \id & \sp & (cmy) & \sp & \sp & \sp & \sp & (hsb) & (gray)\\
-% \Em{cmy}& \sp & \id & \sp & (rgb) & \sp & (rgb) & (rgb) & (rgb) & (gray)\\
-% \Em{cmyk}& (cmy) & \sp & \id & (cmy) & \sp & (cmy) & (cmy) & (cmy) & (gray)\\
-% \Em{hsb}& \sp & (rgb) & (rgb) & \id & (rgb) & (rgb) & {rgb} & \sp & (rgb)\\
-% \Em{gray}& \sp & \sp & \sp & \sp & \id & \sp & \sp & \sp & \sp\\
-% \Em{RGB}& \sp & (rgb) & (rgb) & (rgb) & (rgb) & \id & (rgb) & (rgb) & (rgb)\\
-% \Em{HTML}& \sp & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & \id & (rgb) & (rgb)\\
-% \Em{HSB}& (hsb) & (hsb) & (hsb) & \sp & (hsb) & (hsb) & (hsb) & \id & (hsb)\\
-% \Em{Gray}& (gray) & (gray) & (gray) & (gray) & \sp & (gray) & (gray) & (gray) & \id\\
-% \Em{wave}& (hsb) & (hsb) & (hsb) & \sp & (hsb) & (hsb) & (hsb) & (hsb) & (hsb)\\
+% \Em{rgb}& \Em{cmy}& \Em{cmyk}& \Em{hsb}& \Em{Hsb} & \Em{tHsb} & \Em{gray}& \Em{RGB}& \Em{HTML}& \Em{HSB}& \Em{Gray}\\
+% \Em{rgb}& \id & \sp & (cmy) & \sp & (hsb) & (hsb) & \sp & \sp & \sp & (hsb) & (gray)\\
+% \Em{cmy}& \sp & \id & \sp & (rgb) & (rgb) & (rgb) & \sp & (rgb) & (rgb) & (rgb) & (gray)\\
+% \Em{cmyk}& (cmy) & \sp & \id & (cmy) & (cmy) & (cmy) & \sp & (cmy) & (cmy) & (cmy) & (gray)\\
+% \Em{hsb}& \sp & (rgb) & (rgb) & \id & \sp & (Hsb) & (rgb) & (rgb) & (rgb) & \sp & (rgb)\\
+% \Em{Hsb}& (hsb) & (hsb) & (hsb) & \sp & \id & \sp & (hsb) & (hsb) & (hsb) & (hsb) & (hsb)\\
+% \Em{tHsb}& (Hsb) & (Hsb) & (Hsb) & (Hsb) & \sp & \id & (Hsb) & (Hsb) & (Hsb) & (Hsb) & (Hsb)\\
+% \Em{gray}& \sp & \sp & \sp & \sp & \sp & \sp & \id & \sp & \sp & \sp & \sp\\
+% \Em{RGB}& \sp & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & \id & (rgb) & (rgb) & (rgb)\\
+% \Em{HTML}& \sp & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & (rgb) & \id & (rgb) & (rgb)\\
+% \Em{HSB}& (hsb) & (hsb) & (hsb) & \sp & (hsb) & (hsb) & (hsb) & (hsb) & (hsb) & \id & (hsb)\\
+% \Em{Gray}& (gray) & (gray) & (gray) & (gray) & (gray) & (gray) & \sp & (gray) & (gray) & (gray) & \id\\
+% \Em{wave}& (hsb) & (hsb) & (hsb) & \sp & (hsb) & (hsb) & (hsb) & (hsb) & (hsb) & (hsb) & (hsb)\\
% \hline\hline
-% \multicolumn{10}{c}{\id{} = identity function; $\ast$ = specific conversion function;}\\
-% \multicolumn{10}{c}{\textsf{(model)} = conversion via specified model}\\
+% \multicolumn{12}{c}{\id{} = identity function; $\ast$ = specific conversion function;}\\
+% \multicolumn{12}{c}{\textsf{(model)} = conversion via specified model}\\
% \hline
% \end{tabular}
+% \end{adjustwidth}
% \end{table}
%
%
@@ -2001,6 +2455,8 @@
% \begin{gather}
% E := (1,1,1)
% \end{gather}
+%
+%
% \subsubsection{The \Model{rgb} model}
%
% \paragraph{Conversion \Model{rgb} to \Model{cmy}}\label{sec.rgb2cmy}
@@ -2009,6 +2465,7 @@
% (\emph{cyan}, \emph{magenta}, \emph{yellow}) := E-(\emph{red}, \emph{green}, \emph{blue})
% \end{gather}
%
+%
% \paragraph{Conversion \Model{rgb} to \Model{hsb} (1)}
% We set
% \begin{align}
@@ -2061,6 +2518,7 @@
% Because we need to sort three numbers in order to calculate $x,y,z$, several comparisons are involved in the algorithm.
% We present now a second method which is more suited for \TeX.
%
+%
% \paragraph{Conversion \Model{rgb} to \Model{hsb} (2)}
% Let $\beta$ be a function that takes a Boolean expression as argument and returns 1 if the expression is true, 0 otherwise; set
% \begin{gather}
@@ -2105,27 +2563,29 @@
% Bold $i$~values mark the main cases where all $*$~values of a row are zero.
% The slight difference to equation (\ref{eq.rgb2hsb1}) in the last inequality is intentional and does no harm.
%
+%
% \paragraph{Conversion \Model{rgb} to \Model{gray}}
% Source: \cite{plrm}, p. 474.
% \begin{align}
% \emph{gray} & := 0.3\cdot\emph{red} + 0.59\cdot\emph{green} + 0.11\cdot\emph{blue}
% \end{align}
%
+%
% \paragraph{Conversion \Model{rgb} to \Model{RGB}}
% As described in section \vref{sec.real2int}.
-% \begin{align}
-% \emph{Red} & := \RtoI L(\emph{red})\\
-% \emph{Green} & := \RtoI L(\emph{green})\\
-% \emph{Blue} & := \RtoI L(\emph{blue})
-% \end{align}
+% \begin{gather}
+% (\emph{Red},\emph{Green},\emph{Blue}) := \bigl(\RtoI L(\emph{red}), \RtoI L(\emph{green}), \RtoI L(\emph{blue})\bigr)
+% \end{gather}
+%
%
% \paragraph{Conversion \Model{rgb} to \Model{HTML}}
-% As described in section \vref{sec.real2int}. Convert to hexadecimal afterwards.
-% \begin{align}
-% \emph{RR} & := \RtoI L(\emph{red})_{\emph{hex}}\\
-% \emph{GG} & := \RtoI L(\emph{green})_{\emph{hex}}\\
-% \emph{BB} & := \RtoI L(\emph{blue})_{\emph{hex}}
-% \end{align}
+% As described in section \vref{sec.real2int}.
+% Convert to 6-digit hexadecimal afterwards.
+% Certainly, multiplication and summation can be replaced by simple text concatenation of 2-digit hexadecimals.
+% \begin{gather}
+% \emph{RRGGBB} := \bigl( 65536\cdot\RtoI L(\emph{red}) + 256\cdot \RtoI L(\emph{green}) + \RtoI L(\emph{blue}) \bigr)_{\emph{hex}}
+% \end{gather}
+%
%
% \paragraph{Complement of \Model{rgb} color}
% We simply take the complementary vector:
@@ -2142,6 +2602,7 @@
% (\emph{red}, \emph{green}, \emph{blue}) := E - (\emph{cyan}, \emph{magenta}, \emph{yellow})
% \end{gather}
%
+%
% \paragraph{Conversion \Model{cmy} to \Model{cmyk}}\label{sec.cmy2cmyk}
% This is probably the hardest of our conversion tasks: many sources emphasize that there does not exist any universal conversion algorithm for this case because of device-dependence.
% The following algorithm is an extended version of the one given in \cite{plrm}, p. 476.
@@ -2168,12 +2629,14 @@
% \DescribeMacro\adjustUCRBG
% where the parameters are given by |\def\adjustUCRBG{|\Meta{$\beta_c$},\Meta{$\beta_m$},\Meta{$\beta_y$},\Meta{$\beta_k$}|}| at any point in a document, defaulting to |{|$\adjustUCRBG$|}|.
%
+%
% \paragraph{Conversion \Model{cmy} to \Model{gray}}
% This is derived from the conversion chain $\Model{cmy}\to\Model{rgb}\to\Model{gray}$.
% \begin{align}
% \emph{gray} & := 1 - (0.3\cdot\emph{cyan} + 0.59\cdot\emph{magenta} + 0.11\cdot\emph{yellow})
% \end{align}
%
+%
% \paragraph{Complement of \Model{cmy} color}
% We simply take the complementary vector:
% \begin{gather}
@@ -2191,12 +2654,14 @@
% \emph{yellow} & := \min\{1,\emph{yellow} + \emph{black}\}
% \end{align}
%
+%
% \paragraph{Conversion \Model{cmyk} to \Model{gray}}
% Source: \cite{plrm}, p. 475.
% \begin{align}
% \emph{gray} & := 1 - \min\{1,0.3\cdot\emph{cyan} + 0.59\cdot\emph{magenta} + 0.11\cdot\emph{yellow} + black\}
% \end{align}
%
+%
% \paragraph{Complement of \Model{cmyk} color}
% The simple vector complement does not yield useful results.
% Therefore, we first convert %$C=(\emph{cyan}, \emph{magenta}, \emph{yellow}, \emph{black})$
@@ -2251,13 +2716,18 @@
% A similar argument shows that $F$ indeed is a continuous function of \emph{hue} over the whole range $[0,1]$.
%
%
+% \paragraph{Conversion \Model{hsb} to \Model{Hsb}}
+% Only the first component has to be changed.
+% \begin{gather}
+% (\emph{hue\Circ}, \emph{saturation}, \emph{brightness}) := (H\cdot\emph{hue}, \emph{saturation}, \emph{brightness})
+% \end{gather}
+%
+%
% \paragraph{Conversion \Model{hsb} to \Model{HSB}}
-% As described in section \vref{sec.real2int}. Convert to hexadecimal afterwards.
-% \begin{align}
-% \emph{Hue} & := \RtoI M(\emph{hue})\\
-% \emph{Saturation} & := \RtoI M(\emph{saturation})\\
-% \emph{Brightness} & := \RtoI M(\emph{brightness})
-% \end{align}
+% As described in section \vref{sec.real2int}.
+% \begin{gather}
+% (\emph{Hue}, \emph{Saturation}, \emph{Brightness}) := \bigl(\RtoI M(\emph{hue}), \RtoI M(\emph{saturation}), \RtoI M(\emph{brightness})\bigr)
+% \end{gather}
%
%
% \paragraph{Complement of \Model{hsb} color}
@@ -2320,6 +2790,46 @@
% \end{proof}
%
%
+% \subsubsection{The \Model{Hsb} model}
+%
+% \paragraph{Conversion \Model{Hsb} to \Model{hsb}}
+% Only the first component has to be changed.
+% \begin{gather}
+% (\emph{hue}, \emph{saturation}, \emph{brightness}) := (\emph{hue\Circ}/H, \emph{saturation}, \emph{brightness})
+% \end{gather}
+%
+%
+% \paragraph{Conversion \Model{Hsb} to \Model{tHsb}}
+% Under the settings of (\ref{eq.tHsb1})--(\ref{eq.tHsb3}) we simply have to exchange the letters $x$ and $y$ in equation (\ref{eq.tHsb4}) to get the inverse transformation:
+% \begin{gather}
+% \displaystyle \emph{hue\Circ}\in\left[y_{\eta-1},y_\eta\right] \Rightarrow
+% \emph{hue\Circ} := x_{\eta-1} + \frac{x_\eta - x_{\eta-1}}{y_\eta - y_{\eta-1}}\cdot(\emph{hue\Circ} - y_{\eta-1})
+% \end{gather}
+% while \emph{saturation} and \emph{brightness} are left unchanged.
+%
+%
+% \subsubsection{The \Model{tHsb} model}
+%
+% \paragraph{Conversion \Model{tHsb} to \Model{Hsb}}\label{sec.tHsb2Hsb}
+% \DescribeMacro\rangeHsb
+% \DescribeMacro\rangetHsb
+% We assume that $\texttt{\string\rangeHsb}=H$ and |\rangetHsb| expands to
+% \begin{gather}
+% x_1,y_1;x_2,y_2;\dots;x_{h-1},y_{h-1}\label{eq.tHsb1}
+% \intertext{where}
+% x_0:=0<x_1<x_2<\dots<x_{h-1}<x_h:=H\label{eq.tHsb2}\\
+% y_0:=0<y_1<y_2<\dots<y_{h-1}<y_h:=H\label{eq.tHsb3}
+% \end{gather}
+% with an integer $h>0$.
+% Now the $x$ and $y$ values determine a piecewise linear transformation:
+% \begin{gather}
+% \displaystyle \emph{hue\Circ}\in\left[x_{\eta-1},x_\eta\right] \Rightarrow
+% \emph{hue\Circ} := y_{\eta-1} + \frac{y_\eta - y_{\eta-1}}{x_\eta - x_{\eta-1}}\cdot(\emph{hue\Circ} - x_{\eta-1})
+% \label{eq.tHsb4}
+% \end{gather}
+% while \emph{saturation} and \emph{brightness} are left unchanged.
+%
+%
% \subsubsection{The \Model{gray} model}
%
% \paragraph{Conversion \Model{gray} to \Model{rgb}}
@@ -2328,30 +2838,42 @@
% (\emph{red}, \emph{green}, \emph{blue}) := \emph{gray}\cdot E
% \end{gather}
%
+%
% \paragraph{Conversion \Model{gray} to \Model{cmy}}
% This is derived from the conversion chain $\Model{gray}\to\Model{rgb}\to\Model{cmy}$.
% \begin{gather}
% (\emph{cyan}, \emph{magenta}, \emph{yellow}) := (1-\emph{gray})\cdot E
% \end{gather}
%
+%
% \paragraph{Conversion \Model{gray} to \Model{cmyk}}
% Source: \cite{plrm}, p. 475.
% \begin{gather}
% (\emph{cyan}, \emph{magenta}, \emph{yellow}, \emph{black}) := (0,0,0,1-\emph{gray})
% \end{gather}
%
+%
% \paragraph{Conversion \Model{gray} to \Model{hsb}}
% This is derived from the conversion chain $\Model{gray}\to\Model{rgb}\to\Model{hsb}$.
% \begin{gather}
% (\emph{hue}, \emph{saturation}, \emph{brightness}) := (0,0,\emph{gray})
% \end{gather}
%
+%
+% \paragraph{Conversion \Model{gray} to \Model{Hsb}/\Model{tHsb}}
+% This is derived from the conversion chain $\Model{gray}\to\Model{hsb}\to\Model{Hsb}$, followed by $\Model{Hsb}\to\Model{tHsb}$ if applicable.
+% \begin{gather}
+% (\emph{hue\Circ}, \emph{saturation}, \emph{brightness}) := (0,0,\emph{gray})
+% \end{gather}
+%
+%
% \paragraph{Conversion \Model{gray} to \Model{Gray}}
% As described in section \vref{sec.real2int}.
% \begin{gather}
% \emph{Gray} := \RtoI N(\emph{gray})
% \end{gather}
%
+%
% \paragraph{Complement of \Model{gray} color}
% This is similar to the \Model{rgb} case:
% \begin{gather}
@@ -2431,6 +2953,7 @@
% We see no reason why we should not extend these edges in a similar fashion to end-up with true \Color{black} on either side.
% Now we are prepared to translate everything into another, more natural algorithm.
%
+%
% \paragraph{Conversion \Model{wave} to \Model{hsb}}
% Let $\lambda>0$ be a wavelength, given in nanometers (nm), and let
% \begin{gather}
@@ -2470,135 +2993,6 @@
% Thus, for the time being, \XC's implementation uses the latter value which implies a pure linear approach.
% In the \Package{pstricks} examples file \href{xcolor2.pdf}{\File{xcolor2.tex}}, there is a demonstration of different $\gamma$ values.
%
-%
-% \clearpage
-%
-% \begin{adjustwidth}{-2.5cm}{}
-% \raggedcolumns\columnsep2.5em
-%
-% \section{Colors by Name}\label{sec.names}
-%
-% \begin{multicols}{5}[\subsection{Base Colors}\label{sec.basenam}]
-% \footnotesize\def\0#1{\TestClr{#1}{#1}}
-% \0{black}
-% \0{blue}
-% \0{brown}
-% \0{cyan}
-% \0{darkgray}
-% \0{gray}
-% \0{green}
-% \0{lightgray}
-% \0{magenta}
-% \0{olive}
-% \0{orange}
-% \0{pink}
-% \0{purple}
-% \0{red}
-% \0{violet}
-% \0{white}
-% \0{yellow}
-% \end{multicols}
-%
-%
-% \begin{multicols}{5}[\subsection{Colors via \Option{dvipsnames}}\label{sec.dvipsnam}]
-% \footnotesize\def\0#1{\TestClr{#1}{#1}}
-% \0{Apricot}
-% \0{Aquamarine}
-% \0{Bittersweet}
-% \0{Black}
-% \0{Blue}
-% \0{BlueGreen}
-% \0{BlueViolet}
-% \0{BrickRed}
-% \0{Brown}
-% \0{BurntOrange}
-% \0{CadetBlue}
-% \0{CarnationPink}
-% \0{Cerulean}
-% \0{CornflowerBlue}
-% \0{Cyan}
-% \0{Dandelion}
-% \0{DarkOrchid}
-% \0{Emerald}
-% \0{ForestGreen}
-% \0{Fuchsia}
-% \0{Goldenrod}
-% \0{Gray}
-% \0{Green}
-% \0{GreenYellow}
-% \0{JungleGreen}
-% \0{Lavender}
-% \0{LimeGreen}
-% \0{Magenta}
-% \0{Mahogany}
-% \0{Maroon}
-% \0{Melon}
-% \0{MidnightBlue}
-% \0{Mulberry}
-% \0{NavyBlue}
-% \0{OliveGreen}
-% \0{Orange}
-% \0{OrangeRed}
-% \0{Orchid}
-% \0{Peach}
-% \0{Periwinkle}
-% \0{PineGreen}
-% \0{Plum}
-% \0{ProcessBlue}
-% \0{Purple}
-% \0{RawSienna}
-% \0{Red}
-% \0{RedOrange}
-% \0{RedViolet}
-% \0{Rhodamine}
-% \0{RoyalBlue}
-% \0{RoyalPurple}
-% \0{RubineRed}
-% \0{Salmon}
-% \0{SeaGreen}
-% \0{Sepia}
-% \0{SkyBlue}
-% \0{SpringGreen}
-% \0{Tan}
-% \0{TealBlue}
-% \0{Thistle}
-% \0{Turquoise}
-% \0{Violet}
-% \0{VioletRed}
-% \0{White}
-% \0{WildStrawberry}
-% \0{Yellow}
-% \0{YellowGreen}
-% \0{YellowOrange}
-% \end{multicols}
-%
-%
-% \makeatletter
-% \def\ColorList#1#2#3#4{\begin{multicols}{#1}[\subsection{Colors via \Option{#2names}}\label{sec.#2nam}]
-% \footnotesize
-% \def\preparecolorset
-% {\def\XC@@cmd[####1]####2####3####4{\definecolor[####1]{@test}{####3}{####4}#4{@test}{####2}}\@testopt{\XC@definecolorset}{}}
-% \edef\restore{\catcode`\noexpand\%\the\catcode`\%\relax}
-% \catcode`\%14\relax\input{#3nam.def}\restore
-% \end{multicols}}
-% \makeatother
-%
-% \ColorList4{svg}{svg}\TestClr
-% \medskip
-% \begin{adjustwidth}{1cm}{1cm}
-% \footnotesize\raggedright Duplicate colors:
-% \Color{Aqua} = \Color{Cyan},
-% \Color{Fuchsia} = \Color{Magenta};
-% \Color{Gray} = \Color{Grey},
-% \Color{DarkGray} = \Color{DarkGrey},
-% \Color{LightGray} = \Color{LightGrey},
-% \Color{SlateGray} = \Color{SlateGrey},
-% \Color{DarkSlateGray} = \Color{DarkSlateGrey},
-% \Color{LightSlateGray} = \Color{LightSlateGrey},
-% \Color{DimGray} = \Color{DimGrey}.
-% \end{adjustwidth}
-%
-% \end{adjustwidth}
% \clearpage
%
%
@@ -2612,33 +3006,41 @@
% {Adobe Systems Incorporated: ``PostScript Language Reference Manual''. Addison-Wesley, third edition, 1999.
% \URL{http://www.adobe.com/products/postscript/pdfs/PLRM.pdf}}
%
+% \bibitem{fbox}%
+% {\People{Donald}{Arseneau}: ``Patch so \cmd\fbox{} draws frame on top of text''. \LaTeX{} bug report, latex/3655, 2004/03/18.
+% \URL{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3655}}
+%
+% \bibitem{url}%
+% {\People{Donald}{Arseneau}: \Package{url} package, ``2005/06/27 ver 3.2 Verb mode for urls, etc.''.
+% \CTAN{macros/latex/contrib/misc/}{url.sty}}
+%
% \bibitem{Bruton}%
-% {Dan~Bruton:~``Approximate RGB values for Visible Wavelengths'', 1996.
+% {\People{Dan}{Bruton}: ``Approximate RGB values for Visible Wavelengths'', 1996.
% \URL{http://www.physics.sfasu.edu/astro/color/spectra.html}}
%
% \bibitem{dpc}%
-% {David~P.~Carlisle:~``Packages in the `graphics' bundle'', 1999.
+% {\People{David P.}{Carlisle}: ``Packages in the `graphics' bundle'', 1999.
% \CTAN{macros/latex/required/graphics/}{grfguide.*}}
%
% \bibitem{color}%
-% {David~P.~Carlisle:~\LCP, ``1999/02/16 v1.0i Standard \LaTeX{} Color''.
+% {\People{David P.}{Carlisle}: \LCP, ``1999/02/16 v1.0i Standard \LaTeX{} Color''.
% \CTAN{macros/latex/required/graphics/}{color.*}}
%
% \bibitem{colortbl}%
-% {David~P.~Carlisle:~\Package{colortbl} package, ``2001/02/13 v0.1j Color table columns''.
+% {\People{David P.}{Carlisle}: \Package{colortbl} package, ``2001/02/13 v0.1j Color table columns''.
% \CTAN{macros/latex/contrib/carlisle/}{colortbl.*}}
%
% \bibitem{pstcol}%
-% {David~P.~Carlisle:~\Package{pstcol} package, ``2001/06/20 v1.1 PSTricks color compatibility''.
+% {\People{David P.}{Carlisle}: \Package{pstcol} package, ``2001/06/20 v1.1 PSTricks color compatibility''.
% \CTAN{macros/latex/required/graphics/}{pstcol.*}}
%
% \bibitem{chroma}%
-% {Uwe~Kern:~``Chroma: a reference book of \LaTeX{} colors''.
+% {\People{Uwe}{Kern}: ``Chroma: a reference book of \LaTeX{} colors''.
% \CTAN{info/colour/chroma/}{} and
% \URL{http://www.ukern.de/tex/chroma.html}}
%
% \bibitem{xcolor}%
-% {Uwe~Kern:~\Package{xcolor} package, ``\LaTeX{} color extensions''.
+% {\People{Uwe}{Kern}: \Package{xcolor} package, ``\LaTeX{} color extensions''.
% \CTAN{macros/latex/contrib/xcolor/}{} and
% \URL{http://www.ukern.de/tex/xcolor.html}}
%
@@ -2647,23 +3049,23 @@
% \URL{http://www.miktex.org/}}
%
% \bibitem{colorinfo}%
-% {Rolf~Niepraschk:~\Package{colorinfo} package, ``2003/05/04 v0.3c Info from defined colors''.
+% {\People{Rolf}{Niepraschk}: \Package{colorinfo} package, ``2003/05/04 v0.3c Info from defined colors''.
% \CTAN{macros/latex/contrib/colorinfo/}{}}
%
% \bibitem{pdfcolmk}%
-% {Heiko~Oberdiek:~\Package{pdfcolmk} package, ``2005/07/09 v0.7''.
+% {\People{Heiko}{Oberdiek}: \Package{pdfcolmk} package, ``2005/07/09 v0.7''.
% \CTAN{macros/latex/contrib/oberdiek/pdfcolmk.sty}{}}
%
% \bibitem{hyperref}%
-% {Sebastian~Rahtz:~\Package{hyperref} package, ``2003/11/30 v6.74m Hypertext links for \LaTeX''.
+% {\People{Sebastian}{Rahtz}: \Package{hyperref} package, ``2003/11/30 v6.74m Hypertext links for \LaTeX''.
% \CTAN{macros/latex/contrib/hyperref/}{}}
%
% \bibitem{smith}%
-% {Alvy Ray Smith: ``Color Gamut Transform Pairs''. \emph{Computer Graphics} (ACM SIGGRAPH), Volume 12, Number 3, August 1978.
+% {\People{Alvy Ray}{Smith}: ``Color Gamut Transform Pairs''. \emph{Computer Graphics} (ACM SIGGRAPH), Volume 12, Number 3, August 1978.
% \URL{http://alvyray.com/Papers/PapersCG.htm}}
%
% \bibitem{svg}%
-% {World Wide Web Consortium: ``Scalable Vector Graphics (SVG) 1.1 Specification --- Basic Data Types and Interfaces''.
+% {World Wide Web Consortium: ``Scalable Vector Graphics (\Index{SVG}) 1.1 Specification --- Basic Data Types and Interfaces''.
% \URL{http://www.w3.org/TR/SVG11/types.html\#ColorKeywords}}
%
% \end{thebibliography}
@@ -2676,9 +3078,9 @@
%
% \subsection*{Acknowledgement}
% \addcontentsline{toc}{subsection}{Acknowledgement}
-% This package is based on and contains code copied from \cite{color} (Copyright (C) 1994--1999 \People{David}{Carlisle}), which is part of the Standard \LaTeX{} `Graphics Bundle'.
+% This package is based on and contains code copied from \cite{color} (Copyright (C) 1994--1999 \People{David P.}{Carlisle}), which is part of the Standard \LaTeX{} `Graphics Bundle'.
% Although many commands and features have been added and most of the original \LC{} commands have been rewritten or adapted within \XC, the latter package would not exist without \LC.
-% Thus, the author is grateful to \People{David}{Carlisle} for having created \LC{} and its accompanying files.
+% Thus, the author is grateful to \People{David P.}{Carlisle} for having created \LC{} and its accompanying files.
%
% \subsection*{Trademarks}
% \addcontentsline{toc}{subsection}{Trademarks}
@@ -2699,12 +3101,68 @@
% \subsection*{History}
% \addcontentsline{toc}{subsection}{History}
%
+% \subsubsection*{2005/12/21 v2.09}
+% \begin{itemize}
+% \item New features:
+% \begin{itemize}
+% \item |\definecolor| and |\color| now accept space-separated color specifications, e.g., |\color| |[rgb]{1 .5 0}|;
+% \item experimental \Option{xcdraw} option extended to \Option{pdftex} and \Option{dvipdfm} drivers.
+% \end{itemize}
+% \item Changes:
+% \begin{itemize}
+% \item test file \File{xcolor2.tex} made compatible with recent changes in \Package{pstricks};
+% \item test file \File{xcolor3.tex} extended;
+% \item driver test file \File{xcolor4.tex} extended to demonstrate the different frame drawing approaches;
+% \item more efficient implementation of driver-specific code.
+% \end{itemize}
+% \end{itemize}
+%
+% \subsubsection*{2005/11/25 v2.08}
+% \begin{itemize}
+% \item New features:
+% \begin{itemize}
+% \item more flexibility for |\fcolorbox| arguments, e.g., |\fcolorbox| |[gray]{0.5}[wave]{580}{test}|;
+% \item |\boxframe| returns a frame of given dimensions;
+% \item new implementation of |\f(rame)box| and |\fcolorbox| as an extension of bug report latex/3655 to reduce pixel positioning errors in output devices;
+% \item \Option{kernelfbox} option for those who prefer the previous |\f(rame)box| approach;
+% \item experimental \Option{xcdraw} option uses \Index{PostScript} commands to draw frames and color boxes in case of \Option{dvips}.
+% \end{itemize}
+% \item Bugfixes:
+% \begin{itemize}
+% \item insufficient expression type detection within |\colorlet|;
+% \item wrong calculation in the unit interval reduction for negative integers (affecting color series and extended color expressions).
+% \end{itemize}
+% \end{itemize}
+%
+% \subsubsection*{2005/11/12 v2.07}
+% \begin{itemize}
+% \item New features:
+% \begin{itemize}
+% \item color model \Model{Hsb} allows to specify \emph{hue} in degrees;
+% \item color model \Model{tHsb} (\pModel{tuned} \Model{Hsb}) for user-defined \emph{hue} configuration on color wheels;
+% \item easy generation of color harmonies derived from \Model{Hsb} or \Model{tHsb} color wheels, e.g., |\color{red>wheel,1,12}| yields an `analogous' color to \Color{red} on a 12-spoke wheel;
+% \item additional 317 predefined color names according to \File{rgb.txt}, which is part of \Index{Unix}/\Index{X11} distributions;
+% \item \Option{svgnames} option extended by~4~colors taken from \File{rgb.txt};
+% \item enhanced syntax for immediate conversion, e.g., |\definecolor| |{foo}{rgb:gray}{0.3}| or |\color| |[rgb:wave]{478}|;
+% \item |\@ifundefinedcolor| and |\@ifundefinedmodel| commands;
+% \end{itemize}
+% \item Changes:
+% \begin{itemize}
+% \item enhanced documentation;
+% \item several changes to internal macros.
+% \end{itemize}
+% \item Bugfixes:
+% \begin{itemize}
+% \item wrong calculation of color series components in some cases of negative step parameters.
+% \end{itemize}
+% \end{itemize}
+%
% \subsubsection*{2005/10/15 v2.06}
% \begin{itemize}
% \item New features:
% \begin{itemize}
% \item color model \Model{wave} for (approximate) visualisation of light wavelengths, still somewhat experimental;
-% \item pseudo-model \nModel{ps} for colors defined by literal PostScript code in conjunction with \Package{pstricks} and \Option{dvips}; an illustrative example for a $\gamma$-correction approach is given in \href{xcolor2.pdf}{\File{xcolor2.tex}};
+% \item pseudo-model \nModel{ps} for colors defined by literal \Index{PostScript} code in conjunction with \Package{pstricks} and \Option{dvips}; an illustrative example for a $\gamma$-correction approach is given in \href{xcolor2.pdf}{\File{xcolor2.tex}};
% \item |\substitutecolormodel| command for replacement of missing or faulty driver-specific color models;
% \item improved detection and handling of driver-specific color models;
% \item \Option{dvipdfmx} and \Option{xetex} options to support these drivers;
@@ -2740,7 +3198,7 @@
% \item Changes:
% \begin{itemize}
% \item color model names sanitized (i.e., turned to catcode~12) throughout the package;
-% \item |\@namelet| command deprecated because of name clash with \Package{memoir} -- please use |\XC@let@cc| instead (more |\XC@let@..| commands are available as well);
+% \item |\@namelet| command deprecated because of name clash with \Package{memoir} --- please use |\XC@let@cc| instead (more |\XC@let@..| commands are available as well);
% \item simplified color conversion code by using the new |\XC@ifxcase| command;
% \item some minor changes to internal macros.
% \end{itemize}
@@ -2986,7 +3444,7 @@
%
% \section{The Implementation}
%
-% Some commands have been copied unchanged from \cite{color} (Copyright (C) 1994--1999 \People{David}{Carlisle}), which is part of the Standard \LaTeX{} `Graphics Bundle'.
+% Some commands have been copied unchanged from \cite{color} (Copyright (C) 1994--1999 \People{David P.}{Carlisle}), which is part of the Standard \LaTeX{} `Graphics Bundle'.
% Additionally, also some parts of the code documentation were copied from \cite{color}.
%
%
@@ -3023,6 +3481,7 @@
\catcode`\noexpand\;\the\catcode`\;\relax
\catcode`\noexpand\/\the\catcode`\/\relax
\catcode`\noexpand\"\the\catcode`\"\relax
+ \catcode`\noexpand\>\the\catcode`\>\relax
\catcode`\noexpand\^^A\the\catcode`\^^A\relax}
% \end{macrocode}
% \end{macro}
@@ -3036,6 +3495,7 @@
\catcode`\;=12
\catcode`\/=12
\catcode`\"=12
+\catcode`\>=12
\catcode`\^^A=\catcode`\%
% \end{macrocode}
%
@@ -3100,11 +3560,11 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\ifXC@@xcp}
+% \begin{macro}{\ifXC@@fbox}
% \begin{macro}{\ifXC@@tst}
% Auxiliary test variables.
% \begin{macrocode}
-\newif\ifXC@@xcp
+\newif\ifXC@@fbox \XC@@fboxtrue
\newif\ifXC@@tst
% \end{macrocode}
% \end{macro}
@@ -3148,16 +3608,14 @@
% \marg{target character string}\marg{source character string}\\
% Performs |\let\|\Meta{target character string}|=\|\Meta{source character string}.
% \begin{macrocode}
-\def\XC@let@cc#1%
- {\expandafter\XC@let@Nc\csname#1\endcsname}
+\def\XC@let@cc#1{\expandafter\XC@let@Nc\csname#1\endcsname}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@namelet}
% This is provided for compatibility reasons only, although deprecated because of a name clash with \Package{memoir}.
% \begin{macrocode}
-\providecommand*\@namelet[1]%
- {\expandafter\XC@let@Nc\csname#1\endcsname}
+\providecommand*\@namelet[1]{\expandafter\XC@let@Nc\csname#1\endcsname}
% \end{macrocode}
% \end{macro}
%
@@ -3166,8 +3624,7 @@
% Performs |\let|\Meta{target name}|=\|\Meta{source character string}.
% Formerly called |\@@namelet|.
% \begin{macrocode}
-\def\XC@let@Nc#1#2%
- {\expandafter\let\expandafter#1\csname#2\endcsname}
+\def\XC@let@Nc#1#2{\expandafter\let\expandafter#1\csname#2\endcsname}
% \end{macrocode}
% \end{macro}
%
@@ -3175,8 +3632,7 @@
% \marg{target character string}\marg{source name}\\
% Performs |\let\|\Meta{target character string}|=|\Meta{source name}.
% \begin{macrocode}
-\def\XC@let@cN#1%
- {\expandafter\let\csname#1\endcsname}
+\def\XC@let@cN#1{\expandafter\let\csname#1\endcsname}
% \end{macrocode}
% \end{macro}
%
@@ -3197,7 +3653,7 @@
\def\aftergroupdef#1#2%
{\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{#2}}
\def\aftergroupedef#1#2%
- {\edef\@@tmp{\noexpand\def\noexpand#1{#2}}\expandafter\endgroup\@@tmp}
+ {\edef\@@tmp{\def\noexpand#1{#2}}\expandafter\endgroup\@@tmp}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3207,13 +3663,13 @@
% \begin{macro}{\XC@sdef}
% \marg{cmd}\marg{code}\\
% Defines \Meta{cmd} as a safe expansion of \Meta{code}; needed for color expressions in certain languages.
-% The second form is a streamlined version that takes only care of active `|/|' characters that may occur in \Meta{model-list} and \Meta{spec-list} arguments.
+% The second form is a streamlined version that takes only care of active `|/|' and `|:|' characters that may occur in \Meta{model-list} and \Meta{spec-list} arguments.
% The third form defines a sanitized expansion without considering active characters.
% It is faster since it needs no grouping operation.
% \begin{macrocode}
\begingroup
\catcode`\!=13 \catcode`\:=13 \catcode`\-=13 \catcode`\+=13
-\catcode`\;=13 \catcode`\/=13 \catcode`\"=13
+\catcode`\;=13 \catcode`\/=13 \catcode`\"=13 \catcode`\>=13
\gdef\XC@edef#1#2%
{\begingroup
\ifnum\catcode`\!=13 \edef!{\string!}\fi
@@ -3222,10 +3678,12 @@
\ifnum\catcode`\+=13 \edef+{\string+}\fi
\ifnum\catcode`\;=13 \edef;{\string;}\fi
\ifnum\catcode`\"=13 \edef"{\string"}\fi
+ \ifnum\catcode`\>=13 \edef>{\string>}\fi
\edef#1{#2}\@onelevel@sanitize#1\aftergroupdef#1#1}
\gdef\XC@mdef#1#2%
{\begingroup
\ifnum\catcode`\/=13 \edef/{\string/}\fi
+ \ifnum\catcode`\:=13 \edef:{\string:}\fi
\edef#1{#2}\@onelevel@sanitize#1\aftergroupdef#1#1}
\endgroup
\def\XC@sdef#1#2{\edef#1{#2}\@onelevel@sanitize#1}
@@ -3235,6 +3693,50 @@
% \end{macro}
%
%
+% \subsubsection{Conditional processing}
+%
+% \begin{macro}{\@ifxempty}
+% \marg{arg}\marg{empty}\marg{non-empty}\\
+% Tests without expanding, whether the argument \Meta{arg} is empty and executes the following code accordingly; \Meta{arg} must not start with the token |\XC@@|.
+% Can also be used within |\edef|.
+% \begin{macrocode}
+\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
+\def\@@ifxempty#1#2\XC@@
+ {\ifx#1\@@ifxempty
+ \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@ifxcase}
+% \marg{cmd}|{{|\Meta[1]{cmd}|}{|\Meta[1]{code}|}...{|\Meta[n]{cmd}|}{|\Meta[n]{code}|}}|\marg{default code}\\
+% Performs the test |\ifx|\Meta{cmd}\Meta[k]{cmd} for $k=1,\dots,n$.
+% If for some $k$ the test is `true', then the attached code \Meta[k]{code} is executed.
+% If all tests are `false', then \Meta{default code} is executed.
+% \begin{macrocode}
+\long\def\XC@ifxcase#1#2#3%
+ {\long\def\@@tmp##1##2%
+ {\ifx#1##1%
+ \toks@{##2}\expandafter\remove@to@nnil\else\expandafter\@@tmp\fi}%
+ \@@tmp#2#1{#3}\@nnil\the\toks@}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@ifcase}
+% \marg{str}|{{|\Meta[1]{str-list}|}{|\Meta[1]{code}|}...{|\Meta[n]{str-list}|}{|\Meta[n]{code}|}}|\marg{default code}\\
+% Tests whether \Meta{str} appears in one of the comma-separated lists \Meta[k]{str-list}.
+% Performs the test |\if|\Meta{str}\Meta[kl]{str} for $k=1,\dots,n$ and $l=1,\ldots,m_n$.
+% If for some $k,l$ the test is `true', then the attached code \Meta[k]{code} is executed.
+% If all tests are `false', then \Meta{default code} is executed.
+% \begin{macrocode}
+\long\def\XC@ifcase#1#2#3%
+ {\long\def\@@tmp##1##2%
+ {\@expandtwoargs\in@{,#1,}{,##1,}\ifin@
+ \toks@{##2}\expandafter\remove@to@nnil\else\expandafter\@@tmp\fi}%
+ \@@tmp#2{#1}{#3}\@nnil\the\toks@}
+% \end{macrocode}
+% \end{macro}
+%
+%
%
% \subsection{Package options}
%
@@ -3292,6 +3794,8 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@mod@Hsb}
+% \begin{macro}{\XC@mod@tHsb}
% \begin{macro}{\XC@mod@ignore}
% \begin{macro}{\XC@mod@named}
% \begin{macro}{\XC@mod@ps}
@@ -3309,7 +3813,7 @@
% Put model names into commands and define package options
% \Option{natural}, \Option{rgb}, \Option{cmy}, \Option{cmyk}, \Option{hsb}, \Option{gray}, \Option{RGB}, \Option{HTML}, \Option{HSB}, \Option{Gray}.
% \begin{macrocode}
-\@tfor\@@tmp:={ignore}{named}{ps}{wave}\do
+\@tfor\@@tmp:={Hsb}{tHsb}{ignore}{named}{ps}{wave}\do
{\expandafter\XC@sdef\csname XC@mod@\@@tmp\endcsname{\@@tmp}}
% \end{macrocode}
%
@@ -3334,6 +3838,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% The \Option{monochrome} option should be used \emph{in addition} to one of the standard driver options.
% \begin{macrocode}
@@ -3385,6 +3891,7 @@
% \begin{macrocode}
\XC@declarenames{dvipsnames}{dvipsnam}{\let\colornameprefix\@empty}
\XC@declarenames{svgnames}{svgnam}{}
+\XC@declarenames{x11names}{x11nam}{}
\XC@declarenames{hksnames}%
{hks\ifcase\paperquality k\or n\or k\or z\else n\fi nam}{}
\XC@declarenames{pmsnames}{pmsnam}{}
@@ -3394,7 +3901,7 @@
%
% \subsubsection{Support for other packages}
%
-% Use this option to load \People{David}{Carlisle}'s \Package{colortbl} package:
+% Use this option to load \People{David P.}{Carlisle}'s \Package{colortbl} package:
% \begin{macrocode}
\DeclareOption{table}{\XC@append\XC@@pkg{\RequirePackage{colortbl}}}
% \end{macrocode}
@@ -3404,7 +3911,7 @@
\DeclareOption{fixpdftex}{\XC@append\XC@@pkg{\RequirePackage{pdfcolmk}}}
% \end{macrocode}
%
-% Use this option to load \People{David}{Carlisle}'s \Package{pstcol} package in order to make standard color definitions available within \Package{pstricks}.
+% Use this option to load \People{David P.}{Carlisle}'s \Package{pstcol} package in order to make standard color definitions available within \Package{pstricks}.
% Warning: this option is neither needed nor useful with recent \Package{pstricks} versions.
% \begin{macrocode}
\DeclareOption{pst}{\def\XC@pst{\RequirePackage{pstcol}}}
@@ -3456,7 +3963,7 @@
{emtex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
{tcidvi}{textures}{truetex}{vtex}{xetex}\do
{\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
- {\noexpand\def\noexpand\Gin@driver{\@@tmp.def}}}%
+ {\def\noexpand\Gin@driver{\@@tmp.def}}}%
\@@tmp}
% \end{macrocode}
%
@@ -3467,15 +3974,22 @@
\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
% \end{macrocode}
%
-% \Option{prologue} option, used by (some) drivers.
+% Options used by (some) drivers.
% \begin{macrocode}
-\DeclareOption{prologue}{\XC@@xcptrue}
+\DeclareOption{xcdraw}{\def\XC@@xcd@{1}}
+\DeclareOption{noxcdraw}{\def\XC@@xcd@{-1}}
+\DeclareOption{prologue}{\def\XC@@xcp@{1}}
% \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Other options}
%
+% Switch to original kernel |\fbox| command instead of new \XC{} version.
+% \begin{macrocode}
+\DeclareOption{kernelfbox}{\XC@@fboxfalse}
+% \end{macrocode}
+%
% These options control how non-existing colors are treated:
% \begin{macrocode}
\DeclareOption{showerrors}{\colorerrors@true}
@@ -3495,6 +4009,8 @@
%
% Choose default options:
% \begin{macrocode}
+\def\XC@@xcd@{-1}
+\def\XC@@xcp@{-1}
\ExecuteOptions{natural,showerrors}
% \end{macrocode}
%
@@ -3533,28 +4049,59 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@@drv@}
-% Test variable for |\ifcase| expressions.
+% \begin{macro}{\XC@@xcd@}
+% \begin{macro}{\XC@@xcp@}
+% These are used firstly by the \Option{xcdraw} and \Option{prologue} options, indicating whether either option is swithed on or off.
+% Secondly, the macros serve as test variables for |\ifcase| expressions, storing the intended type of output: $-1=\text{dvi}, 0=\text{ps}, 1=\text{pdf}$.
+% \begin{macrocode}
+\count@\XC@@xcd@ \advance\count@\XC@@xcp@\relax
+\ifnum\count@>-2
+% \end{macrocode}
+%
+% \begin{macro}{\XC@special}
+% \meta{code}\\
+% Driver-specific variant of |\special|.
+% Even if the intended type of output is the same (e.g., pdf), the |\special| commands may differ.
% \begin{macrocode}
-\def\XC@@drv@{-1}
-\@tfor\@@tmp:={dvips}{pctex32}\do
- {\ifx\@@tmp\XC@@drv\def\XC@@drv@{0}\@break@tfor\fi}
+ \XC@ifcase\XC@@drv
+ {{dvips,pctex32}%
+ {\def\@tempa{0}
+ \def\XC@special#1{\special{ps:XC!b}\special{"#1}\special{ps:XC!e}}}%
+ {pdftex}%
+ {\def\@tempa{1}
+ \def\XC@special#1{\pdfliteral{ q #1 Q }}}%
+ {dvipdfm}%
+ {\def\@tempa{1}
+ \def\XC@special#1{\special{pdf: content #1}}}%
+ }{\def\@tempa{-1}}
+% \end{macrocode}
+%
+% Since the options are independent of each other, we have to adjust the affiliated test variables independently as well.
+% \begin{macrocode}
+ \ifnum\XC@@xcd@>\m@ne\let\XC@@xcd@\@tempa\fi
+ \ifnum\XC@@xcp@>\m@ne\let\XC@@xcp@\@tempa\fi
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@@xcp}
-% File variabe for prologue output.
+% File variable for prologue output.
+% \begin{macrocode}
+ \ifnum\@tempa=0 \AtBeginDvi{\special{header=xcolor.pro}}\fi
+ \ifcase\XC@@xcp@
+ \AtBeginDvi{\special{header=\jobname.xcp}}
+ \newwrite\XC@@xcp\immediate\openout\XC@@xcp=\jobname.xcp
+ \immediate\write\XC@@xcp{\@percentchar!}
+ \immediate\write\XC@@xcp{TeXDict begin}
+ \AtEndDocument
+ {\immediate\write\XC@@xcp{end}\immediate\closeout\XC@@xcp}
+ \fi
+% \end{macrocode}
+%
+% End of driver-specific part.
% \begin{macrocode}
-\ifXC@@xcp\ifcase\XC@@drv@
- \AtBeginDvi{\special{header=xcolor.pro}\special{header=\jobname.xcp}}
- \newwrite\XC@@xcp\immediate\openout\XC@@xcp=\jobname.xcp
- \immediate\write\XC@@xcp{\@percentchar!}
- \immediate\write\XC@@xcp{TeXDict begin}
- \AtEndDocument
- {\immediate\write\XC@@xcp{end}\immediate\closeout\XC@@xcp}
-\fi\fi
+\fi
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
%
% \subsubsection{Required packages}
@@ -3581,36 +4128,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@ifxempty}
-% \marg{arg}\marg{empty}\marg{non-empty}\\
-% Tests without expanding, whether the argument \Meta{arg} is empty and executes the following code accordingly; \Meta{arg} must not start with the token |\XC@@|.
-% Can also be used within |\edef|.
-% \begin{macrocode}
-\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@@ifxempty#1#2\XC@@
- {\ifx#1\@@ifxempty
- \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\XC@ifxcase}
-% \marg{cmd}|{{|\Meta[1]{cmd}|}{|\Meta[1]{code}|}...{|\Meta[n]{cmd}|}{|\Meta[n]{code}|}}|\marg{default code}\\
-% Performs the test |\ifx|\Meta{cmd}\Meta[k]{cmd} for $k=1,\dots,n$.
-% If for some $k$ the test is `true', then the attached code \Meta[k]{code} is executed.
-% If all tests are `false', then \Meta{default code} is executed.
-% \begin{macrocode}
-\long\def\XC@ifxcase#1#2#3%
- {\long\def\XC@ifxc@se##1##2%
- {\ifx#1##1%
- \toks@{##2}\expandafter\remove@to@nnil\else
- \expandafter\XC@ifxc@se\fi}%
- \XC@ifxc@se#2#1{#3}\@nnil\the\toks@}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\xglobal}
% \begin{macro}{\xglobal@test}
% If |\foo| occurs in the token list |\xglobal@@|, then the command |\xglobal\foo| will set the switch |\xglobal@true| which can be used inside |\foo| to determine whether certain definitions are to be made explicitely global.
@@ -3678,9 +4195,6 @@
% May be used inside |\edef|.
% \begin{macrocode}
\def\@hex@Hex#1{\ifx#1\relax\else\expandafter\@hex@@Hex\expandafter#1\fi}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\@hex@@Hex#1%
{\if a#1A\else \if b#1B\else \if c#1C\else \if d#1D\else
\if e#1E\else \if f#1f\else #1\fi\fi\fi\fi\fi\fi \@hex@Hex}
@@ -3701,6 +4215,50 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@replace}
+% \marg{cmd}\marg{search}\marg{replace}\\
+% Replace all occurences of \meta{search} within the first-level expansion of \meta{cmd} by \meta{replace} and save the result in \meta{cmd}.
+% The replacement is recursive, so don't put the search pattern into the replacement text!
+% Note that this macro is incapable of seeing `into' braces.
+% The code and its explanation is taken from \People{Donald}{Arseneau}'s \Package{url} package \cite{url}, with only minor changes and renamings applied.
+% The original name of the game is |\Url@Edit|.
+% Thanks to \People{Donald}{Arseneau} for giving me valuable hints.
+% \begin{macrocode}
+{\catcode`Q=3
+ \gdef\XC@replace#1#2#3%
+ {\begingroup
+% \end{macrocode}
+%
+% If finished, then remove |\@empty|'s and redefine macro else, re-iterate.
+% \begin{macrocode}
+ \def\XC@repl@ce##1#2##2Q##3%
+ {\@ifxempty{##2}{\XC@r@pl@ce##1Q}{\XC@repl@ce##1##3##2Q{##3}}}%
+ \def\XC@r@pl@ce##1\@empty Q%
+ {\expandafter\endgroup\expandafter\def\expandafter#1\expandafter{##1}}%
+% \end{macrocode}
+%
+% The leading |\@empty| preserves braces, as does the trailing pattern.
+% \begin{macrocode}
+ \expandafter\XC@repl@ce\expandafter\@empty #1\@empty#2Q{#3}}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@clean}
+% \marg{cmd}\\
+% Makes a proper comma-separated list from \meta{cmd}'s contents and stores it again in \meta{cmd}.
+% Firstly, all commas are changed into spaces, secondly, spaces are turned into commas (using a technique similar to \LaTeX's |\zap@space|).
+% Thirdly, the two leading commas are gobbled.
+% For example, `| 1 2 , 3 |' is mapped to `|1,2,3|'.
+% \begin{macrocode}
+\def\XC@clean#1%
+ {\edef#1{ #1 }\edef#1{\expandafter\XC@strip@comma#1,,\@nnil}%
+ \edef#1{\expandafter\XC@cle@n#1\@empty}%
+ \edef#1{\expandafter\@gobbletwo#1}}
+\def\XC@cle@n#1 #2{,#1\ifx#2\@empty\else\expandafter\XC@cle@n\fi#2}
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsubsection{Scalar arithmetic}
%
@@ -3952,8 +4510,16 @@
% \textbf Division of $x$ by $s$: performs |\def|\Meta{cmd}|{|$x/s$|}|.
% The parameter $s$ is input via |\@@scl|.
% \begin{macrocode}
-\def\XC@calcD#1#2%
- {\dimen@#1\p@ \rdivide\dimen@\@@scl \edef#2{\strip@pt\dimen@}}
+\def\XC@calcD{\XC@c@lcD\@@scl{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@c@lcD}
+% \marg{s}\marg{string}\marg{x}\marg{cmd}\\
+% \textbf Division of $x$ by $s$, appending \Meta{string}: performs |\def|\Meta{cmd}|{|$x/s$\Meta{string}|}|.
+% \begin{macrocode}
+\def\XC@c@lcD#1#2#3#4%
+ {\dimen@#3\p@ \rdivide\dimen@{#1}\edef#4{\strip@pt\dimen@#2}}
% \end{macrocode}
% \end{macro}
%
@@ -4039,9 +4605,20 @@
% \textbf Scaling of $x$ by $s$: performs |\def|\Meta{cmd}|{|$s\cdot x$|}|.
% The parameter $s$ is input via |\@@scl|.
% \begin{macrocode}
-\def\XC@calcS#1#2%
- {\lshiftset\dimen@{#1}\dimen@\lshiftnum\@@scl\dimen@ \rrshift\dimen@
- \edef#2{\strip@pt\dimen@}}
+\def\XC@calcS{\XC@c@lcS\@@scl{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@c@lcS}
+% \marg{s}\marg{string}\marg{x}\marg{cmd}\\
+% \textbf Scaling of $x$ by $s$, appending \Meta{string}: performs |\def|\Meta{cmd}|{|$s\cdot x$\Meta{string}|}|.
+% \begin{macrocode}
+\def\XC@c@lcS#1#2#3#4%
+ {\lshiftset\dimen@{#3}%
+ \ifdim#1\p@<100\p@
+ \dimen@\lshiftnum#1\dimen@ \rrshift\dimen@ \else
+ \dimen@#1\dimen@ \rshift\dimen@ \fi
+ \edef#4{\strip@pt\dimen@#2}}
% \end{macrocode}
% \end{macro}
%
@@ -4065,8 +4642,8 @@
{\dimen@#1\p@
\ifdim\dimen@=\p@\else
\afterassignment\dimen@\count@=\the\dimen@
- \ifnum\count@<\z@
- \lshift\dimen@ \dimen@-\dimen@ \advance\dimen@10\p@ \rshift\dimen@
+ \relax\ifdim\dimen@=\z@\else
+ \ifdim#1\p@<\z@ \dimen@-\dimen@ \advance\dimen@\p@ \fi
\fi
\fi
\edef#2{\strip@pt\dimen@}}
@@ -4080,16 +4657,22 @@
%
% \begin{macro}{\rangeRGB}
% \begin{macro}{\rangeHSB}
+% \begin{macro}{\rangeHsb}
+% \begin{macro}{\rangetHsb}
% \begin{macro}{\rangeGray}
-% Scaling ranges for `integer models':
+% Scaling ranges for `integer' and other special models:
% \begin{macrocode}
\providecommand*\rangeRGB{255}
\providecommand*\rangeHSB{240}
+\providecommand*\rangeHsb{360}
+\providecommand*\rangetHsb{60,30;120,60;180,120;210,180;240,240}
\providecommand*\rangeGray{15}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\adjustUCRBG}
% Parameters for undercolor-removal (UCR) and black-generation (BG) during \Model{cmy} to \Model{cmyk} conversion:
@@ -4141,12 +4724,12 @@
% \begin{macro}{\definecolor}
% \oarg{type}\marg{name}\oarg{prefix}\marg{model-list}\marg{spec-list}\\
% Extends the facilities of \LC's |\definecolor|.
-% The optional argument \Meta{type} has currently to be either empty (= normal color definition) or `named'.
+% The optional argument \Meta{type} has currently to be either empty (= normal color definition) or `named' or `ps'.
% \Meta{prefix} is an argument used for the internal driver-dependent representation.
% |\definecolor| creates a new command |\\color@|\Meta{name} that contains the \emph{internal representation}
% |\xcolor@|\marg{type-spec}\marg{driver-spec}\marg{n-model}\marg{n-color-spec} of the color, where
% \begin{itemize}
-% \item \Meta{type-spec} is either empty (if \Meta{type} was empty), or a driver-dependent macro or expression (if \Meta{type} was `named');
+% \item \Meta{type-spec} is either empty (if \Meta{type} was empty), or a driver-dependent macro or expression (if \Meta{type} was `named', `ps');
% \item \Meta{driver-spec} is a driver-dependent representation of the color, which also depends on \Meta{type};
% \item \Meta{n-model} is either \Meta{model} or the name of another color model, dependent on the desired transformation(s) at definition time;
% \item \Meta{n-color-spec} are the comma-separated normalised parameter values of the color with respect to \Meta{n-model}.
@@ -4154,9 +4737,6 @@
% See table \vref{tab.internal} for some examples.
% \begin{macrocode}
\def\definecolor{\@testopt{\XC@definecolor}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@definecolor[#1]#2%
{\@testopt{\XC@definec@lor[#1]{#2}}\colornameprefix}
% \end{macrocode}
@@ -4166,10 +4746,7 @@
{\begingroup
\XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}\edef\colornameprefix{#3}%
\XC@logdef\@@nam
- \ifXC@@getmod\XC@getmod{#4}\XC@@pos\@@mod\fi
- \XC@getclr{#5}\XC@@pos\@@clr
- \@ifundefined{color@\@@mod}%
- {\c@lor@error{model `\@@mod'}\let\@@tmp\relax}%
+ \XC@getmodclr02{#4}{#5}{\let\@@tmp\relax}%
{\ifx\@@mod\XC@mod@named
\XC@c@l@rlet\@@nam\@@clr
\else
@@ -4192,11 +4769,11 @@
%
% Handle prologue and `named' colors:
% \begin{macrocode}
- \ifXC@@xcp\ifcase\XC@@drv@
+ \ifcase\XC@@xcp@
\immediate\write\XC@@xcp{/\colornameprefix\@@nam{\expandafter
\XC@strip@comma\@@clr,,\@nnil}XC\@@mod}%
\let\@@cls\XC@mod@named
- \fi\fi
+ \fi
\ifx\@@cls\@empty\else
\let\@@tmp\@@cls
\@nameuse{define@color@\@@cls}\@@nam\@@drv
@@ -4218,40 +4795,79 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@getmodclr}
+% \marg{mod-opt}\marg{clr-opt}\marg{model-list}\marg{spec-list}\marg{undefined}\marg{defined}\\
+% Depending on \Meta{mod-opt}, different tasks are performed:
+% \begin{itemize}
+% \item[0:] Retrieve color model and target model from \Meta{model-list} if |\XC@@getmod| is `true'.
+% \item[1:] Retrieve color model and target model from \Meta{model-list} always.
+% \end{itemize}
+% The color model is stored in |\@@mod|, its position in |\XC@@pos|, a possible target model in |\@@Mod|.
+% Depending on \Meta{clr-opt}, different tasks are performed:
+% \begin{itemize}
+% \item[0:] Don't pick color specification from \Meta{spec-list}.
+% \item[1:] Pick color specification from \Meta{spec-list}, convert it from model |\@@mod| to |\@@Mod|, unless the latter is `ignore' or |\@@cls| is `ps'.
+% \item[2:] Like the former case, additionally |\let\@@mod\@@Mod|.
+% \end{itemize}
+% The color specification is stored in |\@@clr|.
+% Color specification picking relies on the position |\XC@@pos|, conversion relies on the model |\@@mod|, and the target model |\@@Mod|.
+% If |\@@mod| represents an undefined color model, then \Meta{undefined} is executed at the end of the macro, else \Meta{defined}.
+% \begin{macrocode}
+\def\XC@getmodclr#1#2#3#4%
+ {\ifnum\ifcase#1 \ifXC@@getmod1\else0 \fi \or1 \fi>0
+ \XC@mdef\@@mod{#3}\expandafter\XC@getmod\@@mod////////\XC@@
+ \@ifundefinedmodel\@@Mod{\let\@@Mod\XC@mod@ignore}{}\fi
+ \@ifundefined{XC@mod@\@@mod}%
+ {\c@lor@error{model `\@@mod'}\@firstoftwo}%
+ {\ifcase#2\else
+ \XC@mdef\@@clr{#4}%
+ \edef\@@clr{\expandafter\XC@getclr\@@clr////////\XC@@}%
+ \ifx\@@cls\XC@mod@ps\else\XC@clean\@@clr\fi
+ \ifx\@@Mod\XC@mod@ignore\else
+ \convertcolorspec\@@mod\@@clr\@@Mod\@@clr
+ \ifnum#2>1 \let\@@mod\@@Mod\fi
+ \fi
+ \fi \@secondoftwo}}
+% \end{macrocode}
+%
% \begin{macro}{\XC@getmod}
-% \marg{model-list}\marg{position-cmd}\marg{model-cmd}\\
-% Retrieve color model from multiple definitions, separated by `|/|'.
-% This is being done by searching \Meta{model-list} for the current target model; if there is no match, the first listed model will be taken.
-% The position is saved in \Meta{position-cmd}, the resulting model is saved in \Meta{model-cmd}.
+% Retrieve model position |\XC@@pos|, model |\@@mod|, and target model |\@@Mod| from multiple definitions (up to~8), separated by `|/|'.
% \begin{macrocode}
-\def\XC@getmod#1#2#3%
- {\def\XC@getm@d##1/##2/##3/##4/##5/##6/##7/##8/##9:%
- {\XC@g@tm@d0{##1}\XC@g@tm@d1{##2}\XC@g@tm@d2{##3}\XC@g@tm@d3{##4}%
- \XC@g@tm@d4{##5}\XC@g@tm@d5{##6}\XC@g@tm@d6{##7}\XC@g@tm@d7{##8}%
- \def#2{0}\def#3{##1}\@gobble\@nnil}%
- \def\XC@g@tm@d##1##2%
- {\edef#2{##2}\XC@sdef#3{\XC@tgt@mod#2}%
- \ifx#2#3\def#2{##1}\expandafter\remove@to@nnil\fi}%
- \XC@mdef#3{#1}\expandafter\XC@getm@d#3////////:}
+\def\XC@getmod#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
+ {\XC@g@tm@d0#1::\XC@@ \XC@getm@d1{#2}\XC@getm@d2{#3}%
+ \XC@getm@d3{#4}\XC@getm@d4{#5}\XC@getm@d5{#6}\XC@getm@d6{#7}%
+ \XC@getm@d7{#8}\def\XC@@pos{0}\def\@@mod{#1}\@gobble\@nnil}%
% \end{macrocode}
%
% \begin{macrocode}
-\newif\ifXC@@getmod \XC@@getmodtrue
+\def\XC@getm@d#1#2%
+ {\edef\XC@@pos{#2}\XC@sdef\@@mod{\XC@tgt@mod\XC@@pos}%
+ \ifx\XC@@pos\@@mod\def\XC@@pos{#1}\expandafter\remove@to@nnil\fi}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\XC@g@tm@d#1#2:#3:#4\XC@@
+ {\@ifxempty{#3}{\let\@@Mod\XC@mod@ignore\XC@getm@d0{#2}}%
+ {\def\@@Mod{#2}\XC@getm@d0{#3}}}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\XC@getclr}
-% \marg{spec-list}\marg{position}\marg{clr-cmd}\\
-% Pick color specification on position \Meta{position} from multiple definitions, separated by `|/|'.
-% The associated specification from \Meta{spec-list} is put into \Meta{clr-cmd}.
-% It is assumed that \Meta{position} contains a valid number, no checks are performed.
+% Pick color specification on position |\XC@@pos| from multiple definitions (up to~8), separated by `|/|'.
+% Expandable.
+% \begin{macrocode}
+\def\XC@getclr#1/#2/#3/#4/#5/#6/#7/#8/#9\XC@@
+ {\ifcase\XC@@pos\space #1\or#2\or#3\or#4\or#5\or#6\or#7\or#8\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifXC@@getmod}
+% Switch used to determine whether the model has to be retrieved (e.g., ordinary |\definecolor|) or not (e.g., |\definecolor| acting as subroutine to |\definecolorset|).
% \begin{macrocode}
-\def\XC@getclr#1#2#3%
- {\def\XC@getc@r##1/##2/##3/##4/##5/##6/##7/##8/##9:%
- {\ifcase#2 ##1\or##2\or##3\or##4\or##5\or##6\or##7\or##8\fi}%
- \XC@mdef#3{#1}\edef#3{\expandafter\XC@getc@r#3////////:}}
+\newif\ifXC@@getmod \XC@@getmodtrue
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\xdefinecolor}
% This command is identical with |\definecolor|, it is kept only for compatibility reasons.
@@ -4265,9 +4881,6 @@
% Similar to |\definecolor|, but the color \Meta{name} is only defined if it does not exist already.
% \begin{macrocode}
\def\providecolor{\@testopt{\XC@providecolor}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@providecolor[#1]#2%
{\@testopt{\XC@providec@lor[#1]{#2}}\colornameprefix}
% \end{macrocode}
@@ -4275,7 +4888,7 @@
% \begin{macrocode}
\def\XC@providec@lor[#1]#2[#3]%
{\XC@edef\XC@@tmp{#2}%
- \@ifundefined{\string\color@\XC@@tmp}{\XC@definecolor[#1]{#2}[#3]}%
+ \@ifundefinedcolor\XC@@tmp{\XC@definecolor[#1]{#2}[#3]}%
{\ifnum\XC@tracing>0
\PackageInfo{xcolor}{Ignoring color definition `\XC@@tmp'}\fi
\@gobbletwo}}
@@ -4296,13 +4909,7 @@
% Create a color `name' consisting of \Meta{color}, converted to \Meta{num model} if non-empty.
% \begin{macrocode}
\def\colorlet{\@testopt{\XC@colorlet}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@colorlet[#1]#2{\@testopt{\XC@col@rlet[#1]{#2}}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@col@rlet[#1]#2[#3]#4%
{\begingroup
\edef\@@cls{#1}\XC@edef\@@nam{#2}\XC@sdef\@@mod{#3}\XC@edef\@@clr{#4}%
@@ -4335,7 +4942,7 @@
%
% \begin{macrocode}
\def\XC@c@l@rlet#1#2%
- {\@ifundefined{\string\color@#2}%
+ {\@ifundefinedcolor{#2}%
{\c@lor@error{`#2'}\let\@@tmp\@empty}%
{\edef\@@tmp
{\ifglobalcolors\global\else\xglobal@\fi
@@ -4355,26 +4962,20 @@
% \subsubsection{Deferred definition}
%
% \begin{macro}{\preparecolor}
-% \oarg{type}\marg{name}\marg{model-list}\marg{spec-list}\\
+% \oarg{type}\marg{name}\oarg{prefix}\marg{model-list}\marg{spec-list}\\
% \begin{macrocode}
\def\preparecolor{\@testopt{\XC@preparecolor}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@preparecolor[#1]#2%
{\@testopt{\XC@preparec@lor[#1]{#2}}\colornameprefix}
% \end{macrocode}
%
% \begin{macrocode}
\def\XC@preparec@lor[#1]#2[#3]#4#5%
- {\XC@edef\@@nam{#2}%
- \ifXC@@getmod\XC@getmod{#4}\XC@@pos\@@mod\fi
- \XC@getclr{#5}\XC@@pos\@@clr
- \@ifundefined{XC@mod@\@@mod}%
- {\c@lor@error{model `\@@mod'}}%
+ {\XC@sdef\@@cls{#1}\XC@edef\@@nam{#2}%
+ \XC@getmodclr01{#4}{#5}{}%
{\xdef\XC@@stack
- {\ifx\XC@@stack\@empty\else\XC@@stack,\fi
- {#1}{\@@nam}{#3}{\@@mod}{\@@clr}}}}
+ {\ifx\XC@@stack\@empty\else\XC@@stack,\fi{#1}{\@@nam}{#3}%
+ {\ifx\@@Mod\XC@mod@ignore\@@mod\else\@@Mod\fi}{\@@clr}}}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -4441,13 +5042,13 @@
%
% \begin{macrocode}
\def\XC@definecolorset[#1]#2#3#4#5%
- {\XC@getmod{#2}\XC@@pos\@@mod\XC@@getmodfalse\XC@edef\XC@@tmp{#5}%
- \let\XC@@glb\xglobal@
- \def\XC@definec@lorset##1,##2;%
- {\@ifxempty{##1}{}%
- {\let\xglobal@\XC@@glb
- \XC@@cmd[#1]{#3##1#4}{\@@mod}{##2}\XC@definec@lorset}}%
- \expandafter\XC@definec@lorset\XC@@tmp;,;\XC@@getmodtrue}
+ {\XC@getmodclr10{#2}{}{}%
+ {\XC@@getmodfalse\XC@edef\XC@@tmp{#5}\let\XC@@glb\xglobal@
+ \def\XC@definec@lorset##1,##2;%
+ {\@ifxempty{##1}{}%
+ {\let\xglobal@\XC@@glb
+ \XC@@cmd[#1]{#3##1#4}{\@@mod}{##2}\XC@definec@lorset}}%
+ \expandafter\XC@definec@lorset\XC@@tmp;,;\XC@@getmodtrue}}
% \end{macrocode}
% \end{macro}
%
@@ -4510,9 +5111,6 @@
% \oarg{div}\marg{name}
% \begin{macrocode}
\def\resetcolorseries{\@testopt{\XC@resetcolorseries}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@resetcolorseries[#1]#2%
{\begingroup
\@namexdef
@@ -4555,8 +5153,7 @@
{\edef\@@tmp{\@nameuse{\string\colorB@#1}}%
\expandafter\XC@st@p\@@tmp{#1}%
\edef\@@tmp
- {\noexpand\def\noexpand\@@mod{\@@mod}%
- \noexpand\def\noexpand\@@clr{\@@tmp}}}
+ {\def\noexpand\@@mod{\@@mod}\def\noexpand\@@clr{\@@tmp}}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4573,9 +5170,6 @@
% An empty \Meta{mix expr} argument will switch blending off.
% \begin{macrocode}
\def\blendcolors{\@ifstar{\XC@blendcolors\colorblend}{\XC@blendcolors{}}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@blendcolors#1#2%
{\edef\colorblend{#1}\XC@edef\XC@@tmp{#2}%
\ifx\XC@@tmp\@empty
@@ -4612,9 +5206,6 @@
% The optional \Meta{core model} argument may be used to determine the underlying color model.
% \begin{macrocode}
\def\maskcolors{\@testopt{\XC@maskcolors}{}}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@maskcolors[#1]#2%
{\XC@edef\colormask{#2}%
\ifx\colormask\@empty
@@ -4638,11 +5229,11 @@
%
% \subsection{Color application}
%
-% \subsubsection{The core command}
+% \subsubsection{Standard color commands}
%
% \begin{macro}{\color}
% \marg{color}\\
-% \oarg{model}\marg{spec}\\
+% \oarg{model-list}\marg{spec-list}\\
% Switches to the color given either by name/expression or by model/specification.
% This color will stay in effect until the end of the current \TeX\ group.
% \begin{macrocode}
@@ -4652,35 +5243,36 @@
% \end{macro}
%
% \begin{macro}{\@undeclaredcolor}
-% \oarg{model}\marg{spec}\\
+% \oarg{model-list}\marg{spec-list}\\
% Display a color that is given by \Meta{model} name and numerical \Meta{spec}.
% \begin{macrocode}
\def\@undeclaredcolor[#1]#2%
{\begingroup
- \XC@sdef\@@mod{#1}\XC@edef\@@clr{#2}%
- \ifblendcolors
- \ifx\colorblend\@empty\else
- \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse
- \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr
+ \let\@@cls\@empty
+ \XC@getmodclr12{#1}{#2}{}%
+ {\ifblendcolors
+ \ifx\colorblend\@empty\else
+ \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse
+ \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr
+ \fi
\fi
- \fi
- \ifconvertcolorsU
- \edef\@@tmp{\XC@tgt@mod{\@@mod}}%
- \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp
- \fi
- \ifmaskcolors
- \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr
- \let\@@mod\XC@mmod
- \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp
- \expandafter\XC@mul\@@tmp,\@@clr
- \fi
- \edef\@@tmp{\noexpand\XC@undeclaredcolor{\@@mod}{\@@clr}}%
- \expandafter\endgroup\@@tmp}
+ \ifconvertcolorsU
+ \edef\@@tmp{\XC@tgt@mod{\@@mod}}%
+ \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp
+ \fi
+ \ifmaskcolors
+ \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr
+ \let\@@mod\XC@mmod
+ \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp
+ \expandafter\XC@mul\@@tmp,\@@clr
+ \fi
+ \edef\@@tmp{\noexpand\XC@undeclaredcolor{\@@mod}{\@@clr}}%
+ \expandafter\endgroup\@@tmp}}
% \end{macrocode}
%
% \begin{macrocode}
\def\XC@undeclaredcolor#1#2%
- {\@ifundefined{color@#1}%
+ {\@ifundefinedmodel{#1}%
{\c@lor@error{model `#1'}}%
{\@nameuse{color@#1}\current@color{#2}%
\edef\XC@current@color{\noexpand\xcolor@{}{\current@color}{#1}{#2}}%
@@ -4694,7 +5286,7 @@
% \begin{macrocode}
\def\@declaredcolor#1%
{\XC@edef\XC@@tmp{#1}\XC@@tstfalse
- \ifcase\XC@type{\XC@@tmp}\relax \XC@@tsttrue\or \relax\else
+ \ifcase\XC@type\XC@@tmp\relax \XC@@tsttrue\or \relax\else
\ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi
\ifconvertcolorsU\XC@@tsttrue\fi
\fi
@@ -4718,8 +5310,216 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\textcolor}
+% \marg{color}\marg{text}\\
+% \oarg{model-list}\marg{spec-list}\marg{text}\\
+% are just alternative syntax for |\color|, in which the groups are added implicitly.
+% Thus \emph{text} appears in the specified color, but then the color reverts to its previous value.
+% The naming is by analogy with |\textrm| (as opposed to |\rm| and |\rmfamily|) although it is slightly a misnomer as the command also works in math-mode.
+% Additionally, it calls |\leavevmode| to ensure the start of horizontal mode.
+% \begin{macrocode}
+\def\textcolor#1#{\@textcolor{#1}}
+\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pagecolor}
+% \marg{color}\\
+% \oarg{model-list}\marg{spec-list}\\
+% Specifies the background color for the current, and all following, pages.
+% It is a global declaration which does not respect \TeX\ groups.
+% \begin{macrocode}
+\def\pagecolor
+ {\begingroup
+ \let\ignorespaces\endgroup \let\set@color\set@page@color
+ \color}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Colored boxes}
+%
+% \begin{macro}{\colorbox}
+% \marg{color}\marg{text}\\
+% \oarg{model}\marg{spec}\marg{text}\\
+% Takes the same argument forms as |\textcolor|, but the color specifies the \emph{background} color of the box.
+% \begin{macrocode}
+\def\colorbox#1#{\color@box{#1}}
+\def\color@box#1#2{\color@b@x\relax{\color#1{#2}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fcolorbox}
+% \marg{frame color}\marg{background color}\marg{text}\\
+% \oarg{model}\marg{frame spec}\marg{background spec}\marg{text}\\
+% \oarg{frame model}\marg{frame spec}\oarg{background model}\marg{background spec}\marg{text}\\
+% \marg{frame color}\oarg{background model}\marg{background spec}\marg{text}\\
+% Puts a frame of the first color around a box with a background specified by the second color.
+% If only the first optional argument is given, it specifies the color model for both colors.
+% \begin{macrocode}
+\def\fcolorbox#1#{\color@fbox{#1}}
+\def\color@fbox#1#2#3#{\color@fb@x{#1}{#2}{#3}}
+\def\color@fb@x#1#2#3#4%
+ {\color@b@x{\fboxsep\z@\color#1{#2}\XC@fbox}%
+ {\@ifxempty{#3}{\color#1}{\color#3}{#4}}}
+% \end{macrocode}
+% \end{macro}
%
-% \subsubsection{Internal commands}
+% \begin{macro}{\color@b@x}
+% Internal macro for |\colorbox| and |\fcolorbox|.
+% \begin{macrocode}
+\long\def\color@b@x#1#2#3%
+ {\leavevmode
+ \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}%
+ \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
+ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
+ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@frameb@x}
+% Common part of |\framebox| and |\fbox|.
+% |#1| is a negative kern in the |\framebox| case so that the vertical rules do not add to the width of the box.
+% Optimised by \People{Donald}{Arseneau}.
+% \begin{macrocode}
+\def\XC@frameb@x#1%
+ {\hbox
+ {\@tempdima\fboxrule \advance\@tempdima\fboxsep
+ \advance\@tempdima\dp\@tempboxa
+ \setbox\@tempboxa\hbox
+ {\lower\@tempdima\hbox
+ {\vbox
+ {\kern\fboxrule
+ \hbox
+ {\kern\fboxrule#1%
+ \vbox{\kern\fboxsep\box\@tempboxa\kern\fboxsep}%
+ #1\kern\fboxrule}%
+ \kern\fboxrule}}}%
+ \@tempdima\wd\@tempboxa
+ \edef\@tempa{{\the\@tempdima}{\the\ht\@tempboxa}{\the\dp\@tempboxa}}%
+ \box\@tempboxa\kern-\@tempdima\expandafter\boxframe\@tempa}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@fbox}
+% \begin{macro}{\@frameb@x}
+% If no \Option{kernelfbox} option was specified, switch to the new method in general, else only for |\fcolorbox|.
+% \begin{macrocode}
+\ifXC@@fbox
+ \let\@frameb@x\XC@frameb@x \let\XC@fbox\fbox
+\else
+ \def\XC@fbox{\let\@frameb@x\XC@frameb@x\fbox}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Driver-specific and generic drawing}
+%
+% \begin{macro}{\color@block}
+% \marg{width}\marg{height}\marg{depth}\\
+% Should take up no space for \TeX, but produce a block in the current color of the specified size.
+% It is mainly used for producing box backgrounds.
+% \begin{macro}{\boxframe}
+% \marg{width}\marg{height}\marg{depth}\\
+% Draw a frame with a linewidth of |\fboxrule|.
+% Return a |\hbox| with outer dimensions \meta{width}, \meta{height}, \meta{depth}.
+
+% \begin{macro}{\XC@boxframe}
+% \marg{width}\marg{height}\marg{depth}\marg{frame construction}\\
+% Wrapper for |\boxframe| commands that return zero-dimension frames.
+% \begin{macrocode}
+\ifnum\XC@@xcd@>\m@ne
+\def\XC@boxframe#1#2#3#4%
+ {\hbox{\sbox\z@{\ifdim\fboxrule>\z@ #4\fi}%
+ \wd\z@#1\relax\ht\z@#2\relax\dp\z@#3\relax\box\z@}}
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% \textbf{\Option{dvips}-optimised code}
+% \begin{macrocode}
+\ifcase\XC@@xcd@
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand*\color@block[3]%
+ {{\set@color\hbox
+ {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
+ \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
+ \dimen@#1\relax
+ \XC@special{\number\dimen@\@tempa XCcolorblock}}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand*\boxframe[3]%
+ {\XC@boxframe{#1}{#2}{#3}%
+ {\dimen@#3\edef\@tempa{ \number\dimen@\space}%
+ \dimen@#2\edef\@tempa{ \number\dimen@\@tempa}%
+ \dimen@#1\relax
+ \XC@special{\number\fboxrule\space\number\dimen@\@tempa XCboxframe}}}
+% \end{macrocode}
+%
+% \textbf{\Option{pdftex}-optimised code }
+% There seems to be no improvement by adding a specific |\color@block| command, since the PDF format doesn't offer higher accuracy than \TeX.
+% For |\boxframe| we want to achieve this PDF pseudo-code (besides initial scaling):\\[1ex]
+% \centerline{\ttfamily $l$ w [] $0$ d $2$ J $0$ j $4$ M
+% $1$ $0$ $0$ $1$ $\frac12\,l$ $\frac12\,l$ cm
+% $0$ $-d$ $(w-l)$ $(h+d-l)$ re s}
+% \begin{macrocode}
+\or
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand*\boxframe[3]%
+ {\XC@boxframe{#1}{#2}{#3}%
+ {\dimen@#3\edef\@tempa{ 0 -\strip@pt\dimen@\space}%
+ \edef\@tempb{\advance\dimen@\the\dimen@}%
+ \dimen@#2\advance\dimen@-\fboxrule\@tempb
+ \edef\@tempb{ \strip@pt\dimen@\space re s}%
+ \dimen@#1\advance\dimen@-\fboxrule
+ \edef\@tempb{ cm\@tempa\strip@pt\dimen@\@tempb}%
+ \dimen@.5\fboxrule\edef\@tempa{ \strip@pt\dimen@}%
+ \XC@special
+ {0.996264 0 0 0.996264 0 0 cm
+ \strip@pt\fboxrule\space w [] 0 d 2 J 0 j 4 M
+ 1 0 0 1\@tempa\@tempa\@tempb}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\fi
+% \end{macrocode}
+%
+% \textbf{Generic code }
+% The definition here works by selecting a color, and then drawing a \TeX\ rule (unless |\ifcolors@false|).
+% \begin{macrocode}
+\providecommand*\color@block[3]%
+ {{\set@color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
+% \end{macrocode}
+%
+% The following definition was optimised by \People{Donald}{Arseneau}.
+% \begin{macrocode}
+\providecommand*\boxframe[3]%
+ {\hbox
+ {\dimen@#2\advance\dimen@#3\relax
+ \lower#3\vbox
+ {\hrule\@height\fboxrule
+ \@tempdima-0.5\fboxrule \ifodd\fboxrule\advance\@tempdima\m@ne sp\fi
+ \kern\@tempdima
+ \hbox
+ {\advance\dimen@-\fboxrule
+ \vrule\@width\fboxrule\@height\dimen@\@depth\z@
+ \@tempdima#1\advance\@tempdima-\tw@\fboxrule \kern\@tempdima
+ \vrule\@width\fboxrule\@height\dimen@\@depth\z@}%
+ \kern-0.5\fboxrule
+ \hrule\@height\fboxrule}}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Color argument processing}
%
% \begin{macro}{\@xcolor@}
% \marg{type-spec}\marg{driver-spec}\marg{model}\marg{spec}\\
@@ -4775,51 +5575,59 @@
% Note: |\XC@split| opens a group which has to be closed afterwards by |\endgroup|.
% \begin{macrocode}
\def\XC@split#1%
- {\begingroup\XC@edef\@@tmp{#1}\expandafter\XC@split@i\@@tmp:\@nil}
+ {\begingroup\XC@edef\@@tmp{#1}\expandafter\XC@split@i\@@tmp>>\@nnil}
% \end{macrocode}
%
% \begin{macro}{\XC@split@i}
-% Check whether it is an \emph{extended} or \emph{standard} color expression.
+% Separate first part of expression chain and apply function(s) afterwards as requested.
% \begin{macrocode}
-\def\XC@split@i#1:#2\@nil
- {\@ifxempty{#2}{\XC@split@v}{\XC@split@ii#1,,:#2}}
+\def\XC@split@i#1>%
+ {\def\@@tmp{#1}\XC@split@ii#1:\@nil \XC@func}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\XC@split@ii}
+% Check whether it is an \emph{extended} or \emph{standard} color expression.
+% \begin{macrocode}
+\def\XC@split@ii#1:#2\@nil
+ {\@ifxempty{#2}{\XC@split@vi}{\XC@split@iii#1,,:#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@split@iii}
% Initialisation for extended color expressions.
% The magic \Meta{div} is either given as second argument, or calculated as the sum of all weights.
% \begin{macrocode}
-\def\XC@split@ii#1,#2,#3:#4:%
+\def\XC@split@iii#1,#2,#3:#4:%
{\edef\XC@@mod{#1}\let\@tempa\@empty
\ifx,#2,\XC@@tsttrue\@tempdima\z@\else\XC@@tstfalse\@tempdima#2\p@\fi
- \XC@split@iii#4;,;}
+ \XC@split@iv#4;,;}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@split@iii}
+% \begin{macro}{\XC@split@iv}
% \marg{expr}\marg{dec}\\
% Step through the list of \Meta{expr},\Meta{dec} pairs.
% Add \Meta{dec} to the sum of weights (in order to calculate the ultimate \Meta{div}) and append pair information to |\@tempa| command.
% At the end of the list, execute |\@tempa| and map resulting parameter vector into unit cube.
% Finally, |\@@mod| and |\@@clr| contain the desired information about color model and parameters.
% \begin{macrocode}
-\def\XC@split@iii#1,#2;%
+\def\XC@split@iv#1,#2;%
{\@ifxempty{#1}%
{\let\XC@@clr\@empty \@tempa \expandafter\XC@calc@\XC@@clr,,,,:U%
\let\@@mod\XC@@mod \let\@@clr\@@tmp}
- {\XC@append\@tempa{\XC@split@iv{#1}{#2}}%
+ {\XC@append\@tempa{\XC@split@v{#1}{#2}}%
\ifXC@@tst\advance\@tempdima#2\p@\fi
- \XC@split@iii}}
+ \XC@split@iv}}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@split@iv}
+% \begin{macro}{\XC@split@v}
% \marg{expr}\marg{dec}\\
% Extract color specification from \Meta{expr}, convert to target model, multiply the resulting vector by the quotient of \Meta{dec} and \Meta{div}, add that vector to the overall parameter vector.
% \begin{macrocode}
-\def\XC@split@iv#1#2%
- {\def\@@tmp{#1}\XC@split@v
+\def\XC@split@v#1#2%
+ {\def\@@tmp{#1}\XC@split@vi
\ifx\@@mod\XC@@mod\else
\convertcolorspec\@@mod\@@clr\XC@@mod\@@clr
\fi
@@ -4833,30 +5641,30 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@split@v}
+% \begin{macro}{\XC@split@vi}
% Start splitting process for standard color expression.
% \begin{macrocode}
-\def\XC@split@v{\count@\z@ \expandafter\XC@split@vi\@@tmp!\@nil}
+\def\XC@split@vi{\count@\z@ \expandafter\XC@split@vii\@@tmp!\@nil}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@split@vi}
+% \begin{macro}{\XC@split@vii}
% Count number of `-' signs at the beginning of the string.
% \begin{macrocode}
-\def\XC@split@vi#1%
- {\ifx#1-\advance\count@\@ne\expandafter\XC@split@vi
- \else\expandafter\XC@split@vii\expandafter#1\fi}
+\def\XC@split@vii#1%
+ {\ifx#1-\advance\count@\@ne\expandafter\XC@split@vii
+ \else\expandafter\XC@split@viii\expandafter#1\fi}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\XC@split@vii}
+% \begin{macro}{\XC@split@viii}
% Extract \Meta{name} and \Meta{mix expr} part of color expression.
% Delegate control to |\@xcolor@|.
% \begin{macrocode}
-\def\XC@split@vii#1!#2\@nil
+\def\XC@split@viii#1!#2\@nil
{\edef\@@nam{#1}\edef\@@mix{#2}%
\ifodd\count@\@tempswatrue\else\@tempswafalse\fi
- \@ifundefined{\string\color@\@@nam}%
+ \@ifundefinedcolor\@@nam
{\c@lor@error{`\@@nam'}\def\@@nam{black}}{}%
\let\xcolor@\@xcolor@\@nameuse{\string\color@\@@nam}}
% \end{macrocode}
@@ -4880,20 +5688,66 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@func}
+% \marg{function}|,{|\Meta[1]{arg}|,...,{|\Meta[n]{arg}|}>...\@nnil>|\\
+% General macro to handle color functions.
+% The number of arguments depends on the function.
+% Multiple consecutive functions may be applied.
+% Color model and specifications are input and output via |\@@mod| and |\@@clr|.
+% \begin{macrocode}
+\def\XC@func#1>{\@ifxempty{#1}{\remove@to@nnil}{\XC@fun@#1,>\XC@func}}
+\def\XC@fun@#1,#2>{\@nameuse{XC@func@#1}#2,,>}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@func@wheel}
+% \begin{macro}{\XC@func@twheel}
+% \marg{angle}|,|\marg{full circle}|,>|\\
+% Calculate color wheel position according to \Model{Hsb} or \Model{tHsb} model: \emph{hue} is rotated by \meta{angle} relative to \meta{full circle}.
+% The latter value is taken from |\rangeHsb| if left empty.
+% Finally, |\@@mod| is changed to \Model{hsb}.
+% \begin{macrocode}
+\def\XC@func@wheel#1,#2,#3>{\XC@func@wh@el{#1}{#2}0}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\XC@func@twheel#1,#2,#3>{\XC@func@wh@el{#1}{#2}1}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\XC@func@wh@el#1#2#3%
+ {\convertcolorspec\@@mod\@@clr
+ {\ifcase#3 \XC@mod@Hsb\or\XC@mod@tHsb\fi}\@@clr
+ \expandafter\XC@extract@hue\@@clr:\@@hue \dimen@#1\p@
+ \@ifxempty{#2}{}%
+ {\rdivide\dimen@{#2}\lshift\dimen@
+ \dimen@\rangeHsb\dimen@\rshift\dimen@}%
+ \advance\dimen@\@@hue\p@ \rdivide\dimen@\rangeHsb
+ \edef\@@hue{\strip@pt\dimen@}\XC@calcU\@@hue\@@hue
+ \ifcase#3
+ \expandafter\XC@replace@hue\@@clr:\@@hue,\@@clr
+ \or
+ \XC@c@lcS\rangeHsb{}\@@hue\@@hue
+ \expandafter\XC@replace@hue\@@clr:\@@hue,\@@clr
+ \convertcolorspec\XC@mod@tHsb\@@clr\XC@mod@hsb\@@clr
+ \fi
+ \let\@@mod\XC@mod@hsb}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\XC@display}
% Write information to log file and display the current color.
% \begin{macrocode}
\def\XC@display
{\XC@bcolor\XC@let@cN{\string\color@.}\XC@current@color
\ifnum\XC@type{.}=1
- \PackageWarning{xcolor}{Incompatible color definition}%
- \else
- \ifnum\XC@tracing>2
- \begingroup \let\xcolor@\@empty \def\@nil{\string\@nil}%
- \PackageInfo{xcolor}{Setting color `\XC@current@color'}%
- \endgroup
- \fi
- \fi
+ \PackageWarning{xcolor}{Incompatible color definition}\else
+ \ifnum\XC@tracing>2
+ \begingroup \let\xcolor@\@empty \def\@nil{\string\@nil}%
+ \PackageInfo{xcolor}{Setting color `\XC@current@color'}%
+ \endgroup
+ \fi\fi
\XC@mcolor\set@color\XC@ecolor\ignorespaces}
% \end{macrocode}
% \end{macro}
@@ -4915,94 +5769,6 @@
% \end{macro}
%
%
-% \subsubsection{Additional user-level commands}
-%
-% \begin{macro}{\textcolor}
-% \marg{color}\marg{text}\\
-% \oarg{model}\marg{spec}\marg{text}\\
-% are just alternative syntax for |\color|, in which the groups are added implicitly.
-% Thus \emph{text} appears in the specified color, but then the color reverts to its previous value.
-% The naming is by analogy with |\textrm| (as opposed to |\rm| and |\rmfamily|) although it is slightly a misnomer as the command also works in math-mode.
-% Additionally, it calls |\leavevmode| to ensure the start of horizontal mode.
-% \begin{macrocode}
-\def\textcolor#1#{\@textcolor{#1}}
-\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\color@block}
-% \marg{width}\marg{height}\marg{depth}\\
-% Should take up no space for \TeX, but produce a block in the current color of the specified size.
-% It is mainly used for producing box backgrounds.
-%
-% The definition here works by selecting a color, and then drawing a \TeX\ rule (unless |\ifcolors@false|).
-% This allows the `driver independent' color specials to be used.
-% A graphics package may want to define it using a |\special| to produce (for example) a \Index{PostScript} line.
-% Producing the line in the |\special| has the advantage that on a preview that does not understand |\special|s, the line is automatically omited, without needing to modify the source of the document (for instance by adding the \Option{monochrome} option).
-% \begin{macrocode}
-\def\color@block#1#2#3{%
- {\set@color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\colorbox}
-% \marg{color}\marg{text}\\
-% \oarg{model}\marg{spec}\marg{text}\\
-% Takes the same argument forms as |\textcolor|, but the color specifies the \emph{background} color of the box.
-% \begin{macrocode}
-\def\colorbox#1#{\color@box{#1}}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\color@box#1#2{\color@b@x\relax{\color#1{#2}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fcolorbox}
-% \marg{frame color}\marg{background color}\marg{text}\\
-% \oarg{model}\marg{frame spec}\marg{background spec}\marg{text}\\
-% Puts a frame of the first color around a box with a background specified by the second color.
-% If an optional argument is given, it specifies the color model for both colors.
-% \begin{macrocode}
-\def\fcolorbox#1#{\color@fbox{#1}}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\color@fbox#1#2#3{%
- \color@b@x{\fboxsep\z@\color#1{#2}\fbox}{\color#1{#3}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\color@b@x}
-% Internal macro for |\colorbox| and |\fcolorbox|.
-% \begin{macrocode}
-\long\def\color@b@x#1#2#3{%
- \leavevmode
- \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}%
- \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
- \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
- {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}%
- \box\z@}}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Background (page) color}
-%
-% \begin{macro}{\pagecolor}
-% \marg{color}\\
-% \oarg{model}\marg{spec}\\
-% Specifies the background color for the current, and all following, pages.
-% It is a global declaration which does not respect \TeX\ groups.
-% \begin{macrocode}
-\def\pagecolor
- {\begingroup
- \let\ignorespaces\endgroup \let\set@color\set@page@color
- \color}
-% \end{macrocode}
-% \end{macro}
-%
-%
% \subsubsection{Border colors for hyperlinks}
%
% \begin{macro}{\XC@bordercolor}
@@ -5110,7 +5876,7 @@
% \begin{macro}{\rownum}
% Reserve a counter register.
% \begin{macrocode}
- \ifx\rownum\@undefined\newcount\rownum\fi
+ \@ifundefined{rownum}{\newcount\rownum}{}
% \end{macrocode}
% \end{macro}
%
@@ -5162,9 +5928,35 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@extract@hue}
+% Extract first entry of comma-separated value list.
% \begin{macrocode}
\def\XC@extract@hue#1,#2:#3{\edef#3{#1}}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@extract@hue}
+% Change first entry of comma-separated value list.
+% \begin{macrocode}
+\def\XC@replace@hue#1,#2:#3,#4{\edef#4{#3,#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifundefinedcolor}
+% \marg{name}\marg{undefined}\marg{defined}\\
+% Checks whether \Meta{name} is a defined color name and executes the respective code.
+% \begin{macrocode}
+\def\@ifundefinedcolor#1{\@ifundefined{\string\color@#1}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@ifundefinedmodel}
+% \marg{model}\marg{undefined}\marg{defined}\\
+% Checks whether \Meta{model} is a defined color model and executes the respective code.
+% \begin{macrocode}
+\def\@ifundefinedmodel#1{\@ifundefined{color@#1}}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\XC@type}
% \marg{name}\\
@@ -5207,15 +5999,17 @@
% 1 & explicit name& `|red|', `|green|'\\
% 2 & standard color expression& `|-red|', `|green!50|'\\
% 3 & extended color expression& `|rgb:-red,1;green!50,2|'\\
+% 4 & color function expression& `|rgb:-red,1;green!50,2>wheel,30|'\\
% \end{tabular}
% \end{center}
% \begin{macrocode}
\def\XC@info#1#2%
{\XC@edef#2{#1}%
- \if.#2\def#2{0}\else\expandafter\in@\expandafter:\expandafter{#2}%
+ \if.#2\def#2{0}\else\expandafter\in@\expandafter>\expandafter{#2}%
+ \ifin@\def#2{4}\else\expandafter\in@\expandafter:\expandafter{#2}%
\ifin@\def#2{3}\else\expandafter\in@\expandafter!\expandafter{#2}%
\ifin@\def#2{2}\else\edef#2{\noexpand\in@{/-}{/#2}}#2%
- \edef#2{\ifin@2\else1\fi}\fi\fi\fi}
+ \edef#2{\ifin@2\else1\fi}\fi\fi\fi\fi}
% \end{macrocode}
% \end{macro}
%
@@ -5237,7 +6031,7 @@
% \begin{macrocode}
\def\XC@logdef#1%
{\ifnum\XC@tracing>1
- \@ifundefined{\string\color@#1}%
+ \@ifundefinedcolor{#1}%
{\ifnum\XC@tracing>2
\PackageInfo{xcolor}{Defining color `#1'}%
\fi}%
@@ -5262,18 +6056,37 @@
\edef\@@num{\the\count@}%
% \end{macrocode}
%
+% Check whether the actual font belongs to a set of OT1-encoded monospaced fonts in order to display |>| instead of |\textgreater|.
+% \begin{macro}{\XC@@gt}
+% \begin{macrocode}
+ \def\XC@@gt{\textgreater}\def\@@tmp{OT1}%
+ \ifx\f@encoding\@@tmp
+ \@expandtwoargs\in@{,\f@family,}{,cmtt,pcr,}%
+ \ifin@\def\XC@@gt{>}\fi
+ \fi
+% \end{macrocode}
+% \end{macro}
+%
+% Disable prologue and tracing commands for temporary color definitions.
+% \begin{macrocode}
+% \XC@@xcpfalse \ifnum\XC@tracing>1 \def\XC@tracing{1}\fi
+ \def\XC@@xcp@{-1}\ifnum\XC@tracing>1 \def\XC@tracing{1}\fi
+% \end{macrocode}
+%
% \begin{macro}{\testcolor}
% \marg{color}\\
-% \oarg{model}\marg{spec}\\
+% \oarg{model-list}\marg{spec-list}\\
% Each |\testcolor| command generates a table row.
% If the column-model matches the model of the color in question, its parameters are underlined.
% \begin{macrocode}
\def\testcolor{\@testopt{\@testcolor}{}}%
\def\@testcolor[##1]##2%
- {\@ifxempty{##1}%
- {\def\@@arg{##2&}\def\@@clr{##2}}%
- {\def\@@arg{[##1]{##2}&}\definecolor{*}{##1}{##2}\def\@@clr{*}}%
- \extractcolorspecs\@@clr\@@mod\@@clr
+ {\XC@mdef\@@mod{##1}\XC@edef\@@clr{##2}%
+ \ifx\@@mod\@empty
+ \let\@@arg\@@clr\XC@replace\@@arg>\XC@@gt\else
+ \edef\@@arg{[\@@mod]{\@@clr}}\XC@definecolor[]{*}\@@mod\@@clr
+ \def\@@clr{*}\fi
+ \XC@append\@@arg{&}\extractcolorspecs\@@clr\@@mod\@@clr
\@testc@lor}%
% \end{macrocode}
% \end{macro}
@@ -5399,6 +6212,8 @@
{\XC@ifxcase#1%
{\XC@mod@RGB {\convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb}%
\XC@mod@HTML{\convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb}%
+ \XC@mod@Hsb {\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
+ \XC@mod@tHsb{\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
\XC@mod@HSB {\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
\XC@mod@Gray{\convertcolorspec#1#2\XC@mod@gray#2\let#1\XC@mod@gray}%
\XC@mod@wave{\convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb}%
@@ -5416,19 +6231,22 @@
{\XC@mod@cmy {\XC@calc@#1,#2,#3,,:C}%
\XC@mod@cmyk
{\XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@cmy@cmyk\@@tmp,}%
- \XC@mod@hsb {\XC@cnv@rgb@hsb#1,#2,#3,}%
- \XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,}%
\XC@mod@RGB {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:M}%
\XC@mod@HTML{\edef\@@scl{\@cclv}\XC@calc@#1,#2,#3,,:M%
\expandafter\XC@calc@\@@tmp,,:H%
\expandafter\XC@cnv@rgb@HTML\@@tmp,}%
- \XC@mod@HSB {\XC@cnv@rgb@hsb#1,#2,#3,%
- \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M}%
- \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,%
- \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp}}%
- {\XC@calc@#1,#2,#3,,:N}}
+ \XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,}%
+ \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@cnv@gray\@@tmp,}}%
+ {\XC@cnv@rgb@hsb#1,#2,#3,\XC@cnv@hsb@}}
+% \end{macrocode}
+%
+% \begin{macro}{\XC@cnv@rgb@}
+% \begin{macrocode}
+\def\XC@cnv@rgb@
+ {\ifx\tm\XC@mod@rgb\else\expandafter\XC@cnv@rgb\@@tmp,\fi}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\XC@cnv@rgb@hsb}
% \Meta{red}|,|\Meta{green}|,|\Meta{blue}|,|
@@ -5491,18 +6309,11 @@
% \begin{macrocode}
\def\XC@cnv@cmy#1,#2,#3,%
{\XC@ifxcase\tm
- {\XC@mod@rgb {\XC@calc@#1,#2,#3,,:C}%
- \XC@mod@cmyk{\XC@cnv@cmy@cmyk#1,#2,#3,}%
- \XC@mod@hsb {\XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb@hsb\@@tmp,}%
+ {\XC@mod@cmyk{\XC@cnv@cmy@cmyk#1,#2,#3,}%
\XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp}%
- \XC@mod@RGB {\XC@calc@#1,#2,#3,,:C%
- \edef\@@scl{\rangeRGB}\expandafter\XC@calc@\@@tmp,,:M}%
- \XC@mod@HTML{\XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb\@@tmp,}%
- \XC@mod@HSB {\XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb@hsb\@@tmp,%
- \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M}%
\XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp
- \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp}}%
- {\XC@calc@#1,#2,#3,,:N}}
+ \XC@cnv@gray\@@tmp,}}%
+ {\XC@calc@#1,#2,#3,,:C\XC@cnv@rgb@}}
% \end{macrocode}
% \end{macro}
%
@@ -5532,27 +6343,12 @@
% \begin{macrocode}
\def\XC@cnv@cmyk#1,#2,#3,#4,%
{\XC@ifxcase\tm
- {\XC@mod@rgb
- {\XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C}%
- \XC@mod@cmy{\XC@cnv@cmyk@cmy#1,#2,#3,#4,}%
- \XC@mod@hsb
- {\XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
- \expandafter\XC@cnv@rgb@hsb\@@tmp,}%
- \XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,%
- \edef\@@arg{#4}\XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp}%
- \XC@mod@RGB
- {\XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
- \edef\@@scl{\rangeRGB}\expandafter\XC@calc@\@@tmp,,:M}%
- \XC@mod@HTML
- {\XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@cnv@cmy\@@tmp,}%
- \XC@mod@HSB
- {\XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
- \expandafter\XC@cnv@rgb@hsb\@@tmp,%
- \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M}%
- \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,%
- \edef\@@arg{#4}\XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp
- \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp}}%
- {\XC@calc@#1,#2,#3,#4,:N}}
+ {\XC@mod@gray{\XC@cnv@rgb@gray#1,#2,#3,\edef\@@arg{#4}%
+ \XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp}%
+ \XC@mod@Gray{\XC@cnv@rgb@gray#1,#2,#3,\edef\@@arg{#4}%
+ \XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp \XC@cnv@gray\@@tmp,}}%
+ {\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
+ \ifx\tm\XC@mod@cmy\else\expandafter\XC@cnv@cmy\@@tmp,\fi}}
% \end{macrocode}
% \end{macro}
%
@@ -5569,13 +6365,19 @@
% \Meta{hue}|,|\Meta{saturation}|,|\Meta{brightness}|,|
% \begin{macrocode}
\def\XC@cnv@hsb#1,#2,#3,%
- {\ifx\tm\XC@mod@HSB
- \edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:M%
- \else
- \XC@cnv@hsb@rgb#1,#2,#3,%
- \ifx\tm\XC@mod@rgb\else\expandafter\XC@cnv@rgb\@@tmp,\fi
- \fi}
+ {\XC@ifxcase\tm
+ {\XC@mod@Hsb {\XC@cnv@hsb@Hsb#1,#2,#3,}%
+ \XC@mod@tHsb{\XC@cnv@hsb@Hsb#1,#2,#3,\expandafter\XC@cnv@Hsb\@@tmp,}%
+ \XC@mod@HSB {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:M}}%
+ {\XC@cnv@hsb@rgb#1,#2,#3,\XC@cnv@rgb@}}
% \end{macrocode}
+%
+% \begin{macro}{\XC@cnv@hsb@}
+% \begin{macrocode}
+\def\XC@cnv@hsb@
+ {\ifx\tm\XC@mod@hsb\else\expandafter\XC@cnv@hsb\@@tmp,\fi}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \begin{macro}{\XC@cnv@hsb@rgb}
@@ -5596,6 +6398,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\XC@cnv@hsb@Hsb}
+% \Meta{hue}|,|\Meta{saturation}|,|\Meta{brightness}|,|
+% \begin{macrocode}
+\def\XC@cnv@hsb@Hsb#1,#2,#3,%
+ {\XC@c@lcS\rangeHsb{,#2,#3}{#1}\@@tmp}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\XC@cnv@gray}
% \Meta{gray}|,|
% \begin{macrocode}
@@ -5604,7 +6414,6 @@
{\XC@mod@rgb {\XC@calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
\XC@mod@cmy {\XC@calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
\XC@mod@cmyk{\XC@calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}}%
- \XC@mod@hsb {\XC@calcN{#1}\@@tmp \edef\@@tmp{0,0,\@@tmp}}%
\XC@mod@RGB {\edef\@@scl{\rangeRGB}\XC@calcM{#1}\@@tmp
\edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}}%
\XC@mod@HTML{\edef\@@scl{\@cclv}\XC@calcM{#1}\@@tmp
@@ -5612,7 +6421,7 @@
\XC@mod@HSB {\edef\@@scl{\rangeHSB}\XC@calcM{#1}\@@tmp
\edef\@@tmp{0,0,\@@tmp}}%
\XC@mod@Gray{\edef\@@scl{\rangeGray}\XC@calcM{#1}\@@tmp}}%
- {\XC@calcN{#1}\@@tmp}}
+ {\XC@calcN{#1}\@@tmp \edef\@@tmp{0,0,\@@tmp}}}
% \end{macrocode}
% \end{macro}
%
@@ -5621,7 +6430,7 @@
% \Meta{Red}|,|\Meta{Green}|,|\Meta{Blue}|,|
% \begin{macrocode}
\def\XC@cnv@RGB#1,#2,#3,%
- {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:D\expandafter\XC@cnv@rgb\@@tmp,}
+ {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:D\XC@cnv@rgb@}
% \end{macrocode}
% \end{macro}
%
@@ -5631,8 +6440,7 @@
% \begin{macrocode}
\def\XC@cnv@HTML#1,%
{\edef\@@tmp{\expandafter\@hex@Hex#1\relax}\expandafter\XC@cnv@HTML@\@@tmp
- \edef\@@scl{\@cclv}\expandafter\XC@calc@\@@tmp,,:D%
- \expandafter\XC@cnv@rgb\@@tmp,}
+ \edef\@@scl{\@cclv}\expandafter\XC@calc@\@@tmp,,:D\XC@cnv@rgb@}
% \end{macrocode}
%
% \begin{macrocode}
@@ -5642,11 +6450,82 @@
% \end{macro}
%
%
+% \begin{macro}{\XC@cnv@Hsb}
+% \Meta{hue\Circ}|,|\Meta{saturation}|,|\Meta{brightness}|,|
+% \begin{macrocode}
+\def\XC@cnv@Hsb#1,#2,#3,%
+ {\ifx\tm\XC@mod@tHsb\XC@cnv@@Hsb#1,#2,#3,\XC@cnv@Hsb@
+ \else\XC@cnv@Hsb@hsb#1,#2,#3,\XC@cnv@hsb@\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@cnv@Hsb@hsb}
+% \Meta{hue\Circ}|,|\Meta{saturation}|,|\Meta{brightness}|,|
+% \begin{macrocode}
+\def\XC@cnv@Hsb@hsb#1,#2,#3,%
+ {\XC@c@lcD\rangeHsb{,#2,#3}{#1}\@@tmp}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@cnv@@Hsb}
+% \Meta{hue\Circ}|,|\Meta{saturation}|,|\Meta{brightness}|,|\marg{cmd}
+% \begin{macrocode}
+\def\XC@cnv@@Hsb#1,#2,#3,#4%
+ {\dimen@\rangeHsb\p@ \advance\dimen@\p@ \edef\@@tmp{\strip@pt\dimen@}%
+ \edef\@@tmp{0,0;\rangetHsb;\rangeHsb,\rangeHsb;\@@tmp,\@@tmp;}%
+ \dimen@#1\p@ \expandafter#4\@@tmp\@nnil
+ \edef\@@tmp{\strip@pt\dimen@,#2,#3}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@cnv@Hsb@}
+% \Meta{x}|,|\Meta{y}|;|\Meta{x'}|,|\Meta{y'}|;|
+% \begin{macrocode}
+\def\XC@cnv@Hsb@#1,#2;#3,#4;%
+ {\ifdim\dimen@<#4\p@
+ \@tempdima#3\p@ \advance\@tempdima-#1\p@
+ \@tempdimb#4\p@ \advance\@tempdimb-#2\p@
+ \rdivide\@tempdima\@tempdimb
+ \advance\dimen@-#2\p@ \rmultiply\dimen@{\strip@pt\@tempdima}%
+ \advance\dimen@#1\p@ \expandafter\remove@to@nnil
+ \else
+ \def\@@tmp{\XC@cnv@Hsb@#3,#4;}\expandafter\@@tmp
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\XC@cnv@tHsb}
+% \Meta{hue\Circ}|,|\Meta{saturation}|,|\Meta{brightness}|,|
+% \begin{macrocode}
+\def\XC@cnv@tHsb#1,#2,#3,%
+ {\XC@cnv@@Hsb#1,#2,#3,\XC@cnv@tHsb@
+ \ifx\tm\XC@mod@Hsb\else\expandafter\XC@cnv@Hsb\@@tmp,\fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\XC@cnv@tHsb@}
+% \Meta{x}|,|\Meta{y}|;|\Meta{x'}|,|\Meta{y'}|;|
+% \begin{macrocode}
+\def\XC@cnv@tHsb@#1,#2;#3,#4;%
+ {\ifdim\dimen@<#3\p@
+ \@tempdima#4\p@ \advance\@tempdima-#2\p@
+ \@tempdimb#3\p@ \advance\@tempdimb-#1\p@
+ \rdivide\@tempdima\@tempdimb
+ \advance\dimen@-#1\p@ \rmultiply\dimen@{\strip@pt\@tempdima}%
+ \advance\dimen@#2\p@ \expandafter\remove@to@nnil
+ \else
+ \def\@@tmp{\XC@cnv@tHsb@#3,#4;}\expandafter\@@tmp
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\XC@cnv@HSB}
% \Meta{Hue}|,|\Meta{Saturation}|,|\Meta{Brightness}|,|
% \begin{macrocode}
\def\XC@cnv@HSB#1,#2,#3,%
- {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:D\expandafter\XC@cnv@hsb\@@tmp,}
+ {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:D\XC@cnv@hsb@}
% \end{macrocode}
% \end{macro}
%
@@ -5655,7 +6534,7 @@
% \Meta{Gray}|,|
% \begin{macrocode}
\def\XC@cnv@Gray#1,%
- {\edef\@@scl{\rangeGray}\XC@calcD{#1}\@@tmp \XC@cnv@gray\@@tmp,}
+ {\XC@c@lcD\rangeGray{}{#1}\@@tmp \XC@cnv@gray\@@tmp,}
% \end{macrocode}
% \end{macro}
%
@@ -5664,8 +6543,7 @@
% \Meta{lambda}|,|
% \begin{macrocode}
\def\XC@cnv@wave#1,%
- {\XC@cnv@wave@hsb#1,%
- \ifx\tm\XC@mod@hsb\else\expandafter\XC@cnv@hsb\@@tmp,\fi}
+ {\XC@cnv@wave@hsb#1,\XC@cnv@hsb@}
% \end{macrocode}
% \end{macro}
%
@@ -5679,18 +6557,16 @@
% Calculate hue:
% \begin{macrocode}
\ifdim\@tempdima<440\p@
- \XC@c@v@wave@hsb{-.0166667}{7.33333}4{}%
- \else\ifdim\@tempdima<490\p@
- \XC@c@v@wave@hsb{.02}{-8.8}4-%
- \else\ifdim\@tempdima<510\p@
- \XC@c@v@wave@hsb{-.05}{25.5}2{}%
- \else\ifdim\@tempdima<580\p@
- \XC@c@v@wave@hsb{.0142857}{-7.28571}2-%
- \else\ifdim\@tempdima<645\p@
- \XC@c@v@wave@hsb{-.0153846}{9.92308}0{}%
- \else
- \dimen@\z@
- \fi\fi\fi\fi\fi
+ \XC@c@v@wave@hsb{-.0166667}{7.33333}4{}\else
+ \ifdim\@tempdima<490\p@
+ \XC@c@v@wave@hsb{.02}{-8.8}4-\else
+ \ifdim\@tempdima<510\p@
+ \XC@c@v@wave@hsb{-.05}{25.5}2{}\else
+ \ifdim\@tempdima<580\p@
+ \XC@c@v@wave@hsb{.0142857}{-7.28571}2-\else
+ \ifdim\@tempdima<645\p@
+ \XC@c@v@wave@hsb{-.0153846}{9.92308}0{}\else
+ \dimen@\z@ \fi\fi\fi\fi\fi
\divide\dimen@6\relax
\edef\@@tmp{\strip@pt\dimen@,1,}%
% \end{macrocode}
@@ -5698,12 +6574,10 @@
% Calculate brightness:
% \begin{macrocode}
\ifdim\@tempdima<420\p@
- \XC@c@v@wave@hsb{.0175}{-6.35}0{}%
- \else\ifdim\@tempdima>700\p@
- \XC@c@v@wave@hsb{-.00875}{7.125}0{}%
- \else
- \dimen@\p@
- \fi\fi
+ \XC@c@v@wave@hsb{.0175}{-6.35}0{}\else
+ \ifdim\@tempdima>700\p@
+ \XC@c@v@wave@hsb{-.00875}{7.125}0{}\else
+ \dimen@\p@ \fi\fi
\edef\@@tmp{\@@tmp\strip@pt\dimen@}}
% \end{macrocode}
% \end{macro}
@@ -5715,8 +6589,7 @@
% \begin{macrocode}
\def\XC@c@v@wave@hsb#1#2#3#4%
{\dimen@#1\@tempdima \advance\dimen@#2\p@
- \edef\@tempa{\strip@pt\dimen@}%
- \XC@calcR\@tempa\@tempa
+ \XC@calcR{\strip@pt\dimen@}\@tempa
\dimen@#4\@tempa\p@ \advance\dimen@#3\p@}
% \end{macrocode}
% \end{macro}
@@ -5729,8 +6602,7 @@
% \begin{macrocode}
\def\XC@cnv@cmyk@compl#1,#2,#3,#4,%
{\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
- \expandafter\XC@calc@\@@tmp,,:C%
- \expandafter\XC@cnv@cmy@cmyk\@@tmp,}
+ \expandafter\XC@calc@\@@tmp,,:C\expandafter\XC@cnv@cmy@cmyk\@@tmp,}
% \end{macrocode}
% \end{macro}
%
@@ -5739,10 +6611,8 @@
% \begin{macrocode}
\def\XC@cnv@hsb@compl#1,#2,#3,%
{\lshiftset\dimen@{#1}\advance\dimen@\ifdim\dimen@<5\p@-\fi-5\p@
- \rshift\dimen@
- \edef\@@tmp{\strip@pt\dimen@}%
- \lshiftset\dimen@{#3}%
- \@tempdima#2\dimen@
+ \rshift\dimen@ \edef\@@tmp{\strip@pt\dimen@}%
+ \lshiftset\dimen@{#3}\@tempdima#2\dimen@
\@tempdimb\@tempdima \advance\@tempdimb10\p@ \advance\@tempdimb-\dimen@
\ifdim\@tempdimb=\z@
\edef\@@tmp{\@@tmp,0,0}%
@@ -5761,7 +6631,7 @@
%
% These macros provide generic support for missing color models in specific drivers.
% For example, \File{pdftex.def} does not support the \Model{hsb} model.
-% It is assumed that at least one of the models \Model{rgb}, \Model{RGB}, \Model{HTML}, \Model{hsb}, \Model{HSB}, \Model{cmy}, \Model{cmyk}, \Model{gray}, \Model{Gray} exists.
+% It is assumed that at least one of the models \Model{rgb}, \Model{RGB}, \Model{HTML}, \Model{hsb}, \Model{Hsb}, \Model{HSB}, \Model{cmy}, \Model{cmyk}, \Model{gray}, \Model{Gray} exists.
%
% \begin{macro}{\substitutecolormodel}
% \marg{source model}\marg{target model-list}\\
@@ -5769,21 +6639,25 @@
% each reference to the driver-specific command |\color@|\Meta{source model} is replaced by a color model conversion, followed by the driver-specific command |\color@|\Meta{target model}.
% \begin{macrocode}
\def\substitutecolormodel#1#2%
- {\edef\XC@@tmp{\expandafter\XC@substitutecolormodel#2/ignore/\@nnil}%
- \expandafter\edef\csname color@#1\endcsname##1##2%
- {\noexpand\convertcolorspec
- \expandafter\noexpand\csname XC@mod@#1\endcsname{##2}%
- \expandafter\noexpand\csname XC@mod@\XC@@tmp\endcsname
- \noexpand\XC@@tmp\noexpand\expandafter
- \expandafter\noexpand\csname color@\XC@@tmp\endcsname
- \noexpand\expandafter##1\noexpand\expandafter{\noexpand\XC@@tmp}}%
+ {\XC@sdef\XC@@tmp{\expandafter\XC@substitutecolormodel#2/ignore/\@nnil}%
+ \ifx\XC@@tmp\XC@mod@ignore
+ \XC@let@cN{color@#1}\color@ignore
+ \else
+ \expandafter\edef\csname color@#1\endcsname##1##2%
+ {\noexpand\convertcolorspec
+ \expandafter\noexpand\csname XC@mod@#1\endcsname{##2}%
+ \expandafter\noexpand\csname XC@mod@\XC@@tmp\endcsname
+ \noexpand\XC@@tmp\noexpand\expandafter
+ \expandafter\noexpand\csname color@\XC@@tmp\endcsname
+ \noexpand\expandafter##1\noexpand\expandafter{\noexpand\XC@@tmp}}%
+ \fi
\expandafter\xglobalize@\csname color@#1\endcsname \xglobal@stop
\PackageInfo{xcolor}{Model `#1' substituted by `\XC@@tmp'}}
% \end{macrocode}
%
% \begin{macrocode}
\def\XC@substitutecolormodel#1/%
- {\@ifundefined{color@#1}{\XC@substitutecolormodel}{#1\remove@to@nnil}}
+ {\@ifundefinedmodel{#1}{\XC@substitutecolormodel}{#1\remove@to@nnil}}
% \end{macrocode}
% \end{macro}
%
@@ -5801,22 +6675,22 @@
% For example, if \File{dvips.def} is loaded, then |\color@rgb\foo{1,0,0}| will be equivalent to |\def\foo{rgb 1 0 0}|.
% In the case of \File{pdftex.def}, it will act like |\def\foo{1 0 0 rg 1 0 0 RG}| instead.
% \begin{macrocode}
-\@ifundefined{color@rgb}%
- {\substitutecolormodel{rgb}{RGB/HTML/hsb/HSB/cmy/cmyk/gray/Gray}}{}
+\@ifundefinedmodel{rgb}%
+ {\substitutecolormodel{rgb}{RGB/HTML/hsb/Hsb/HSB/cmy/cmyk/gray/Gray}}{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@cmyk}
% \marg{cmd}\marg{spec}
% \begin{macrocode}
-\@ifundefined{color@cmyk}{\substitutecolormodel{cmyk}{cmy/rgb}}{}
+\@ifundefinedmodel{cmyk}{\substitutecolormodel{cmyk}{cmy/rgb}}{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\color@cmy}
% \marg{cmd}\marg{spec}
% \begin{macrocode}
-\@ifundefined{color@cmy}%
+\@ifundefinedmodel{cmy}%
{\PackageInfo{xcolor}{Model `cmy' substituted by `cmy0'}
\def\color@cmy#1#2{\color@cmyk#1{#2,0}}}{}
% \end{macrocode}
@@ -5826,12 +6700,10 @@
% \marg{cmd}\marg{spec}\\
% Since the \Option{dvipdfm} and \Option{textures} drivers only pretend to support \Model{hsb}, we have to check for these drivers.
% \begin{macrocode}
-\@ifundefined{color@hsb}{\@tempswatrue}%
- {\@tempswafalse
- \@tfor\@@tmp:={dvipdfm}{textures}\do
- {\ifx\@@tmp\XC@@drv\@tempswatrue\@break@tfor\fi}}
+\@ifundefinedmodel{hsb}{\@tempswatrue}%
+ {\XC@ifcase\XC@@drv{{dvipdfm,textures}\@tempswatrue}\@tempswafalse}
\if@tempswa
- \substitutecolormodel{hsb}{HSB/rgb}
+ \substitutecolormodel{hsb}{Hsb/HSB/rgb}
\fi
% \end{macrocode}
% \end{macro}
@@ -5840,7 +6712,7 @@
% \marg{cmd}\marg{spec}\\
% If the model is supported and |\rangeRGB| equals 255, we stick to the algorithm provided by the driver.
% \begin{macrocode}
-\@ifundefined{color@RGB}%
+\@ifundefinedmodel{RGB}%
{\substitutecolormodel{RGB}{HTML/rgb}}
{\PackageInfo{xcolor}{Model `RGB' extended}
\let\XC@color@RGB\color@RGB
@@ -5856,22 +6728,28 @@
%
% \begin{macro}{\color@gray}
% \begin{macro}{\color@HTML}
+% \begin{macro}{\color@Hsb}
+% \begin{macro}{\color@tHsb}
% \begin{macro}{\color@HSB}
% \begin{macro}{\color@Gray}
% \begin{macro}{\color@wave}
% \marg{cmd}\marg{spec}
% \begin{macrocode}
-\@ifundefined{color@gray}{\substitutecolormodel{gray}{Gray/rgb}}{}
-\@ifundefined{color@HTML}{\substitutecolormodel{HTML}{rgb}}{}
-\@ifundefined{color@HSB}{\substitutecolormodel{HSB}{hsb}}{}
-\@ifundefined{color@Gray}{\substitutecolormodel{Gray}{gray}}{}
-\@ifundefined{color@wave}{\substitutecolormodel{wave}{hsb}}{}
+\@ifundefinedmodel{gray}{\substitutecolormodel{gray}{Gray/rgb}}{}
+\@ifundefinedmodel{HTML}{\substitutecolormodel{HTML}{rgb}}{}
+\@ifundefinedmodel{Hsb}{\substitutecolormodel{Hsb}{hsb}}{}
+\@ifundefinedmodel{tHsb}{\substitutecolormodel{tHsb}{hsb}}{}
+\@ifundefinedmodel{HSB}{\substitutecolormodel{HSB}{hsb}}{}
+\@ifundefinedmodel{Gray}{\substitutecolormodel{Gray}{gray}}{}
+\@ifundefinedmodel{wave}{\substitutecolormodel{wave}{hsb}}{}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \subsubsection{PostScript-related stuff}
@@ -5931,10 +6809,10 @@
% \begin{macrocode}
}{% compatibility code begin
\def\XC@getcolor#1#2%
- {\@ifundefined{\string\color@#1}%
+ {\@ifundefinedcolor{#1}%
{\begingroup\color{#1}%
\edef\@@tmp
- {\noexpand\edef\noexpand#2{\noexpand\expandafter\noexpand\c@lor@to@ps
+ {\edef\noexpand#2{\noexpand\expandafter\noexpand\c@lor@to@ps
\current@color\noexpand\@@}}%
\expandafter\endgroup\@@tmp}%
{\edef#2{\XC@usecolor{#1}}}}
@@ -5949,9 +6827,6 @@
% Note that non-trivial color expressions like |green!50| are forbidden and that |\XC@usecolor| is fully expandable, for example, |\edef\foo{\XC@usecolor{green}}| is valid.
% \begin{macrocode}
\def\XC@usecolor#1{\expandafter\XC@usec@lor#1\XC@@}
-% \end{macrocode}
-%
-% \begin{macrocode}
\def\XC@usec@lor#1#2\XC@@
{\ifx#1\xcolor@
\expandafter\expandafter\expandafter\c@lor@to@ps#1#2\@@
@@ -5962,14 +6837,14 @@
\space}
% \end{macrocode}
%
-% For compatibility reasons, we need the following command temporarily; however, |\XC@c@lor@to@ps| will disappear soon!
+% For compatibility reasons, we need the following command temporarily; however, |\XC@c@lor@to@ps| will disappear!
% \begin{macrocode}
\let\XC@c@lor@to@ps\XC@usecolor
% \end{macrocode}
% \end{macro}
%
% If \Package{pstcol} has been loaded, we have to redefine two macros from this package.
-% The conditional code is needed temporarily, until a new version of \Package{pstricks} is released.
+% The conditional code is needed temporarily, until nobody uses old \Package{pstricks} versions anymore.
% \begin{macrocode}
\let\pst@getcolor\XC@getcolor
\@ifundefined{XC@pst}{%
@@ -6007,7 +6882,7 @@
\AtBeginDocument{\let\default@color\current@color}
% \end{macrocode}
% \end{macro}
-% |\current@color| (which is the first-level expansion of |\XC@current@color|) contains an internal representation of the color at this point in the document.
+% |\current@color| (which is the expansion of |\XC@current@color|) contains an internal representation of the color at this point in the document.
% This can only be an approximation to the truth as the `macro layer' of \TeX\ does not know where the output routine is going to re-insert floats.
% This is why drivers must maintain their own stack of colors in order to fully support these commands.
%
@@ -6018,41 +6893,40 @@
% \begin{macro}{\define@color@named}
% We have to modify a few driver-specific commands in order to avoid generation of superfluous macros.
% \begin{macrocode}
-\@tfor\@@tmp:={dvipdf}{dvipdfm}{dvipdfmx}{dvips}{pctex32}\do
- {\ifx\@@tmp\XC@@drv
- \def\c@lor@@named#1,#2,#3\@@#4%
- {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
- \csname\string\color@#1\endcsname}}
- \def\define@color@named#1#2%
- {\@namedef{\string\color@#1}{{}{}{ \colornameprefix#1}{}{}}}
- \@break@tfor\fi}
+\XC@ifcase\XC@@drv
+ {{dvipdf,dvipdfm,dvipdfmx,dvips,pctex32}%
+ {\def\c@lor@@named#1,#2,#3\@@#4%
+ {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
+ \csname\string\color@#1\endcsname}}
+ \def\define@color@named#1#2%
+ {\@namedef{\string\color@#1}{{}{}{ \colornameprefix#1}{}{}}}}%
% \end{macrocode}
%
% \begin{macrocode}
-\@tfor\@@tmp:={dvipsone}{pctexps}{pdftex}{tcidvi}{truetex}{vtex}{xetex}\do
- {\ifx\@@tmp\XC@@drv
- \def\c@lor@@named#1,#2,#3\@@#4%
- {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
- \csname\string\color@#1\endcsname}}
- \def\define@color@named#1#2%
- {\let\@@cls\@empty\@namedef{\string\color@#1}{{}{}{#2}{}{}}}
- \@break@tfor\fi}
+ {dvipsone,pctexps,pdftex,tcidvi,truetex,vtex,xetex}%
+ {\def\c@lor@@named#1,#2,#3\@@#4%
+ {\edef#4{\expandafter\expandafter\expandafter\@thirdoffive
+ \csname\string\color@#1\endcsname}}
+ \def\define@color@named#1#2%
+ {\let\@@cls\@empty\@namedef{\string\color@#1}{{}{}{#2}{}{}}}}%
% \end{macrocode}
%
% \begin{macrocode}
-\@tfor\@@tmp:={textures}\do
- {\ifx\@@tmp\XC@@drv
- \def\c@lor@@named#1,#2,#3\@@#4%
- {\edef\@tempa{\color@P@custom{#1}{\if!#2!1\else#2\fi}}%
- \expandafter\def\expandafter#4\@tempa}
- \def\define@color@named#1#2%
- {\edef\@tempa{{#1}{#2}}\expandafter\AddCustomColor\@tempa}
- \def\c@lor@ps@#1 #2\@@
- {\expandafter\expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\c@lor@to@ps@
- \csname\string\color@#1\expandafter\endcsname\space
- #2. \@@{#1}}
- \@break@tfor\fi}
+ {textures}%
+ {\def\c@lor@@named#1,#2,#3\@@#4%
+ {\edef\@tempa{\color@P@custom{#1}{\if!#2!1\else#2\fi}}%
+ \expandafter\def\expandafter#4\@tempa}
+ \def\define@color@named#1#2%
+ {\edef\@tempa{{#1}{#2}}\expandafter\AddCustomColor\@tempa}
+ \def\c@lor@ps@#1 #2\@@
+ {\expandafter\expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\c@lor@to@ps@
+ \csname\string\color@#1\expandafter\endcsname\space
+ #2. \@@{#1}}}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ }{}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -6116,9 +6990,6 @@
% \begin{macrocode}
\csname xcolorcmd\endcsname
\color{black}
-% \end{macrocode}
-%
-% \begin{macrocode}
%</package>
% \end{macrocode}
%
@@ -6129,20 +7000,78 @@
%
% \subsection{Auxiliary definitions}
%
-% \subsubsection{PostScript prologue}
+% \subsubsection{\Index{PostScript} prologue file \File{xcolor.pro}}
%
% \begin{macrocode}
%<*dvips>
userdict begin
/setcmycolor{0 setcmykcolor}def
-/XCdef{exch dup TeXDict exch known{pop pop}{exch def}ifelse}bind def
-/XCbdef{bind XCdef}bind def
-/XCsetcolor{cvx counttomark array astore cvx exch pop XCdef}XCbdef
-/XCcmy{mark exch exec /setcmycolor XCsetcolor}XCbdef
-/XCcmyk{mark exch exec /setcmykcolor XCsetcolor}XCbdef
-/XCgray{mark exch exec /setgray XCsetcolor}XCbdef
-/XChsb{mark exch exec /sethsbcolor XCsetcolor}XCbdef
-/XCrgb{mark exch exec /setrgbcolor XCsetcolor}XCbdef
+/XCbd{bind def}bind def
+/XCed{exch def}XCbd
+% \end{macrocode}
+%
+% \Index{PostScript} version of |\providecommand|.
+% \begin{macrocode}
+/XCdef{exch dup TeXDict exch known{pop pop}{XCed}ifelse}XCbd
+% \end{macrocode}
+%
+% \Index{PostScript} version of |\providecolor|.
+% \begin{macrocode}
+/XCsetcolor{cvx counttomark array astore cvx exch pop XCdef}XCbd
+% \end{macrocode}
+%
+% Now define model-dependent color definition commands.
+% \begin{macrocode}
+/XCcmy{mark exch exec/setcmycolor XCsetcolor}XCbd
+/XCcmyk{mark exch exec/setcmykcolor XCsetcolor}XCbd
+/XCgray{mark exch exec/setgray XCsetcolor}XCbd
+/XChsb{mark exch exec/sethsbcolor XCsetcolor}XCbd
+/XCrgb{mark exch exec/setrgbcolor XCsetcolor}XCbd
+% \end{macrocode}
+%
+% Grouping operators.
+% We have to disable the |setgray| operator which is invoked by |normalscale| as part of |@beginspecial| as defined by \File{special.pro}.
+% \begin{macrocode}
+/XC!b{save/setgray{pop}def}XCbd
+/XC!e{restore}XCbd
+% \end{macrocode}
+%
+% Scale `sp' coordinates back to `bp' units.
+% \begin{macrocode}
+/XCsp2bp{1 65781.76 div dup scale}XCbd
+% \end{macrocode}
+%
+% \begin{macro}{XCsetline}
+% \meta{linewidth} |XCsetline|\\
+% Common line definition.
+% \begin{macrocode}
+/XCsetline
+ {setlinewidth [] 0 setdash 2 setlinecap 0 setlinejoin 4 setmiterlimit}XCbd
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{XCboxframe}
+% \meta{linewidth} \meta{width} \meta{height} \meta{depth} |XCboxframe|\\
+% Draw a frame in `sp' coordinates using LanguageLevel~2.
+% \begin{macrocode}
+/XCboxframe{/d XCed/h XCed/w XCed/l XCed w 0 gt{h d neg gt{l 0 gt
+ {XCsp2bp l XCsetline
+ l 2 div dup translate
+ 0 d neg w l sub h l sub d add rectstroke}if}if}if}XCbd
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{XCcolorblock}
+% \meta{width} \meta{height} \meta{depth} |XCcolorblock|\\
+% Draw a colored box in `sp' coordinates using LanguageLevel~2.
+% \begin{macrocode}
+/XCcolorblock{/d XCed/h XCed/w XCed w 0 gt{h d neg gt
+ {XCsp2bp 0 XCsetline
+ 0 d neg w h d add rectfill}if}if}XCbd
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
end
%</dvips>
% \end{macrocode}
@@ -6155,9 +7084,9 @@ end
%
% \iffalse
%-------------------------------------------------------------------------------
-%<*svgnames|hksknames|hksnnames|hksznames|pmsnames|ralnames>
+%<*svgnames|x11names|hksknames|hksnnames|hksznames|pmsnames|ralnames>
\def\colornameprefix{XC@}
-%</svgnames|hksknames|hksnnames|hksznames|pmsnames|ralnames>
+%</svgnames|x11names|hksknames|hksnnames|hksznames|pmsnames|ralnames>
%
%<*svgnames>
\preparecolorset{rgb}{}{}{%
@@ -6215,9 +7144,9 @@ GhostWhite,.972,.972,1;%
Gold,1,.844,0;%
Goldenrod,.855,.648,.125;%
Gray,.5,.5,.5;%
-Grey,.5,.5,.5;%
Green,0,.5,0;%
GreenYellow,.68,1,.185;%
+Grey,.5,.5,.5;%
Honeydew,.94,1,.94;%
HotPink,1,.41,.705;%
IndianRed,.804,.36,.36;%
@@ -6231,6 +7160,7 @@ LemonChiffon,1,.98,.804;%
LightBlue,.68,.848,.9;%
LightCoral,.94,.5,.5;%
LightCyan,.88,1,1;%
+LightGoldenrod,.933,.867,.51;%
LightGoldenrodYellow,.98,.98,.824;%
LightGray,.828,.828,.828;%
LightGreen,.565,.932,.565;%
@@ -6239,6 +7169,7 @@ LightPink,1,.712,.756;%
LightSalmon,1,.628,.48;%
LightSeaGreen,.125,.698,.668;%
LightSkyBlue,.53,.808,.98;%
+LightSlateBlue,.518,.44,1;%
LightSlateGray,.468,.532,.6;%
LightSlateGrey,.468,.532,.6;%
LightSteelBlue,.69,.77,.87;%
@@ -6263,6 +7194,7 @@ MistyRose,1,.894,.884;%
Moccasin,1,.894,.71;%
NavajoWhite,1,.87,.68;%
Navy,0,0,.5;%
+NavyBlue,0,0,.5;%
OldLace,.992,.96,.9;%
Olive,.5,.5,0;%
OliveDrab,.42,.556,.136;%
@@ -6303,6 +7235,7 @@ Thistle,.848,.75,.848;%
Tomato,1,.39,.28;%
Turquoise,.25,.88,.815;%
Violet,.932,.51,.932;%
+VioletRed,.816,.125,.565;%
Wheat,.96,.87,.7;%
White,1,1,1;%
WhiteSmoke,.96,.96,.96;%
@@ -6310,6 +7243,327 @@ Yellow,1,1,0;%
YellowGreen,.604,.804,.196}
%</svgnames>
%
+%<*x11names>
+\preparecolorset{rgb}{}{}{%
+AntiqueWhite1,1,.936,.86;%
+AntiqueWhite2,.932,.875,.8;%
+AntiqueWhite3,.804,.752,.69;%
+AntiqueWhite4,.545,.512,.47;%
+Aquamarine1,.498,1,.83;%
+Aquamarine2,.464,.932,.776;%
+Aquamarine3,.4,.804,.668;%
+Aquamarine4,.27,.545,.455;%
+Azure1,.94,1,1;%
+Azure2,.88,.932,.932;%
+Azure3,.756,.804,.804;%
+Azure4,.512,.545,.545;%
+Bisque1,1,.894,.77;%
+Bisque2,.932,.835,.716;%
+Bisque3,.804,.716,.62;%
+Bisque4,.545,.49,.42;%
+Blue1,0,0,1;%
+Blue2,0,0,.932;%
+Blue3,0,0,.804;%
+Blue4,0,0,.545;%
+Brown1,1,.25,.25;%
+Brown2,.932,.23,.23;%
+Brown3,.804,.2,.2;%
+Brown4,.545,.136,.136;%
+Burlywood1,1,.828,.608;%
+Burlywood2,.932,.772,.57;%
+Burlywood3,.804,.668,.49;%
+Burlywood4,.545,.45,.332;%
+CadetBlue1,.596,.96,1;%
+CadetBlue2,.556,.898,.932;%
+CadetBlue3,.48,.772,.804;%
+CadetBlue4,.325,.525,.545;%
+Chartreuse1,.498,1,0;%
+Chartreuse2,.464,.932,0;%
+Chartreuse3,.4,.804,0;%
+Chartreuse4,.27,.545,0;%
+Chocolate1,1,.498,.14;%
+Chocolate2,.932,.464,.13;%
+Chocolate3,.804,.4,.112;%
+Chocolate4,.545,.27,.075;%
+Coral1,1,.448,.336;%
+Coral2,.932,.415,.312;%
+Coral3,.804,.356,.27;%
+Coral4,.545,.244,.185;%
+Cornsilk1,1,.972,.864;%
+Cornsilk2,.932,.91,.804;%
+Cornsilk3,.804,.785,.694;%
+Cornsilk4,.545,.532,.47;%
+Cyan1,0,1,1;%
+Cyan2,0,.932,.932;%
+Cyan3,0,.804,.804;%
+Cyan4,0,.545,.545;%
+DarkGoldenrod1,1,.725,.06;%
+DarkGoldenrod2,.932,.68,.055;%
+DarkGoldenrod3,.804,.585,.048;%
+DarkGoldenrod4,.545,.396,.03;%
+DarkOliveGreen1,.792,1,.44;%
+DarkOliveGreen2,.736,.932,.408;%
+DarkOliveGreen3,.635,.804,.352;%
+DarkOliveGreen4,.43,.545,.24;%
+DarkOrange1,1,.498,0;%
+DarkOrange2,.932,.464,0;%
+DarkOrange3,.804,.4,0;%
+DarkOrange4,.545,.27,0;%
+DarkOrchid1,.75,.244,1;%
+DarkOrchid2,.698,.228,.932;%
+DarkOrchid3,.604,.196,.804;%
+DarkOrchid4,.408,.132,.545;%
+DarkSeaGreen1,.756,1,.756;%
+DarkSeaGreen2,.705,.932,.705;%
+DarkSeaGreen3,.608,.804,.608;%
+DarkSeaGreen4,.41,.545,.41;%
+DarkSlateGray1,.592,1,1;%
+DarkSlateGray2,.552,.932,.932;%
+DarkSlateGray3,.475,.804,.804;%
+DarkSlateGray4,.32,.545,.545;%
+DeepPink1,1,.08,.576;%
+DeepPink2,.932,.07,.536;%
+DeepPink3,.804,.064,.464;%
+DeepPink4,.545,.04,.312;%
+DeepSkyBlue1,0,.75,1;%
+DeepSkyBlue2,0,.698,.932;%
+DeepSkyBlue3,0,.604,.804;%
+DeepSkyBlue4,0,.408,.545;%
+DodgerBlue1,.116,.565,1;%
+DodgerBlue2,.11,.525,.932;%
+DodgerBlue3,.094,.455,.804;%
+DodgerBlue4,.064,.305,.545;%
+Firebrick1,1,.19,.19;%
+Firebrick2,.932,.172,.172;%
+Firebrick3,.804,.15,.15;%
+Firebrick4,.545,.1,.1;%
+Gold1,1,.844,0;%
+Gold2,.932,.79,0;%
+Gold3,.804,.68,0;%
+Gold4,.545,.46,0;%
+Goldenrod1,1,.756,.145;%
+Goldenrod2,.932,.705,.132;%
+Goldenrod3,.804,.608,.112;%
+Goldenrod4,.545,.41,.08;%
+Green1,0,1,0;%
+Green2,0,.932,0;%
+Green3,0,.804,0;%
+Green4,0,.545,0;%
+Honeydew1,.94,1,.94;%
+Honeydew2,.88,.932,.88;%
+Honeydew3,.756,.804,.756;%
+Honeydew4,.512,.545,.512;%
+HotPink1,1,.43,.705;%
+HotPink2,.932,.415,.655;%
+HotPink3,.804,.376,.565;%
+HotPink4,.545,.228,.385;%
+IndianRed1,1,.415,.415;%
+IndianRed2,.932,.39,.39;%
+IndianRed3,.804,.332,.332;%
+IndianRed4,.545,.228,.228;%
+Ivory1,1,1,.94;%
+Ivory2,.932,.932,.88;%
+Ivory3,.804,.804,.756;%
+Ivory4,.545,.545,.512;%
+Khaki1,1,.965,.56;%
+Khaki2,.932,.9,.52;%
+Khaki3,.804,.776,.45;%
+Khaki4,.545,.525,.305;%
+LavenderBlush1,1,.94,.96;%
+LavenderBlush2,.932,.88,.898;%
+LavenderBlush3,.804,.756,.772;%
+LavenderBlush4,.545,.512,.525;%
+LemonChiffon1,1,.98,.804;%
+LemonChiffon2,.932,.912,.75;%
+LemonChiffon3,.804,.79,.648;%
+LemonChiffon4,.545,.536,.44;%
+LightBlue1,.75,.936,1;%
+LightBlue2,.698,.875,.932;%
+LightBlue3,.604,.752,.804;%
+LightBlue4,.408,.512,.545;%
+LightCyan1,.88,1,1;%
+LightCyan2,.82,.932,.932;%
+LightCyan3,.705,.804,.804;%
+LightCyan4,.48,.545,.545;%
+LightGoldenrod1,1,.925,.545;%
+LightGoldenrod2,.932,.864,.51;%
+LightGoldenrod3,.804,.745,.44;%
+LightGoldenrod4,.545,.505,.298;%
+LightPink1,1,.684,.725;%
+LightPink2,.932,.635,.68;%
+LightPink3,.804,.55,.585;%
+LightPink4,.545,.372,.396;%
+LightSalmon1,1,.628,.48;%
+LightSalmon2,.932,.585,.448;%
+LightSalmon3,.804,.505,.385;%
+LightSalmon4,.545,.34,.26;%
+LightSkyBlue1,.69,.888,1;%
+LightSkyBlue2,.644,.828,.932;%
+LightSkyBlue3,.552,.712,.804;%
+LightSkyBlue4,.376,.484,.545;%
+LightSteelBlue1,.792,.884,1;%
+LightSteelBlue2,.736,.824,.932;%
+LightSteelBlue3,.635,.71,.804;%
+LightSteelBlue4,.43,.484,.545;%
+LightYellow1,1,1,.88;%
+LightYellow2,.932,.932,.82;%
+LightYellow3,.804,.804,.705;%
+LightYellow4,.545,.545,.48;%
+Magenta1,1,0,1;%
+Magenta2,.932,0,.932;%
+Magenta3,.804,0,.804;%
+Magenta4,.545,0,.545;%
+Maroon1,1,.204,.7;%
+Maroon2,.932,.19,.655;%
+Maroon3,.804,.16,.565;%
+Maroon4,.545,.11,.385;%
+MediumOrchid1,.88,.4,1;%
+MediumOrchid2,.82,.372,.932;%
+MediumOrchid3,.705,.32,.804;%
+MediumOrchid4,.48,.215,.545;%
+MediumPurple1,.67,.51,1;%
+MediumPurple2,.624,.475,.932;%
+MediumPurple3,.536,.408,.804;%
+MediumPurple4,.365,.28,.545;%
+MistyRose1,1,.894,.884;%
+MistyRose2,.932,.835,.824;%
+MistyRose3,.804,.716,.71;%
+MistyRose4,.545,.49,.484;%
+NavajoWhite1,1,.87,.68;%
+NavajoWhite2,.932,.81,.63;%
+NavajoWhite3,.804,.7,.545;%
+NavajoWhite4,.545,.475,.37;%
+OliveDrab1,.752,1,.244;%
+OliveDrab2,.7,.932,.228;%
+OliveDrab3,.604,.804,.196;%
+OliveDrab4,.41,.545,.132;%
+Orange1,1,.648,0;%
+Orange2,.932,.604,0;%
+Orange3,.804,.52,0;%
+Orange4,.545,.352,0;%
+OrangeRed1,1,.27,0;%
+OrangeRed2,.932,.25,0;%
+OrangeRed3,.804,.215,0;%
+OrangeRed4,.545,.145,0;%
+Orchid1,1,.512,.98;%
+Orchid2,.932,.48,.912;%
+Orchid3,.804,.41,.79;%
+Orchid4,.545,.28,.536;%
+PaleGreen1,.604,1,.604;%
+PaleGreen2,.565,.932,.565;%
+PaleGreen3,.488,.804,.488;%
+PaleGreen4,.33,.545,.33;%
+PaleTurquoise1,.732,1,1;%
+PaleTurquoise2,.684,.932,.932;%
+PaleTurquoise3,.59,.804,.804;%
+PaleTurquoise4,.4,.545,.545;%
+PaleVioletRed1,1,.51,.67;%
+PaleVioletRed2,.932,.475,.624;%
+PaleVioletRed3,.804,.408,.536;%
+PaleVioletRed4,.545,.28,.365;%
+PeachPuff1,1,.855,.725;%
+PeachPuff2,.932,.796,.68;%
+PeachPuff3,.804,.688,.585;%
+PeachPuff4,.545,.468,.396;%
+Pink1,1,.71,.772;%
+Pink2,.932,.664,.72;%
+Pink3,.804,.57,.62;%
+Pink4,.545,.39,.424;%
+Plum1,1,.732,1;%
+Plum2,.932,.684,.932;%
+Plum3,.804,.59,.804;%
+Plum4,.545,.4,.545;%
+Purple1,.608,.19,1;%
+Purple2,.57,.172,.932;%
+Purple3,.49,.15,.804;%
+Purple4,.332,.1,.545;%
+Red1,1,0,0;%
+Red2,.932,0,0;%
+Red3,.804,0,0;%
+Red4,.545,0,0;%
+RosyBrown1,1,.756,.756;%
+RosyBrown2,.932,.705,.705;%
+RosyBrown3,.804,.608,.608;%
+RosyBrown4,.545,.41,.41;%
+RoyalBlue1,.284,.464,1;%
+RoyalBlue2,.264,.43,.932;%
+RoyalBlue3,.228,.372,.804;%
+RoyalBlue4,.152,.25,.545;%
+Salmon1,1,.55,.41;%
+Salmon2,.932,.51,.385;%
+Salmon3,.804,.44,.33;%
+Salmon4,.545,.298,.224;%
+SeaGreen1,.33,1,.624;%
+SeaGreen2,.305,.932,.58;%
+SeaGreen3,.264,.804,.5;%
+SeaGreen4,.18,.545,.34;%
+Seashell1,1,.96,.932;%
+Seashell2,.932,.898,.87;%
+Seashell3,.804,.772,.75;%
+Seashell4,.545,.525,.51;%
+Sienna1,1,.51,.28;%
+Sienna2,.932,.475,.26;%
+Sienna3,.804,.408,.224;%
+Sienna4,.545,.28,.15;%
+SkyBlue1,.53,.808,1;%
+SkyBlue2,.494,.752,.932;%
+SkyBlue3,.424,.65,.804;%
+SkyBlue4,.29,.44,.545;%
+SlateBlue1,.512,.435,1;%
+SlateBlue2,.48,.404,.932;%
+SlateBlue3,.41,.35,.804;%
+SlateBlue4,.28,.235,.545;%
+SlateGray1,.776,.888,1;%
+SlateGray2,.725,.828,.932;%
+SlateGray3,.624,.712,.804;%
+SlateGray4,.424,.484,.545;%
+Snow1,1,.98,.98;%
+Snow2,.932,.912,.912;%
+Snow3,.804,.79,.79;%
+Snow4,.545,.536,.536;%
+SpringGreen1,0,1,.498;%
+SpringGreen2,0,.932,.464;%
+SpringGreen3,0,.804,.4;%
+SpringGreen4,0,.545,.27;%
+SteelBlue1,.39,.72,1;%
+SteelBlue2,.36,.675,.932;%
+SteelBlue3,.31,.58,.804;%
+SteelBlue4,.21,.392,.545;%
+Tan1,1,.648,.31;%
+Tan2,.932,.604,.288;%
+Tan3,.804,.52,.248;%
+Tan4,.545,.352,.17;%
+Thistle1,1,.884,1;%
+Thistle2,.932,.824,.932;%
+Thistle3,.804,.71,.804;%
+Thistle4,.545,.484,.545;%
+Tomato1,1,.39,.28;%
+Tomato2,.932,.36,.26;%
+Tomato3,.804,.31,.224;%
+Tomato4,.545,.21,.15;%
+Turquoise1,0,.96,1;%
+Turquoise2,0,.898,.932;%
+Turquoise3,0,.772,.804;%
+Turquoise4,0,.525,.545;%
+VioletRed1,1,.244,.59;%
+VioletRed2,.932,.228,.55;%
+VioletRed3,.804,.196,.47;%
+VioletRed4,.545,.132,.32;%
+Wheat1,1,.905,.73;%
+Wheat2,.932,.848,.684;%
+Wheat3,.804,.73,.59;%
+Wheat4,.545,.494,.4;%
+Yellow1,1,1,0;%
+Yellow2,.932,.932,0;%
+Yellow3,.804,.804,0;%
+Yellow4,.545,.545,0;%
+Gray0,.745,.745,.745;%
+Green0,0,1,0;%
+Grey0,.745,.745,.745;%
+Maroon0,.69,.19,.376;%
+Purple0,.628,.125,.94}
+%</x11names>
+%
%<*test1>
\documentclass[a4paper]{article}
@@ -6488,7 +7742,7 @@ YellowGreen,.604,.804,.196}
\begin{figure}[htb]\caption{Modified version of an example from the \textsf{pstricks} manual; requires \textsf{pst-tree}}
\begin{SideBySideExample}[fontsize=\footnotesize,xrightmargin=.45\textwidth]
- \begin{pspicture}[.5](-0.5,-2)(3,2)
+ \begin{pspicture}(-0.5,-2)(3,2)
\cnode(0,0){.5cm}{root}
\cnode*[linecolor=red](3,1.5){4pt}{A}
\cnode*[linecolor=red!72.5375!blue](3,0){4pt}{B}
@@ -6554,8 +7808,8 @@ YellowGreen,.604,.804,.196}
\begin{Example}[fontsize=\footnotesize,xrightmargin=.45\textwidth]
\newcount\WL \unitlength.75pt
\def\WaveToPS#1%
- {\definecolor{tmp}{wave}{#1}\extractcolorspec{tmp}\tmp
- \expandafter\convertcolorspec\tmp{rgb}\tmp \expandafter\WaveToPSi\tmp,}
+ {\definecolor{tmp}{rgb:wave}{#1}\extractcolorspecs{tmp}\tmpm\tmpc
+ \expandafter\WaveToPSi\tmpc,}
\def\WaveToPSi#1,#2,#3,{\pstVerb{/Red{#1}def /Green{#2}def /Blue{#3}def}}
\def\DisplayBar#1#2%
{\linethickness{1.25\unitlength}\WL=360
@@ -6587,8 +7841,15 @@ YellowGreen,.604,.804,.196}
%
%<*test3>
\listfiles
-\documentclass{article}
-\usepackage[table,dvipsnames]{xcolor}[2005/03/24]
+\documentclass[a4paper]{article}
+\usepackage[showerrors,table,dvipsnames*,hyperref]{xcolor}[2005/12/21]
+\usepackage[margin=2.25cm]{geometry}
+\usepackage
+ [\GinDriver,hyperindex=false,bookmarks,bookmarksopen,bookmarksopenlevel=1,%
+ pdftitle={xcolor3 \XCfileversion{} (\XCfiledate)},pdfauthor={Dr. Uwe Kern},%
+ pdfsubject={Color extensions for LaTeX and pdfLaTeX},%
+ pdfkeywords={xcolor,color,colour,model,tint,tone,shade,harmony,spot,latex,pdftex,dvips,%
+ conversion,blend,mix,mask,separation,rgb,cmy,cmyk,hsb,gray,html,wave,thsb,wheel}]{hyperref}
\tracingcolors=4
%%\tracingcolors=3
@@ -6599,40 +7860,132 @@ YellowGreen,.604,.804,.196}
\parindent0pt
\pagecolor{gray!25}
+\definecolors{JungleGreen,DarkOrchid}
+
\begin{document}
-\title{Color extensions with the \textsf{xcolor} package --- log file example}
-\author{Dr. Uwe Kern\thanks{This file is part of the \textsf{xcolor} distribution which can be downloaded from the CTAN mirrors (\texttt{macros/latex/contrib/xcolor/}) or the homepage \texttt{www.ukern.de/tex/xcolor.html}. Please send error reports and suggestions for improvements to \texttt{xcolor@ukern.de}.}}
-\date{\XCfileversion{} (\XCfiledate)}
+\title{Color extensions with the \textsf{xcolor} package --- various examples}
+\author{\href{mailto:xcolor@ukern.de}{\fboxrule0pt\fboxsep2pt\fbox{Dr. Uwe Kern}}}
+\date{\XCfileversion{} (\XCfiledate)
+\thanks{This file (\texttt{\jobname.tex}) is part of the \textsf{xcolor} distribution which can be downloaded from the CTAN mirrors \texttt{\href{http://www.ctan.org/tex-archive/macros/latex/contrib/xcolor/}{CTAN/macros/latex/contrib/xcolor/}} or the homepage \texttt{\href{http://www.ukern.de/tex/xcolor.html}{www.ukern.de/tex/xcolor.html}}. Please send error reports and suggestions for improvements to \texttt{\href{mailto:xcolor@ukern.de}{xcolor@ukern.de}}.}}
\maketitle
-The purpose of this file is to demonstrate the logging facilities of the \textsf{xcolor} package.
+The purpose of this file is to demonstrate a variety of capabilities including the logging facilities of the \textsf{xcolor} package.
By playing around with different values of \texttt{\string\tracingcolors}, one can observe the different behavior in the \texttt{log} file.
-\bigskip
-Table example:
-\rowcolors[\hline]{1}{green!25}{yellow!50}
-\begin{tabular}{ll}
-test & row \number\rownum\\
-test & row \number\rownum\\
-\rowcolor{blue!25}
-test & row \number\rownum\\
-test & row \number\rownum\\
-\hiderowcolors
-test & row \number\rownum\\
-test & row \number\rownum\\
-\showrowcolors
-test & row \number\rownum\\
-test & row \number\rownum\\
-\multicolumn{1}%
- {>{\columncolor{red!12}}l}{test} & row \number\rownum\\
-\end{tabular}
+\section{Predefined colors}
+
+\begingroup
+\small\sffamily
+\rowcolors1{}{}
+\begin{testcolors}[rgb,cmyk,hsb,HTML,gray]
+\testcolor{red}
+\testcolor{green}
+\testcolor{blue}
+\testcolor{cyan}
+\testcolor{magenta}
+\testcolor{yellow}
+\testcolor{orange}
+\testcolor{violet}
+\testcolor{purple}
+\testcolor{brown}
+\testcolor{pink}
+\testcolor{olive}
+\testcolor{black}
+\testcolor{darkgray}
+\testcolor{gray}
+\testcolor{lightgray}
+\testcolor{white}
+\noalign{\medskip}\hline\noalign{\medskip}
+\testcolor{-red}
+\testcolor{-green}
+\testcolor{-blue}
+\testcolor{-cyan}
+\testcolor{-magenta}
+\testcolor{-yellow}
+\testcolor{-orange}
+\testcolor{-violet}
+\testcolor{-purple}
+\testcolor{-brown}
+\testcolor{-pink}
+\testcolor{-olive}
+\testcolor{-black}
+\testcolor{-darkgray}
+\testcolor{-gray}
+\testcolor{-lightgray}
+\testcolor{-white}
+\noalign{\medskip}\hline\noalign{\medskip}
+\testcolor{JungleGreen}
+\testcolor{DarkOrchid}
+\noalign{\medskip}\hline\noalign{\medskip}
+\testcolor{-JungleGreen}
+\testcolor{-DarkOrchid}
+\end{testcolors}
+\endgroup
+
+\vfill
+
+\clearpage
+\pagecolor{white}
+
+\section{Color definition and application}
-\bigskip
\providecolor{dummy}{rgb}{.6,.5,.4}
\definecolor{dummy}{rgb}{.6,.5,.4}
\providecolor{dummy}{rgb}{.6,.5,.4}
\hbox{\textcolor{dummy}{Test with \texttt{\string\definecolor}}}
+\bigskip
+
+Comma-separated and space-separated definitions:
+
+\definecolor{c1}{rgb}{.7,.6,.5}
+\definecolor{c2}{rgb}{.7 .6 .5}
+\colorlet{c1a}{c1}
+\colorlet{c2a}{c2}
+
+\textcolor{c1}{identical} =
+\textcolor{c2}{identical} =
+\textcolor{c1a}{identical} =
+\textcolor{c2a}{identical} =
+\textcolor[rgb]{.7,.6,.5}{identical} =
+\textcolor[rgb]{.7 .6 .5}{identical} =
+\textcolor{rgb,10:red,7;green,6;blue,5}{identical}
+\textcolor{rgb,15:red,10.5;green,9;blue,7.5}{identical}
+
+\medskip
+
+\begingroup
+\sffamily
+\begin{testcolors}
+\testcolor{c1}
+\testcolor{c2}
+\testcolor{c1a}
+\testcolor{c2a}
+\testcolor[rgb]{.7,.6,.5}
+\testcolor[rgb]{.7 .6 .5}
+\testcolor{rgb,10:red,7;green,6;blue,5}
+\testcolor{rgb,15:red,10.5;green,9;blue,7.5}
+\end{testcolors}
+\endgroup
+
+\bigskip
+
+\textcolor{rgb:red!50,4;green!25,2}{Another extended color expression (rgb:red!50,4;green!25,2)}.
+
+\bigskip
+
+\begingroup
+\color{black}
+Test with named colors:\par
+\color{blue}
+Test: \textcolor[named]{JungleGreen}{JungleGreen};
+Test: \textcolor{JungleGreen}{JungleGreen};
+Test: \textcolor{JungleGreen!50!DarkOrchid}{JungleGreen!50!DarkOrchid};
+Test: \textcolor{green!50!red}{green!50!red}.
+\endgroup
+
+\bigskip
+
{\color[rgb]{.4,.5,.6}Test with \texttt{\string\color}}
\bigskip
@@ -6661,16 +8014,29 @@ Test\test\test\test\test\test\test Test
\def\test{\hbox to 1em{{\color{foo!![2]}\vrule width 1em height 1.5ex}}}
Test\test\test\test\test\test\test Test
-\bigskip
-\color{black}
-Test with named colors:\par
-\color{blue}
-Test: \textcolor[named]{JungleGreen}{JungleGreen};
-Test: \textcolor{JungleGreen}{JungleGreen};
-Test: \textcolor{JungleGreen!50!DarkOrchid}{JungleGreen!50!DarkOrchid};
-Test: \textcolor{green!50!red}{green!50!red}.
\endgroup
+\section{Color in tables}
+
+\rowcolors[\hline]{1}{green!25}{yellow!50}
+\begin{tabular}{ll}
+test & row \number\rownum\\
+test & row \number\rownum\\
+\rowcolor{blue!25}
+test & row \number\rownum\\
+test & row \number\rownum\\
+\hiderowcolors
+test & row \number\rownum\\
+test & row \number\rownum\\
+\showrowcolors
+test & row \number\rownum\\
+test & row \number\rownum\\
+\multicolumn{1}%
+ {>{\columncolor{red!12}}l}{test} & row \number\rownum\\
+\end{tabular}
+
+\section{Color information}
+
Type test:
\makeatletter
\@namedef{\string\color@foo1}{foo1{}{}{}{}}\edef\tempa{\XC@type{foo1}}\tempa
@@ -6679,43 +8045,119 @@ Type test:
\@namedef{\string\color@foo4}{\xcolor@{}{}{foo4}{}}\edef\tempd{\XC@type{foo4}}\tempd
\makeatother
-\textcolor{rgb:red!50,4;green!25,2}{Extended color expression (rgb:red!50,4;green!25,2)}.
-
\end{document}
%</test3>
%
%<*test4>
\listfiles
\documentclass[a4paper]{article}
+%%\PassOptionsToPackage{dvipdf}{xcolor}
+%%\PassOptionsToPackage{dvipdfm}{xcolor}
+%%\PassOptionsToPackage{dvipdfmx}{xcolor}
+%%\PassOptionsToPackage{dvips}{xcolor}
+%%\PassOptionsToPackage{dvipsone}{xcolor}
+%%\PassOptionsToPackage{dviwin}{xcolor}
+%%\PassOptionsToPackage{dviwindo}{xcolor}
+%%\PassOptionsToPackage{emtex}{xcolor}
+%%\PassOptionsToPackage{oztex}{xcolor}
+%%\PassOptionsToPackage{pctex32}{xcolor}
+%%\PassOptionsToPackage{pctexhp}{xcolor}
+%%\PassOptionsToPackage{pctexps}{xcolor}
+%%\PassOptionsToPackage{pctexwin}{xcolor}
+%%\PassOptionsToPackage{pdftex}{xcolor}
+%%\PassOptionsToPackage{tcidvi}{xcolor}
+%%\PassOptionsToPackage{textures}{xcolor}
+%%\PassOptionsToPackage{truetex}{xcolor}
+%%\PassOptionsToPackage{vtex}{xcolor}
+%%\PassOptionsToPackage{xdvi}{xcolor}
+%%\PassOptionsToPackage{xetex}{xcolor}
+%%\PassOptionsToPackage{prologue}{xcolor}
+%%\PassOptionsToPackage{kernelfbox}{xcolor}
+%%\PassOptionsToPackage{xcdraw}{xcolor}
+\usepackage[emtex]{graphics}
\usepackage{xcolor}
-%%\usepackage[dvipdf]{xcolor}
-%%\usepackage[dvipdfm]{xcolor}
-%%\usepackage[dvipdfmx]{xcolor}
-%%\usepackage[dvips]{xcolor}
-%%\usepackage[dvipsone]{xcolor}
-%%\usepackage[dviwin]{xcolor}
-%%\usepackage[emtex]{xcolor}
-%%\usepackage[pctex32]{xcolor}
-%%\usepackage[pctexhp]{xcolor}
-%%\usepackage[pctexps]{xcolor}
-%%\usepackage[pctexwin]{xcolor}
-%%\usepackage[pdftex]{xcolor}
-%%\usepackage[tcidvi]{xcolor}
-%%\usepackage[textures]{xcolor}
-%%\usepackage[truetex]{xcolor}
-%%\usepackage[vtex]{xcolor}
-%%\usepackage[xetex]{xcolor}
-%%\usepackage[dviwindo]{xcolor}
-%%\usepackage[oztex]{xcolor}
-%%\usepackage[xdvi]{xcolor}
\usepackage[margin=1.25cm,noheadfoot]{geometry}
\pagestyle{empty}
\parindent0pt
\nofiles
\let\familydefault\sfdefault
+\makeatletter
+%% special code for driver list construction via
+%% latex \def\xcdriverlist{1}\input{xcolor4}
+%% writes list in file xcolor4.tmp
+\@ifundefined{xcdriverlist}{}{%
+%% optional * (skips test whether #1.def exists)
+%% #1 = driver
+%% #2 = additional options (stored in \options@#2)
+%% #3 = processor 1
+%% #4 = output format 1
+%% #5 = processor 2
+%% #6 = output format 2
+%% #7 = processor 3
+%% #8 = output format 3
+\def\0{\@ifstar
+ {\def\@@tmp####1{\@firstoftwo}\1}{\def\@@tmp####1{\IfFileExists{####1.def}}\1}}
+\def\1#1#2#3#4#5#6#7#8{\@@tmp{#1}%
+ {\XC@let@Nc\@@tmp{options@#2}
+ \ifx\@@tmp\@empty\else
+ \edef\@@tmp{,\@@tmp}\XC@replace\@@tmp,{;#1-}\XC@replace\@@tmp;,
+ \fi
+ \edef\@@tmp{:=#1\@@tmp}
+ \expandafter\@for\expandafter\@tempa\@@tmp\do
+ {\let\@@tmp\@tempa\XC@replace\@@tmp-,
+ \edef\@@tmp{\@tempa\space\string\PassOptionsToPackage{\@@tmp}{xcolor}}
+ \@namexdef{list@#4}{\@nameuse{list@#4},#3 \@@tmp}
+ \@namexdef{list@#6}{\@nameuse{list@#6},#5 \@@tmp}
+ \@namexdef{list@#8}{\@nameuse{list@#8},#7 \@@tmp}}}%
+ {\typeout{No file `#1.def' found.}}}
+\def\list@{}
+\def\list@dvi{}
+\def\list@ps{}
+\def\list@pdf{}
+\@namedef{options@0}{}
+\@namedef{options@1}{kernelfbox,prologue,xcdraw,kernelfbox-xcdraw,prologue-xcdraw}
+\0{dvips}1{latex}{dvi}{dvips}{ps}{ps2pdf}{pdf}
+\0{pctex32}0{latex}{dvi}{dvips}{ps}{ps2pdf}{pdf}
+\0{dvipdf}0{latex}{dvi}{dvipdf}{pdf}{}{}
+\0{dvipdfm}1{latex}{dvi}{dvipdfm}{pdf}{}{}
+\0{dvipdfmx}0{latex}{dvi}{dvipdfmx}{pdf}{}{}
+\0{dvipsone}0{latex}{dvi}{}{}{}{}
+\0{dviwin}0{latex}{dvi}{}{}{}{}
+\0*{dviwindo}0{latex}{dvi}{}{}{}{}
+\0{emtex}0{latex}{dvi}{}{}{}{}
+\0*{oztex}0{latex}{dvi}{}{}{}{}
+\0{pctexhp}0{latex}{dvi}{}{}{}{}
+\0{pctexps}0{latex}{dvi}{}{}{}{}
+\0{pctexwin}0{latex}{dvi}{}{}{}{}
+\0{tcidvi}0{latex}{dvi}{}{}{}{}
+\0{textures}0{latex}{dvi}{}{}{}{}
+\0{truetex}0{latex}{dvi}{}{}{}{}
+\0*{xdvi}0{latex}{dvi}{}{}{}{}
+\0{pdftex}1{pdflatex}{pdf}{}{}{}{}
+\0{vtex}0{vlatex}{pdf}{}{}{}{}
+\0{xetex}0{xelatex}{pdf}{}{}{}{}
+\newwrite\@tempa\immediate\openout\@tempa=\jobname.tmp
+\@tfor\@tempb:={dvi}{ps}{pdf}\do
+ {\edef\@@tmp{\@nameuse{list@\@tempb}}\edef\@@tmp{:=\expandafter\@gobble\@@tmp}
+ \expandafter\@for\expandafter\@@tmp\@@tmp\do
+ {\immediate\write\@tempa{\@@tmp}}}
+\immediate\closeout\@tempa
+\@@end}% end of driver list construction code
+\edef\Options{\expandafter\@gobble\XC@@opt}
+\@tfor\@@tmp:={dvipdf}{dvipdfm}{dvipdfmx}{dvips}{dvipsone}{dviwin}{dviwindo}%
+ {emtex}{oztex}{pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}%
+ {tcidvi}{textures}{truetex}{vtex}{xdvi}{xetex}%
+ {natural}{table}{fixpdftex}{hyperref}{showerrors}{hideerrors}%
+ {override}{usenames}{nodvipsnames}{debugshow}\do
+ {\expandafter\XC@replace\expandafter\Options\expandafter{\@@tmp,}{}}
+\edef\Options{\XC@@drv,\Options}
+\def\@@tmp#1,#2%
+ {\ifx,#2#1\expandafter\remove@to@nnil\else#1', `\expandafter\@@tmp\fi#2}
+\edef\Options{`\expandafter\@@tmp\Options,,\@nnil'}
+\makeatother
\begin{document}
\vbox to\textheight{\vss\centering
-{\Large\textbf{xcolor} driver test: `\csname XC@@drv\endcsname'}
+{\Large\textbf{xcolor} driver test: \Options}
\vskip0.5cm
\begin{testcolors}[rgb,hsb,cmyk,gray,HTML]
\testcolor{magenta}
@@ -6729,35 +8171,30 @@ Type test:
\testcolor[hsb]{0.66667,1,1}
\testcolor[cmyk]{1,1,0,0}
\testcolor[gray]{0.11}
-\testcolor[wave]{440}
\noalign{\medskip}
\testcolor{cyan}
\testcolor[rgb]{0,1,1}
\testcolor[hsb]{0.5,1,1}
\testcolor[cmyk]{1,0,0,0}
\testcolor[gray]{0.7}
-\testcolor[wave]{490}
\noalign{\medskip}
\testcolor{green}
\testcolor[rgb]{0,1,0}
\testcolor[hsb]{0.33333,1,1}
\testcolor[cmyk]{1,0,1,0}
\testcolor[gray]{0.59}
-\testcolor[wave]{510}
\noalign{\medskip}
\testcolor{yellow}
\testcolor[rgb]{1,1,0}
\testcolor[hsb]{0.16667,1,1}
\testcolor[cmyk]{0,0,1,0}
\testcolor[gray]{0.89}
-\testcolor[wave]{580}
\noalign{\medskip}
\testcolor{red}
\testcolor[rgb]{1,0,0}
\testcolor[hsb]{0,1,1}
\testcolor[cmyk]{0,1,1,0}
\testcolor[gray]{0.3}
-\testcolor[wave]{645}
\noalign{\medskip}
\testcolor{black}
\testcolor[rgb]{0,0,0}
@@ -6776,6 +8213,11 @@ Type test:
\testcolor[hsb]{0,0,1}
\testcolor[cmyk]{0,0,0,0}
\testcolor[gray]{1}
+\noalign{\medskip\smallskip}
+f(color)box &
+\multicolumn5{c}{\def\i{\fbox{\a}}\def\ii{\fcolorbox{red}{yellow}{\a}}\def\iii{\scalebox{3}}%
+\def\a{{\setbox0=\hbox to3ex{\hss\textcolor{blue}{\vrule width .75ex height1.5ex depth1.5ex}\hss}\ht0=0pt\dp0=0pt\box0}}%
+\fboxsep0.333ex \i\quad\ii\quad\iii\i\quad\iii\ii\quad\fboxrule.75ex \iii\i\quad\iii\ii}
\end{testcolors}
\vskip0.5cm
{\footnotesize This table was generated with \textbf{xcolor4.tex} which is part of the \textbf{xcolor} package \XCfileversion{} (\XCfiledate) by Uwe Kern.}
diff --git a/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx b/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
index 5febf8c8960..2aabc0bc603 100644
--- a/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
+++ b/Master/texmf-dist/source/latex/xkeyval/xkeyval.dtx
@@ -172,10 +172,11 @@ documentation and for contributing the |\@selective@sanitize| macro.
% \changes{v2.5b}{2005/06/20}{Made retrieving document class more robust}
% \changes{v2.5d}{2005/08/12}{Added missing \cs{filename@area} in
% document class retrieval in \texttt{xkeyval.sty}}
+% \changes{v2.5e}{2005/11/25}{Updated docs}
%
% \GetFileInfo{xkeyval.sty}
%
-% \CheckSum{2963}
+% \CheckSum{2964}
%
%\DoNotIndex{\:,\@,\@@,\@backslashchar,\@ehc,\@empty,\@expandtwoargs,
%\@for,\@forloop,\@fornoop,\@fortmp,\@gobble,\@gobbletwo,\@if,\@ifnch,
@@ -1713,11 +1714,8 @@ documentation and for contributing the |\@selective@sanitize| macro.
%a lot of authors are involved and since it requires a change of
%policy, the conversion of \pf{PSTricks} packages might take some
%time. Hence, at the moment of writing, \pf{xkeyval} will conflict
-%with \pf{pst-key} and the \pf{PSTricks} packages using \pf{pst-key},
-%which are \pf{pst-circ}, \pf{pst-eucl}, \pf{pst-fr3d}, \pf{pst-geo},
-%\pf{pst-gr3d}, \pf{pst-labo}, \pf{pst-lens}, \pf{pst-ob3d},
-%\pf{pst-optic}, \pf{pst-osci}, \pf{pst-poly}, \pf{pst-stru},
-%\pf{pst-uml} and \pf{pst-vue3d}.
+%with \pf{pst-key} and the \pf{PSTricks} packages still using
+%\pf{pst-key}, which are \pf{pst-ob3d}, \pf{pst-stru} and \pf{pst-uml}.
%
%Have a look at the \pf{PSTricks} website \cite{PSTricksWeb} to find
%out if the package that you want to use has been converted already.
@@ -2048,10 +2046,10 @@ documentation and for contributing the |\@selective@sanitize| macro.
% Load \LaTeX\ primitives if necessary and provide information.
% \begin{macrocode}
\ifx\ProvidesFile\@undefined
- \message{2005/08/12 v2.5d key=value parser (HA)}
+ \message{2005/11/25 v2.5e key=value parser (HA)}
\input xkvtxhdr
\else
- \ProvidesFile{xkeyval.tex}[2005/08/12 v2.5d key=value parser (HA)]
+ \ProvidesFile{xkeyval.tex}[2005/11/25 v2.5e key=value parser (HA)]
\@addtofilelist{xkeyval.tex}
\fi
% \end{macrocode}
@@ -3996,7 +3994,7 @@ documentation and for contributing the |\@selective@sanitize| macro.
%<*xkvlatex>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{xkeyval}
- [2005/08/12 v2.5d package option processing (HA)]
+ [2005/11/25 v2.5e package option processing (HA)]
% \end{macrocode}
% Initializations. Load |xkeyval.tex|, adjust some catcodes to define
% internal macros and initialize the |\DeclareOptionX*| working macro.
@@ -4739,11 +4737,11 @@ documentation and for contributing the |\@selective@sanitize| macro.
% provide information.
% \begin{macrocode}
\ifx\ProvidesFile\@undefined
- \message{2005/02/22 v1.5 PSTricks specialization of xkeyval (HA)}
+ \message{2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)}
\ifx\XKeyValLoaded\endinput\else\input xkeyval \fi
\else
\ProvidesFile{pst-xkey.tex}
- [2005/02/22 v1.5 PSTricks specialization of xkeyval (HA)]
+ [2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)]
\@addtofilelist{pst-xkey.tex}
\RequirePackage{xkeyval}
\fi
@@ -4767,13 +4765,14 @@ documentation and for contributing the |\@selective@sanitize| macro.
% \end{macro}
% \begin{macro}{\psset}
% \changes{v1.8b}{2004/12/22}{Properly expand \cs{pst@famlist}}
+% \changes{v2.5e}{2005/11/25}{Added \cs{ignorespaces} as in \texttt{pstricks.tex}}
% \begin{macro}{\pss@t}
% Set keys. Uses \pf{xkeyval}'s |\setkeys+|.
% \begin{macrocode}
\def\psset{%
\expandafter\@testopt\expandafter\pss@t\expandafter{\pst@famlist}%
}
-\def\pss@t[#1]{\setkeys+[psset]{#1}}
+\def\pss@t[#1]#2{\setkeys+[psset]{#1}{#2}\ignorespaces}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4798,7 +4797,7 @@ documentation and for contributing the |\@selective@sanitize| macro.
%<*pxklatex>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{pst-xkey}
- [2005/02/22 v1.5 package wrapper for pst-xkey.tex (HA)]
+ [2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)]
% \end{macrocode}
% Load required package.
% \begin{macrocode}
@@ -5572,11 +5571,19 @@ actually used. They are not expanded during option processing.\\
year = 2003
}
-@BOOK{companion,
- author = {Frank Mittelbach and Michel Goossens and Johannes Braams and David Carlisle and Chris Rowley},
- title = {The {\LaTeX} {C}ompanion, {S}econd {E}dition},
- year = {2004},
- publisher = {{Addison-Wesley}}
+@book{companion,
+ author = {Frank Mittelbach and Michel Goossens},
+ title = {The {\LaTeX} Companion},
+ edition = 2,
+ note = {With Johannes Braams, David Carlisle, and Chris Rowley},
+ series = {Tools and Techniques for Computer Typesetting},
+ publisher = {Addison-Wesley},
+ address = {Boston, Massachusetts},
+ year = 2004,
+ pagenums = {1120},
+ bibliography = {yes},
+ index = {yes},
+ isbn = {0-201-36299-6}
}
@MISC{keyval,