Skip to content
Snippets Groups Projects
Commit f578b3e2 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

Font-Loop feinfühliger

parent 28a4c2ca
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@
\newcommand*\scaleTitleFontSize[1]{%
\PTB@tempdima=\PTB@default@tfsize
\PTB@tempdima=#1\PTB@tempdima
\PTB@tempdimb=1.2\PTB@tempdima
\PTB@tempdimb=1.14\PTB@tempdima
\xdef\titleFontSize{\noexpand\@setfontsize
\noexpand\titleFontSize{\the\PTB@tempdima}{\the\PTB@tempdimb}}%
}
......@@ -260,24 +260,27 @@
}%
}%
\begingroup
\@tempcnta=\@ne \@tempcntb=1279 %
\loop\ifnum\@tempcnta<7 % Finden der ersten passenden titleFontSize
\multiply\@tempcntb 10000 \divide\@tempcntb by 12800 %
\scaleTitleFontSize{0.\the\@tempcntb}% 1:0.999, 2:0.78, 3:0.61, ...
\@tempcnta=\@ne \@tempcntb=10499 %
\loop\ifnum\@tempcnta<25 % Finden der ersten passenden titleFontSize
\multiply\@tempcntb 10000 \divide\@tempcntb by 10500 % jeweils um 5% kleiner
\scaleTitleFontSize{0.\the\@tempcntb}% 1:0.9999, 2:0.9522, 3:0.9068, ...
%\typeout{\the\@tempcnta\space XXX: \titleFontSize, 0.\the\@tempcntb}%
%%% \hyphenpenalty=10000 % keine Trennung
\setbox\z@ \hbox{\parbox[c]{\PTB@framewidth}{%
\sffamily\titleFontSize\@title}}%
\microtypesetup{protrusion=false}\sffamily\titleFontSize\@title}}%
\ifdim\dimexpr\ht\z@+\dp\z@>\PTB@maxtitleheight
\advance\@tempcnta\@ne % zu gross; weiter
\advance\@tempcnta\@ne % weiter, wenn zu gross
\else
\@tempcnta=99 % Abbruch
\@tempcnta=999 % Abbruch
\fi
\repeat
\endgroup
\PTB@tempdima=-0.127\PTB@scale@base
%%% \hyphenpenalty=10000 % keine Trennung
\put(\PTB@leftmargin,\PTB@tempdima){\parbox[c]{\PTB@framewidth}{%
\microtypesetup{protrusion=false}\sffamily\titleFontSize\@title}%
}%
\PTB@tempdima=-0.17\PTB@scale@base
\PTB@tempdima=-0.172\PTB@scale@base
\def\and{, }%
\put(\PTB@leftmargin,\PTB@tempdima){\parbox[b]{\PTB@framewidth}{%
\sffamily\authorFontSize\@author}}%
......@@ -457,7 +460,7 @@
\KOMAoptions{headings=normal,parskip=half} \normalsize
\setlength\PTB@texthsep{.75em}%
\setlength\PTB@textvsep{.75em}%
\setlength\PTB@maxtitleheight{0.059\PTB@scale@base}% HUGO
\setlength\PTB@maxtitleheight{0.057\PTB@scale@base}% HUGO
\ifx\@author\@empty
\setlength\PTB@topmargin{0.152\PTB@scale@base}%
\else
......
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