summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex1272
1 files changed, 697 insertions, 575 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex
index 76728b89e0d..603adeb934d 100644
--- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex
+++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrpage2.tex
@@ -40,28 +40,29 @@
%
% ----------------------------------------------------------------------
%
-% Kapitel über scrpage2 in der KOMA-Script-Anleitung
-% Verwaltet von Jens-Uwe Morawski (unterstützt von Markus Kohm)
+% Kapitel ueber scrpage2 in der KOMA-Script-Anleitung
+% Verwaltet von Jens-Uwe Morawski (unterstuetzt von Markus Kohm)
%
% ============================================================================
-\ProvidesFile{scrpage2.tex}[2008/07/10 KOMA-Script guide (chapter:scrpage2)]
+\ProvidesFile{scrpage2.tex}[2012/02/22 KOMA-Script guide (chapter:scrpage2)]
+
\translator{Jens-Uwe Morawski\and Karl-Heinz Zimmer\and Christoph Bier\and
Gernot Hassenpflug\and Markus Kohm}
-% date of translated german file: 2007/12/07
+% date of translated german file: 2012/02/22
\chapter{Adapting Page Headers and Footers with \Package{scrpage2}}
\labelbase{scrpage}
%
\BeginIndex{Package}{scrpage2}%
-As already mentioned in the two previous chapters, {\KOMAScript}
-includes a package to customise the document page header and footer.
-As of 2001, this package is no longer \Package{scrpage} but the much
+As already mentioned in the two previous chapters, {\KOMAScript} includes a
+package to customise the document page header and footer. As of 2001, this
+package is no longer \Package{scrpage}\IndexPackage{scrpage} but the much
improved and enhanced successor \Package{scrpage2}. Therefore, this
documentation describes only \Package{scrpage2}. The package
-\Package{scrpage} is obsolete.
+\Package{scrpage} is deprecated.
\begin{Explain}
In place of \Package{scrpage2} you can of course make use of
@@ -74,75 +75,65 @@ documentation describes only \Package{scrpage2}. The package
other document classes.
\end{Explain}
-Included as part of the basic functionality of \Package{scrpage2} are
-various predefined and configurable page styles.
\section{Basic Functionality}\label{sec:scrpage.basics}
\begin{Explain}% Introduction to headings
- To understand the following description, an overview of {\LaTeX}'s
- fairly involved header and footer mechanism is needed. The {\LaTeX}
- kernel defines the page styles \PValue{empty}, which produces a
- completely empty header and footer, and \PValue{plain}, which
- produces usually only a page number in the footer and an empty
- header. Apart from these, many document classes provide the style
- \PValue{headings}, which allows more complex style settings and
- running headings. The \PValue{headings} style often has a related
- variant, \PValue{myheadings}, which is similar except for switching
- off the running headings and reverting them to manual control by the
- user. A more detailed description is given in
- \autoref{sec:maincls.pageStyle} where it is also noted that some
- {\LaTeX} commands automatically switch to the page style
- \PValue{plain} for the current page, independent of what page style
- was chosen by the author, and consequently a document needs an
- appropriate \PValue{plain} page style.
-
- Therefore \Package{scrpage2} defines its own \PValue{plain} and
- \PValue{headings} page styles, named \PValue{scrplain} and
- \PValue{scrheadings}. The manual activation of \PValue{scrplain} is
- not necessary, since the activation of \PValue{scrheadings} takes
- care of it automatically. Only if one wants to use one's own page
- style in combination with \PValue{scrplain} must the page style
- \PValue{scrplain} be activated first, i.\,e., with
- \Macro{pagestyle}\Parameter{scrplain}%
- \Macro{pagestyle}\Parameter{personalPagestyle}.
+ To understand the following description, an overview of {\LaTeX}'s fairly
+ involved header and footer mechanism is needed. The {\LaTeX} kernel defines
+ the page styles \Pagestyle{empty}, which produces a completely empty header
+ and footer, and \Pagestyle{plain}, which produces usually only a page number
+ in the footer and an empty header. Apart from these, many document classes
+ provide the style \Pagestyle{headings}, which allows more complex style
+ settings and running
+ headings\Index{headings>running}\Index{headings>automatic}. The
+ \Pagestyle{headings} style often has a related variant,
+ \Pagestyle{myheadings}, which is similar except for switching off the
+ running headings\Index{headings>manual} and reverting them to manual control
+ by the user. A more detailed description is given in
+ \autoref{sec:maincls.pagestyle} where it is also noted that some {\LaTeX}
+ commands automatically switch to another page style\,---\,usually page style
+ \Pagestyle{plain}\,---\,for the current page.
\end{Explain}
-
-The original \PValue{headings} page style of the document class is
-available as \PValue{useheadings}. This re-definition is required
-since \Package{scrpage2} uses a different way to deal with automatic
-and manual headings. This way is more flexible and allows
-configurations which would usually prove difficult to implement for
-inexperienced users. The required commands to work with the
-\Package{scrpage2} implementation are introduced at the end of
-\autoref{sec:scrpage.basics.buildIn} and the beginning of
-\autoref{sec:scrpage.basics.mark}.
+
+Package \Package{scrpage2} doesn't distinguish between page styles with
+automatic, running headings and page styles with manual headings. The way to
+deal with automatic and manual headings is independent from the page style and
+so the page style is independent from the choice of automatic or manual
+headings. More information about this in \autoref{sec:scrpage.basics.mark}.
+
+
\subsection{Predefined Page Styles}\label{sec:scrpage.basics.buildIn}
+
+One of the basic features of \Package{scrpage2} is a set of predefined,
+configurable page styles.
+
% \lehead ...
% scrheadings
% \headmark \pagemark
\begin{Declaration}
- \PValue{scrheadings}\\
- \PValue{scrplain}
+ \Pagestyle{scrheadings}\\
+ \Pagestyle{scrplain}
\end{Declaration}%
-\BeginIndex{Pagestyle}{scrheadings}\BeginIndex{Pagestyle}{scrplain}%
+\BeginIndex{Pagestyle}{scrheadings}%
+\BeginIndex{Pagestyle}{scrplain}%
\Index{page>style}%
%
Package \Package{scrpage2} delivers its own page style, named
-\PValue{scrheadings}, which can be activated with the
-\Macro{pagestyle}\PParameter{scrheadings}. When this page style is in
-use, an appropriate \PValue{scrplain} page style is used for the
-\PValue{plain} page style. In this case \emph{appropriate} means that
-this new \PValue{plain} page style is also configureable by the
-commands introduced in \autoref{sec:scrpage.basics.format}, which, for
-example, configure the header and footer width. Neither the
-activation of \PValue{scrheadings} nor the attendant change to the
-\PValue{plain} page style influences the mode of manual or automatic
-headings (see \autoref{sec:scrpage.basics.mark}). The
-\PValue{scrplain} page style can also be activated directly with
-\Macro{pagestyle}.
+\Pagestyle{scrheadings}, which can be activated with the
+\Macro{pagestyle}\PParameter{scrheadings}. When this page style is in use, an
+appropriate \Pagestyle{scrplain} page style is used for the plain page style.
+In this case \emph{appropriate} means that this new plain page style is also
+configureable by the commands introduced in
+\autoref{sec:scrpage.basics.format}, which, for example, configure the header
+and footer width and complies within the basic layout. Neither the activation
+of \Pagestyle{scrheadings} nor the attendant change to the appropriate plain
+page style, \Pagestyle{scrplain}, influences the mode of manual or automatic
+headings\Index{headings>automatic}\Index{headings>manual} (see
+\autoref{sec:scrpage.basics.mark}). The \Pagestyle{scrplain} page style can
+also be activated directly with \Macro{pagestyle}.
\begin{Declaration}
\Macro{lehead}%
@@ -182,21 +173,45 @@ headings (see \autoref{sec:scrpage.basics.mark}). The
\Macro{ofoot}%
\OParameter{scrplain-outside}\Parameter{scrheadings-outside}
\end{Declaration}%
-\BeginIndex{Cmd}{lehead}\BeginIndex{Cmd}{cehead}\BeginIndex{Cmd}{rehead}%
-\BeginIndex{Cmd}{ihead}\BeginIndex{Cmd}{chead}\BeginIndex{Cmd}{ohead}%
-\BeginIndex{Cmd}{lohead}\BeginIndex{Cmd}{cohead}\BeginIndex{Cmd}{rohead}%
-\BeginIndex{Cmd}{lefoot}\BeginIndex{Cmd}{cefoot}\BeginIndex{Cmd}{refoot}%
-\BeginIndex{Cmd}{ifoot}\BeginIndex{Cmd}{cfoot}\BeginIndex{Cmd}{rfoot}%
-\BeginIndex{Cmd}{lofoot}\BeginIndex{Cmd}{cofoot}\BeginIndex{Cmd}{rofoot}%
-%
-The page styles include three boxes in both the header and the footer.
-The commands modifying the content of these boxes can be seen in
-\autoref{fig:scrpage.leheadetall}. Commands in the middle column
-modify the box contents on both odd and even pages.
+\BeginIndex{Cmd}{lehead}%
+\BeginIndex{Cmd}{cehead}%
+\BeginIndex{Cmd}{rehead}%
+\BeginIndex{Cmd}{ihead}%
+\BeginIndex{Cmd}{chead}%
+\BeginIndex{Cmd}{ohead}%
+\BeginIndex{Cmd}{lohead}%
+\BeginIndex{Cmd}{cohead}%
+\BeginIndex{Cmd}{rohead}%
+\BeginIndex{Cmd}{lefoot}%
+\BeginIndex{Cmd}{cefoot}%
+\BeginIndex{Cmd}{refoot}%
+\BeginIndex{Cmd}{ifoot}%
+\BeginIndex{Cmd}{cfoot}%
+\BeginIndex{Cmd}{rfoot}%
+\BeginIndex{Cmd}{lofoot}%
+\BeginIndex{Cmd}{cofoot}%
+\BeginIndex{Cmd}{rofoot}%
+The page style of \Package{scrpage2} are defined to have flexible configurable
+header and footer. To achieve this, the page styles include three boxes in
+both the header and the footer. The contents of these boxes may be modified
+easily. The commands modifying the content of these boxes can be seen in
+\autoref{fig:scrpage.leheadetall}. Commands in the middle column modify the
+box contents on both odd and even pages. All of the commands have an optional
+and a mandatory argument. The option Argument influences the content of
+corresponding box of the plain page style, \Pagestyle{scrplain}. The mandatory
+argument influences the content of the corresponding box of the page style
+\Pagestyle{scrheadings}.
\begin{figure}
- \centering
- \setlength{\unitlength}{1mm}\begin{picture}(100,65)(0,10)\small
+% \centering
+ \setcapindent{0pt}%
+ \begin{captionbeside}
+ [Commands for modification of \Package{scrpage2} page styles elements]%
+ {Commands for modification of page styles \Pagestyle{scrheadings} and
+ \Pagestyle{scrplain} and their relationship to header and footer
+ elements}
+ [l]
+ \setlength{\unitlength}{.95mm}\begin{picture}(100,65)(0,8)\small
\put(0,12){\dashbox{2}(40,56){even page}}
\put(60,12){\dashbox{2}(40,56){odd page}}
% items top left
@@ -252,70 +267,72 @@ modify the box contents on both odd and even pages.
\put(80,11){\makebox(0,0)[t]{\Macro{cofoot}}}
\put(95,11){\makebox(0,0)[t]{\Macro{rofoot}}}
\end{picture}
- \caption[Commands for modification of \Package{scrpage2} page styles
- elements]%
- {Commands for modification of page styles \PValue{scrheadings} and
- \PValue{scrplain} and their relationship to header and footer
- elements}
+ \end{captionbeside}
+% \caption[Commands for modification of \Package{scrpage2} page styles
+% elements]%
+% {Commands for modification of page styles \Pagestyle{scrheadings} and
+% \Pagestyle{scrplain} and their relationship to header and footer
+% elements}
\label{fig:scrpage.leheadetall}
\end{figure}
\begin{Example}
-If one wants the page number be placed in the middle of the
-footer, then following can be used:
-\begin{lstlisting}
+ If one wants the page number within \Pagestyle{scrheadings} be placed in the
+ middle of the footer, then following can be used:
+\begin{lstcode}
\cfoot{\pagemark}
-\end{lstlisting}
-The next example shows how to place both running heading and page
-number in the header; the running heading inside and the page number
-outside:
-\begin{lstlisting}
+\end{lstcode}
+ The next example shows how to place both running heading and page
+ number\Index{page>number}\Index{pagination} in the header; the running
+ heading\Index{headings} inside and the page number outside:
+\begin{lstcode}
\ohead{\pagemark}
\ihead{\headmark}
\cfoot{}
-\end{lstlisting}
-The command \Macro{cfoot}\PParameter{} is only required in order to
-empty the item in the middle of the footer, which normally contains
-the page number.
+\end{lstcode}
+ The command \Macro{cfoot}\PParameter{} is only required in order to
+ empty the item in the middle of the footer, which normally contains
+ the page number.
\end{Example}
The commands which are associated with only one item can be used for
more advanced settings.
\begin{Example}
-Assuming one has the order to write an annual report for one's
-company, one could use commands like this:
-\begin{lstlisting}
+ Assuming one has the order to write an annual report of a company, one could
+ use commands like this:
+\begin{lstcode}
\ohead{\pagemark}
\rehead{Annual Report 2001}
\lohead{\headmark}
\cefoot{TheCompanyName Inc.}
\cofoot{Department: Development}
-\end{lstlisting}
-In order to keep the data in the footer synchronized with the content
-of the document, the footer has to be updated using \Macro{cofoot}
-when a new department is discussed in the report.
+\end{lstcode}
+ In order to keep the data in the footer synchronized with the content
+ of the document, the footer has to be updated using \Macro{cofoot}
+ when a new department is discussed in the report.
\end{Example}
-As mentioned above, there is a new \PValue{plain} page style which
-corresponds to \PValue{scrheadings}. Since it should also be possible
-to customize this style, the commands support an optional argument
-with which the contents of the appropriate fields of this
-\PValue{plain} page style can be modified.
+As mentioned above, there is a new plain page style which corresponds to
+\Pagestyle{scrheadings}. Since it should also be possible to customize this
+style, the commands support an optional argument with which the contents of
+the appropriate fields of this plain page style can be modified.
\begin{Example}
-The position of the page number for the page style \PValue{scrheadings}
-can be declared as follows:
-\begin{lstlisting}
+ The position of the page number for the page style \Pagestyle{scrheadings}
+ can be declared as follows:
+\begin{lstcode}
\cfoot[\pagemark]{}
\ohead[]{\pagemark}
-\end{lstlisting}
-When the command \Macro{chapter}, after it has started a new page, now
-switches to the \PValue{plain} page style, then the page number is
-centered in the footer.
+\end{lstcode}
+ When the command \Macro{chapter}, after it has started a new page, now
+ switches to the page style \Pagestyle{plain}, then the page number is
+ centered in the footer.
\end{Example}
%
-\EndIndex{Pagestyle}{scrheadings}\EndIndex{Pagestyle}{scrplain}%
+\EndIndex{Pagestyle}{scrheadings}%
+\EndIndex{Pagestyle}{scrplain}%
+
\begin{Declaration}
\Macro{clearscrheadings}\\
@@ -325,39 +342,38 @@ centered in the footer.
\BeginIndex{Cmd}{clearscrheadings}%
\BeginIndex{Cmd}{clearscrplain}%
\BeginIndex{Cmd}{clearscrheadfoot}%
-If one wants to redefine both the page style \PValue{scrheadings} and
-the corresponding \PValue{plain} page style, frequently one must empty
+If one wants to redefine both the page style \Pagestyle{scrheadings} and
+the corresponding plain page style, frequently one must empty
some already occupied page elements. Since one rarely fills all items
with new content, in most cases several instructions with empty
parameters are necessary. With the help of these three instructions
the quick and thorough deletion is possible. While
\Macro{clearscrheadings} only deletes all fields of the page style
-\PValue{scrheadings}, and \Macro{clearscrplain} deletes all fields of
-the corresponding \PValue{plain} page style, \Macro{clearscrheadfoot}
+\Pagestyle{scrheadings}, and \Macro{clearscrplain} deletes all fields of
+the corresponding plain page style, \Macro{clearscrheadfoot}
sets all fields of both page styles to empty.
-
\begin{Example}
If one wants to reset the page style to the default {\KOMAScript}
settings, independent of the actual configuration, only these three
commands are sufficient:
-\begin{lstlisting}
+\begin{lstcode}
\clearscrheadfoot
\ohead{\headmark}
\ofoot[\pagemark]{\pagemark}
-\end{lstlisting}
-Without the commands \Macro{clearscrheadfoot},
-\Macro{clearscrheadings} and \Macro{clearscrplain}, 6 commands with 9
-empty arguments would be required:
-\begin{lstlisting}
+\end{lstcode}
+ Without the commands \Macro{clearscrheadfoot},
+ \Macro{clearscrheadings} and \Macro{clearscrplain}, six commands with
+ additional nine empty arguments would be required:
+\begin{lstcode}
\ihead[]{}
\chead[]{}
\ohead[]{\headmark}
\ifoot[]{}
\cfoot[]{}
\ofoot[\pagemark]{\pagemark}
-\end{lstlisting}
-Of course, for a specific configuration, some of them could be
-dropped.%
+\end{lstcode}
+ Of course, for a specific configuration, some of them could be
+ dropped.%
\end{Example}%
%
\EndIndex{Cmd}{clearscrheadings}%
@@ -378,62 +394,69 @@ introduced yet. The description of these commands follows.
\Macro{leftmark}\\
\Macro{rightmark}
\end{Declaration}%
-\BeginIndex{Cmd}{leftmark}\BeginIndex{Cmd}{rightmark}%
-These two instructions make it possible to access the running
-headings, which are normally meant for the left or for the right
-page. These two instruction are not made available by
-\Package{scrpage2}, but directly by the {\LaTeX} kernel. When in this
-section running headings of the left page or the right page are
-mentioned, this refers to the contents of \Macro{leftmark} or
+\BeginIndex{Cmd}{leftmark}%
+\BeginIndex{Cmd}{rightmark}%
+These two instructions make it possible to access the running headings, which
+are normally meant for the left or for the right page. These two instruction
+are not made available by \Package{scrpage2}, but directly by the {\LaTeX}
+kernel. When in this section running headings of the left page or the right
+page are mentioned, this refers to the contents of \Macro{leftmark} or
\Macro{rightmark}, respectively.
%
-\EndIndex{Cmd}{leftmark}\EndIndex{Cmd}{rightmark}%
+\EndIndex{Cmd}{leftmark}%
+\EndIndex{Cmd}{rightmark}%
+
-\BeginIndex{Cmd}{headmark}
\begin{Declaration}
-\Macro{headmark}
+ \Macro{headmark}
\end{Declaration}%
+\BeginIndex{Cmd}{headmark}%
This command gives access to the content of running headings. In
contrast to \Macro{leftmark} and \Macro{rightmark}, one need not
-regard the proper assignment to left or right page.
+regard the proper assignment to left or right page.%
+%
\EndIndex{Cmd}{headmark}
-\BeginIndex{Cmd}{pagemark}
+
\begin{Declaration}
-\Macro{pagemark}
+ \Macro{pagemark}
\end{Declaration}%
+\BeginIndex{Cmd}{pagemark}%
This command returns the formatted page number. The formatting can be
controlled by \Macro{pnumfont}, introduced in
-\autoref{sec:scrpage.basics.format},
-\autopageref{desc:scrpage.cmd.pnumfont}, which \Macro{pagemark}
-heeds automatically. Alternatively, \Macro{setkomafont} can be used if
-a {\KOMAScript} class is used (see \autoref{sec:maincls.font}).
-% the last describtion \setkomafont ... is only fill-text
+\autoref{sec:scrpage.basics.format}, \autopageref{desc:scrpage.cmd.pnumfont},
+which \Macro{pagemark} heeds automatically.%
+%
\EndIndex{Cmd}{pagemark}
-\BeginIndex{Cmd}{pagestyle}\BeginIndex{Pagestyle}{useheadings}
+
\begin{Declaration}
-\Option{useheadings}
+ \Pagestyle{useheadings}
\end{Declaration}%
-\phantomsection\label{desc:scrpage.pagestyle.useheadings}%
-The package \Package{scrpage2} is meant primarily for use of the
-supplied styles or for defining one's own styles. However, it may be
-necessary to shift back also to a style provided by the document
-class. It might appear that this should be done with \Macro{page
- style}\PParameter{headings}, but this has the disadvantage that
-commands \Macro{automark} and \Macro{manualmark}, to be discussed
-shortly, do not function as expected. For this reason one should
-shift back to the original styles using \Macro{page
- style}\PParameter{useheadings}, which chooses the correct page
-styles automatically for both manual and automatic running headings.
+\BeginIndex{Pagestyle}{useheadings}
+The package \Package{scrpage2} is meant primarily for use of the supplied
+styles or for defining one's own styles. However, it may be necessary to shift
+back also to a style provided by the document class. It might appear that
+this should be done with
+\Macro{pagestyle}\PParameter{headings}\IndexCmd{pagestyle}, but this has the
+disadvantage that commands \Macro{automark} and \Macro{manualmark}, to be
+discussed shortly, do not function as expected. For this reason one should
+shift back to the original styles using
+\Macro{pagestyle}\PParameter{useheadings}\IndexCmd{pagestyle}, which chooses
+the correct page styles automatically for both manual and automatic running
+headings.%
%
-\EndIndex{Cmd}{pagestyle}\EndIndex{Pagestyle}{useheadings}
+\EndIndex{Pagestyle}{useheadings}
+
\subsection{Manual and Running Headings}
\label{sec:scrpage.basics.mark}
% \automark \manualmark
%
-Usually there is a \emph{my}-version of the \PValue{headings}
+\BeginIndex{}{headings>running}%
+\BeginIndex{}{headings>automatic}%
+\BeginIndex{}{headings>manual}%
+Usually there is a \emph{my}-version of the \Pagestyle{headings}
page style. If such a page style is active, then the running headings
are no longer updated no longer automatically and become manual
headings. With \Package{scrpage2} a different path is taken. Whether
@@ -444,36 +467,38 @@ can be set already while loading of the package, with the options
\autoref{sec:scrpage.basics.options},
\autopageref{desc:scrpage.option.automark}).
-\BeginIndex{Cmd}{manualmark}
+
\begin{Declaration}
-\Macro{manualmark}
+ \Macro{manualmark}
\end{Declaration}%
+\BeginIndex{Cmd}{manualmark}%
As the name suggests, \Macro{manualmark} switches off the updating of
the running headings and makes them manual. It is left to the user to
update and provide contents for the headings. For that purpose the
instructions \Macro{markboth}\IndexCmd{markboth} and
-\Macro{markright}\IndexCmd{markright} are available.
+\Macro{markright}\IndexCmd{markright} are available.%
+%
\EndIndex{Cmd}{manualmark}
-\BeginIndex{Cmd}{automark}
+
\begin{Declaration}
\Macro{automark}\OParameter{right page}\Parameter{left page}
\end{Declaration}%
-The macro \Macro{automark} activates the automatic updating, that is,
-running headings. For the two parameters the designations of the
-document sectioning level whose title is to appear in appropriate
-place are to be used. Valid values for the parameters are:
+\BeginIndex{Cmd}{automark}%
+The macro \Macro{automark} activates the automatic updating, that is, running
+headings. For the two parameters the designations of the document sectioning
+level whose title is to appear in appropriate place are to be used. Valid
+values for the parameters are:
\PValue{part}\ChangedAt{v2.2}{\Package{scrpage2}}, \PValue{chapter},
\PValue{section}, \PValue{subsection}, \PValue{subsubsection},
-\PValue{paragraph}, and \PValue{subparagraph}. For most of the
-classes use of \PValue{part} will not produce the expected result. So
-far only {\KOMAScript} classes from version~2.9s up are known to
-support this value.
-
-The optional argument \PName{right page} is understandably meant only
-for two-sided documents. In the one-sided case one should normally not
-use it. With the help of the option \Option{autooneside} one can also
-set that the optional argument in one-sided mode is ignored
+\PValue{paragraph}, and \PValue{subparagraph}. For most of the classes use of
+\PValue{part} will not produce the expected result. So far only {\KOMAScript}
+classes from version~2.9s up are known to support this value. The optional
+argument \PName{right page} is understandably meant only for double-sided
+documents. In the single-sided case one should normally not use it. With the
+help of the option
+\Option{autooneside}\IndexOption{autooneside}\important{\Option{autooneside}}
+one can also set that the optional argument in single-sided mode is ignored
automatically (see \autoref{sec:scrpage.basics.options},
\autopageref{desc:scrpage.option.autooneside}).
%
@@ -481,30 +506,36 @@ automatically (see \autoref{sec:scrpage.basics.options},
Assuming that the document uses a \emph{book} class, whose topmost
section level is \emph{chapter}, then after a preceding
\Macro{manualmark}
-\begin{lstlisting}
+\begin{lstcode}
\automark[section]{chapter}
-\end{lstlisting}
-restores the original behaviour. If one prefers lower section levels
-in running headings, the following can be used:
-\begin{lstlisting}
+\end{lstcode}
+ restores the original behaviour. If one prefers lower section levels
+ in running headings, the following can be used:
+\begin{lstcode}
\automark[subsection]{section}
-\end{lstlisting}
-How useful the last declaration is, everybody has to decide
-for themselves.
+\end{lstcode}
+% How useful the last declaration is, everybody has to decide
+% for themselves.
\end{Example}
\begin{Explain}
- For the upper section level, the data of the headings is set by the
- command \Macro{markboth}\IndexCmd{markboth}, while that for the
- lower section level by \Macro{markright}\IndexCmd{markright} or
- \Macro{markleft}\IndexCmd{markleft}. These commands are called
- indirectly by the sectioning commands. The macro \Macro{markleft}
- is provided by the package \Package{scrpage2} and is defined
- similarly to \Macro{markright} in the {\LaTeX} kernel. Although
- \Macro{markleft} is not defined as an internal command, the direct
- use is not recommended.
+ For the upper section level, the data of the headings is set by the command
+ \Macro{markboth}\IndexCmd{markboth} (see \autoref{sec:maincls.pagestyle},
+ \autopageref{desc:maincls.cmd.markboth}), while that for the lower section
+ level by \Macro{markright}\IndexCmd{markright} or
+ \Macro{markleft}\IndexCmd{markleft}. These commands are called indirectly
+ by the sectioning commands. The macro \Macro{markleft} is provided by the
+ package \Package{scrpage2} and is defined similarly to \Macro{markright}
+ (see \autoref{sec:maincls.pagestyle},
+ \autopageref{desc:maincls.cmd.markright}) in the {\LaTeX} kernel. Although
+ \Macro{markleft} is not defined as an internal command, the direct use is
+ not recommended.
\end{Explain}
-\EndIndex{Cmd}{automark}
+\EndIndex{Cmd}{automark}%
+%
+\EndIndex{}{headings>manual}%
+\EndIndex{}{headings>automatic}%
+\EndIndex{}{headings>running}%
\subsection{Formatting of Header and Footer}
@@ -516,53 +547,70 @@ The previous section concerned itself mainly with the contents of the
header and footer. This is of course not sufficient to satisfy
formative ambitions. Therefore we devote this section exclusively to
this topic.
-%
-\BeginIndex{Cmd}{headfont}\BeginIndex{Cmd}{pnumfont}
+
\begin{Declaration}
-\Macro{headfont}\\
-\Macro{pnumfont}
+ \Macro{headfont}\\
+ \Macro{footfont}\\
+ \Macro{pnumfont}
\end{Declaration}%
-The command \Macro{headfont} contains the commands which determine the
-font of header and footer lines. The style of the page number is
-defined by the command \Macro{pnumfont}.
+\BeginIndex{Cmd}{headfont}%
+\BeginIndex{Cmd}{footfont}%
+\BeginIndex{Cmd}{pnumfont}%
+The command \Macro{headfont} contains the commands which determine the font of
+header and footer lines. Command \Macro{footfont} contains the difference of
+the footer to that. The difference for the style of the page number is defined
+by the command \Macro{pnumfont}.
\begin{Example}
- If, for example, one wants the header and footer to be typeset in
- bold sans serif, and the page number in a slanted serif style, then
- one can use the following definitions:
-\begin{lstlisting}
+ If, for example, one wants the header to be typeset in bold sans serif, the
+ footer in non-bold sans serif, and the page number in a slanted serif style,
+ then one can use the following definitions:
+\begin{lstcode}
\renewcommand{\headfont}{\normalfont\sffamily\bfseries}
+ \renewcommand*{\footfont}{\normalfont\sffamily}
\renewcommand{\pnumfont}{\normalfont\rmfamily\slshape}
-\end{lstlisting}
+\end{lstcode}
\end{Example}
-\EndIndex{Cmd}{headfont}\EndIndex{Cmd}{pnumfont}
-%
-From version 2.8p of the {\KOMAScript} classes a new unified user
-interface scheme is implemented for font attributes. If
-\Package{scrpage2} is used together with one of these classes, then it
-is recommended to set up font attributes in the manner described in
-\autoref{sec:maincls.font}.
+\EndIndex{Cmd}{headfont}%
+\EndIndex{Cmd}{footfont}%
+\EndIndex{Cmd}{pnumfont}%
+
+\BeginIndex{FontElement}{pagehead}%
+\BeginIndex{FontElement}{pagefoot}%
+\BeginIndex{FontElement}{pagenumber}%
+From version 2.8p of the {\KOMAScript} classes a new unified user interface
+scheme is implemented for font attributes. If \Package{scrpage2} is used
+together with one of these classes, then it is recommended to set up font
+attributes in the manner described in \autoref{sec:maincls.textmarkup} from
+\autopageref{sec:maincls.textmarkup} onward.
\begin{Example}
Instead of \Macro{renewcommand} the command \Macro{setkomafont}
should be used to configure the font attributes. The previous
definitions can then be written as:
-\begin{lstlisting}
+\begin{lstcode}
\setkomafont{pagehead}\normalfont\sffamily\bfseries}
+ \setkomafont{pagefoot}{\normalfont\sffamily}
\setkomafont{pagenumber}{\normalfont\rmfamily\slshape}
-\end{lstlisting}
+\end{lstcode}
\end{Example}
+\EndIndex{FontElement}{pagenumber}%
+\EndIndex{FontElement}{pagefoot}%
+\EndIndex{FontElement}{pagehead}%
+
-\BeginIndex{Cmd}{setheadwidth}\BeginIndex{Cmd}{setfootwidth}
\begin{Declaration}
\Macro{setheadwidth}\OParameter{shift}\Parameter{width}\\
\Macro{setfootwidth}\OParameter{shift}\Parameter{width}
\end{Declaration}%
-Normally the widths of header and footer lines correspond to the width
-of the text body. The commands \Macro{setheadwidth} and
-\Macro{setfootwidth} enable the user to adapt in a simple manner the
-widths to his needs. The mandatory argument \PName{width} takes the
-value of the desired width of the page header or footer, while
-\PName{shift} is a length parameter by which amount the appropriate
-item is shifted toward the outside page edge.
+\BeginIndex{Cmd}{setheadwidth}%
+\BeginIndex{Cmd}{setfootwidth}%
+Normally the widths of header and footer lines correspond to the width of the
+text body. The commands
+\Macro{setheadwidth}\Index{header>width}\Index{head>width} and
+\Macro{setfootwidth}\Index{footer>width}\Index{foot>width} enable the user to
+adapt in a simple manner the widths to his needs. The mandatory argument
+\PName{width} takes the value of the desired width of the page header or
+footer, while \PName{shift} is a length parameter by which amount the
+appropriate item is shifted toward the outside page edge.
For the most common situations the mandatory argument \PName{width}
accepts the following symbolic values:
@@ -584,31 +632,31 @@ identical.
Assume that one wants a layout like that of \emph{The
{\LaTeX}\,Companion}, where the header projects into the
margin. This can be obtained with:
-\begin{lstlisting}
+\begin{lstcode}
\setheadwidth[0pt]{textwithmarginpar}
-\end{lstlisting}
+\end{lstcode}
%
-which appears like this on an odd page:
+ which appears like this on an odd page:
%
-\begin{XmpTopPage}
- \XmpHeading{10,25}{85}
- \thinlines\XmpRule{10,23}{85}
- \XmpSetText[\XmpTopText]{10,21}
- \XmpMarginNote{83,11.8}
-\end{XmpTopPage}
+ \begin{XmpTopPage}
+ \XmpHeading{10,25}{85}
+ \thinlines\XmpRule{10,23}{85}
+ \XmpSetText[\XmpTopText]{10,21}
+ \XmpMarginNote{83,11.8}
+ \end{XmpTopPage}
%
-If the footer line should have the same width and alignment, then two
-ways to set this up are possible. The first way simply repeats the
-settings for the case of the footer line:
-\begin{lstlisting}
+ If the footer line should have the same width and alignment, then two
+ ways to set this up are possible. The first way simply repeats the
+ settings for the case of the footer line:
+\begin{lstcode}
\setfootwidth[0pt]{textwithmarginpar}
-\end{lstlisting}
+\end{lstcode}
%
-In the second way the symbolic value \PValue{head} is used, since the
-header already has the desired settings.
-\begin{lstlisting}
+ In the second way the symbolic value \PValue{head} is used, since the
+ header already has the desired settings.
+\begin{lstcode}
\setfootwidth[0pt]{head}
-\end{lstlisting}
+\end{lstcode}
\end{Example}
If no \PName{shift} is indicated, i.\,e., without the optional argument,
@@ -619,37 +667,45 @@ automatically to correspond to the current page shape.
\begin{Example}
Continuing with the previous example, we remove the optional
argument:
-\begin{lstlisting}
+\begin{lstcode}
\setheadwidth{textwithmarginpar}
-\end{lstlisting}
+\end{lstcode}
%
-which appears like this on an odd page:
+ which appears like this on an odd page:
%
-\begin{XmpTopPage}
- \XmpHeading{5,25}{85}
- \thinlines\XmpRule{5,23}{85}
- \XmpSetText[\XmpTopText]{10,21}
- \XmpMarginNote{83,11.8}
-\end{XmpTopPage}
+ \begin{XmpTopPage}
+ \XmpHeading{5,25}{85}
+ \thinlines\XmpRule{5,23}{85}
+ \XmpSetText[\XmpTopText]{10,21}
+ \XmpMarginNote{83,11.8}
+ \end{XmpTopPage}
\end{Example}
As can be seen, the header is now shifted inward, while the header
width has not changed. The shift is calculated in a way that the
-configuration of the typearea become visible also here.
+configuration of the typearea become visible also here.%
%
\EndIndex{Cmd}{setheadwidth}\EndIndex{Cmd}{setfootwidth}
-\BeginIndex{Cmd}{setheadtopline}\BeginIndex{Cmd}{setheadsepline}
-\BeginIndex{Cmd}{setfootseptline}\BeginIndex{Cmd}{setfootbotline}
\begin{Declaration}
-\Macro{setheadtopline}\OParameter{length}\Parameter{thickness}\OParameter{commands}\\
-\Macro{setheadsepline}\OParameter{length}\Parameter{thickness}\OParameter{commands}\\
-\Macro{setfootsepline}\OParameter{length}\Parameter{thickness}\OParameter{commands}\\
-\Macro{setfootbotline}\OParameter{length}\Parameter{thickness}\OParameter{commands}
+ \Macro{setheadtopline}\OParameter{length}\Parameter{thickness}%
+ \OParameter{commands}\\
+ \Macro{setheadsepline}\OParameter{length}\Parameter{thickness}%
+ \OParameter{commands}\\
+ \Macro{setfootsepline}\OParameter{length}\Parameter{thickness}%
+ \OParameter{commands}\\
+ \Macro{setfootbotline}\OParameter{length}\Parameter{thickness}%
+ \OParameter{commands}
\end{Declaration}%
+\BeginIndex{Cmd}{setheadtopline}\BeginIndex{Cmd}{setheadsepline}%
+\BeginIndex{Cmd}{setfootseptline}\BeginIndex{Cmd}{setfootbotline}%
Corresponding to the size configuration parameters of header and
-footer there are commands to modify the lines above and below the
-header and footer.
+footer there are commands to modify the rules above and below the
+header and footer. But first of all the rules should be activated. See options
+\Option{headtopline}, \Option{headsepline},
+\Option{footsepline}, and \Option{footbotline} in
+\autoref{sec:scrpage.basics.options},
+\autopageref{desc:scrpage.option.headsepline} for this.
\begin{labeling}[\,--]{\Macro{setfootsepline}}
\item[\Macro{setheadtopline}] configures the line above the header
@@ -668,28 +724,42 @@ adapts automatically the width of the header or the footer.
Use \PValue{auto} in the length argument to restore this automation
for the length of a line.
-The\ChangedAt{v2.2}{\Package{scrpage2}} optional argument
-\PName{commands} may be used to specify additional commands to be
-executed before the respective line is drawn. For example, such
-commands could be used for changing the
-color\Index{header>color}\Index{footer>color}\Index{color>in
- header}\Index{color>in footer} of the line. When using a
+\BeginIndex{FontElement}{headtopline}%
+\BeginIndex{FontElement}{headsepline}%
+\BeginIndex{FontElement}{footsepline}%
+\BeginIndex{FontElement}{footbotline}%
+\BeginIndex{FontElement}{footbottomline}%
+The\ChangedAt{v2.2}{\Package{scrpage2}} optional argument \PName{commands} may
+be used to specify additional commands to be executed before the respective
+line is drawn. For example, such commands could be used for changing the
+color\Index{header>color}\Index{footer>color}%
+\Index{head>color}\Index{foot>color}%
+\Index{color>in header}\Index{color>in footer} of the line. When using a
{\KOMAScript} class you could also use
-\Macro{setkomafont}\IndexCmd{setkomafont} to specify commands for one
-of the elements
-\FontElement{headtopline}\IndexFontElement{headtopline},
-\FontElement{headsepline}\IndexFontElement{headsepline},
-\FontElement{footsepline}\IndexFontElement{footsepline},
-\FontElement{footbottomline}\IndexFontElement{footbottomline}, or
-\FontElement{footbotline}\IndexFontElement{footbotline}. These can
-then be extended via \Macro{addtokomafont}\IndexCmd{addtokomafont}.
-See \autoref{sec:maincls.font} for details on the \Macro{setkomafont}
-and \Macro{addkomafont} commands.
+\Macro{setkomafont}\IndexCmd{setkomafont} to specify commands for one of the
+elements \FontElement{headtopline}\important[i]{\FontElement{headtopline}\\
+ \FontElement{headsepline}\\
+ \FontElement{footsepline}\\
+ \FontElement{footbottomline}}, \FontElement{headsepline},
+\FontElement{footsepline}, \FontElement{footbottomline}, or
+\FontElement{footbotline}. These can then be extended via
+\Macro{addtokomafont}\IndexCmd{addtokomafont}. See
+\autoref{sec:maincls.textmarkup}, \autopageref{desc:maincls.cmd.setkomafont}
+for details on the \Macro{setkomafont} and \Macro{addkomafont} commands.
+\EndIndex{FontElement}{footbottomline}%
+\EndIndex{FontElement}{footbotline}%
+\EndIndex{FontElement}{footsepline}%
+\EndIndex{FontElement}{headsepline}%
+\EndIndex{FontElement}{headtopline}%
+
\begin{Declaration}
-\XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}\Parameter{\upshape\PValue{current}}\\
-\XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}\Parameter{}\\
-\XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}\Parameter{}\OParameter{}
+ \XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}%
+ \Parameter{\upshape\PValue{current}}\\
+ \XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}%
+ \Parameter{}\\
+ \XMacro{setheadtopline}\OParameter{\upshape\PValue{auto}}%
+ \Parameter{}\OParameter{}
\end{Declaration}%
The arguments shown here for the command \Macro{setheadtopline} are of
course valid for the other three configuration commands too.
@@ -707,10 +777,14 @@ valid commands.
If the header, for example, is to be contrasted by a strong line of
2\,pt above and a normal line of 0.4\,pt between header and body,
one can achieve this with:
-\begin{lstlisting}
+\begin{lstcode}
\setheadtopline{2pt}
\setheadsepline{.4pt}
-\end{lstlisting}
+\end{lstcode}
+ Additionally\textnote{Attention!} the options \Option{headtopline} and
+ \Option{headsepline} have to be used preferably globally in the optional
+ argument of \Macro{documentclass}. In this case the result may be the
+ following.
%
\begin{XmpTopPage}
\XmpHeading{10,25}{70}
@@ -720,97 +794,111 @@ valid commands.
\XmpMarginNote{83,11.8}
\end{XmpTopPage}
-To specify that this line is to be drawn also, e.\,g., in red color, you
-would change the commands like this:
-\begin{lstlisting}
+ To specify that this line is to be drawn also, e.\,g., in red color, you
+ would change the commands like this:
+\begin{lstcode}
\setheadtopline{2pt}[\color{red}]
\setheadsepline{.4pt}[\color{red}]
-\end{lstlisting}
-In this example, as well as in the following one, line color is
-activated by applying the syntax of the
-\Package{color}\IndexPackage{color} package, so this package must of
-course be loaded. Since \Package{scrpage2} comes without built-in
-color handling, any package providing color support may be used.
-
-{\KOMAScript} classes also support the following way of color specification:
-\begin{lstlisting}
+\end{lstcode}
+ In this example, as well as in the following one, line color is
+ activated by applying the syntax of the
+ \Package{color}\IndexPackage{color} package, so this package must of
+ course be loaded. Since \Package{scrpage2} comes without built-in
+ color handling, any package providing color support may be used.
+
+ {\KOMAScript} classes also support the following way of color specification:
+\begin{lstcode}
\setheadtopline{2pt}
\setheadsepline{.4pt}
\setkomafont{headtopline}[\color{red}]
\setkomafont{headsepline}[\color{red}]
-\end{lstlisting}
+\end{lstcode}
-The automatic adjustment to the header and footer width is illustrated
-in the following example:
-\begin{lstlisting}
+ The automatic adjustment to the header and footer width is illustrated
+ in the following example:
+\begin{lstcode}
\setfootbotline{2pt}
\setfootsepline[text]{.4pt}
\setfootwidth[0pt]{textwithmarginpar}
-\end{lstlisting}
+\end{lstcode}
% \phantomsection for hyperref-\pageref-links jum-2001/11/24
-\phantomsection\label{page:scrpage.autoLineLength}
-\begin{XmpBotPage}
- \XmpHeading{10,18}{85}
- \thinlines\XmpRule{17,21}{70}
- \thicklines\XmpRule{10,16}{85}
- \XmpSetText[\XmpBotText]{10,33}
- \XmpMarginNote{83,24}
-\end{XmpBotPage}
+ \phantomsection\label{page:scrpage.autoLineLength}
+ \begin{XmpBotPage}
+ \XmpHeading{10,18}{85}
+ \thinlines\XmpRule{17,21}{70}
+ \thicklines\XmpRule{10,16}{85}
+ \XmpSetText[\XmpBotText]{10,33}
+ \XmpMarginNote{83,24}
+ \end{XmpBotPage}
\end{Example}
-
+%
Now not everyone will like the alignment of the line above the footer;
instead, one would expect the line to be left-aligned. This can only
be achieved with a global package option, which will be described
together with other package options in the next
-\autoref{sec:scrpage.basics.options}.
+\autoref{sec:scrpage.basics.options}.%
+%
\EndIndex{Cmd}{setheadtopline}\EndIndex{Cmd}{setheadsepline}
\EndIndex{Cmd}{setfootseptline}\EndIndex{Cmd}{setfootbotline}
-\subsection{Package Options}\label{sec:scrpage.basics.options}
+
+\subsection{Package Options}
+\label{sec:scrpage.basics.options}
% head(in|ex)clude foot(in|ex)clude --> typearea
% headtopline headsepline footbotline footsepline (plain...)
% komastyle standardstyle
% markuppercase markusecase
% automark manualmark
-\BeginIndex{Option}{headinclude}\BeginIndex{Option}{footinclude}
-\BeginIndex{Option}{headexclude}\BeginIndex{Option}{footexclude}
+In opposite to the \KOMAScript{} classes, where the most options may be
+changed using \Macro{KOMAoptions} or \Macro{KOMAoption} also after loading the
+class, package \Package{scrpage2} doesn't provide this feature\iffree{
+ currently}{}. All options to \Package{scrpage2} have to be global options,
+i.\,e. be part of the optional argument of \Macro{documentclass}, or
+package option, i.\,e. be part of the optional argument of \Macro{usepackage}.
+
\begin{Declaration}
\Option{headinclude}\\
\Option{headexclude}\\
\Option{footinclude}\\
\Option{footexclude}
\end{Declaration}%
-These options determine whether the page header or the page footer are
-considered as part of the page body for the calculation of the type
-area. The adjustments necessary by the use of these parameters are
-made by the package \Package{typearea} (see
-\autoref{sec:typearea.options}), if this package is loaded after
-\Package{scrpage2}. Important here is that when using a {\KOMAScript}
-class, these options must be given for the document class and not for
-the package \Package{scrpage2}, in order to be effective.
-%
-\EndIndex{Option}{headinclude}\EndIndex{Option}{footinclude}
+\BeginIndex{Option}{headinclude}\BeginIndex{Option}{footinclude}%
+\BeginIndex{Option}{headexclude}\BeginIndex{Option}{footexclude}%
+Since\textnote{Attention!} \KOMAScript~3\ChangedAt{v2.3}{\Package{scrpage2}}
+this options shouldn't be passed to \Package{scrpage2} any longer using
+\Macro{PassOptionsToPackage} or the optional argument of
+\Macro{usepackage}. Only for compatibility reason \Package{scrpage2} still
+declares them and pass them as \Option{headinclude},
+\OptionValue{headinclude}{false}, \Option{footinclude} und
+\OptionValue{footinclude}{false} to package \Package{typearea} (see
+\autoref{sec:typearea.typearea},
+\autopageref{desc:typearea.option.headinclude}) weitergereicht.
+\EndIndex{Option}{headinclude}\EndIndex{Option}{footinclude}%
\EndIndex{Option}{headexclude}\EndIndex{Option}{footexclude}
-\BeginIndex{Option}{headtopline}\BeginIndex{Option}{plainheadtopline}
-\BeginIndex{Option}{headsepline}\BeginIndex{Option}{plainheadsepline}
-\BeginIndex{Option}{footsepline}\BeginIndex{Option}{plainfootsepline}
-\BeginIndex{Option}{footbotline}\BeginIndex{Option}{plainfootbotline}
+
\begin{Declaration}
-\Option{headtopline} and \Option{plainheadtopline}\\
-\Option{headsepline} and \Option{plainheadsepline}\\
-\Option{footsepline} and \Option{plainfootsepline}\\
-\Option{footbotline} and \Option{plainfootbotline}
+ \Option{headtopline}\\
+ \Option{plainheadtopline}\\
+ \Option{headsepline}\\
+ \Option{plainheadsepline}\\
+ \Option{footsepline}\\
+ \Option{plainfootsepline}\\
+ \Option{footbotline}\\
+ \Option{plainfootbotline}
\end{Declaration}%
+\BeginIndex{Option}{headtopline}\BeginIndex{Option}{plainheadtopline}%
+\BeginIndex{Option}{headsepline}\BeginIndex{Option}{plainheadsepline}%
+\BeginIndex{Option}{footsepline}\BeginIndex{Option}{plainfootsepline}%
+\BeginIndex{Option}{footbotline}\BeginIndex{Option}{plainfootbotline}%
Basic adjustment of the lines under and over header and footer can be
made with these options. These adjustments are then considered the
default for all page styles defined with \Package{scrpage2}. If one
of these options is used, then a line thickness 0.4\,pt is set.
-
-Since there is a corresponding \PValue{plain} page style to the
-page style \PValue{scrheadings}, the corresponding line in the plain
+Since there is a corresponding plain page style to the
+page style \Pagestyle{scrheadings}, the corresponding line in the plain
style can also be configured with the \Option{plain\dots} options.
These \Option{plain} options do however work only if the corresponding
options without \Option{plain} are activated. Thus,
@@ -825,28 +913,27 @@ activated with \Option{headsepline}, then the package
\Package{typearea} calculates the type area in such a way that the
page header is part of the text block automatically.
-The conditions for the options of the preceding paragraph apply also
-to this automation. That means that the package \Package{typearea}
-must be loaded after \Package{scrpage2}, or that on use of a
-{\KOMAScript} class, the options \Option{headinclude} and
-\Option{footinclude} must be set explicitly with \Macro{documentclass}
-in order to transfer header or footer line in the text area.
+The\textnote{Attention!} conditions for the options of the preceding paragraph
+apply also to this automation. That means that the package \Package{typearea}
+must be loaded after \Package{scrpage2}, or that on use of a {\KOMAScript}
+class, the options \Option{headinclude} and \Option{footinclude} must be set
+explicitly with \Macro{documentclass} in order to transfer header or footer
+line in the text area.%
%
\EndIndex{Option}{headtopline}\EndIndex{Option}{plainheadtopline}
\EndIndex{Option}{headsepline}\EndIndex{Option}{plainheadsepline}
\EndIndex{Option}{footsepline}\EndIndex{Option}{plainfootsepline}
\EndIndex{Option}{footbotline}\EndIndex{Option}{plainfootbotline}
-\BeginIndex{Option}{ilines}%
-\BeginIndex{Option}{clines}%
-\BeginIndex{Option}{olines}%
-\Index{rule}\Index{line}%
\begin{Declaration}
\Option{ilines}\\
\Option{clines}\\
\Option{olines}
\end{Declaration}%
-%
+\BeginIndex{Option}{ilines}%
+\BeginIndex{Option}{clines}%
+\BeginIndex{Option}{olines}%
+\Index{rule>alignment}\Index{line>alignment}%
With the definition of the line lengths the case can arise where the
lengths are set correctly, but the justification is not as desired
because the line will be centered in the header or footer area. With
@@ -860,15 +947,14 @@ default justification, and \Option{olines} aligns at the outside edge.
The next example illustrates the influence of the
option \Option{ilines}. Please compare to the example for
\Macro{setfootsepline} on \autopageref{page:scrpage.autoLineLength}.
-\begin{lstlisting}
+\begin{lstcode}
\usepackage[ilines]{scrpage2}
\setfootbotline{2pt}
\setfootsepline[text]{.4pt}
\setfootwidth[0pt]{textwithmarginpar}
-\end{lstlisting}
-
-The mere use of the option \Option{ilines} leads to the different
-result shown below:
+\end{lstcode}
+ The mere use of the option \Option{ilines} leads to the different
+ result shown below:
\begin{XmpBotPage}
\XmpHeading{10,18}{85}
\thinlines\XmpRule{10,21}{70}
@@ -876,96 +962,109 @@ result shown below:
\XmpSetText[\XmpBotText]{10,33}
\XmpMarginNote{83,24}
\end{XmpBotPage}
-In contrast to the default configuration, the separation line between
-text and footer is now left-aligned, not centered.%
+ In contrast to the default configuration, the separation line between
+ text and footer is now left-aligned, not centered.%
\end{Example}%
-\EndIndex{Option}{ilines}\EndIndex{Option}{clines}\EndIndex{Option}{olines}%
+\EndIndex{Option}{ilines}%
+\EndIndex{Option}{clines}%
+\EndIndex{Option}{olines}%
+
-% \phantomsection for hyperref-\pageref-links jum-2001/11/24
-\phantomsection\label{page:scrpage.automark}%
-\BeginIndex{Option}{automark}\BeginIndex{Option}{manualmark}
\begin{Declaration}
\Option{automark}\\
\Option{manualmark}
\end{Declaration}%
-These options set at the beginning of the document whether to use
-running headings or manual ones. The option \Option{automark}
-switches the automatic updating on, \Option{manualmark} deactivates
-it. Without the use of one of the two options, the setting which was
-valid when the package was loaded is preserved, .
+\BeginIndex{Option}{automark}%
+\BeginIndex{Option}{manualmark}%
+\BeginIndex{}{headings>automatic}%
+\BeginIndex{}{headings>manual}%
+These options set at the beginning of the document whether to use running
+headings or manual ones. The option \Option{automark} switches the automatic
+updating on, \Option{manualmark} deactivates it. Without the use of one of
+the two options, the setting which was valid when the package was loaded is
+preserved.
%
\begin{Example}
You load the package \Package{scrpage2} directly after the document class
\Class{scrreprt} without any package options:
-\begin{lstlisting}
+\begin{lstcode}
\documentclass{scrreprt}
\usepackage{scrpage2}
-\end{lstlisting}
-Since the default page style of \Class{scrreprt} is \PValue{plain},
-this page style is also now still active. Futhermore, \PValue{plain}
-means manual headings. If one now activates the page style
-\PValue{scrheadings} with
-\begin{lstlisting}
+\end{lstcode}
+ Since the default page style of \Class{scrreprt} is \Pagestyle{plain},
+ this page style is also now still active. Futhermore, \Pagestyle{plain}
+ means manual headings. If one now activates the page style
+ \Pagestyle{scrheadings} with
+\begin{lstcode}
\pagestyle{scrheadings}
-\end{lstlisting}
-then the manual headings are nevertheless still active.
+\end{lstcode}
+ then the manual headings are nevertheless still active.
-If you instead use the document class \Class{scrbook}, then after
-\begin{lstlisting}
+ If you instead use the document class \Class{scrbook}, then after
+\begin{lstcode}
\documentclass{scrbook}
\usepackage{scrpage2}
-\end{lstlisting}
-the page style \PValue{headings} is active and the running headings are
-updated automatically. Switching to the page style
-\PValue{scrheadings} keeps this setting active. The marking commands
-of \Class{scrbook} continue to be used.
-
-However, the use of
-\begin{lstlisting}
+\end{lstcode}
+ the page style \Pagestyle{headings} is active and the running headings are
+ updated automatically. Switching to the page style
+ \Pagestyle{scrheadings} keeps this setting active. The marking commands
+ of \Class{scrbook} continue to be used.
+
+ However, the use of
+\begin{lstcode}
\usepackage[automark]{scrpage2}
-\end{lstlisting}
-activates running headings independently of the used document class.
-The option does not of course affect the used page style \PValue{plain}
-of the class \Class{scrreprt}. The headings are not visible until the
-page style is changed to
-\PValue{scrheadings}\IndexPagestyle{scrheadings}, \PValue{useheadings}
-or another user-defined page style with headings.%
+\end{lstcode}
+ activates running headings independently of the used document class.
+ The option does not of course affect the used page style \Pagestyle{plain}
+ of the class \Class{scrreprt}. The headings are not visible until the
+ page style is changed to
+ \Pagestyle{scrheadings}\IndexPagestyle{scrheadings}, \Pagestyle{useheadings}
+ or another user-defined page style with headings.%
\end{Example}%
\EndIndex{Option}{automark}\EndIndex{Option}{manualmark}%
-\BeginIndex{Option}{autooneside}
\begin{Declaration}
\Option{autooneside}
\end{Declaration}%
+\BeginIndex{Option}{autooneside}%
This option ensures that the optional parameter of
\Macro{automark}\IndexCmd{automark} will be ignored automatically in
one-sided mode. See also the explanation of the command
\Macro{automark} in \autoref{sec:scrpage.basics.mark},
-\autopageref{desc:scrpage.cmd.automark}.
-\EndIndex{Option}{autooneside}
+\autopageref{desc:scrpage.cmd.automark}.%
+%
+\EndIndex{Option}{autooneside}%
+%
+\EndIndex{}{headings>manual}%
+\EndIndex{}{headings>automatic}%
+
-\BeginIndex{Option}{komastyle}\BeginIndex{Option}{standardstyle}
\begin{Declaration}
-\Option{komastyle}\\
-\Option{standardstyle}
+ \Option{komastyle}\\
+ \Option{standardstyle}
\end{Declaration}%
-These options determine the look of the predefined page style
-\PValue{scrheadings}. The option \Option{komastyle} configures a look
-like that of the {\KOMAScript} classes. This is the default for
-{\KOMAScript} classes and can in this way also be set for other
-classes.
+\BeginIndex{Option}{komastyle}%
+\BeginIndex{Option}{standardstyle}%
+These options determine the look of the predefined page styles
+\Pagestyle{scrheadings} and \Pagestyle{scrplain}. The option
+\Option{komastyle} configures a look like that of the {\KOMAScript} classes.
+This is the default for {\KOMAScript} classes and can in this way also be set
+for other classes.
The option \Option{standardstyle} configures a page style as it is
expected by the standard classes. Furthermore, the option
\Option{markuppercase} will be activated automatically, but only if
-option \Option{markusedcase} is not given.
-\EndIndex{Option}{komastyle}\EndIndex{Option}{standardstyle}
+option \Option{markusedcase} is not given.%
+\EndIndex{Option}{komastyle}%
+\EndIndex{Option}{standardstyle}
+
-\BeginIndex{Option}{markuppercase}\BeginIndex{Option}{markusedcase}
\begin{Declaration}
\Option{markuppercase}\\
\Option{markusedcase}
\end{Declaration}%
+\BeginIndex{Option}{markuppercase}%
+\BeginIndex{Option}{markusedcase}%
In order to achieve the functionality of \Macro{automark}, the package
\Package{scrpage2} modifies internal commands which are used by the
document structuring commands to set the running headings. Since some
@@ -973,53 +1072,56 @@ classes, in contrast to the {\KOMAScript} classes, write the headings
in uppercase letters, \Package{scrpage2} has to know how the used
document class sets the headings.
-Option \Option{markuppercase} shows \Package{scrpage2} that the
-document class uses uppercase letters. If the document class does not
-set the headings in uppercase letters, then the option
-\Option{markusedcase} should be given. These options are not suitable
-to force a representation; thus, unexpected effects may occur if the
-given option does not match the actual behaviour of the document
-class.
+Option \Option{markuppercase} shows \Package{scrpage2} that the document class
+uses uppercase letters. If the document class does not set the headings in
+uppercase letters, then the option \Option{markusedcase} should be given.
+These\textnote{Attention!} options are not suitable to force a representation;
+thus, unexpected effects may occur if the given option does not match the
+actual behaviour of the document class.%
\EndIndex{Option}{markuppercase}\EndIndex{Option}{markusedcase}
+
\begin{Declaration}
\Option{nouppercase}
\end{Declaration}%
\BeginIndex{Option}{nouppercase}%
In the previous paragraph dealing with \Option{markuppercase} and
-\Option{markusedcase}, it has been already stated that some document
-classes set the running headings\Index{heading} in uppercase letters
-using the commands \Macro{MakeUppercase} or \Macro{uppercase}.
-Setting the option \Option{nouppercase} allows disabling both these
-commands in the headers and footers. However, this is valid only for
-page styles defined by \Package{scrpage2}, including
-\PValue{scrheadings} and its corresponding \PValue{plain} page style.
+\Option{markusedcase}, it has been already stated that some document classes
+set the running headings\Index{heading} in uppercase letters using the
+commands
+\Macro{MakeUppercase}\IndexCmd{MakeUppercase}\important{\Macro{MakeUppercase}}
+or \Macro{uppercase}\IndexCmd{uppercase}\important{\Macro{uppercase}}.
+Setting the option \Option{nouppercase} allows disabling both these commands
+in the headers and footers. However, this is valid only for page styles
+defined by \Package{scrpage2}, including \Pagestyle{scrheadings} and its
+corresponding plain page style.
The applied method is very brutal and can cause that desired changes
of normal letters to uppercase letters \Index{uppercase letters} do
not occur. Since these cases do not occur frequently, the option
\Option{nouppercase} usually affords a useful solution.
-
\begin{Example}
Your document uses the standard class \Class{book}\IndexClass{book},
but you do not want the uppercase headings but mixed case
headings. Then the preamble of your document could start with:
-\begin{lstlisting}
+\begin{lstcode}
\documentclass{book}
\usepackage[nouppercase]{scrpage2}
\pagestyle{scrheadings}
-\end{lstlisting}
- The selection of the page style \PValue{scrheadings} is necessary,
- since otherwise the page style \PValue{headings} is active, which
+\end{lstcode}
+ The selection of the page style \Pagestyle{scrheadings} is necessary,
+ since otherwise the page style \Pagestyle{headings} is active, which
does not respect the settings made by option \Option{nouppercase}.
\end{Example}
In some cases not only classes but also packages set the running
headings in uppercase letters.
Also in these cases the option \Option{nouppercase} should be able
-to switch back to the normal mixed case headings.
+to switch back to the normal mixed case headings.%
+%
\EndIndex{Option}{nouppercase}
+
\section{Defining Own Page Styles}\label{sec:scrpage.UI}
%
%
@@ -1071,61 +1173,78 @@ below header and footer can take place.
the inside. Furthermore, the document title, here ``Report'', shall
be placed outside in the header, the page number shall be centered
in the footer.
-\begin{lstlisting}
+\begin{lstcode}
\deftripstyle{TheReport}%
{\headmark}{}{Report}%
{}{\pagemark}{}
-\end{lstlisting}
+\end{lstcode}
-If moreover the lines above the header and below the footer shall be
-drawn with a thickness of 2\,pt, and the text body be separated from
-header and footer with 0.4\,pt lines, then the definition has to be
-extended:
-\begin{lstlisting}
+ If moreover the lines above the header and below the footer shall be
+ drawn with a thickness of 2\,pt, and the text body be separated from
+ header and footer with 0.4\,pt lines, then the definition has to be
+ extended:
+\begin{lstcode}
\deftripstyle{TheReport}[2pt][.4pt]%
{\headmark}{}{Report}%
{}{\pagemark}{}
-\end{lstlisting}
-%
-\typeout{^^J--- Ignore underfull and overfull \string\hbox:}
-\begin{center}\setlength{\unitlength}{1mm}\begin{picture}(100,50)\scriptsize
-\thinlines
-\put(5,0){\line(0,1){50}}
-\put(55,0){\line(0,1){50}}
-\put(5,50){\line(1,0){40}}
-\put(55,50){\line(1,0){40}}
+\end{lstcode}
+ See \autoref{fig:scrpage2.tomuchlines} for the result.
%
-\thicklines
-\put(45,0){\line(0,1){50}}
-\put(95,0){\line(0,1){50}}
-\put(5,0,){\line(1,0){40}}
-\put(55,0){\line(1,0){40}}
-%
-\XmpHeading[Report\hfill 2. The Eye]{11,46}{30}
-\XmpHeading[2.1 Retina\hfill Report]{59,46}{30}
-\XmpHeading[\hfill 14\hfill]{11,6.5}{30}
-\XmpHeading[\hfill 15\hfill]{59,6.5}{30}
-\put(11,43){\makebox(0,0)[tl]{\parbox{30mm}{\tiny%
- \textbf{2.1 Retina}\\
- \XmpText[49]}}}
-\put(59,43){\makebox(0,0)[tl]{\parbox{30mm}{\tiny%
- \XmpText[51]}}}
-%
-\thinlines
-\XmpRule{11,44.5}{30}\XmpRule{59,44.5}{30}
-\XmpRule{11,8}{30}\XmpRule{59,8}{30}
-\linethickness{1pt}
-\XmpRule{11,48}{30}\XmpRule{59,48}{30}
-\XmpRule{11,5}{30}\XmpRule{59,5}{30}
-\end{picture}\end{center}
-\typeout{^^J--- Don't ignore underfull and overfull \string\hbox:^^J}
+\begin{figure}
+ \typeout{^^J--- Ignore underfull and overfull \string\hbox:}
+ \setcapindent{0pt}%
+% \begin{center}
+ \begin{captionbeside}
+ [{%
+ Example of a user defined, line dominated page style%
+ }]{%
+ example of a user defined, line dominated page style
+ with a static and a running heading at the page header and a page number
+ centered at the page footer%
+ \label{fig:scrpage2.tomuchlines}%
+ }
+ [l]
+ \iffree{\setlength{\unitlength}{1.15mm}}{\setlength{\unitlength}{1mm}}%
+ \begin{picture}(85,51)\scriptsize
+ \thinlines
+ \put(0,0){\line(0,1){51}}
+ \put(45,0){\line(0,1){51}}
+ \put(0,51){\line(1,0){40}}
+ \put(45,51){\line(1,0){40}}
+ %
+ \thicklines
+ \put(40,0){\line(0,1){51}}
+ \put(85,0){\line(0,1){51}}
+ \put(0,0,){\line(1,0){40}}
+ \put(45,0){\line(1,0){40}}
+ %
+ \XmpHeading[Report\hfill 2. The Eye]{6,47}{30}
+ \XmpHeading[2.1 Retina\hfill Report]{49,47}{30}
+ \XmpHeading[\hfill 14\hfill]{6,6.5}{30}
+ \XmpHeading[\hfill 15\hfill]{49,6.5}{30}
+ \put(6,44){\makebox(0,0)[tl]{\parbox{30\unitlength}{\tiny%
+ \textbf{2.1 Retina}\\
+ \XmpText[49]}}}
+ \put(49,44){\makebox(0,0)[tl]{\parbox{30\unitlength}{\tiny%
+ \XmpText[51]}}}
+ %
+ \thinlines
+ \XmpRule{6,45.5}{30}\XmpRule{49,45.5}{30}
+ \XmpRule{6,8}{30}\XmpRule{49,8}{30}
+ \linethickness{1pt}
+ \XmpRule{6,49}{30}\XmpRule{49,49}{30}
+ \XmpRule{6,5}{30}\XmpRule{49,5}{30}
+ \end{picture}
+% \end{center}
+ \end{captionbeside}
+ \typeout{^^J--- Don't ignore underfull and overfull \string\hbox:^^J}
+\end{figure}
\end{Example}
\EndIndex{Cmd}{deftripstyle}
+
\subsection{The Interface for Experts}\label{sec:scrpage.UI.expert}
% \defpagestyle \newpagestyle \providepagestyle \renewpagestyle
-\BeginIndex{Cmd}{defpagestyle}\BeginIndex{Cmd}{newpagestyle}
-\BeginIndex{Cmd}{renewpagestyle}\BeginIndex{Cmd}{providepagestyle}
\Index{page>style}
Simple page styles, as they can be defined with \Macro{deftripstyle},
are fairly rare according to experience. Either a professor requires
@@ -1140,11 +1259,12 @@ solution is:
\Macro{renewpagestyle}\Parameter{name}\Parameter{header definition}\Parameter{footer definition}\\
\Macro{providepagestyle}\Parameter{name}\Parameter{header definition}\Parameter{footer definition}
\end{Declaration}%
+\BeginIndex{Cmd}{defpagestyle}\BeginIndex{Cmd}{newpagestyle}%
+\BeginIndex{Cmd}{renewpagestyle}\BeginIndex{Cmd}{providepagestyle}%
These four commands give full access to the capabilities of
\Package{scrpage2} to define page styles. Their structure is
indentical, they differ only in the manner of working.
-
-\begin{labeling}[\,--]{\Macro{providepagestyle}}
+\begin{labeling}[\ --]{\Macro{providepagestyle}}
\item[\Macro{defpagestyle}] defines a new page style.
If a page style with this name already exists it will be overwritten.
\item[\Macro{newpagestyle}] defines a new page style.
@@ -1156,43 +1276,47 @@ If a page style with this name does not exist a error message will be given.
Using \Macro{defpagestyle} as an example, the syntax of the four
commands is explained below.
-\begin{labeling}[\,--]{\PName{head definition}}
+\begin{labeling}[~--]{\PName{head definition}}
\item[\PName{name}] the name of the page style for
- \Macro{pagestyle}\Parameter{name}
-\item[\PName{header definition}] the declaration of the header, consisting
- of five element; elements in round parenthesis are optional:\\
-\AParameter{ALL,ALT}\Parameter{EP}\Parameter{OP}\Parameter{OS}\AParameter{BLL,BLT}
+ \Macro{pagestyle}\Parameter{name}
+\item[\PName{header definition}] the declaration of the header, consisting
+ of five element; elements in round parenthesis are optional:\hfill\\
+ \hspace*{1em}\AParameter{ALL,ALT}%
+ \Parameter{EP}\Parameter{OP}\Parameter{OS}\AParameter{BLL,BLT}
\item[\PName{footer definition}] the declaration of the footer, consisting
- of five element; elements in round parenthesis are optional:\\
-\AParameter{ALL,ALT}\Parameter{EP}\Parameter{OP}\Parameter{OS}\AParameter{BLL,BLT}
+ of five element; elements in round parenthesis are optional:\hfill\\
+ \hspace*{1em}\AParameter{ALL,ALT}%
+ \Parameter{EP}\Parameter{OP}\Parameter{OS}\AParameter{BLL,BLT}
\end{labeling}
As can be seen, header and footer declaration have identical
structure. The individual parameters have the following meanings:
-\begin{labeling}[\,--]{\PName{OLD}}
-\item[\PName{ALL}] above line length: (header = outside, footer = separation line)
+\begin{labeling}[\ --]{\PName{OLD}}
+\item[\PName{ALL}] above line length: (header = outside, footer = separation
+ line)
\item[\PName{ALT}] above line thickness
\item[\PName{EP}] definition for \emph{even} pages
\item[\PName{OP}] definition for \emph{odd} pages
\item[\PName{OS}] definition for \emph{one-sided} layout
-\item[\PName{BLL}] below line length: (header = separation line, footer = outside)
+\item[\PName{BLL}] below line length: (header = separation line, footer =
+ outside)
\item[\PName{BLT}] below line thickness
\end{labeling}
-If the optional line-parameters are omitted, then the line behaviour
-remains configurable by the commands introduced in
+
+If the optional line-parameters are omitted, then the line behaviour remains
+configurable by the commands introduced in
\autoref{sec:scrpage.basics.format},
\autopageref{desc:scrpage.cmd.setheadtopline}.
-The three elements \PName{EP}, \PName{OP} and \PName{OS} are boxes
-with the width of page header or footer, as appropriate. The
-corresponding definitions are set left-justified in the boxes. To set
-something left- and right-justified into the boxes, the space between
-two text elements can be stretched using \Macro{hfill}, in order to
-write the first text element on the left edge \emph{and}:
+The three elements \PName{EP}, \PName{OP} and \PName{OS} are boxes with the
+width of page header or footer, as appropriate. The corresponding definitions
+are set left-justified in the boxes. To set something left- \emph{and}
+right-justified into the boxes, the space between two text elements can be
+stretched using \Macro{hfill}:
%
-\begin{lstlisting}
+\begin{lstcode}[belowskip=\dp\strutbox]
{\headmark\hfill\pagemark}
-\end{lstlisting}
+\end{lstcode}
If one would like a third text-element centered in the box, then an
extended definition must be used. The commands \Macro{rlap} and
@@ -1200,13 +1324,15 @@ extended definition must be used. The commands \Macro{rlap} and
take up no horizontal space. Only in this way is the middle text
really centered.
%
-\begin{lstlisting}
+\begin{lstcode}
{\rlap{\headmark}\hfill centered text\hfill\llap{\pagemark}}
-\end{lstlisting}
+\end{lstcode}
+\iffalse% Umbruchkorrekturtext
This and the use of the expert interface in connection with other
commands provided by \Package{scpage2} follows now in the final
example.
+\fi
\begin{Example}
This examples uses the document class \Class{scrbook}, which means
@@ -1214,32 +1340,33 @@ example.
\Package{scrpage2} is loaded with options \Option{automark} and
\Option{headsepline}. The first switches on the automatic update of
running headings, the second determines that a separation line
- between header and text body is drawn in the \PValue{scrheadings}
+ between header and text body is drawn in the \Pagestyle{scrheadings}
page style.
-\begin{lstlisting}
+\begin{lstcode}
\documentclass{scrbook}
\usepackage[automark,headsepline]{scrpage2}
-\end{lstlisting}
+\end{lstcode}
-The expert interface is used to define two page styles. The page
-style \PValue{withoutLines} does not define any line parameters. The
-second page style \PValue{withLines} defines a line thicknes of 1\,pt
-for the line above the header and 0\,pt for the separation line
-between header and text.
+ The expert interface is used to define two page styles. The page
+ style \PValue{withoutLines} does not define any line parameters. The
+ second page style \PValue{withLines} defines a line thicknes of 1\,pt
+ for the line above the header and 0\,pt for the separation line
+ between header and text.
-\begin{lstlisting}
+\begin{lstcode}
\defpagestyle{withoutLines}{%
{Example\hfill\headmark}{\headmark\hfill without lines}
{\rlap{Example}\hfill\headmark\hfill%
\llap{without lines}}
}{%
- {\pagemark\hfill}{\hfill\pagemark}
+ {\pagemark\hfill}
+ {\hfill\pagemark}
{\hfill\pagemark\hfill}
}
-\end{lstlisting}
+\end{lstcode}
-\begin{lstlisting}
+\begin{lstcode}
\defpagestyle{withLines}{%
(\textwidth,1pt)
{with lines\hfill\headmark}{\headmark\hfill with lines}
@@ -1248,113 +1375,105 @@ between header and text.
(0pt,0pt)
}{%
(\textwidth,.4pt)
- {\pagemark\hfill}{\hfill\pagemark}
+ {\pagemark\hfill}
+ {\hfill\pagemark}
{\hfill\pagemark\hfill}
(\textwidth,1pt)
}
-\end{lstlisting}
-
-Right at the beginning of the document the page style
-\PValue{scrheadings} is activated. The command \Macro{chapter} starts
-a new chapter and automatically sets the page rstyle for this page to
-\PValue{plain}. Even though not a prime example, the command
-\Macro{chead} shows how running headings can be created even on a
-\PValue{plain} page. However, in principle running headings on
-chapter start-pages are to be avoided, since otherwise the special
-character of the \PValue{plain} page style is lost. It is more
-important to indicate that a new chapter starts here than that a
-section of this page has a special title.
-
-\begin{Explain}% not important, only to enhance the paragraph breaking
-Instead of \Macro{leftmark} one would expect
-the use of \Macro{rightmark} in the parameter
-of \Macro{chead}, since the chapter starts on an even
-page. But, because of internal {\LaTeX} definitions,
-this does not work. It only returns an empty string.
-\end{Explain}
-\begin{lstlisting}
+\end{lstcode}
+
+ Right at the beginning of the document the page style
+ \Pagestyle{scrheadings} is activated. The command \Macro{chapter} starts
+ a new chapter and automatically sets the page rstyle for this page to
+ \Pagestyle{plain}. Even though not a prime example, the command
+ \Macro{chead} shows how running headings can be created even on a
+ plain page. However, in principle running headings on
+ chapter start-pages are to be avoided, since otherwise the special
+ character of the \Pagestyle{plain} page style is lost. It is more
+ important to indicate that a new chapter starts here than that a
+ section of this page has a special title.
+
+\begin{lstcode}
\begin{document}
\pagestyle{scrheadings}
\chapter{Thermodynamics}
-
\chead[\leftmark]{}
-
\section{Main Laws}
Every system has an extensive state quantity called
Energy. In a closed system the energy is constant.
-\end{lstlisting}
-
-\begin{XmpTopPage}
- \XmpHeading[\hfill\textsl{1. Thermodynamics}\hfill]{10,27}{70}
- \put(10,17){\normalsize\textbf{\sffamily 1.Thermodynamics}}
- \put(10,12){\textbf{\sffamily 1.1 Main Laws}}
- \XmpSetText[%
- Every System has an extensive state quantity]{10,9}
-\end{XmpTopPage}
-
-After starting a new page the page style \PValue{scrheadings} is
-active and thus the separation line below the header is visible.
-\begin{lstlisting}
+\end{lstcode}
+
+ \begin{XmpTopPage}
+ \XmpHeading[\hfill\textsl{1. Thermodynamics}\hfill]{10,27}{70}
+ \put(10,17){\normalsize\textbf{\sffamily 1.Thermodynamics}}
+ \put(10,12){\textbf{\sffamily 1.1 Main Laws}}
+ \XmpSetText[%
+ Every System has an extensive state quantity]{10,9}
+ \end{XmpTopPage}
+
+ After starting a new page the page style \Pagestyle{scrheadings} is
+ active and thus the separation line below the header is visible.
+\begin{lstcode}
There is a state quatity of a system, called entropy, whose temporal
change consists of entropy flow and entropy generation.
-\end{lstlisting}
-\begin{XmpTopPage}
- \XmpHeading[\textsl{1. Thermodynamics}\hfill]{20,27}{70}
- \thinlines\XmpRule{20,25}{70}
- \XmpSetText[%
- There is a condition unit of a system, called entropy,
- whose temporal change consists of entropy flow
- and entropy generation.]{20,20}
-\end{XmpTopPage}
-
-After switching to the next page, the automatic update of the running
-headings is disabled using \Macro{manualmark}, and the page style
-\PValue{withoutLines} becomes active. Since no line parameters are
-given in the definition of this page style, the default configuration
-is used, which draws a separation line between header and text body
-because \Package{scrpage2} was called with \Option{headsepline}.
-\begin{XmpTopPage}
- \XmpHeading[\slshape Energy Conversion\hfill without lines]{10,27}{70}
- \thinlines\XmpRule{10,25}{70}
- \XmpSetText[%
- \textbf{\sffamily 1.2 Exergy and Anergy}\\
- During the transition of a system to an equilibrium state
- with its environment, the maximum work gainable is called
- exergy.]{10,21}
-\end{XmpTopPage}
-
-\begin{lstlisting}
+\end{lstcode}
+ \begin{XmpTopPage}
+ \XmpHeading[\textsl{1. Thermodynamics}\hfill]{20,27}{70}
+ \thinlines\XmpRule{20,25}{70}
+ \XmpSetText[%
+ There is a condition unit of a system, called entropy,
+ whose temporal change consists of entropy flow
+ and entropy generation.]{20,20}
+ \end{XmpTopPage}
+
+ After switching to the next page, the automatic update of the running
+ headings is disabled using \Macro{manualmark}, and the page style
+ \PValue{withoutLines} becomes active. Since no line parameters are
+ given in the definition of this page style, the default configuration
+ is used, which draws a separation line between header and text body
+ because \Package{scrpage2} was called with \Option{headsepline}.
+\begin{lstcode}
\manualmark
\pagestyle{withoutLines}
\section{Exergy and Anergy}\markright{Energy Conversion}
During the transition of a system to an equilibrium state
with its environment, the maximum work gainable is called
exergy.
-\end{lstlisting}
-
-At the next page of the document, the page style \PValue{withLines} is
-activated. The line settings of its definition are taken in account
-and the lines are drawn accordingly.
-\begin{lstlisting}
+\end{lstcode}
+ \begin{XmpTopPage}
+ \XmpHeading[\slshape Energy Conversion\hfill without lines]{10,27}{70}
+ \thinlines\XmpRule{10,25}{70}
+ \XmpSetText[\setlength{\parfillskip}{0pt plus 1fil}%
+ \textbf{\sffamily 1.2 Exergy and Anergy}\\
+ During the transition of a system to an equilibrium state
+ with its environment, the maximum work gainable is called
+ exergy.]{10,21}
+ \end{XmpTopPage}
+
+ At the next page of the document, the page style \PValue{withLines} is
+ activated. The line settings of its definition are taken in account
+ and the lines are drawn accordingly.
+\begin{lstcode}
\pagestyle{mitLinien}
\renewcommand{\headfont}{\itshape\bfseries}
The portion of an energy not convertible in exergy
is named anergy \Var{B}.
\[ B = U + T (S_1 - S_u) - p (V_1 - V_u)\]
\end{document}
-\end{lstlisting}
-\begin{XmpTopPage}
- \XmpHeading[\itshape\bfseries with lines\hfill 1. Thermodynamics]{20,27}{70}
- \thicklines\XmpRule{20,29}{70}
- \XmpSetText[%
- The portion of an energy not convertible in exergy
- is named anergy $B$.
- \[ B = U + T (S_1 - S_u) - p (V_1 - V_u)\] ]{20,20}
-\end{XmpTopPage}
+\end{lstcode}
+ \begin{XmpTopPage}
+ \XmpHeading[\itshape\bfseries with lines\hfill 1. Thermodynamics]{20,27}{70}
+ \thicklines\XmpRule{20,29}{70}
+ \XmpSetText[\setlength{\parfillskip}{0pt plus 1fil}%
+ The portion of an energy not convertible in exergy
+ is named anergy $B$.
+ \[ B = U + T (S_1 - S_u) - p (V_1 - V_u)\] ]{20,20}
+ \end{XmpTopPage}
\end{Example}
\EndIndex{Cmd}{defpagestyle}\EndIndex{Cmd}{newpagestyle}
\EndIndex{Cmd}{renewpagestyle}\EndIndex{Cmd}{providepagestyle}
+
\subsection{Managing Page Styles}\label{sec:scrpage.UI.cfgFile}
% scrpage.cfg
\BeginIndex{File}{scrpage.cfg}
@@ -1368,8 +1487,11 @@ styles which many projects can share.
\EndIndex{File}{scrpage.cfg}
\EndIndex{Package}{scrpage2}
+\endinput
+
+
%%% Local Variables:
%%% mode: latex
-%%% coding: iso-latin-1
+%%% coding: us-ascii
%%% TeX-master: "../guide"
%%% End: