diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/typearea.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/typearea.sty | 89 |
1 files changed, 68 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/typearea.sty b/Master/texmf-dist/tex/latex/koma-script/typearea.sty index 72c50031e09..9078819aa54 100644 --- a/Master/texmf-dist/tex/latex/koma-script/typearea.sty +++ b/Master/texmf-dist/tex/latex/koma-script/typearea.sty @@ -10,7 +10,7 @@ %% scrktare.dtx (with options: `package,option,body') %% scrlogo.dtx (with options: `logo') %% -%% Copyright (c) 1994-2006 +%% Copyright (c) 1994-2007 %% Markus Kohm and any individual authors listed elsewhere in this file. %% %% This file was generated from file(s) of the KOMA-Script bundle. @@ -62,7 +62,7 @@ \fi } \fi - \@CheckKOMAScriptVersion{2006/07/30 v2.95b KOMA-Script}% + \@CheckKOMAScriptVersion{2007/03/02 v2.97 KOMA-Script}% \endgroup %%% From File: scrktare.dtx \ProvidesPackage{typearea}[% @@ -72,7 +72,7 @@ \@spaces\@spaces\@spaces\@spaces\space\space Copyright (C) Frank Neukam, 1992-1994^^J% \@spaces\@spaces\@spaces\@spaces\space\space - Copyright (C) Markus Kohm, 1994-2002^^J% + Copyright (C) Markus Kohm, 1994-^^J% } %%% From File: scrkbase.dtx \RequirePackage{scrkbase}[\KOMAScriptVersion] @@ -250,6 +250,12 @@ \AtEndOfPackage{\KOMA@key{DIV}{\typearea[current]{#1}}} \KOMA@DeclareObsoleteOption[\PackageInfo]{DIVcalc}{DIV=calc} \KOMA@DeclareObsoleteOption[\PackageInfo]{DIVclassic}{DIV=classic} +\KOMA@key{twoside}[true]{% + \KOMA@set@ifkey{twoside}{@twoside}{#1}% + \if@twoside\@mparswitchtrue\else\@mparswitchfalse\fi% + \csname recalctypearea\endcsname +} +\KOMA@DeclareObsoleteOption[\PackageInfo]{oneside}{twoside=false} \KOMA@key{twocolumn}[true]{% \KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}% \csname recalctypearea\endcsname @@ -416,7 +422,7 @@ }{} \DeclareKeyValOption[\x@paper]{KOMA} \KOMAoptions{headinclude=false,footinclude=false,paper=A4} -\ProcessAllOptions{KOMA} +\ProcessOptions*\relax \providecommand\ta@divlist{{}{}{}{}{}{}{}{}{}{8}{10}{12}} \providecommand\ta@divlistelse{1} \newlength{\ta@hblk} @@ -488,6 +494,12 @@ \if@fincl \advance\ta@temp by-\footskip \fi + \scr@ifundefined{@ptsize}{% + \topskip=\f@size\p@ + }{% + \topskip=\@ptsize\p@ + \advance\topskip by 10\p@ + }% \textheight=\topskip \@whiledim\textheight <\ta@temp \do{\advance\textheight by\baselineskip}% @@ -529,8 +541,12 @@ \divide\ta@temp by26 \fi } -\AtBeginDocument{% - \newcommand\@typearea@end{% +\newcommand*{\AfterCalculatingTypearea}{% + \@ifstar \l@addto@macro \g@addto@macro \@typearea@end +} +\newcommand*{\@typearea@end}{} +\newcommand*{\activateareas}{% + \if@atdocument \PackageWarning{typearea}{% Typearea changed!\MessageBreak You should do this only at preamble, because only\MessageBreak @@ -549,8 +565,8 @@ \fi \hsize=\columnwidth \linewidth\hsize - \ifundefined{@pagesizelast}{}{\KOMAoptions{pagesize=\@pagesizelast}}% - }% + \scr@ifundefined{@pagesizelast}{}{\KOMAoptions{pagesize=\@pagesizelast}}% + \fi } \newcommand*{\ta@divfor}[1]{% \if@mincl @@ -562,16 +578,26 @@ \ta@div=2 \else \xdef\@tempa{\ta@divlist{}}% - \ta@div=#1\relax - \@whilenum \ta@div >-9 \do {% - \ifx\@tempa\empty - \else \xdef\@tempa{\expandafter\@cdr\@tempa\@nil}\fi - \advance\ta@div by-1 - }% + \@tempdima=#1pt + \addtolength{\@tempdima}{.5\p@}% + \divide\@tempdima by\p@ + \setlength{\@tempdimb}{\@tempdima}% + \multiply\@tempdimb by\p@ + \ifdim \@tempdimb=#1pt + \ta@div=#1\relax + \@whilenum \ta@div >-9 \do {% + \ifx\@tempa\empty + \else \xdef\@tempa{\expandafter\@cdr\@tempa\@nil}\fi + \advance\ta@div by-1 + }% + \else + \let\@tempa\empty + \fi \ifx\@tempa\empty - \ta@div=10 \advance\ta@div by#1 + \setlength{\@tempdima}{#1\p@}% + \addtolength{\@tempdima}{10\p@}% \PackageWarningNoLine{typearea}{% - DIV for \the\ta@div pt and used papersize\MessageBreak + DIV for \the\@tempdima\space and used papersize\MessageBreak not defined!\MessageBreak Using DIV=\ta@divlistelse }% @@ -587,6 +613,20 @@ \fi } \newcommand*\typearea[2][\z@]{% + \scr@ifundefined{currentgrouptype}{}{% + \ifcase\currentgrouptype\else + \PackageWarning{typearea}{% + \string\typearea\space used at group level + \the\currentgrouplevel.\MessageBreak + Using \string\typearea\space inside any group, e.g.\MessageBreak + environments, math mode, boxes, etc. may result in\MessageBreak + many type setting problems. Because of this you\MessageBreak + should never do this. You should move the + \string\typearea\MessageBreak + outside all groups% + }% + \fi + }% \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else \setlength{\ta@bcor}{#1}% \fi @@ -622,7 +662,7 @@ \marginparpush=0.45\baselineskip \ifnum\ta@div=\z@ \@ifundefined{@ptsize}{% - \@tempdima=\f@size pt + \@tempdima=\f@size\p@ \advance\@tempdima by.5pt \ta@div=\@tempdima \divide\ta@div by65536 @@ -630,7 +670,7 @@ \xdef\@ptsize{\the\ta@div}% \PackageWarningNoLine{typearea}{% \string\@ptsize\space not defined!\MessageBreak - Fontsize ist \f@size.\MessageBreak + Fontsize is \f@size pt.\MessageBreak Defining \string\@ptsize\space to \@ptsize% }% }{}% @@ -772,7 +812,8 @@ \space\string\baselineskip\space\space\space=% \space\the\baselineskip\MessageBreak }% - \if@atdocument\@typearea@end\fi + \@typearea@end + \activateareas \fi } \AtEndOfPackage{\newcommand*{\recalctypearea}{\typearea[current]{last}}} @@ -780,7 +821,7 @@ \edef\@tempa{#1}\edef\@tempb{current}\ifx\@tempa\@tempb\else \setlength{\ta@bcor}{#1}% \fi - \if@atdocument\newpage\fi + \if@atdocument\newpage\fi \setlength{\textwidth}{#2}% \setlength{\textheight}{#3}% \def\@lastdiv{areaset}% @@ -799,6 +840,12 @@ \advance\oddsidemargin by\ta@bcor \evensidemargin\oddsidemargin \fi + \scr@ifundefined{@ptsize}{% + \topskip=\f@size\p@ + }{% + \topskip=\@ptsize\p@ + \advance\topskip by 10\p@ + }% \headheight=15\p@ \advance\headheight by\f@size\p@ \advance\headheight by-10\p@ @@ -827,7 +874,7 @@ \fi \marginparsep=1cc \marginparpush=0.45\baselineskip - \if@atdocument\@typearea@end\fi + \activateareas } \typearea[current]{current} %%% From File: scrlogo.dtx |