diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex | 229 |
1 files changed, 191 insertions, 38 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex index 0e84fc54c33..3e240f8f973 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/english/tocbasic.tex @@ -1,48 +1,59 @@ +\immediate\write17{^^J% ++----------------------------------------------------------------------^^J% +| WARNING (`tocbasic.tex'):^^J% ++----------------------------------------------------------------------^^J% +| YOU SHOULD NOTE, THAT THIS IS NOT AN OFFICIAL RELEASE!^^J% +| THIS VERSION IS INTENDED TO BE USED FOR TESTING ONLY!^^J% +| USAGE FOR PURPOSES OTHER THAN INTENDED IS DANGEROUS!^^J% +| DON'T EXPECT ANY SUPPORT FOR THIS VERSION!^^J% ++----------------------------------------------------------------------^^J% +} %% %% This is file `tocbasic.tex', -%% generated with the docstrip utility. +%% generated with the docstrip utility, extended by scrdocstrip. %% %% The original source files were: %% %% tocbasic.dtx (with options: `doc') %% -%% Copyright (c) 2007-2012 -%% Markus Kohm and any individual authors listed elsewhere in this file. +%% Copyright (c) 2008-2013 Markus Kohm [komascript at gmx info] %% %% This file was generated from file(s) of the KOMA-Script bundle. %% --------------------------------------------------------------- %% -%% This work may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, version 1.3c of the license. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later and of this work. +%% It may be distributed under the conditions of the +%% LaTeX Project Public License in the version distributed together +%% with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'. %% -%% This work has the LPPL maintenance status "author-maintained". +%% This file may only be distributed together with a copy of the +%% KOMA-Script bundle. You may however distribute the +%% KOMA-Script bundle without all such generated files. See also +%% `lppl.txt' or `lppl-de.txt' for additional information. %% -%% The Current Maintainer and author of this work is Markus Kohm. +%% The list of files belonging to KOMA-Script distribution is given in +%% the file `manifest.txt'. See also `lppl.txt' or `lppl-de.txt' for +%% additional information. %% -%% This file may only be distributed together with the files -%% `scrlogo.dtx' and `tocbasic.dtx'. You may however distribute the files -%% `scrlogo.dtx' and `tocbasic.dtx' without this file. -%% See also `tocbasic.dtx' for additional information. +%% If this file is a beta version, you may not be allowed to distribute +%% it. Look at the comments below to see if this is the case. %% -%% If this file is a beta version, you are not allowed to distribute it. +%% English and German manuals are part of KOMA-Script bundle. +%% ---------------------------------------------------------- %% -%% Currently there is only a short english manual at `tocbasic.dtx', that -%% should also be found as `tocbasic.pdf'. +%% See `README'. %% %% The KOMA-Script bundle (but maybe not this file) was based upon the -%% LaTeX2.09 Script family created by Frank Neukam 1993 and the LaTeX2e -%% standard classes created by The LaTeX3 Project 1994-1996. +%% LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e +%% standard classes created by The LaTeX3 Project 1994-1996. You may +%% find a complete unmodified copy of LaTeX2e at +%% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>. %% -%%% From File: tocbasic.dtx -\def\tocbasicversion{2012/04/04 v3.10b} -\ProvidesFile{tocbasic.tex} - [\tocbasicversion\space KOMA-Script package - (manual)% - ] +%%% From File: $Id: tocbasic.dtx 1533 2013-12-10 18:06:14Z mjk $ +\ProvidesFile{tocbasic.tex}[% + 2013/12/19 v3.12 KOMA-Script + package + (handling toc-files)% +] \translator{Markus Kohm} @@ -65,7 +76,7 @@ the list of figures and the list of tables and thereby allow other classes or packages some types of controll about these. For examples package \Package{tocbasic} delegates language control of all these tables and lists of contents to package \Package{babel}\IndexPackage{babel}%^^A -(see \cite{package:babel})%^^A +\ (see \cite{package:babel})%^^A . So automatic change of language will be provides inside all these tables and lists of contents. Using \Package{tocbasic} will exculpate authors of classes and packages from implementation of such @@ -333,37 +344,89 @@ Commands, that shouldn't be expanded while writing, should be prefixed by \EndIndex{Cmd}{addtoeachtocfile}% \begin{Declaration} - \Macro{addcontentslinetoeachtocfile}\OParameter{owner}\Parameter{level}% - \Parameter{contentsline} + \Macro{addxcontentsline}% + \Parameter{extension}\Parameter{level}\OParameter{number}%^^A + \Parameter{text} +\end{Declaration} +\BeginIndex{Cmd}{addxcontentsline}% +The command \Macro{addxcontentsline} +adds an entry of given \PName{level} to toc-file with \PName{extension}. If +the \Parameter{number} is empty or omitted the entry won't have a number for +the entry with the given \PName{text}. Entries without number may be left +aligned to the number of the numbered entries of the same \PName{level} or +indented like the text of the numbered entries of the same \PName{level}, +depending on the \PValue{numberline} feature. + +\begin{Example} + Maybe you are not using a \KOMAScript{} class but need a not numbered + chapter with entry to the table of contents. This may be done using +\begin{lstcode} + \cleardoublepage + \csname phantomsection\endcsname + \addxcontentsline{toc}{chapter} + {Chapters without Numbers} + \chapter*{Chapters without Numbers} + \markboth{Chapters without Numbers}{} +\end{lstcode} + As you can see, you simply have to replace usual \Macro{addcontentsline} by + \Macro{addxcontentsline} to support the \Package{tocbasic} feature + \PValue{numberline}. +\end{Example} + +Note, that \Macro{addxcontentsline} uses +\Macro{add\PName{level}\PName{extension}entry} if such a macro exists and +\Macro{tocbasic@addxcontentsline} otherwise. Therefore you cannot define +a macro \Macro{add\PName{level}\PName{extension}entry} using +\Macro{addxcontentsline} but \Macro{tocbasic@addxcontentsline}. + +It is recommended to use \Macro{addxcontentsline} instead of +\Macro{addcontentsline} whenever possible.% +\EndIndex{Cmd}{addxcontentsline} + +\begin{Declaration} + \Macro{addcontentslinetoeachtocfile}\OParameter{owner}\Parameter{level}%^^A + \Parameter{contentsline}\\ + \Macro{addxcontentslinetoeachtocfile}\OParameter{owner}%^^A + \Parameter{level}\OParameter{number}\Parameter{text} \end{Declaration} \BeginIndex{Cmd}{addcontentslinetoeachtocfile}% -This command +\BeginIndex{Cmd}{addxcontentslinetoeachtocfile}% +The first command is something like \Macro{addcontentsline} from \LaTeX{} kernel. In difference to that it writes the \PName{contentsline} not only into one file, but into all files of all known file extensions or of all known file extensions of a given owner. + +The Command \Macro{addxcontentslinetoeachtocfile}%^^A +\ is similar but uses +\Macro{addxcontentsline} instead of \Macro{addcontentsline} and +therefore supports \Package{tocbasic} feature \PValue{numberline}. \begin{Example} You are a class author and want to write the chapter entry not only to the table of contents toc-file but to all toc-files, while \texttt{\#1} is the title, that should be written to the files. \begin{lstcode} - \addcontentslinetoeachtocfile{chapter}{% - \protect\numberline{\thechapter}#1} + \addxcontentslinetoeachtocfile + {chapter}[\thechapter]{#1}% \end{lstcode} In this case the current chapter number should be expanded while writing into the file. So it isn't protected from expansion using \Macro{protect}. \end{Example} -While writing -\Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} is the file -extension of the file into which \PName{contentsline} will be written. +While writing \Macro{@currext}\IndexCmd{@currext}\important{\Macro{@currext}} +is the file extension of the file into which \PName{contentsline} will be +written. + +It is recommended to use \Macro{addxcontentslinetoeachtocfile} instead +of \Macro{addcontentslinetoeachtocfile} whenever possible. +\EndIndex{Cmd}{addxcontentslinetoeachtocfile}% \EndIndex{Cmd}{addcontentslinetoeachtocfile}% \begin{Declaration} - \Macro{listoftoc}\OParameter{list of title}\Parameter{extension} + \Macro{listoftoc}\OParameter{list of title}\Parameter{extension}%^^A \\ - \Macro{listoftoc*}\Parameter{extension} + \Macro{listoftoc*}\Parameter{extension}%^^A \\ - \Macro{listofeachtoc}\OParameter{owner} + \Macro{listofeachtoc}\OParameter{owner}%^^A \\ \Macro{listof\PName{file-extension}name} \end{Declaration} @@ -603,6 +666,11 @@ features. \Package{tocbasic} does know following features: \OptionValue{listof}{numbered}\important{\OptionValue{listof}{numbered}}% \IndexOption{listof~=\PValue{numbered}} for all file extensions of the owner \PValue{float}. +\item[\texttt{numberline}] \leavevmode\ChangedAt{v3.12}{\Package{tocbasic}}% + redefines \Macro{nonumberline} to use \Macro{numberline}. With this the not + numbered entries generated by \KOMAScript{} or using \Macro{nonumberline} at + the very beginning of the last argument of \Macro{addcontentline} will also + be indented like numbered entries of the same type. \item[\texttt{onecolumn}] \leavevmode\ChangedAt{v3.01}{\Package{tocbasic}}% typesets the corresponding table of contents or list of something with internal one column mode of @@ -843,6 +911,18 @@ toc-entry, and running head, if it was defined. If it was not defined it will be defined and used in \Macro{tocbasic@listhead} automatically. \EndIndex{Cmd}{tocbasic@listhead@\PName{extension}}% +\begin{Declaration} + \Macro{tocbasic@addxcontentsline}% + \Parameter{extension}\Parameter{level}\Parameter{number}\Parameter{text} +\end{Declaration} +\BeginIndex{Cmd}{tocbasic@addxcontentsline}% +This command +uses \Macro{addcontentsline} to either create a numbered or not numbered text +entry to toc-file with given \PName{extension}. Note, that all parameters of +\Macro{tocbasic@addxcontentsline} are mandatory. But you may use an +empty \PName{number} argument, if you don't want a number. +\EndIndex{Cmd}{tocbasic@addxcontentsline} + \section{A Complete Example} \label{sec:tocbasic.example} @@ -1137,6 +1217,79 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. additionally, then a non-floating environment \Environment{remarkbox-} will be also defined. You may use \Macro{caption}\IndexCmd{caption} inside of that non-floating environment as usual for floating environments. + \hyperref[tab:tocbasic.comparison]{Figure~\ref*{tab:tocbasic.comparison}} + showes a comparison of the commands, counters and environments of the + example environment \Environment{remarkbox} and of the commands, counters + and environments for figures.% + \begin{table} + \centering + \caption{Comparison of example environment \Environment{remarkbox} + and environment \Environment{figure}} + \label{tab:tocbasic.comparison} + \begin{tabularx}{\textwidth}{ll>{\raggedright}p{6em}X} + \toprule + \Environment{remarkbox} & \Environment{figure} + & options of \Macro{DeclareNewTOC} & short description \\[1ex] + \midrule + \Environment{remarkbox} & \Environment{figure} + & \Option{type}, \Option{float} + & floating environments of the respective types\\[1ex] + \Environment{remarkbox*} & \Environment{figure*} + & \Option{type}, \Option{float} + & columns spanning floating environments of the respective types\\[1ex] + \Counter{remarkbox} & \Counter{figure} + & \Option{type}, \Option{float} + & counter used by \Macro{caption}\\[1ex] + \Macro{theremarkbox} & \Macro{thefigure} + & \Option{type}, \Option{float} + & output command to the respective counters\\[1ex] + \Macro{remarkboxformat} & \Macro{figureformat} + & \Option{type}, \Option{float} + & formating command to the respective counters used by + \Macro{caption}\\[1ex] + \Macro{remarkboxname} & \Macro{figurename} + & \Option{type}, \Option{float}, \Option{name} + & names used in the label of \Macro{caption}\\[1ex] + \Macro{listofremarkboxes} & \Macro{listoffigures} + & \Option{types}, \Option{float} + & command to show the list of the respective environments\\[1ex] + \Macro{listremarboxname} & \Macro{listfigurename} + & \Option{type}, \Option{float}, \Option{listname} + & heading text of the respective list \\[1ex] + \Macro{fps@remarkbox} & \Macro{fps@figure} + & \Option{type}, \Option{float}, \Option{floattype} + & numeric float type for order perputation\\[1ex] + \File{lor} & \File{lof} + & + & file extension of the helper file of the respective list \\ + \bottomrule + \end{tabularx} + \end{table} + + And now a possible usage of the example environment: +\begin{lstcode} + \begin{remarkbox} + \centering + Equal should be typeset equally + and with equal formatting. + \caption{First theorem of typography} + \label{rem:typo1} + \end{remarkbox} +\end{lstcode} + A segment of an example page with this environment could be: + \begin{center}\footnotesize + \begin{tabular} + {|!{\hspace{.1\linewidth}}p{.55\linewidth}!{\hspace{.1\linewidth}}|} + \\ + \centering + Equal should be typeset equally + and with equal formatting.\\[\abovecaptionskip] + {% + \usekomafont{caption}\footnotesize{\usekomafont{captionlabel}% + Remark 1: }First theorem of typography + }\\ + \end{tabular}% + \end{center}% \end{Example} \EndIndex{Cmd}{DeclareNewTOC}% \EndIndex{Package}{tocbasic}% |