diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx | 365 |
1 files changed, 23 insertions, 342 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx b/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx index 5c3434b8787..217a6be58c1 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrlayer-notecolumn.dtx @@ -1,8 +1,8 @@ -% \CheckSum{1577} +% \CheckSum{1578} % \iffalse^^A meta-comment % ====================================================================== % scrlayer-notecolumn.dtx -% Copyright (c) Markus Kohm, 2013 +% Copyright (c) Markus Kohm, 2013-2014 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -20,7 +20,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrlayer-notecolumn.dtx -% Copyright (c) Markus Kohm, 2013 +% Copyright (c) Markus Kohm, 2013-2014 % % Diese Datei ist Teil der LaTeX2e KOMA-Script-Sammlung. % @@ -57,17 +57,17 @@ % Right brace \} Tilde \~} % % \iffalse^^A meta-comment -%<identify>%%% From File: $Id: scrlayer-notecolumn.dtx 1514 2013-11-15 08:23:09Z mjk $ (identify) -%<init>%%% From File: $Id: scrlayer-notecolumn.dtx 1514 2013-11-15 08:23:09Z mjk $ (init) -%<options>%%% From File: $Id: scrlayer-notecolumn.dtx 1514 2013-11-15 08:23:09Z mjk $ (options) -%<body>%%% From File: $Id: scrlayer-notecolumn.dtx 1514 2013-11-15 08:23:09Z mjk $ (body) +%<identify>%%% From File: $Id: scrlayer-notecolumn.dtx 1760 2014-06-03 08:28:36Z kohm $ (identify) +%<init>%%% From File: $Id: scrlayer-notecolumn.dtx 1760 2014-06-03 08:28:36Z kohm $ (init) +%<options>%%% From File: $Id: scrlayer-notecolumn.dtx 1760 2014-06-03 08:28:36Z kohm $ (options) +%<body>%%% From File: $Id: scrlayer-notecolumn.dtx 1760 2014-06-03 08:28:36Z kohm $ (body) %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup - \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#4/#3/#2}} - \filedate$Date: 2013-11-15 09:23:09 +0100 (Fr, 15. Nov 2013) $ + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2014-06-03 10:28:36 +0200 (Tue, 03 Jun 2014) $ \def\filerevision$#1: #2 ${\gdef\filerevision{v0.1.#2}} - \filerevision$Revision: 1514 $ + \filerevision$Revision: 1760 $ \endgroup \ProvidesFile{scrlayer-notecolumn.dtx}[\filedate\space\filerevision\space %</dtx> @@ -87,9 +87,10 @@ \input scrdocstrip.tex \@@input scrkernel-version.dtx \@@input scrstrip.inc -% Some time we will need: -% \KOMAdefVariable{COPYRIGHTFROM}{2013} - \KOMAdefVariable{SCRLAYERVERSION}{\space\space\filedate\space\filerevision}% + \KOMAdefVariable{COPYRIGHTFROM}{2013} + \KOMAdefVariable{SCRLAYERVERSION}{% + \space\space\filedate\space\filerevision\space KOMA-Script + }% \expandafter\let\csname ifbetawas\expandafter\endcsname \csname ifbeta\endcsname \expandafter\let\csname ifbeta\expandafter\endcsname @@ -106,9 +107,6 @@ \from{scrlayer-notecolumn.dtx}{interface,trace,notecolumn,final}% \from{scrlogo.dtx}{logo}% }% - \file{scrlayer-notecolumn.tex}{% - \from{scrlayer-notecolumn.dtx}{doc}% - }% } \expandafter\let\csname ifbeta\expandafter\endcsname \csname ifbetawas\endcsname @@ -185,6 +183,11 @@ \begin{document} \maketitle + \begin{abstract} + This is only the implementation documentation of package + \Package{scrlayer-notecolumn}. See the English or German \KOMAScript{} + manual for more information about usage of the package! + \end{abstract} \tableofcontents \DocInput{\filename} \PrintChanges @@ -196,331 +199,9 @@ % \selectlanguage{english} % % \changes{v0.0}{2013/04/26}{start of interface} -% \let\restorechapter\chapter -% \let\chapter\section -% \let\section\subsection -% \let\subsection\subsubsection -% \iffalse -%<*dtx|doc> -% \fi - -\chapter[{End User Interface \Package{scrlayer-notecolumn}}]{End User - Interface \Package{scrlayer-notecolumn}\footnote{This is not a translation - of the corresponding chapter of the German \KOMAScript{} manual but the - tentative and primary implementation manual of package - \Package{scrlayer-notecolumn}. As long as \Package{scrlayer-notecolumn} is - primary a proof of concept this doesn't matter. But nevertheless, a - German to English translator would still be welcome.}} -\label{sec:scrlayer.notecolumn} -%\iffalse -\labelbase{scrlayer-notecolumn} -%\fi - -Sometimes documents need an additional notes column beside the main text -column and maybe beside the marginal note column. Problematicly may be -having page breaks inside the notes column. This package provides a -solution based on the layer interface of \Package{scrlayer}. You may -define several notes columns, each of them with page breaks -inside. It supports automatic page break inside of notes and recognises -note collisions and solve them by moving notes. - -The idea of this package raised while an e-mail contact with Heiner -Richter from FH~Stralsund, who told me of a book project, and asked -whether or not such a functionality may be added to another package of -mine easily. It couldn't, but design and implementation of a first test -alpha of \Package{scrlayer-notecolumn} has been done in about three -hours. So maybe it was a really good idea to ask me the question. - -%\iffalse^^A meta-comment -\begin{Declaration} -%\fi^^A meta-comment -% \DescribeMacro{\DeclareNoteColumn} -% \DescribeMacro{\DeclareNewNoteColumn} -% \DescribeMacro{\ProvideNoteColumn} -% \DescribeMacro{\RedeclareNoteColumn} -% The command - \Macro{DeclareNoteColumn}% - \OParameter{option list}\Parameter{note column name}% -%\iffalse^^A meta-comment - \\ - \Macro{DeclareNewNoteColumn}% - \OParameter{option list}\Parameter{note column name}\\%^^A - \Macro{ProvideNoteColumn}% - \OParameter{option list}\Parameter{note column name}\\%^^A - \Macro{RedeclareNoteColumn}% - \OParameter{option list}\Parameter{note column name}% -\end{Declaration} -\BeginIndex{Cmd}{DeclareNoteColumn}% -\BeginIndex{Cmd}{DeclareNewNoteColumn}% -\BeginIndex{Cmd}{ProvideNoteColumn}% -\BeginIndex{Cmd}{RedeclareNoteColumn}% -Command \Macro{DeclareNoteColumn} -%\fi^^A meta-comment -may be used to declare a note column. Each note column is referenced by its -name, defined by the obligatory argument \PName{note column name}. A note -column vertically span the text area. - -By default its horizontal position is the current position of the marginal -note column. It also regards \Macro{reversemarginpar} and -\Macro{normalmarginpar}, while output of a note. Note that this is not the -same like making a margin note. The default width is -\Length{marginparwidth}. But you may use the optional argument \PName{option - list} to change this behaviour. - -The \PName{option list} is a comma-separated list of -\texttt{\PName{key}=\PName{value}} options. Currently the following -\PName{key}s are supported: -\begin{labeling}[\ --]{\KOption{position}\PName{horizontal offset}} -\item [\KOption{font}\PName{font declaration}] set the initial font attributes - to be used for the note column. Everything, that is allowed to be set by - \Macro{setkomafont} or \Macro{addtokomafont} can be used as - \PName{font declaration}. Note, that - \Macro{normalfont}\Macro{normalsize} will be used - before. So you don't need one of them at your own initialisation. -\item [\Option{marginpar}] set up \Option{position} and \Option{width} to use - the marginal note column of \Macro{marginpar}. -\item [\Option{normalmarginpar}] set up \Option{position} and \Option{width} - to use the normal marginal note column and ignore \Macro{reversemarginpar} - and \Macro{normalmarginpar}. -\item [\KOption{position}\PName{horizontal offset}] set up the horizontal - offset of the note column from the left edge of the paper. The - \PName{horizontal offset} can be either a \LaTeX{} length, a \TeX{} - dimension, a \TeX{} skip, a length value, or a dimensional expression using - \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/} and parenthesis (see - \cite[section~3.5]{manual:eTeX} for more information about dimensional - expressions). The value will be calculated at usage time not at definition - time. So you may even use more complex constructs like: -\begin{lstcode} - \ifodd\value{page} - \oddsidemargin+1in - +\textwidth+\marginparsep - \else - \evensidemargin+1in - -\marginparsep - -\marginparwidth - \fi -\end{lstcode} -\item [\Option{reversemarginpar}] set up \Option{position} and \Option{width} - to use the reverse marginal note column and ignore \Macro{reversemarginpar} - and \Macro{normalmarginpar}. -\item [\KOption{width}\PName{size}] set up the horizontal size of the note - column. You can use the same values for \PName{size} like for - \PName{horizontal offset} of option \Option{position}. -\end{labeling} - -You may use as much note columns as \LaTeX{} provides free box registers, -because every note column needs one box register. You may use package -\Package{etex} to increase the normal amount of box registers from 256 to -32768. This should be enough to avoid the ``\texttt{no room for - \Macro{newbox}}'' error. - -The implementation of note columns uses foreground layers from package -\Package{scrlayer}. Every \Macro{DeclareNoteColumn} generates a layer and adds -this layer to the pseudo page style \Pagestyle{@everystyle@}. Theoretically -you may modify the generated layer, but it is recommended not to modify them. - -Overlapping of different note columns is allowed. There's one predefined note -column named ``\texttt{marginpar}''. - -% \iffalse^^A meta-comment -\BeginIndex{FontElement}{notecolumn.\PName{note column name}}% -% \fi^^A meta-comment -Note, that if you change the initial font using -\begin{quote} - \Macro{setkomafont}\linebreak[1]\PParameter{marginnote.\PName{note column - name}}\Parameter{font declaration} -\end{quote} -or -\begin{quote} - \Macro{addtokomafont}\linebreak[1]\PParameter{marginnote.\PName{note column - name}}\Parameter{font declaration} -\end{quote} -the font of all succeeding note column outputs would change. This could make it -hard to find out, which notes will be affected by the change. -% \iffalse^^A meta-comment -See \autoref{sec:maincls.textmarkup}, -\autopageref{desc:maincls.cmd.setkomafont} for more information about -\Macro{setkomafont} and \Macro{addtokomafont}.% -\EndIndex{FontElement}{notecolumn.\PName{note column name}}% -% \fi^^A meta-comment - -The difference between \Macro{DeclareNoteColumn} and the other commands is, -that \Macro{DeclareNoteColumn} defines the note column independent whether a -note column with the same name has already been defined or -not. \Macro{DeclareNewNoteColumn} defined only note columns which names are -not yet used for another note column. It's an error to use it with an already -used \PName{note column name}. \Macro{ProvideNoteColumn} is like -\Macro{DeclareNewNoteColumn}, but if the \PName{note column name} is already -used for a note column nothing happens. \Macro{RedeclareNoteColumn} may be -used to declare a note column with a name, that is already used. Using it with -a new name is an error. -%\iffalse^^A meta-comment -\EndIndex{Cmd}{RedeclareNoteColumn}%^^A -\EndIndex{Cmd}{ProvideNoteColumn}%^^A -\EndIndex{Cmd}{DeclareNewNoteColumn}%^^A -\EndIndex{Cmd}{DeclareNoteColumn}%^^A -%\fi^^A meta-comment - -%\iffalse^^A meta-comment -\begin{Declaration} -%\fi^^A meta-comment -% \DescribeMacro{\makenote} -% The command - \Macro{makenote}% - \OParameter{note column name}\Parameter{note text} -%\iffalse^^A meta-comment -\end{Declaration} -\BeginIndex{Cmd}{makenote}% -This command -%\fi^^A meta-comment -may be used to make a new note. The note will be written to a helper file with -extension \File{.slnc} in this run. In the next run, it will be -typeset. Normally it will be typeset with the same vertical position, that -would be used for a \Macro{parbox[t]}, but horizontally moved to the note -column. Collisions at this position of this note column (but not of other note -columns) will be recognised. In such a case the note may be moved down and -even to another page. Automatic page breaks at the note columns are -supported. This is something different to \Macro{marginpar}, -\Macro{marginline} (\KOMAScript{} classes), or \Macro{marginnote} (package -\Package{marginnote}). - -Note, that after changing the document, at least two \LaTeX{} runs are needed -to move the note to its final position. - -Note, that fragile commands should be protected to avoid error messages while -writing or reading the helper file. - -Note, that \Package{scrlayer-notecolumn} needs only one helper file for all -note columns together. You should not edit or change that helper file, because -the syntax is fragile. It won't be read using \Macro{input} but -\Macro{read}. Because of this, line breaks, empty lines and \Macro{par} should -be avoided. - -Currently it is unknown where you may use \Macro{makenote} and where not. But -you must not use \Macro{makenote} inside of \Macro{makenote}! - -The default for the optional argument \PName{makenote} is \PValue{marginpar}, -that is the \PName{note column name} of the pre-defined note column. -%\iffalse^^A meta-comment -\EndIndex{Cmd}{makenote} -%\fi^^A meta-comment - -%\iffalse^^A meta-comment -\begin{Declaration} - \KOption{autoclearnotecolumns}\PName{simple switch}\\ -%\fi^^A meta-comment -% \DescribeMacro{\clearnotecolumn} -% The commands - \Macro{clearnotecolumn}\OParameter{name of a note column}% -% \iffalse^^A meta-comment - \\ -% \fi^^A meta-comment -% and - \Macro{clearnotecolumns}\OParameter{list of note column names} -%\iffalse^^A meta-comment -\end{Declaration} -\BeginIndex{Cmd}{clearnotcolumn}% -\BeginIndex{Cmd}{clearnotcolumns}% -The commands -%\fi^^A meta-comment -may be used to output all hanging notes for either one or several note -columns. With \Macro{clearnotecolumn} only the notes of the note column with -the given \PName{name of a note column} will be output. If you omit the -optional argument (this is not the same like using an empty value!) note -column \PValue{marginnote} will be used. - -With \Macro{clearnotecolumns} the notes of all note columns of the comma -separated \PName{list of note column names} will be output. If you omit the -optional Argument or if the optional Argument is empty (or start with -\Macro{relax}) the notes of all note columns will be output. - -Macro \Macro{clearpage} will be used to output hanging notes and several -\LaTeX{} runs may be needed to terminate with the correct number of -\Macro{clearpage} for the whole document. You will get the message ``\LaTeX{} -Warning: Label(s) may have changed. Rerun to get cross-references right.'' as -long as the process hasn't been terminated. - -But normally you don't need to us \Macro{clearnotecolum} or -\Macro{clearnotecolumns} yourself. Because by default option -\Option{autoclearnotecolumns} is switched on, which means, that -\Macro{clearnotecolumns} will be done at every \Macro{clearpage}. You may -change this, switching off \Macro{autoclearnotecolumns} using one of the -values for simple switches. - -Note, that it is not allowed to use \Macro{clearnotecolumn} or -\Macro{clearnotecolumns} inside a note. You can use these commands only inside -the main text of the document.% -%\iffalse^^A meta-comment -\EndIndex{Cmd}{clearnotcolumns}% -\EndIndex{Cmd}{clearnotcolumn}% -%\fi^^A meta-comment - -%\iffalse^^A meta-comment -\begin{Declaration} -%\fi^^A meta-comment -% \DescribeMacro{\syncwithnotecolumn} -% The commands - \Macro{syncwithnotecolumn}\OParameter{name of a note column}% -% \iffalse^^A meta-comment - \\ -% \fi^^A meta-comment -% and - \Macro{syncwithnotecolumns}\OParameter{list of note column names}% -%\iffalse^^A meta-comment -\end{Declaration} -\BeginIndex{Cmd}{syncwithnotecolumn}% -\BeginIndex{Cmd}{syncwithnotecolumns}% -These commands -%\fi^^A meta-comment -may be used to synchronise the vertical position of the main text with one or -several note columns. If you use the optional argument of -\Macro{syncwithnotecolumn} it should be one \PName{name of a note column}. If -you omit it, \PValue{marginpar} will be used as the \PName{name of a note - column}. Usage of \Macro{syncwithnotecolumn} is exactly the same like usage -of \Macro{syncwithnotecolumns} with exactly one \PName{name of a note column}. - -The optional argument of \Macro{syncwithnotecolumns} is a comma-separated list -of names of note columns. If you omit this optional argument or if you use an -empty argument or if the argument starts with \Macro{relax} synchronisation -will be done with all declared note columns. - -Synchronisation with a note column means, that the current position of the -main text will be changed to be the current vertical position of the note -column after cleaning the note column. This differs in several point from -cleaning a note column: -\begin{itemize} -\item After cleaning a note column the text position would change to be at a - new page, even if the note column doesn't fill the whole page - before. Synchronisation will change the vertical position just after the - last vertical position of the note column. -\item Cleaning a note column needs less \LaTeX{} runs than synchronising a - note column. -\end{itemize} -Both, cleaning an synchronising a note column, uses the label mechanism of -\LaTeX{} without using \Macro{label}, \Macro{ref}, or \Macro{pageref} itself -(but \Macro{newlabel}). So you should have a look at \LaTeX{} rerun messages, -because of undefined or changed labels. - -Note, that it is not allowed to use \Macro{syncwithnotecolumn} or -\Macro{syncwithnotecolumns} inside a note. If you do so, you need endless -\LaTeX{} runs without reaching a final state. But synchronisation of several -note columns in the main text of a document will also synchronise the notes -columns with each others.% -%\iffalse^^A meta-comment -\EndIndex{Cmd}{syncwithnotecolumns} -\EndIndex{Cmd}{syncwithnotecolumn} -%\fi^^A meta-comment - - -%\iffalse -%</dtx|doc> -%\fi % % \StopEventually{} % -% \chapter{Implementation of \Package{scrlayer-notecolumn}} -% -% This section if for developers only. % % \iffalse %<*interface> @@ -676,12 +357,15 @@ columns with each others.% % \end{macrocode} % We need to add the layer to every page style. The easiest way to do this is % to add it to the pseudo layer page style \Pagestyle{@everystyle@}. +% \changes{v0.1.1681}{2014/02/05}{add the layer only once} % \begin{macrocode} - \AddLayersToPageStyle{@everystyle@}{notecolumn.#2}% + \IfLayerAtPageStyle{@everystyle@}{notecolumn.#2}{}{% + \AddLayersToPageStyle{@everystyle@}{notecolumn.#2}% % \end{macrocode} % On auto-removing the interface, the layer should be removed from % \Pagestyle{@everystyle@} and should be destroyed. % \begin{macrocode} + }% \scrlayerOnAutoRemoveInterface[scrlayer-notecolumn.sty]{% \RemoveLayersFromPageStyle{@everystyle@}{notecolumn.#2}% \DestroyLayer{notecolumn.#2}% @@ -1911,9 +1595,6 @@ columns with each others.% % \fi^^A meta-comment % % \Finale -% \let\subsection\section -% \let\section\chapter -% \let\chapter\restorechapter % \endinput % |