Skip to content
Snippets Groups Projects
Verified Commit 12f93549 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

introduce \teckidsgeometry:

when called as \teckidsgeometry it just resets stuff that needs
fixups after geometry changes; when called as \teckidsgeometry[foo]
it calls \geometry{foo} first for you
parent c0d44492
No related branches found
No related tags found
No related merge requests found
......@@ -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}%
......
......@@ -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%
......
......@@ -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}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment