summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/typearea.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/typearea.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/typearea.sty305
1 files changed, 211 insertions, 94 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/typearea.sty b/Master/texmf-dist/tex/latex/koma-script/typearea.sty
index 8d50c5beb73..836273a82af 100644
--- a/Master/texmf-dist/tex/latex/koma-script/typearea.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/typearea.sty
@@ -1,20 +1,19 @@
%%
%% This is file `typearea.sty',
-%% generated with the docstrip utility.
+%% generated with the docstrip utility, extended by scrdocstrip.
%%
%% The original source files were:
%%
-%% scrkvers.dtx (with options: `package,typearea')
-%% scrktare.dtx (with options: `package,identify')
-%% scrkbase.dtx (with options: `load')
-%% scrktare.dtx (with options: `package,option')
-%% scrkcomp.dtx (with options: `package,typearea,option')
-%% scrktare.dtx (with options: `package,body')
-%% scrkcomp.dtx (with options: `package,typearea,body')
+%% scrkernel-version.dtx (with options: `package,typearea')
+%% scrkernel-typearea.dtx (with options: `package,identify')
+%% scrkernel-basics.dtx (with options: `load')
+%% scrkernel-typearea.dtx (with options: `package,option')
+%% scrkernel-compatibility.dtx (with options: `package,typearea,option')
+%% scrkernel-typearea.dtx (with options: `package,body')
+%% scrkernel-compatibility.dtx (with options: `package,typearea,body')
%% scrlogo.dtx (with options: `logo')
%%
-%% Copyright (c) 1994-2012
-%% Markus Kohm and any individual authors listed elsewhere in this file.
+%% Copyright (c) 1994-2013 Markus Kohm [komascript at gmx info]
%%
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
@@ -46,9 +45,9 @@
%% find a complete unmodified copy of LaTeX2e at
%% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
%%
-%%% From File: scrkvers.dtx
+%%% From File: $Id: scrkernel-version.dtx 1560 2013-12-19 07:13:30Z mjk $
\begingroup
- \makeatletter
+ \catcode`\@11\relax
\ifx\KOMAScriptVersion\undefined
\newcommand*{\@CheckKOMAScriptVersion}[1]{%
\gdef\KOMAScriptVersion{#1}%
@@ -68,11 +67,13 @@
\fi
}
\fi
- \@CheckKOMAScriptVersion{2012/07/29 v3.11b KOMA-Script}%
+ \@CheckKOMAScriptVersion{2013/12/19 v3.12 KOMA-Script}%
\endgroup
-%%% From File: scrktare.dtx
+%%% From File: $Id: scrkernel-typearea.dtx 1512 2013-11-11 10:35:04Z mjk $
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{typearea}[%
- \KOMAScriptVersion\space package (type area)]
+ 2013/12/19 v3.12 KOMA-Script
+ package (type area)]
\typeout{%
Package typearea, \csname ver@typearea.sty\endcsname^^J%
\@spaces\@spaces\@spaces\@spaces\space\space
@@ -80,9 +81,9 @@
\@spaces\@spaces\@spaces\@spaces\space\space
Copyright (C) Markus Kohm, 1994-^^J%
}
-%%% From File: scrkbase.dtx
+%%% From File: $Id: scrkernel-basics.dtx 1502 2013-11-06 11:00:12Z mjk $
\RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: scrktare.dtx
+%%% From File: $Id: scrkernel-typearea.dtx 1512 2013-11-11 10:35:04Z mjk $
\newcommand*\SetDIVList[1]{\def\ta@divlist{{}{}{}{}{}{}{}{}{}#1}}
\newcommand*\SetXDIVList[1]{\def\ta@divlist{#1}}
\newlength{\ta@bcor}
@@ -226,12 +227,28 @@
\setlength{\@tempdima}{#1\baselineskip}%
\endgroup
\def\ta@hh{#1\baselineskip}%
+ \FamilyKeyStateProcessed
+}
+\KOMA@key{footlines}{%
+ \begingroup
+ \setlength{\@tempdima}{#1\baselineskip}%
+ \endgroup
+ \def\ta@fh{#1\baselineskip}%
+ \FamilyKeyStateProcessed
}
\KOMA@key{headheight}{%
\begingroup
\setlength{\@tempdima}{#1}%
\endgroup
\def\ta@hh{#1}%
+ \FamilyKeyStateProcessed
+}
+\KOMA@key{footheight}{%
+ \begingroup
+ \setlength{\@tempdima}{#1}%
+ \endgroup
+ \def\ta@fh{#1}%
+ \FamilyKeyStateProcessed
}
\newif\if@hincl\@ifundefined{if@hsl}{}{\let\if@hincl\if@hsl}
\KOMA@ifkey{headinclude}{@hincl}
@@ -245,20 +262,22 @@
\edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else
\setlength{\ta@bcor}{#1}%
\fi
+ \FamilyKeyStateProcessed
}
\AtEndOfPackage{\KOMA@key{BCOR}{\typearea[{#1}]{last}}}
\KOMA@key{DIV}[calc]{%
\edef\@tempa{#1}%
\def\@tempb{last}\ifx\@tempa\@tempb\let\@tempa=\@lastdiv\fi
\def\@tempb{current}\ifx\@tempa\@tempb\else
- \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=0 \else
- \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=2 \else
- \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=3 \else
+ \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
+ \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
+ \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
\ta@div=\@tempa
\fi
\fi
\fi
\fi
+ \FamilyKeyStateProcessed
}
\AtEndOfPackage{\KOMA@key{DIV}{\typearea[current]{#1}}}
\KOMA@DeclareDeprecatedOption[typearea]{DIVcalc}{DIV=calc}
@@ -272,6 +291,7 @@
\ifstr{#1}{semi}{%
\@twosidetrue
\@semitwosidetrue
+ \FamilyKeyStateProcessed
}{%
\def\FamilyElseValue{, `semi'}%
\KOMA@set@ifkey{twoside}{@twoside}{#1}%
@@ -293,7 +313,9 @@
\KOMA@key{twocolumn}[true]{%
\if@atdocument\clearpage\fi
\KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}%
- \csname recalctypearea\endcsname
+ \ifx\FamilyKeyState\FammilyKeyStateProcessed
+ \csname recalctypearea\endcsname
+ \fi
}
\KOMA@DeclareStandardOption%
[typearea]%
@@ -304,26 +326,32 @@
{off}{-1},{no}{-1},{false}{-1},%
{auto}{0},{automedia}{1},{dvips}{2},{pdftex}{3},{dvipdfmx}{4}%
}{#1}%
- \ifcase\number\@tempa\relax
- \endgroup
- \set@pdftexpagesize
- \set@dvipspagesize
- \or
- \endgroup
- \set@pdftexpagesize
- \set@vtexpagesize
- \set@dvipspagesize
- \or
- \endgroup
- \set@dvipspagesize
- \or
- \endgroup
- \set@pdftexpagesize
- \or
- \endgroup
- \set@dvipdfmxpagesize
+ \ifx\FamilyKeyState\FamilyKeyStateProcessed
+ \aftergroup\FamilyKeyStateProcessed
+ \ifcase\number\@tempa\relax
+ \endgroup
+ \set@pdftexpagesize
+ \set@dvipspagesize
+ \or
+ \endgroup
+ \set@pdftexpagesize
+ \set@vtexpagesize
+ \set@dvipspagesize
+ \or
+ \endgroup
+ \set@dvipspagesize
+ \or
+ \endgroup
+ \set@pdftexpagesize
+ \or
+ \endgroup
+ \set@dvipdfmxpagesize
+ \fi
+ \edef\@pagesizelast{#1}%
+ \else
+ \endgroup
+ \FamilyKeyStateUnknownValue
\fi
- \edef\@pagesizelast{#1}%
}
\newcommand{\set@pdftexpagesize}{%
\AtBeginDocument{%
@@ -336,7 +364,10 @@
\begingroup
\@tempswafalse
\scr@ifdvioutput{\@tempswatrue}{%
- \ifnotundefined{if@dvips}{\let\if@tempswa\if@dvips}{}%
+ \ifnotundefined{if@dvips}{%
+ \expandafter\let\csname if@tempswa\expandafter\endcsname
+ \csname if@dvips\endcsname
+ }{}%
}%
\if@tempswa
\endgroup
@@ -382,15 +413,17 @@
\let\set@vtexpagesize=\@empty
}
\newcommand*{\scr@updatedvipspagesize}{%
- \special{ps::\@percentchar\@percentchar
- PageBoundingBox: 0 0 \the\numexpr\paperwidth/\dimexpr 1bp\relax\relax
- \space \the\numexpr\paperheight/\dimexpr 1bp\relax\relax^^J%
- \@percentchar\@percentchar BeginPageSetup^^J%
- << /PageSize [\the\numexpr\paperwidth/\dimexpr 1bp\relax\relax\space
- \the\numexpr\paperheight/\dimexpr 1bp\relax\relax]
- >> setpagedevice^^J%<<
- 0 0 bop^^J%
- \@percentchar\@percentchar EndPageSetup}%
+ \scr@ifundefinedorrelax{XeTeXversion}{%
+ \special{ps::\@percentchar\@percentchar
+ PageBoundingBox: 0 0 \the\numexpr\paperwidth/\dimexpr 1bp\relax\relax
+ \space \the\numexpr\paperheight/\dimexpr 1bp\relax\relax^^J%
+ \@percentchar\@percentchar BeginPageSetup^^J%
+ << /PageSize [\the\numexpr\paperwidth/\dimexpr 1bp\relax\relax\space
+ \the\numexpr\paperheight/\dimexpr 1bp\relax\relax]
+ >> setpagedevice^^J%<<
+ 0 0 bop^^J%
+ \@percentchar\@percentchar EndPageSetup}%
+ }{}%
}
\AtBeginDocument{%
\renewcommand*{\set@pdftexpagesize}{%
@@ -399,35 +432,52 @@
}%
\ifnum \scr@compatibility>\@nameuse{scr@v@3.02b}\relax
\renewcommand*{\set@dvipspagesize}{%
- \scr@ifundefinedorrelax{AtNextShipout}{%
- \scr@ifundefinedorrelax{AtBeginShipoutNext}{%
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \scr@updatedvipspagesize}\reserved@a
- }{%
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \protect\AtBeginShipoutNext{%
- \protect\bgroup
- \protect\global\protect\setbox\AtBeginShipoutBox\protect\vbox{%
- \scr@updatedvipspagesize
- \protect\box\AtBeginShipoutBox
- }%
- \protect\egroup
- }}\reserved@a
+ \begingroup
+ \@tempswafalse
+ \scr@ifdvioutput{\@tempswatrue}{%
+ \ifnotundefined{if@dvips}{%
+ \expandafter\let\csname if@tempswa\expandafter\endcsname
+ \csname if@dvips\endcsname
+ }{}%
}%
- }{%
- \begingroup
- \protected@edef\reserved@a{\endgroup
- \protect\AtNextShipout{%
- \protect\bgroup
- \protect\global\protect\setbox\protect\@cclv\protect\vbox{%
- \scr@updatedvipspagesize
- \protect\box\protect\@cclv
- }%
- \protect\egroup
- }}\reserved@a
- }%
+ \if@tempswa
+ \endgroup
+ \scr@ifundefinedorrelax{AtNextShipout}{%
+ \scr@ifundefinedorrelax{AtBeginShipoutNext}{%
+ \begingroup
+ \protected@edef\reserved@a{\endgroup
+ \scr@updatedvipspagesize}%
+ \reserved@a
+ }{%
+ \begingroup
+ \protected@edef\reserved@a{\endgroup
+ \protect\AtBeginShipoutNext{%
+ \protect\bgroup
+ \protect\global\protect\setbox\AtBeginShipoutBox
+ \protect\vbox{%
+ \scr@updatedvipspagesize
+ \protect\box\AtBeginShipoutBox
+ }%
+ \protect\egroup
+ }}%
+ \reserved@a
+ }%
+ }{%
+ \begingroup
+ \protected@edef\reserved@a{\endgroup
+ \protect\AtNextShipout{%
+ \protect\bgroup
+ \protect\global\protect\setbox\protect\@cclv\protect\vbox{%
+ \scr@updatedvipspagesize
+ \protect\box\protect\@cclv
+ }%
+ \protect\egroup
+ }}%
+ \reserved@a
+ }%
+ \else
+ \endgroup
+ \fi
}%
\else
\let\set@dvipspagesize=\setnot@dvipspagesize
@@ -465,6 +515,7 @@
\setlength{\paperheight}{\@tempdima}%
\@landscapetrue
\fi
+ \FamilyKeyStateProcessed
}{%
\ifstr{#1}{landscape}{%
\@seascapefalse
@@ -474,6 +525,7 @@
\setlength{\paperheight}{\@tempdima}%
\@landscapetrue
\fi
+ \FamilyKeyStateProcessed
}{%
\ifstr{#1}{portrait}{%
\if@landscape
@@ -482,6 +534,7 @@
\setlength{\paperheight}{\@tempdima}%
\@landscapefalse
\fi
+ \FamilyKeyStateProcessed
}{%
\ifstr{#1}{letter}{%
\if@landscape
@@ -491,6 +544,7 @@
\setlength\paperheight{11in}%
\setlength\paperwidth {8.5in}%
\fi
+ \FamilyKeyStateProcessed
}{%
\ifstr{#1}{legal}{%
\if@landscape
@@ -500,6 +554,7 @@
\setlength\paperheight{14in}%
\setlength\paperwidth {8.5in}%
\fi
+ \FamilyKeyStateProcessed
}{%
\ifstr{#1}{executive}{%
\if@landscape
@@ -509,9 +564,12 @@
\setlength\paperheight{10.5in}%
\setlength\paperwidth {7.25in}%
\fi
+ \FamilyKeyStateProcessed
}{%
\iso@paper{#1}%
- \if@tempswa\else
+ \if@tempswa
+ \FamilyKeyStateProcessed
+ \else
\expandafter\maybe@pair#1::\@nil
\if@tempswa
\ifnum \scr@ta@compatibility<\@nameuse{scr@v@3.01b}\relax
@@ -528,6 +586,7 @@
\setlength\paperwidth{\@tempa}%
\setlength\paperheight{\@tempb}%
\fi
+ \FamilyKeyStateProcessed
\else
\KOMA@unknown@keyval{paper}{#1}{%
`letter', `legal', `executive', `a'<nr>, `b'<nr>,
@@ -554,7 +613,7 @@
}
\DeclareOption*{%
\x@paper}
-%%% From File: scrkcomp.dtx
+%%% From File: $Id: scrkernel-compatibility.dtx 1512 2013-11-11 10:35:04Z mjk $
\providecommand*
{\scr@compatibility}{\scr@v@last}
\newcommand*{\scr@ta@compatibility}{\scr@compatibility}
@@ -573,6 +632,7 @@
Switching compatibility level to `#1'%
}%
\edef\scr@ta@compatibility{\@nameuse{scr@v@#1}}%
+ \FamilyKeyStateProcessed
}%
}
\AtEndOfPackage{%
@@ -586,6 +646,7 @@
package.\MessageBreak
But you've tried to set it up later.%
}%
+ \FamilyKeyStateProcessed
}%
}
\@namedef{scr@v@first}{0}
@@ -635,8 +696,9 @@
\@namedef{scr@v@3.11}{10}
\@namedef{scr@v@3.11a}{10}
\@namedef{scr@v@3.11b}{10}
-\@namedef{scr@v@last}{10}
-%%% From File: scrktare.dtx
+\@namedef{scr@v@3.12}{11}
+\@namedef{scr@v@last}{11}
+%%% From File: $Id: scrkernel-typearea.dtx 1512 2013-11-11 10:35:04Z mjk $
\InputIfFileExists{typearea.cfg}{%
\typeout{%
***************************************^^J%
@@ -644,7 +706,8 @@
***************************************%
}
}{}
-\KOMAExecuteOptions{paper=A4}
+\providecommand*{\defaultpapersize}{A4}
+\KOMAExecuteOptions{paper=\defaultpapersize}
\if@twoside
\if@semitwoside
\KOMAExecuteOptions{twoside=semi}
@@ -685,7 +748,11 @@
\if@semitwoside
\advance\oddsidemargin by1.5\ta@hblk
\advance\oddsidemargin by\ta@bcor
- \evensidemargin=\oddsidemargin
+ \ifnum \scr@compatibility<\@nameuse{scr@v@3.12}\relax
+ \evensidemargin=\oddsidemargin
+ \else
+ \advance\evensidemargin by1.5\ta@hblk
+ \fi
\else
\advance\oddsidemargin by\ta@hblk
\advance\oddsidemargin by\ta@bcor
@@ -812,7 +879,9 @@
\fi
\hsize=\columnwidth
\linewidth\hsize
- \scr@ifundefinedorrelax{@pagesizelast}{}{\KOMAoptions{pagesize=\@pagesizelast}}%
+ \scr@ifundefinedorrelax{@pagesizelast}{}{%
+ \KOMAoptions{pagesize=\@pagesizelast}%
+ }%
\fi
}
\newcommand*{\scr@grouplevel@test}[1]{%
@@ -871,7 +940,7 @@
DIV values. Using DIV calculation for good line\MessageBreak
width%
}%
- \ta@div=2
+ \ta@div=\tw@
\else
\xdef\@tempa{\ta@divlist{}}%
\@tempdima=#1pt
@@ -923,9 +992,9 @@
\areaset[current]{\textwidth}{\textheight}%
\else
\def\@tempb{current}\ifx\@tempa\@tempb\else
- \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=0 \else
- \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=2 \else
- \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=3 \else
+ \def\@tempb{default}\ifx\@tempa\@tempb\ta@div=\z@ \else
+ \def\@tempb{calc}\ifx\@tempa\@tempb\ta@div=\tw@ \else
+ \def\@tempb{classic}\ifx\@tempa\@tempb\ta@div=\thr@@ \else
\ta@div=\@tempa
\fi
\fi
@@ -940,7 +1009,15 @@
\headheight=\ta@hh
}%
\headsep=1.5\baselineskip
- \footskip=3.5\baselineskip
+ \@ifundefined{footheight}{%
+ \newlength\footheight
+ }{}%
+ \@ifundefined{ta@fh}{%
+ \footheight=1.25\baselineskip
+ }{%
+ \footheight=\ta@fh
+ }%
+ \footskip=\dimexpr\footheight+2.25\baselineskip
\marginparsep=1cc
\marginparpush=0.45\baselineskip
\ifnum\ta@div=\z@
@@ -1075,6 +1152,18 @@
\ta@layoutinfo{\number\ta@div}{\the\@tempcnta}%
\@typearea@end
\activateareas
+ \ifdim \dimexpr 1in+\topmargin
+ +\headheight+\headsep
+ +\textheight
+ +\footskip+\dp\strutbox\relax
+ >\paperheight
+ \PackageWarningNoLine{typearea}{%
+ page content and margins higher than paper.\MessageBreak
+ This may result in page footer out of paper.\MessageBreak
+ You should decrease DIV, decrease foot height,\MessageBreak
+ or include footer into type area%
+ }%
+ \fi
\fi
}
\newcommand*{\ta@layoutinfo}[2]{%
@@ -1139,7 +1228,11 @@
\if@semitwoside
\advance\oddsidemargin by1.5\ta@hblk
\advance\oddsidemargin by\ta@bcor
- \evensidemargin\oddsidemargin
+ \ifnum \scr@compatibility<\@nameuse{scr@v@3.12}\relax
+ \evensidemargin=\oddsidemargin
+ \else
+ \advance\evensidemargin by1.5\ta@hblk
+ \fi
\else
\advance\oddsidemargin by\ta@hblk
\advance\oddsidemargin by\ta@bcor
@@ -1169,7 +1262,19 @@
\advance\headheight by-10\p@
\fi
\headsep=1.5\baselineskip
- \footskip=3.5\baselineskip
+ \@ifundefined{footheight}{\newlength\footheight}{}
+ \if@areasetadvanced
+ \@ifundefined{ta@fh}{%
+ \footheight=1.25\baselineskip
+ \footskip=3.5\baselineskip
+ }{%
+ \footheight=\ta@fh
+ \footskip=\dimexpr \footheight+2.25\baselineskip\relax
+ }%
+ \else
+ \footheight=1.25\baselineskip
+ \footskip=3.5\baselineskip
+ \fi
\ta@vblk=\paperheight
\advance\ta@vblk by-\textheight
\divide\ta@vblk by3
@@ -1209,10 +1314,22 @@
\ta@layoutinfo{areaset}{}%
\@areaset@end
\activateareas
+ \ifdim \dimexpr 1in+\topmargin
+ +\headheight+\headsep
+ +\textheight
+ +\footskip+\dp\strutbox\relax
+ >\paperheight
+ \PackageWarningNoLine{typearea}{%
+ page content and margins higher than paper.\MessageBreak
+ This may result in page footer out of paper.\MessageBreak
+ You should decrease DIV, decrease foot height,\MessageBreak
+ or decreate height of text area%
+ }%
+ \fi
}
\typearea[current]{current}
-%%% From File: scrkcomp.dtx
-%%% From File: scrlogo.dtx
+%%% From File: $Id: scrkernel-compatibility.dtx 1512 2013-11-11 10:35:04Z mjk $
+%%% From File: $Id: scrlogo.dtx 1380 2013-10-01 15:31:55Z mjk $
\@ifundefined{KOMAScript}{%
\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
M\kern.05em A\kern.1em-\kern.1em Script}}}{}