diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/scrpage.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/scrpage.dtx | 550 |
1 files changed, 285 insertions, 265 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/scrpage.dtx b/Master/texmf-dist/source/latex/koma-script/scrpage.dtx index e97a680aa1f..c639f994906 100644 --- a/Master/texmf-dist/source/latex/koma-script/scrpage.dtx +++ b/Master/texmf-dist/source/latex/koma-script/scrpage.dtx @@ -1,4 +1,4 @@ -% \CheckSum{2537} +% \CheckSum{2553} % \iffalse % ====================================================================== % scrpage.dtx @@ -65,7 +65,7 @@ %<v1>\ProvidesPackage{scrpage}[2006/03/29 v1.3d KOMA-Script %<v2>\ProvidesPackage{scrpage2} %<*!v1> - [2006/03/29 v2.2c LaTeX2e KOMA-Script + [2007/07/23 v2.2e LaTeX2e KOMA-Script %</!v1> %<scrpage> package] %<*driver> @@ -327,6 +327,7 @@ %<*scrpage> % \end{macrocode} % \changes{v1.1}{1995/06/27}{\cs{hbox to} changed into \cs{hb@xt@}.} +% \changes{v2.2c}{2007/07/23}{a lot of \% added and removed} % % \subsection{Options} % \texttt{scrpage} knows some options. They are similar to the @@ -633,11 +634,27 @@ % \begin{macro}{\if@mainmatter} % \changes{v1.2}{1995/07/08}{Definition changed} % \changes{v2.1b}{2003/05/31}{more save test} +% \changes{v2.2d}{2007/03/13}{additional \cs{if@mainmatter} test} % Next distinguish between matter- and nomatter-classes. % \begin{macrocode} \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 +%<*v2> + \@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% + }% + }{% +%</v2> + \let\@tempa\relax +%<v2> }% +\fi \@tempa % \end{macrocode} % \end{macro} @@ -696,13 +713,14 @@ % \end{macrocode} % Now the we can define the head and the foot. First at twoside-mode: % \changes{v1.0b}{1995/05/25}{Dot deleted after number at -% chapter- and sectionmark} +% chapter- and sectionmark} % \changes{v1.0b}{1995/05/25}{Use CJK at \cs{chaptermark}, -% \cs{sectionmark} and \cs{subsectionmark}} +% \cs{sectionmark} and \cs{subsectionmark}} % \changes{v2.0}{2001/04/20}{Version 2 uses \cs{automark} and -% \cs{manualmark}, so star and non-star -% version are same} +% \cs{manualmark}, so star and non-star version are same} % \changes{v2.1a}{2002/10/30}{Use \cs{if@automark}} +% \changes{v2.2d}{2007/06/14}{Support of article-classes with +% \cs{if@mainmatter}} % \begin{macrocode} \if@twoside \def\@defpagestyle[#1]#2#3#4{% @@ -720,25 +738,25 @@ \if@mainmatter\chaptermarkformat\fi\fi ####1}}% \def\sectionmark####1{% \markright {\ifnum \c@secnumdepth >\z@% - \sectionmarkformat\fi ####1}} + \sectionmarkformat\fi ####1}}% \else \def\sectionmark####1{% \markboth {\ifnum \c@secnumdepth >\z@% - \sectionmarkformat\fi ####1}{% + \if@mainmatter\sectionmarkformat\fi\fi ####1}{% \ifnum \c@secnumdepth >\z@% - \sectionmarkformat\fi ####1}} + \ifmainmatter\sectionmarkformat\fi\fi ####1}}% \def\subsectionmark####1{% \markright {\ifnum \c@secnumdepth >\@ne% - \subsectionmarkformat\fi ####1}} + \subsectionmarkformat\fi ####1}}% \fi \else \let\@mkboth\@gobbletwo \if@chapter - \def\chaptermark####1{} + \def\chaptermark####1{}% \else - \def\subsectionmark####1{} + \def\subsectionmark####1{}% \fi - \def\sectionmark####1{} + \def\sectionmark####1{}% \fi %</v1> %<!v1> \if@automark\let\@mkboth\markboth\else\let\@mkboth\@gobbletwo\fi @@ -761,21 +779,21 @@ \def\chaptermark####1{% \markright {\ifnum \c@secnumdepth >\m@ne% \if@mainmatter\chaptermarkformat\fi\fi ####1}}% - \def\sectionmark####1{} + \def\sectionmark####1{}% \else \def\sectionmark####1{% \markright{\ifnum \c@secnumdepth >\z@% - \sectionmarkformat\fi ####1}} - \def\subsectionmark####1{} + \if@mainmatter\sectionmarkformat\fi\fi ####1}}% + \def\subsectionmark####1{}% \fi \else \let\@mkboth\@gobbletwo \if@chapter - \def\chaptermark####1{} + \def\chaptermark####1{}% \else - \def\subsectionmark####1{} + \def\subsectionmark####1{}% \fi - \def\sectionmark####1{} + \def\sectionmark####1{}% \fi %</v1> %<!v1> \if@automark\let\@mkboth\markboth\else\let\@mkboth\@gobbletwo\fi @@ -796,43 +814,43 @@ % \begin{macrocode} %<*v2> \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)}} \def\def@@@twosidehead(#1,#2)#3#4#5(#6,#7){% %</v2> -%<v1>\def\def@twosidehead(#1,#2)#3#4#5(#6,#7){ +%<v1>\def\def@twosidehead(#1,#2)#3#4#5(#6,#7){% \def\@evenhead{\let\headmark\leftmark% \hss\hskip\@evenheadshift\vbox{\hsize=\@headwidth\relax% \hf@rule{#1}{#2}{\@headwidth}% %<v2> {headabove}% \vskip#2 - \vskip\baselineskip% + \vskip\baselineskip \hb@xt@\@headwidth{{% -%<v2> \scr@nouppercase% +%<v2> \scr@nouppercase \headfont\strut #3}}% \hf@rule{#6}{#7}{\@headwidth}% %<v2> {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}% %<v2> {headabove}% - \vskip#2 - \vskip\baselineskip% + \vskip#2% + \vskip\baselineskip \hb@xt@\@headwidth{{% -%<v2> \scr@nouppercase% +%<v2> \scr@nouppercase \headfont\strut #4}}% \hf@rule{#6}{#7}{\@headwidth}% %<v2> {headbelow}% - }\hskip\@evenheadshift\hss} + }\hskip\@evenheadshift\hss}% } % \end{macrocode} % \end{macro} @@ -850,32 +868,32 @@ % \begin{macrocode} %<*v2> \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){% %</v2> -%<v1>\def\def@onesidehead(#1,#2)#3#4#5(#6,#7){ - \def\@evenhead{} - \def\@oddhead{\let\headmark\rightmark% - \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax% +%<v1>\def\def@onesidehead(#1,#2)#3#4#5(#6,#7){% + \def\@evenhead{}% + \def\@oddhead{\let\headmark\rightmark + \hss\hskip\@oddheadshift\vbox{\hsize=\@headwidth\relax \hf@rule{#1}{#2}{\@headwidth}% %<v2> {headabove}% \vskip#2% - \vskip\baselineskip% + \vskip\baselineskip \hb@xt@\@headwidth{{% -%<v2> \scr@nouppercase% - \headfont\strut #5}} +%<v2> \scr@nouppercase + \headfont\strut #5}}% \hf@rule{#6}{#7}{\@headwidth}% %<v2> {headbelow}% - }\hskip\@evenheadshift\hss} + }\hskip\@evenheadshift\hss}% } % \end{macrocode} % \end{macro} @@ -891,31 +909,31 @@ % \begin{macrocode} %<*v2> \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){% %</v2> -%<v1>\def\def@twosidefoot(#1,#2)#3#4#5(#6,#7){ - \def\@evenfoot{\let\headmark\leftmark% - \hss\hskip\@evenfootshift\vbox{\hsize=\@footwidth\relax% +%<v1>\def\def@twosidefoot(#1,#2)#3#4#5(#6,#7){% + \def\@evenfoot{\let\headmark\leftmark + \hss\hskip\@evenfootshift\vbox{\hsize=\@footwidth\relax \topfoot@rule{#1}{#2}\hb@xt@\@footwidth{{% -%<v2> \scr@nouppercase% +%<v2> \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{{% -%<v2> \scr@nouppercase% +%<v2> \scr@nouppercase \headfont\strut #4}}% - \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss} + \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}% } % \end{macrocode} % \end{macro} @@ -931,26 +949,26 @@ % \begin{macrocode} %<*v2> \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){% %</v2> -%<v1>\def\def@onesidefoot(#1,#2)#3#4#5(#6,#7){ - \def\@evenfoot{} - \def\@oddfoot{\let\headmark\rightmark% - \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax% +%<v1>\def\def@onesidefoot(#1,#2)#3#4#5(#6,#7){% + \def\@evenfoot{}% + \def\@oddfoot{\let\headmark\rightmark + \hss\hskip\@oddfootshift\vbox{\hsize=\@footwidth\relax \topfoot@rule{#1}{#2}\hb@xt@\@footwidth{{% -%<v2> \scr@nouppercase% +%<v2> \scr@nouppercase \headfont\strut #5}} - \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss} + \botfoot@rule{#6}{#7}}\hskip\@evenfootshift\hss}% } % \end{macrocode} % \end{macro} @@ -1007,7 +1025,7 @@ \fi \ifnum\@tempa=1 %</v2> - \setlength{\@tempdimb}{.5\@tempdimb} + \setlength{\@tempdimb}{.5\@tempdimb}% %<v2> \fi \hb@xt@#3{% %<v2> \ifnum\@tempa>0 @@ -1081,20 +1099,20 @@ % There we have to distinguish, whether the pagestyle is already % defined or not. % \begin{macrocode} -\def\@newpagestyle[#1]#2#3#4{ +\def\@newpagestyle[#1]#2#3#4{% \expandafter\ifx\csname ps@#2\endcsname\relax % \end{macrocode} % Then we can use the already defined |\@defpagestyle|. % \begin{macrocode} - \@defpagestyle[#1]{#2}{#3}{#4} + \@defpagestyle[#1]{#2}{#3}{#4}% \else \PackageError -%<v1> {scrpage} -%<v2> {scrpage2} +%<v1> {scrpage}% +%<v2> {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 } % \end{macrocode} @@ -1118,21 +1136,21 @@ % There we have to distinguish, whether the pagestyle is already % defined or not. % \begin{macrocode} -\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 -%<v1> {scrpage} -%<v2> {scrpage2} +%<v1> {scrpage}% +%<v2> {scrpage2}% {Your command was ignored}% {There is no pagestyle named ``#1''.\MessageBreak% Use \protect\defpagestyle, \protect\newpagestyle or - \protect\providepagestyle.} + \protect\providepagestyle.}% \else % \end{macrocode} % Then we can use the already defined |\@defpagestyle|. % \begin{macrocode} - \@defpagestyle[#1]{#2}{#3}{#4} + \@defpagestyle[#1]{#2}{#3}{#4}% \fi } % \end{macrocode} @@ -1154,17 +1172,17 @@ % There we have to distinguish, whether the pagestyle is already % defined or not. % \begin{macrocode} -\def\@providepagestyle[#1]#2#3#4{ +\def\@providepagestyle[#1]#2#3#4{% \expandafter\ifx\csname ps@#2\endcsname\relax % \end{macrocode} % Then we can use the already defined |\@defpagestyle|. % \begin{macrocode} - \@defpagestyle[#1]{#2}{#3}{#4} + \@defpagestyle[#1]{#2}{#3}{#4}% \else \PackageInfo -%<v1> {scrpage} -%<v2> {scrpage2} - {\protect\providepagestyle\protect{#1\protect} ignored.} +%<v1> {scrpage}% +%<v2> {scrpage2}% + {\protect\providepagestyle\protect{#1\protect} ignored.}% \fi } % \end{macrocode} @@ -1191,7 +1209,7 @@ % \begin{macro}{\@deftripstyle} % \begin{macrocode} \def\@deftripstyle[#1]#2{% - \@ifnextchar[ + \@ifnextchar[%] {\@@deftripstyle[#1]{#2}}% {\@@deftripstyle[#1]{#2}[\z@]}} % \end{macrocode} @@ -1199,13 +1217,13 @@ % or perhaps two optional arguments: % \begin{macro}{\@@deftripstyle} % \begin{macrocode} -\def\@@deftripstyle[#1]#2[#3]{ +\def\@@deftripstyle[#1]#2[#3]{% % \end{macrocode} % Ok, now we have the problem, that there can be only 9 arguments. So we % have to distinguish the star-versions by a macro: % \begin{macrocode} - \def\@tempa{#1} - \@ifnextchar[ + \def\@tempa{#1}% + \@ifnextchar[%] {\@@@deftripstyle#2[#3]}% {\@@@deftripstyle#2[\z@][#3]}} % \end{macrocode} @@ -1214,31 +1232,31 @@ % \begin{macro}{\@@@deftripstyle} % \begin{macrocode} \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 } % \end{macrocode} @@ -1275,13 +1293,13 @@ % \cs{@markright} at \LaTeX{} kernel. % \begin{macrocode} \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]{% @@ -1307,13 +1325,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 @@ -1322,7 +1340,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}}% @@ -1338,14 +1356,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 @@ -1356,7 +1374,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 @@ -1368,13 +1386,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 } @@ -1448,7 +1466,7 @@ % \cs{MakeUppercase} at the head-marks. We set this macro to % \cs{MakeUppercase} if one of the standard-classes was loaded: % \begin{macrocode} -\@ifundefined{MakeMarkcase}{ +\@ifundefined{MakeMarkcase}{% \@ifclassloaded{scrbook}{\let\MakeMarkcase\relax}{% \@ifclassloaded{scrreprt}{\let\MakeMarkcase\relax}{% \@ifclassloaded{scrartcl}{\let\MakeMarkcase\relax}{% @@ -1460,7 +1478,7 @@ 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}}}}}{} % \end{macrocode} % \end{macro} @@ -1472,7 +1490,7 @@ % This macro defines, which style for scrheadings should be used. If % it is not defined, we have to define it in a propper way. % \begin{macrocode} -\@ifundefined{scrheadings@style}{ +\@ifundefined{scrheadings@style}{% \@ifclassloaded{scrbook}{\def\scrheadings@style{koma}}{% \@ifclassloaded{scrreprt}{\def\scrheadings@style{koma}}{% \@ifclassloaded{scrartcl}{\def\scrheadings@style{koma}}{% @@ -1520,35 +1538,35 @@ % is \cs{deftowidthof}. % \begin{macrocode} \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 @@ -1562,66 +1580,66 @@ } \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 -%<v1> {scrpage} -%<v2> {scrpage2} +%<v1> {scrpage}% +%<v2> {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 -%<v1> {scrpage} -%<v2> {scrpage2} +%<v1> {scrpage}% +%<v2> {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 } % \end{macrocode} @@ -1648,26 +1666,26 @@ % The values of width and shift of head and foot are saved at internal % macros. % \begin{macrocode} -\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@}% % \end{macrocode} % If option \texttt{mpinclude} was used, we use a special trick to set % width of head and foot but only if the user doesn't: % \begin{macrocode} %<*v2> \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 @@ -1882,7 +1900,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 @@ -1890,7 +1908,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 @@ -1918,16 +1936,16 @@ % \begin{macrocode} \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 } % \end{macrocode} % Note: Because of saving \cs{@mkboth}, \cs{chaptermark}, @@ -1975,64 +1993,64 @@ \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}{} @@ -2099,60 +2117,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}{} @@ -2342,18 +2362,18 @@ % redefinition directly: % \begin{macrocode} \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}{}% } % \end{macrocode} % \end{macro} @@ -2403,7 +2423,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 @@ -2449,9 +2469,9 @@ % increased. % \begin{macrocode} %<*v2> -\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 @@ -2459,9 +2479,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 @@ -2469,7 +2489,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} %</v2> % \end{macrocode} |