diff --git a/teckids2jahresbericht.cls b/teckids2jahresbericht.cls index 9ef2205c883da62098d77524c39965657bbb2315..66e1c0f1434ca6dd2bb74d17f6267070c16ec6ea 100644 --- a/teckids2jahresbericht.cls +++ b/teckids2jahresbericht.cls @@ -19,7 +19,7 @@ % of said person’s immediate fault when using the work as intended. \NeedsTeXFormat{LaTeX2e}% -\ProvidesClass{teckids2jahresbericht}[2018/08/13 1.0 Teckids Jahresbericht class]% +\ProvidesClass{teckids2jahresbericht}[2018/08/21 1.1 Teckids Jahresbericht class]% \PassOptionsToPackage{paper=a4}{typearea}% \RequirePackage{fancyhdr}% @@ -31,11 +31,9 @@ \RequirePackage{pgfplots}% \KOMAoptions{fontsize=9pt}% -\geometry{paperwidth=154truemm,paperheight=216truemm,includeheadfoot,top=7mm,bottom=5mm,twoside,inner=9mm,outer=7mm,nohead,footskip=7mm}% -% tell fancyhdr to redo its geometry calculations -\makeatletter\f@nch@setoffs\makeatother% -% restore lengths damaged during geometry change -\setlength{\intextsep}{0pt}% + +\teckidsgeometry[paperwidth=154truemm,paperheight=216truemm,includeheadfoot,top=7mm,bottom=5mm,twoside,inner=9mm,outer=7mm,nohead,footskip=7mm]% + % adjust for scaled-down text \setlength{\parskip}{2.1mm plus 4mm minus 1mm}% diff --git a/teckids2style.sty b/teckids2style.sty index 4ca1664f134a859e26c092c2382f39ad78c0c5f4..7b07076780bf63c304b46c1dfb5413a7553e26aa 100644 --- a/teckids2style.sty +++ b/teckids2style.sty @@ -31,7 +31,7 @@ % • (em dash) → \dash \NeedsTeXFormat{LaTeX2e}% -\ProvidesPackage{teckids2style}[2018/08/12 1.8 Teckids TeX/LaTeX style, second epoch]% Teχ/LᴬTᴇX +\ProvidesPackage{teckids2style}[2018/08/21 1.9 Teckids TeX/LaTeX style, second epoch]% Teχ/LᴬTᴇX \RequirePackage{accsupp}% \RequirePackage[utf8]{inputenc}% @@ -48,7 +48,7 @@ \RequirePackage{multirow}% \renewcommand{\multirowsetup}{}% \RequirePackage{wrapfig}% -\setlength{\intextsep}{0pt}% +\setlength{\intextsep}{0pt}% see also \teckidsgeometry below \RequirePackage{intcalc}% \RequirePackage[writefile]{listings}% \RequirePackage{tocloft}% @@ -167,6 +167,23 @@ }% \teckidshdr{\headmark}% +% Stuff to do at geometry changes +\makeatletter% +\def\teckidsgeometry{\@ifnextchar[\teckidsgeometry@BT\teckidsgeometry@BF}% +\def\teckidsgeometry@BT[#1]{% + \geometry{#1}% + \teckidsgeometry@BF% +}% +\def\teckidsgeometry@BF{% + % restore lengths damaged during geometry change + \setlength{\intextsep}{0pt}% + % tell fancyhdr to redo its geometry calculations + \makeatletter\f@nch@setoffs\makeatother% +}% +\makeatother% +% run it initially +\teckidsgeometry% + % Hurenkinder und Schusterjungen \clubpenalty10000% \widowpenalty10000% diff --git a/teckids2urkunde.cls b/teckids2urkunde.cls index 3f8874cbf91595ff348c7277c154bfeaab38aae7..41cfa3eddd897e9e70f47207323c2bbcdd24086c 100644 --- a/teckids2urkunde.cls +++ b/teckids2urkunde.cls @@ -19,18 +19,14 @@ % of said person’s immediate fault when using the work as intended. \NeedsTeXFormat{LaTeX2e}% -\ProvidesClass{teckids2jahresbericht}[2018/08/21 0.1 Teckids Urkunde class]% +\ProvidesClass{teckids2jahresbericht}[2018/08/21 1.0 Teckids Urkunde class]% \PassOptionsToPackage{paper=a4}{typearea}% \RequirePackage{fancyhdr}% \LoadClass{scrartcl}% \RequirePackage{teckids2style}% -\geometry{hmargin=2cm,top=0.5cm,showframe}% -% tell fancyhdr to redo its geometry calculations -\makeatletter\f@nch@setoffs\makeatother% -% restore lengths damaged during geometry change -\setlength{\intextsep}{0pt}% +\teckidsgeometry[hmargin=2cm,top=0.5cm]% % run parent style constructor \teckidshdr[\the\year{}]{Urkunde}%