summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrpage2.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-11 23:46:49 +0000
committerKarl Berry <karl@freefriends.org>2007-10-11 23:46:49 +0000
commit82dc50c595ce8268fd46c4af7ce77bf20af120d0 (patch)
tree6c051b86aedada971bc69a4cd18495683df13e8b /Master/texmf-dist/tex/latex/koma-script/scrpage2.sty
parentbc91a8ed9ae14ad4f0805df6c244b55063d69414 (diff)
koma-script 2.97c (10oct07)
git-svn-id: svn://tug.org/texlive/trunk@5160 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrpage2.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/scrpage2.sty491
1 files changed, 253 insertions, 238 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrpage2.sty b/Master/texmf-dist/tex/latex/koma-script/scrpage2.sty
index e152a442f4e..8189fd75643 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrpage2.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/scrpage2.sty
@@ -40,7 +40,7 @@
%%% From File: scrpage.dtx
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{scrpage2}
- [2006/03/29 v2.2c LaTeX2e KOMA-Script
+ [2007/07/23 v2.2e LaTeX2e KOMA-Script
package]
\DeclareOption{headinclude}{\PassOptionsToPackage{headinclude}{typearea}}
\DeclareOption{headexclude}{\PassOptionsToPackage{headexclude}{typearea}}
@@ -128,7 +128,20 @@
\fi
\def\@tempa{\newif\if@mainmatter\@mainmattertrue}
\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname mainmatter\endcsname\relax\else\let\@tempa\relax\fi
+\expandafter\ifx\csname mainmatter\endcsname\relax
+\else
+ \@ifundefined{@mainmattertrue}{%
+ \PackageWarningNoLine{scrpage2}{%
+ \string\mainmatter\space defined without
+ \string\if@mainmatter!\MessageBreak
+ This switch is obligatory for scrpage2 to omit\MessageBreak
+ running head chapter numbers in front and\MessageBreak
+ back matter and will be defined now%
+ }%
+ }{%
+ \let\@tempa\relax
+ }%
+\fi
\@tempa
\let\headmark\relax
\DeclareRobustCommand\pagemark{{\pnumfont\thepage}}
@@ -155,13 +168,13 @@
}
\fi
\def\def@twosidehead{%
- \@ifnextchar(
- {\def@@twosidehead}
+ \@ifnextchar(%)
+ {\def@@twosidehead}%
{\def@@twosidehead(\scr@headabove@linelength,%
\scr@headabove@linethickness)}}
\def\def@@twosidehead(#1,#2)#3#4#5{%
- \@ifnextchar(
- {\def@@@twosidehead({#1},{#2}){#3}{#4}{#5}}
+ \@ifnextchar(%)
+ {\def@@@twosidehead({#1},{#2}){#3}{#4}{#5}}%
{\def@@@twosidehead({#1},{#2}){#3}{#4}{#5}%
(\scr@headbelow@linelength,%
\scr@headbelow@linethickness)}}
@@ -171,96 +184,96 @@
\hf@rule{#1}{#2}{\@headwidth}%
{headabove}%
\vskip#2
- \vskip\baselineskip%
+ \vskip\baselineskip
\hb@xt@\@headwidth{{%
- \scr@nouppercase%
+ \scr@nouppercase
\headfont\strut #3}}%
\hf@rule{#6}{#7}{\@headwidth}%
{headbelow}%
- }\hskip\@oddheadshift\hss}
- \def\@oddhead{\let\headmark\rightmark%
- \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax%
+ }\hskip\@oddheadshift\hss}%
+ \def\@oddhead{\let\headmark\rightmark
+ \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax
\hf@rule{#1}{#2}{\@headwidth}%
{headabove}%
- \vskip#2
- \vskip\baselineskip%
+ \vskip#2%
+ \vskip\baselineskip
\hb@xt@\@headwidth{{%
- \scr@nouppercase%
+ \scr@nouppercase
\headfont\strut #4}}%
\hf@rule{#6}{#7}{\@headwidth}%
{headbelow}%
- }\hskip\@evenheadshift\hss}
+ }\hskip\@evenheadshift\hss}%
}
\def\def@onesidehead{%
- \@ifnextchar(
- {\def@@onesidehead}
+ \@ifnextchar(%)
+ {\def@@onesidehead}%
{\def@@onesidehead(\scr@headabove@linelength,%
\scr@headabove@linethickness)}}
\def\def@@onesidehead(#1,#2)#3#4#5{%
- \@ifnextchar(
- {\def@@@onesidehead({#1},{#2}){#3}{#4}{#5}}
+ \@ifnextchar(%)
+ {\def@@@onesidehead({#1},{#2}){#3}{#4}{#5}}%
{\def@@@onesidehead({#1},{#2}){#3}{#4}{#5}%
(\scr@headbelow@linelength,%
\scr@headbelow@linethickness)}}
\def\def@@@onesidehead(#1,#2)#3#4#5(#6,#7){%
- \def\@evenhead{}
- \def\@oddhead{\let\headmark\rightmark%
- \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax%
+ \def\@evenhead{}%
+ \def\@oddhead{\let\headmark\rightmark
+ \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax
\hf@rule{#1}{#2}{\@headwidth}%
{headabove}%
\vskip#2%
- \vskip\baselineskip%
+ \vskip\baselineskip
\hb@xt@\@headwidth{{%
- \scr@nouppercase%
- \headfont\strut #5}}
+ \scr@nouppercase
+ \headfont\strut #5}}%
\hf@rule{#6}{#7}{\@headwidth}%
{headbelow}%
- }\hskip\@evenheadshift\hss}
+ }\hskip\@evenheadshift\hss}%
}
\def\def@twosidefoot{%
- \@ifnextchar(
+ \@ifnextchar(%)
{\def@@twosidefoot}
{\def@@twosidefoot(\scr@footabove@linelength,%
\scr@footabove@linethickness)}}
\def\def@@twosidefoot(#1,#2)#3#4#5{%
- \@ifnextchar(
- {\def@@@twosidefoot({#1},{#2}){#3}{#4}{#5}}
+ \@ifnextchar(%)
+ {\def@@@twosidefoot({#1},{#2}){#3}{#4}{#5}}%
{\def@@@twosidefoot({#1},{#2}){#3}{#4}{#5}%
(\scr@footbelow@linelength,%
\scr@footbelow@linethickness)}}
\def\def@@@twosidefoot(#1,#2)#3#4#5(#6,#7){%
- \def\@evenfoot{\let\headmark\leftmark%
- \hss\hskip\@evenfootshift\vbox{\hsize=\@footwidth\relax%
+ \def\@evenfoot{\let\headmark\leftmark
+ \hss\hskip\@evenfootshift\vbox{\hsize=\@footwidth\relax
\topfoot@rule{#1}{#2}\hb@xt@\@footwidth{{%
- \scr@nouppercase%
+ \scr@nouppercase
\headfont\strut #3}}%
- \botfoot@rule{#6}{#7}}\hskip\@oddfootshift\hss}
- \def\@oddfoot{\let\headmark\rightmark%
- \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax%
+ \botfoot@rule{#6}{#7}}\hskip\@oddfootshift\hss}%
+ \def\@oddfoot{\let\headmark\rightmark
+ \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax
\topfoot@rule{#1}{#2}\hb@xt@\@footwidth{{%
- \scr@nouppercase%
+ \scr@nouppercase
\headfont\strut #4}}%
- \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}
+ \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}%
}
\def\def@onesidefoot{%
- \@ifnextchar(
- {\def@@onesidefoot}
+ \@ifnextchar(%)
+ {\def@@onesidefoot}%
{\def@@onesidefoot(\scr@footabove@linelength,%
\scr@footabove@linethickness)}}
\def\def@@onesidefoot(#1,#2)#3#4#5{%
- \@ifnextchar(
- {\def@@@onesidefoot({#1},{#2}){#3}{#4}{#5}}
+ \@ifnextchar(%)
+ {\def@@@onesidefoot({#1},{#2}){#3}{#4}{#5}}%
{\def@@@onesidefoot({#1},{#2}){#3}{#4}{#5}%
(\scr@footbelow@linelength,%
\scr@footbelow@linethickness)}}
\def\def@@@onesidefoot(#1,#2)#3#4#5(#6,#7){%
- \def\@evenfoot{}
- \def\@oddfoot{\let\headmark\rightmark%
- \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax%
+ \def\@evenfoot{}%
+ \def\@oddfoot{\let\headmark\rightmark
+ \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax
\topfoot@rule{#1}{#2}\hb@xt@\@footwidth{{%
- \scr@nouppercase%
+ \scr@nouppercase
\headfont\strut #5}}
- \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}
+ \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}%
}
\newcommand\topfoot@rule[2]{%
\@tempdima\baselineskip\advance\@tempdima by-.7\normalbaselineskip
@@ -289,7 +302,7 @@
\edef\@tempa{\hfline@adjust}%
\fi
\ifnum\@tempa=1
- \setlength{\@tempdimb}{.5\@tempdimb}
+ \setlength{\@tempdimb}{.5\@tempdimb}%
\fi
\hb@xt@#3{%
\ifnum\@tempa>0
@@ -316,46 +329,46 @@
\@ifstar
{\@newpagestyle[-]}%
{\@newpagestyle[+]}}
-\def\@newpagestyle[#1]#2#3#4{
+\def\@newpagestyle[#1]#2#3#4{%
\expandafter\ifx\csname ps@#2\endcsname\relax
- \@defpagestyle[#1]{#2}{#3}{#4}
+ \@defpagestyle[#1]{#2}{#3}{#4}%
\else
\PackageError
- {scrpage2}
+ {scrpage2}%
{Your command was ignored}%
{There is already a pagestyle named ``#1''.\MessageBreak%
Use \protect\defpagestyle\space, \protect\renewpagestyle or
- \protect\providepagestyle.}
+ \protect\providepagestyle.}%
\fi
}
\def\renewpagestyle{%
\@ifstar
{\@renewpagestyle[-]}%
{\@renewpagestyle[+]}}
-\def\@renewpagestyle[#1]#2#3#4{
+\def\@renewpagestyle[#1]#2#3#4{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname ps@#2\endcsname\relax
\PackageError
- {scrpage2}
+ {scrpage2}%
{Your command was ignored}%
{There is no pagestyle named ``#1''.\MessageBreak%
Use \protect\defpagestyle, \protect\newpagestyle or
- \protect\providepagestyle.}
+ \protect\providepagestyle.}%
\else
- \@defpagestyle[#1]{#2}{#3}{#4}
+ \@defpagestyle[#1]{#2}{#3}{#4}%
\fi
}
\def\providepagestyle{%
\@ifstar
{\@providepagestyle[-]}%
{\@providepagestyle[+]}}
-\def\@providepagestyle[#1]#2#3#4{
+\def\@providepagestyle[#1]#2#3#4{%
\expandafter\ifx\csname ps@#2\endcsname\relax
- \@defpagestyle[#1]{#2}{#3}{#4}
+ \@defpagestyle[#1]{#2}{#3}{#4}%
\else
\PackageInfo
- {scrpage2}
- {\protect\providepagestyle\protect{#1\protect} ignored.}
+ {scrpage2}%
+ {\protect\providepagestyle\protect{#1\protect} ignored.}%
\fi
}
\def\deftripstyle{%
@@ -363,50 +376,50 @@
{\@deftripstyle[-]}%
{\@deftripstyle[+]}}
\def\@deftripstyle[#1]#2{%
- \@ifnextchar[
+ \@ifnextchar[%]
{\@@deftripstyle[#1]{#2}}%
{\@@deftripstyle[#1]{#2}[\z@]}}
-\def\@@deftripstyle[#1]#2[#3]{
- \def\@tempa{#1}
- \@ifnextchar[
+\def\@@deftripstyle[#1]#2[#3]{%
+ \def\@tempa{#1}%
+ \@ifnextchar[%]
{\@@@deftripstyle#2[#3]}%
{\@@@deftripstyle#2[\z@][#3]}}
\def\@@@deftripstyle#1[#2][#3]#4#5#6#7#8#9{%
- \def\@tempb{+}
- \ifx\@tempa\@tempb%
+ \def\@tempb{+}%
+ \ifx\@tempa\@tempb
\defpagestyle{#1}%
{(\@headwidth,#2)%
{\rlap{#6}\hfill{#5}\hfill\llap{#4}}%
{\rlap{#4}\hfill{#5}\hfill\llap{#6}}%
{\rlap{#4}\hfill{#5}\hfill\llap{#6}}%
- (\@headwidth,#3)}
+ (\@headwidth,#3)}%
{(\@footwidth,#3)%
{\rlap{#9}\hfill{#8}\hfill\llap{#7}}%
{\rlap{#7}\hfill{#8}\hfill\llap{#9}}%
{\rlap{#7}\hfill{#8}\hfill\llap{#9}}%
- (\@footwidth,#2)}
+ (\@footwidth,#2)}%
\else
\defpagestyle*{#1}%
{(\@headwidth,#2)%
{\rlap{#6}\hfill{#5}\hfill\llap{#4}}%
{\rlap{#4}\hfill{#5}\hfill\llap{#6}}%
{\rlap{#4}\hfill{#5}\hfill\llap{#6}}%
- (\@headwidth,#3)}
+ (\@headwidth,#3)}%
{(\@footwidth,#3)%
{\rlap{#9}\hfill{#8}\hfill\llap{#7}}%
{\rlap{#7}\hfill{#8}\hfill\llap{#9}}%
{\rlap{#7}\hfill{#8}\hfill\llap{#9}}%
- (\@footwidth,#2)}
+ (\@footwidth,#2)}%
\fi
}
\newcommand*{\@iflevelok}[4]{%
- \begingroup%
- \edef\@tempa{#1}\ifx\@tempa\@empty\def\@tempa{\endgroup #3}\else%
+ \begingroup
+ \edef\@tempa{#1}\ifx\@tempa\@empty\def\@tempa{\endgroup #3}\else
\def\@tempa{\csname #1level\endcsname}%
\def\@tempb{\csname #2level\endcsname}%
- \ifnum \@tempa>\@tempb%
+ \ifnum \@tempa>\@tempb
\def\@tempa{\endgroup#3}%
- \else%
+ \else
\def\@tempa{\endgroup#4}%
\fi\fi\@tempa}
\providecommand{\markleft}[1]{%
@@ -425,13 +438,13 @@
\begingroup
\edef\@tempa{#2}\ifx\@tempa\@empty
\endgroup
- \PackageWarning{scrpage2}
- {\string\automark\space with empty obligatory argument}
+ \PackageWarning{scrpage2}%
+ {\string\automark\space with empty obligatory argument}%
\else
\endgroup
\expandafter\def\csname #2mark\endcsname##1{%
\begingroup
- \def\@tempa{\csname #2level\endcsname}
+ \def\@tempa{\csname #2level\endcsname}%
\@tempswafalse
\ifnum \c@secnumdepth <\@tempa\else\if@mainmatter
\@tempswatrue
@@ -440,7 +453,7 @@
\if@twoside\edef\@tempb{#2}\else\let\@tempb\@tempa\fi
\ifx\@tempa\@tempb
\if@tempswa
- \@mkboth{\MakeMarkcase{\csname #2markformat\endcsname ##1}}
+ \@mkboth{\MakeMarkcase{\csname #2markformat\endcsname ##1}}%
{\MakeMarkcase{\csname #2markformat\endcsname ##1}}%
\else%
\@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
@@ -456,14 +469,14 @@
\else
\@iflevelok{#1}{#2}{%
\@mkboth{\MakeMarkcase{##1}}{}}{%
- \ifx\@mkboth\markboth\markleft{\MakeMarkcase{##1}}\fi}
+ \ifx\@mkboth\markboth\markleft{\MakeMarkcase{##1}}\fi}%
\fi
\fi
\endgroup
}
\fi
\begingroup
- \edef\@tempa{#1}\edef\@tempb{#2}
+ \edef\@tempa{#1}\edef\@tempb{#2}%
\if@autooneside\if@twoside\else\let\@tempa\@empty\fi\fi
\ifx\@tempa\@empty
\endgroup
@@ -474,7 +487,7 @@
\endgroup
\expandafter\def\csname #1mark\endcsname##1{%
\begingroup
- \def\@tempa{\csname #1level\endcsname}
+ \def\@tempa{\csname #1level\endcsname}%
\@tempswafalse
\ifnum \c@secnumdepth <\@tempa\else\if@mainmatter
\@tempswatrue
@@ -486,13 +499,13 @@
##1}}%
\fi}{%
\@mkboth{}{\MakeMarkcase{\csname #1markformat\endcsname
- ##1}}}
+ ##1}}}%
\else
\@iflevelok{#1}{#2}{%
\ifx\@mkboth\markboth
\markright{\MakeMarkcase{##1}}%
\fi}{%
- \@mkboth{}{\MakeMarkcase{##1}}}
+ \@mkboth{}{\MakeMarkcase{##1}}}%
\fi
\endgroup
}
@@ -520,7 +533,7 @@
\newcommand*{\subsubsectionlevel}{3}
\newcommand*{\paragraphlevel}{4}
\newcommand*{\subparagraphlevel}{5}
-\@ifundefined{MakeMarkcase}{
+\@ifundefined{MakeMarkcase}{%
\@ifclassloaded{scrbook}{\let\MakeMarkcase\relax}{%
\@ifclassloaded{scrreprt}{\let\MakeMarkcase\relax}{%
\@ifclassloaded{scrartcl}{\let\MakeMarkcase\relax}{%
@@ -532,44 +545,44 @@
use of scrpage2 with unknown class.\MessageBreak
Please mail to markus.kohm@gmx.de, if
headmarks\MessageBreak
- are lower case without use of scrpage2}}}}
+ are lower case without use of scrpage2}}}}%
\let\MakeMarkcase\MakeUppercase}}}}}{}
-\@ifundefined{scrheadings@style}{
+\@ifundefined{scrheadings@style}{%
\@ifclassloaded{scrbook}{\def\scrheadings@style{koma}}{%
\@ifclassloaded{scrreprt}{\def\scrheadings@style{koma}}{%
\@ifclassloaded{scrartcl}{\def\scrheadings@style{koma}}{%
\@ifclassloaded{scrlttr2}{\def\scrheadings@style{koma}}{%
\def\scrheadings@style{standard}}}}}}{}
\newcommand*{\settowidthof}[2]{%
- \edef\@tempa{#2}
+ \edef\@tempa{#2}%
\edef\@tempb{paper}\ifx\@tempa\@tempb
- \setlength{#1}{\paperwidth}
+ \setlength{#1}{\paperwidth}%
\else\edef\@tempb{text}\ifx\@tempa\@tempb
- \setlength{#1}{\textwidth}
+ \setlength{#1}{\textwidth}%
\else\edef\@tempb{textwithmarginpar}\ifx\@tempa\@tempb
- \setlength{#1}{\textwidth}
- \addtolength{#1}{\marginparwidth}
- \addtolength{#1}{\marginparsep}
+ \setlength{#1}{\textwidth}%
+ \addtolength{#1}{\marginparwidth}%
+ \addtolength{#1}{\marginparsep}%
\else\edef\@tempb{head}\ifx\@tempa\@tempb
- \setlength{#1}{\@headwidth}
+ \setlength{#1}{\@headwidth}%
\else\edef\@tempb{foot}\ifx\@tempa\@tempb
- \setlength{#1}{\@footwidth}
+ \setlength{#1}{\@footwidth}%
\else\edef\@tempb{headtopline}\ifx\@tempa\@tempb
- \setlength{#1}{\scr@headabove@linelength}
+ \setlength{#1}{\scr@headabove@linelength}%
\else\edef\@tempb{headsepline}\ifx\@tempa\@tempb
- \setlength{#1}{\scr@headbelow@linelength}
+ \setlength{#1}{\scr@headbelow@linelength}%
\else\edef\@tempb{footsepline}\ifx\@tempa\@tempb
- \setlength{#1}{\scr@footabove@linelength}
+ \setlength{#1}{\scr@footabove@linelength}%
\else\edef\@tempb{footbotline}\ifx\@tempa\@tempb
- \setlength{#1}{\scr@footbelow@linelength}
+ \setlength{#1}{\scr@footbelow@linelength}%
\else\edef\@tempb{page}\ifx\@tempa\@tempb
- \setlength{#1}{\paperwidth}
+ \setlength{#1}{\paperwidth}%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname ta@bcor\endcsname\relax\else
- \addtolength{#1}{-\ta@bcor}
+ \addtolength{#1}{-\ta@bcor}%
\fi
\else
- \setlength{#1}{#2}
+ \setlength{#1}{#2}%
\fi
\fi
\fi
@@ -583,81 +596,81 @@
}
\newcommand*{\deftowidthof}[2]{%
\edef\@tempa{#2}\edef\@tempb{autohead}\ifx\@tempa\@tempb
- \expandafter\def\csname #1\endcsname{\@headwidth}
+ \expandafter\def\csname #1\endcsname{\@headwidth}%
\else\edef\@tempb{autofoot}\ifx\@tempa\@tempb
- \expandafter\def\csname #1\endcsname{\@footwidth}
+ \expandafter\def\csname #1\endcsname{\@footwidth}%
\else
- \settowidthof{\@tempdima}{#2}
- \expandafter\edef\csname #1\endcsname{\the\@tempdima}
+ \settowidthof{\@tempdima}{#2}%
+ \expandafter\edef\csname #1\endcsname{\the\@tempdima}%
\fi
\fi
}
\newcommand*{\setheadwidth}[2][\@empty]{%
- \set@hf@width{head}{#1}{#2}
+ \set@hf@width{head}{#1}{#2} %
}
\newcommand*{\setfootwidth}[2][\@empty]{%
- \set@hf@width{foot}{#1}{#2}
+ \set@hf@width{foot}{#1}{#2}%
}
\newcommand*{\set@hf@width}[3]{%
- \settowidthof{\@tempdima}{#3}
+ \settowidthof{\@tempdima}{#3}%
\ifdim\@tempdima>\paperwidth
\PackageWarning
- {scrpage2}
+ {scrpage2}%
{You've set width of #1 to a value\MessageBreak
greater than width of page!\MessageBreak%
- I`ll reduce width of #1 to width of page}
- \setlength{\@tempdima}{\paperwidth}
+ I`ll reduce width of #1 to width of page}%
+ \setlength{\@tempdima}{\paperwidth}%
\else
\ifdim\@tempdima<\z@
\PackageWarning
- {scrpage2}
+ {scrpage2}%
{You've set width of #1 to negative value!\MessageBreak%
- I'll set it to 0pt}
- \setlength{\@tempdima}{\z@}
+ I'll set it to 0pt}%
+ \setlength{\@tempdima}{\z@}%
\fi
\fi
- \expandafter\edef\csname @#1width\endcsname{\the\@tempdima}
- \edef\@tempa{#2}
- \setlength{\@tempdima}{\textwidth}
- \addtolength{\@tempdima}{-\csname @#1width\endcsname}
+ \expandafter\edef\csname @#1width\endcsname{\the\@tempdima}%
+ \edef\@tempa{#2}%
+ \setlength{\@tempdima}{\textwidth}%
+ \addtolength{\@tempdima}{-\csname @#1width\endcsname}%
\ifx\@tempa\@empty
\if@twoside
- \setlength{\@tempdimb}{.3333333333\@tempdima}
+ \setlength{\@tempdimb}{.3333333333\@tempdima}%
\else
- \setlength{\@tempdimb}{.5\@tempdima}
+ \setlength{\@tempdimb}{.5\@tempdima}%
\fi
\else
- \setlength{\@tempdimb}{#2}
+ \setlength{\@tempdimb}{#2}%
\fi
- \addtolength{\@tempdima}{-\@tempdimb}
+ \addtolength{\@tempdima}{-\@tempdimb}%
\ifdim\@tempdimb<\z@
- \setlength{\@tempdimb}{-\@tempdimb}
- \expandafter\edef\csname @odd#1shift\endcsname{-\the\@tempdimb}
+ \setlength{\@tempdimb}{-\@tempdimb}%
+ \expandafter\edef\csname @odd#1shift\endcsname{-\the\@tempdimb}%
\else
- \expandafter\edef\csname @odd#1shift\endcsname{\the\@tempdimb}
+ \expandafter\edef\csname @odd#1shift\endcsname{\the\@tempdimb}%
\fi
\ifdim\@tempdima<\z@
- \setlength{\@tempdima}{-\@tempdima}
- \expandafter\edef\csname @even#1shift\endcsname{-\the\@tempdima}
+ \setlength{\@tempdima}{-\@tempdima}%
+ \expandafter\edef\csname @even#1shift\endcsname{-\the\@tempdima}%
\else
- \expandafter\edef\csname @even#1shift\endcsname{\the\@tempdima}
+ \expandafter\edef\csname @even#1shift\endcsname{\the\@tempdima}%
\fi
}
-\newcommand*{\@headwidth}{\textwidth}
-\newcommand*{\@oddheadshift}{\z@}
-\newcommand*{\@evenheadshift}{\z@}
-\newcommand*{\@footwidth}{\textwidth}
-\newcommand*{\@oddfootshift}{\z@}
-\newcommand*{\@evenfootshift}{\z@}
+\newcommand*{\@headwidth}{\textwidth}%
+\newcommand*{\@oddheadshift}{\z@}%
+\newcommand*{\@evenheadshift}{\z@}%
+\newcommand*{\@footwidth}{\textwidth}%
+\newcommand*{\@oddfootshift}{\z@}%
+\newcommand*{\@evenfootshift}{\z@}%
\if@mincl
- \renewcommand*{\@headwidth}{}
- \renewcommand*{\@footwidth}{}
+ \renewcommand*{\@headwidth}{}%
+ \renewcommand*{\@footwidth}{}%
\AtBeginDocument{%
\ifx\@headwidth\@empty
- \setheadwidth[0pt]{textwithmarginpar}
+ \setheadwidth[0pt]{textwithmarginpar}%
\fi
\ifx\@footwidth\@empty
- \setfootwidth[0pt]{textwithmarginpar}
+ \setfootwidth[0pt]{textwithmarginpar}%
\fi
}
\fi
@@ -718,7 +731,7 @@
\newcommand*{\ps@save@myheadings}{}
\let\ps@save@myheadings\ps@myheadings
\def\ps@headings{%
- \PackageWarning{scrpage2}
+ \PackageWarning{scrpage2}%
{you've used pagestyle ``headings''.\MessageBreak
You should not use this pagestyle with a\MessageBreak
scrpage2-pagestyle!\MessageBreak
@@ -726,7 +739,7 @@
\let\ps@plain\ps@save@plain%
\ps@save@headings\@automarktrue}
\def\ps@myheadings{%
- \PackageWarning{scrpage2}
+ \PackageWarning{scrpage2}%
{you've used pagestyle ``myheadings''.\MessageBreak
You should not use this pagestyle with a\MessageBreak
scrpage2-pagestyle!\MessageBreak
@@ -735,78 +748,78 @@
\ps@save@myheadings\@automarkfalse}
\newcommand*{\ps@useheadings}{%
\if@automark\let\@mkboth\markboth\else\let\@mkboth\@gobbletwo\fi
- \let\ps@plain\ps@use@plain%
- \let\save@@mkboth\@mkboth%
- \let\save@chaptermark\chaptermark%
- \let\save@sectionmark\sectionmark%
- \let\save@subsectionmark\subsectionmark%
- \ifx\@mkboth\markboth\ps@save@headings\else\ps@save@myheadings\fi%
- \let\@mkboth\save@@mkboth%
- \let\chaptermark\save@chaptermark%
- \let\sectionmark\save@sectionmark%
- \let\subsectionmark\save@subsectionmark%
+ \let\ps@plain\ps@use@plain
+ \let\save@@mkboth\@mkboth
+ \let\save@chaptermark\chaptermark
+ \let\save@sectionmark\sectionmark
+ \let\save@subsectionmark\subsectionmark
+ \ifx\@mkboth\markboth\ps@save@headings\else\ps@save@myheadings\fi
+ \let\@mkboth\save@@mkboth
+ \let\chaptermark\save@chaptermark
+ \let\sectionmark\save@sectionmark
+ \let\subsectionmark\save@subsectionmark
}
\newcommand*{\ps@scrplain}{\let\ps@plain\ps@@scrplain\ps@plain}
\newpagestyle{@scrplain}
{%
- (\scrplain@headabove@linelength,\scr@headabove@linethickness)
+ (\scrplain@headabove@linelength,\scr@headabove@linethickness)%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrplain@even@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering\strut%
+ \hfill
+ \parbox{\@headwidth}{\centering\strut
\scrplain@even@middle@head\strut}%
- \hfill%
- \llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrplain@even@right@head\strut}}}
+ \hfill
+ \llap{\parbox{\@headwidth}{\raggedleft
+ \strut\scrplain@even@right@head\strut}}}%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrplain@odd@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering%
+ \hfill
+ \parbox{\@headwidth}{\centering
\strut\scrplain@odd@middle@head\strut}%
- \hfill%
- \llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrplain@odd@right@head\strut}}}
+ \hfill
+ \llap{\parbox{\@headwidth}{\raggedleft
+ \strut\scrplain@odd@right@head\strut}}}%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrplain@odd@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering%
+ \hfill
+ \parbox{\@headwidth}{\centering
\strut\scrplain@odd@middle@head\strut}%
- \hfill%
- \llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrplain@odd@right@head\strut}}}
+ \hfill
+ \llap{\parbox{\@headwidth}{\raggedleft
+ \strut\scrplain@odd@right@head\strut}}}%
(\scrplain@headbelow@linelength,\scr@headbelow@linethickness)
}{%
(\scrplain@footabove@linelength,\scr@footabove@linethickness)
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrplain@even@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrplain@even@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrplain@even@right@foot\strut}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrplain@even@right@foot\strut}}}%
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrplain@odd@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrplain@odd@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrplain@odd@right@foot\strut}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrplain@odd@right@foot\strut}}}%
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrplain@odd@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrplain@odd@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrplain@odd@right@foot\strut}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrplain@odd@right@foot\strut}}}%
(\scrplain@footbelow@linelength,\scr@footbelow@linethickness)
}
\newcommand*{\scrplain@even@left@head}{}
@@ -825,60 +838,62 @@
\newpagestyle{@scrheadings}
{%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrheadings@even@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering%
+ \hfill
+ \parbox{\@headwidth}{\centering
\strut\scrheadings@even@middle@head\strut}%
- \hfill%
+ \hfill
\llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrheadings@even@right@head\strut}}}
+ \strut\scrheadings@even@right@head\strut}}}%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrheadings@odd@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering%
+ \hfill
+ \parbox{\@headwidth}{\centering
\strut\scrheadings@odd@middle@head\strut}%
- \hfill%
+ \hfill
\llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrheadings@odd@right@head\strut}}}
+ \strut\scrheadings@odd@right@head\strut}}}%
{%
- \rlap{\parbox{\@headwidth}{\raggedright%
+ \rlap{\parbox{\@headwidth}{\raggedright
\strut\scrheadings@odd@left@head\strut}}%
- \hfill%
- \parbox{\@headwidth}{\centering%
+ \hfill
+ \parbox{\@headwidth}{\centering
\strut\scrheadings@odd@middle@head\strut}%
- \hfill%
- \llap{\parbox{\@headwidth}{\raggedleft%
- \strut\scrheadings@odd@right@head\strut}}}}
+ \hfill
+ \llap{\parbox{\@headwidth}{\raggedleft
+ \strut\scrheadings@odd@right@head\strut}}}}%
{%
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrheadings@even@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrheadings@even@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrheadings@even@right@foot\strut}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrheadings@even@right@foot\strut}}}%
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrheadings@odd@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrheadings@odd@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrheadings@odd@right@foot\strut}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrheadings@odd@right@foot\strut}}}%
{%
- \rlap{\parbox{\@footwidth}{\raggedright%
+ \rlap{\parbox{\@footwidth}{\raggedright
\strut\scrheadings@odd@left@foot\strut}}%
- \hfill%
- \parbox{\@footwidth}{\centering%
+ \hfill
+ \parbox{\@footwidth}{\centering
\strut\scrheadings@odd@middle@foot\strut}%
- \hfill%
- \llap{\parbox{\@footwidth}{\raggedleft%
- \strut\scrheadings@odd@right@foot\strut}}}}
+ \hfill
+ \llap{\parbox{\@footwidth}{\raggedleft
+ \strut\scrheadings@odd@right@foot\strut}}%
+ }%
+}
\newcommand*{\scrheadings@even@left@head}{}
\newcommand*{\scrheadings@even@middle@head}{}
\newcommand*{\scrheadings@even@right@head}{}
@@ -974,18 +989,18 @@
\newcommand*{\clearscrheadfoot}{%
\ihead[]{}\chead[]{}\ohead[]{}\ifoot[]{}\cfoot[]{}\ofoot[]{}}
\newcommand*{\clearscrplain}{%
- \renewcommand*{\scrplain@even@left@head}{}
- \renewcommand*{\scrplain@even@middle@head}{}
- \renewcommand*{\scrplain@even@right@head}{}
- \renewcommand*{\scrplain@odd@left@head}{}
- \renewcommand*{\scrplain@odd@middle@head}{}
- \renewcommand*{\scrplain@odd@right@head}{}
- \renewcommand*{\scrplain@even@left@foot}{}
- \renewcommand*{\scrplain@even@middle@foot}{}
- \renewcommand*{\scrplain@even@right@foot}{}
- \renewcommand*{\scrplain@odd@left@foot}{}
- \renewcommand*{\scrplain@odd@middle@foot}{}
- \renewcommand*{\scrplain@odd@right@foot}{}
+ \renewcommand*{\scrplain@even@left@head}{}%
+ \renewcommand*{\scrplain@even@middle@head}{}%
+ \renewcommand*{\scrplain@even@right@head}{}%
+ \renewcommand*{\scrplain@odd@left@head}{}%
+ \renewcommand*{\scrplain@odd@middle@head}{}%
+ \renewcommand*{\scrplain@odd@right@head}{}%
+ \renewcommand*{\scrplain@even@left@foot}{}%
+ \renewcommand*{\scrplain@even@middle@foot}{}%
+ \renewcommand*{\scrplain@even@right@foot}{}%
+ \renewcommand*{\scrplain@odd@left@foot}{}%
+ \renewcommand*{\scrplain@odd@middle@foot}{}%
+ \renewcommand*{\scrplain@odd@right@foot}{}%
}
\def\@tempa{koma}\ifx\scrheadings@style\@tempa
\@ifclassloaded{scrlttr2}{%
@@ -1025,7 +1040,7 @@
\ihead{\headmark}
\ohead{\pagemark}
\cfoot[\pagemark]{}
- \else\PackageErrorNoLine{scrpage2}{unknown scrheadings style}
+ \else\PackageErrorNoLine{scrpage2}{unknown scrheadings style}%
{Somehow \string\scrheadings@style was
defined\MessageBreak
as ``\scrheadings@style''.\MessageBreak
@@ -1050,9 +1065,9 @@
* Local config file scrpage.cfg used^^J%
*************************************}}
{}
-\AtBeginDocument{
+\AtBeginDocument{%
\ifdim\headheight=12pt
- \PackageWarningNoLine{scrpage2}
+ \PackageWarningNoLine{scrpage2}%
{seems you are using a constant headheight.\MessageBreak
If you get overfull \string\vbox\space warnings at almost every%
\MessageBreak
@@ -1060,9 +1075,9 @@
\space\string\setlength{\string\headheight}{%
1.1\string\baselineskip}\MessageBreak
into the preamble of your document.\MessageBreak
- A better solution would be to use typearea package}
+ A better solution would be to use typearea package}%
\else\ifdim\headheight<1.07\baselineskip
- \PackageWarningNoLine{scrpage2}
+ \PackageWarningNoLine{scrpage2}%
{seems you are using a very small headheight.\MessageBreak
If you get overfull \string\vbox\space warnings at almost every%
\MessageBreak
@@ -1070,7 +1085,7 @@
\space\string\setlength{\string\headheight}{%
1.1\string\baselineskip}\MessageBreak
into the preamble of your document.\MessageBreak
- A better solution would be to use typearea package}
+ A better solution would be to use typearea package}%
\fi\fi}
%%% From File: scrlogo.dtx
\@ifundefined{KOMAScript}{%