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 @@ ...@@ -159,7 +159,7 @@
\newcommand*\scaleTitleFontSize[1]{% \newcommand*\scaleTitleFontSize[1]{%
\PTB@tempdima=\PTB@default@tfsize \PTB@tempdima=\PTB@default@tfsize
\PTB@tempdima=#1\PTB@tempdima \PTB@tempdima=#1\PTB@tempdima
\PTB@tempdimb=1.2\PTB@tempdima \PTB@tempdimb=1.14\PTB@tempdima
\xdef\titleFontSize{\noexpand\@setfontsize \xdef\titleFontSize{\noexpand\@setfontsize
\noexpand\titleFontSize{\the\PTB@tempdima}{\the\PTB@tempdimb}}% \noexpand\titleFontSize{\the\PTB@tempdima}{\the\PTB@tempdimb}}%
} }
...@@ -260,24 +260,27 @@ ...@@ -260,24 +260,27 @@
}% }%
}% }%
\begingroup \begingroup
\@tempcnta=\@ne \@tempcntb=1279 % \@tempcnta=\@ne \@tempcntb=10499 %
\loop\ifnum\@tempcnta<7 % Finden der ersten passenden titleFontSize \loop\ifnum\@tempcnta<25 % Finden der ersten passenden titleFontSize
\multiply\@tempcntb 10000 \divide\@tempcntb by 12800 % \multiply\@tempcntb 10000 \divide\@tempcntb by 10500 % jeweils um 5% kleiner
\scaleTitleFontSize{0.\the\@tempcntb}% 1:0.999, 2:0.78, 3:0.61, ... \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}{% \setbox\z@ \hbox{\parbox[c]{\PTB@framewidth}{%
\sffamily\titleFontSize\@title}}% \microtypesetup{protrusion=false}\sffamily\titleFontSize\@title}}%
\ifdim\dimexpr\ht\z@+\dp\z@>\PTB@maxtitleheight \ifdim\dimexpr\ht\z@+\dp\z@>\PTB@maxtitleheight
\advance\@tempcnta\@ne % zu gross; weiter \advance\@tempcnta\@ne % weiter, wenn zu gross
\else \else
\@tempcnta=99 % Abbruch \@tempcnta=999 % Abbruch
\fi \fi
\repeat \repeat
\endgroup \endgroup
\PTB@tempdima=-0.127\PTB@scale@base \PTB@tempdima=-0.127\PTB@scale@base
%%% \hyphenpenalty=10000 % keine Trennung
\put(\PTB@leftmargin,\PTB@tempdima){\parbox[c]{\PTB@framewidth}{% \put(\PTB@leftmargin,\PTB@tempdima){\parbox[c]{\PTB@framewidth}{%
\microtypesetup{protrusion=false}\sffamily\titleFontSize\@title}% \microtypesetup{protrusion=false}\sffamily\titleFontSize\@title}%
}% }%
\PTB@tempdima=-0.17\PTB@scale@base \PTB@tempdima=-0.172\PTB@scale@base
\def\and{, }% \def\and{, }%
\put(\PTB@leftmargin,\PTB@tempdima){\parbox[b]{\PTB@framewidth}{% \put(\PTB@leftmargin,\PTB@tempdima){\parbox[b]{\PTB@framewidth}{%
\sffamily\authorFontSize\@author}}% \sffamily\authorFontSize\@author}}%
...@@ -457,7 +460,7 @@ ...@@ -457,7 +460,7 @@
\KOMAoptions{headings=normal,parskip=half} \normalsize \KOMAoptions{headings=normal,parskip=half} \normalsize
\setlength\PTB@texthsep{.75em}% \setlength\PTB@texthsep{.75em}%
\setlength\PTB@textvsep{.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 \ifx\@author\@empty
\setlength\PTB@topmargin{0.152\PTB@scale@base}% \setlength\PTB@topmargin{0.152\PTB@scale@base}%
\else \else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment