| 1 |
% \iffalse meta-comment |
| 2 |
% ====================================================================== |
| 3 |
% scrkernel-fonts.dtx |
| 4 |
% Copyright (c) Markus Kohm, 2002-2025 |
| 5 |
% |
| 6 |
% This file is part of the LaTeX2e KOMA-Script bundle. |
| 7 |
% |
| 8 |
% This work may be distributed and/or modified under the conditions of |
| 9 |
% the LaTeX Project Public License, version 1.3c of the license. |
| 10 |
% The latest version of this license is in |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 13 |
% version 2005/12/01 or later and of this work. |
| 14 |
% |
| 15 |
% This work has the LPPL maintenance status "author-maintained". |
| 16 |
% |
| 17 |
% The Current Maintainer and author of this work is Markus Kohm. |
| 18 |
% |
| 19 |
% This work consists of all files listed in MANIFEST.md. |
| 20 |
% ====================================================================== |
| 21 |
%%% From File: $Id: scrkernel-fonts.dtx 4181 2025-06-14 09:11:13Z kohm $ |
| 22 |
%<identify>%%% (run: identify) |
| 23 |
%<option>%%% (run: option) |
| 24 |
%<body>%%% (run: body) |
| 25 |
%<10pt>%%% (run: 10pt) |
| 26 |
%<11pt>%%% (run: 11pt) |
| 27 |
%<11pt>%%% (run: 12pt) |
| 28 |
%<*dtx> |
| 29 |
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi |
| 30 |
\begingroup |
| 31 |
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} |
| 32 |
\filedate$Date: 2025-06-14 11:11:13 +0200 (Sa, 14. Jun 2025) $ |
| 33 |
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} |
| 34 |
\filerevision$Revision: 4181 $ |
| 35 |
\edef\reserved@a{% |
| 36 |
\noexpand\endgroup |
| 37 |
\noexpand\ProvidesFile{scrkernel-fonts.dtx}% |
| 38 |
[\filedate\space\filerevision\space |
| 39 |
KOMA-Script source |
| 40 |
(font size)] |
| 41 |
}% |
| 42 |
\reserved@a |
| 43 |
% \changes{v3.09}{2011/02/23}{new package \pkg*{scrfontsizes}} |
| 44 |
%</dtx> |
| 45 |
%<*package&generator&identify> |
| 46 |
%<package&generator&identify>\ProvidesPackage{scrfontsizes}[% |
| 47 |
%!KOMAScriptVersion |
| 48 |
%<package&generator&identify> package (font size file generator)] |
| 49 |
%</package&generator&identify> |
| 50 |
%<*dtx> |
| 51 |
\documentclass[USenglish]{koma-script-source-doc} |
| 52 |
\usepackage{babel} |
| 53 |
\usepackage{hvlogos} |
| 54 |
\setcounter{StandardModuleDepth}{2} |
| 55 |
\begin{document} |
| 56 |
\DocInput{scrkernel-fonts.dtx} |
| 57 |
\end{document} |
| 58 |
%</dtx> |
| 59 |
% \fi |
| 60 |
% |
| 61 |
% |
| 62 |
% \changes{v2.95}{2002/06/25}{new by splitting \file{scrclass.dtx}} |
| 63 |
% \changes{v3.36}{2022/02/22}{switch over from \cls*{scrdoc} to |
| 64 |
% \cls*{koma-script-source-doc}} |
| 65 |
% \changes{v3.36}{2022/02/22}{implementation documentation in English} |
| 66 |
% \changes{v3.40}{2023/04/17}{guide names changed} |
| 67 |
% |
| 68 |
% \GetFileInfo{scrkernel-fonts.dtx} |
| 69 |
% \title{Code for the Foats of the |
| 70 |
% \href{https://komascript.de}{\KOMAScript} Classes} |
| 71 |
% \author{\href{mailto:[email protected]}{Markus Kohm}} |
| 72 |
% \date{Revision \fileversion{} of \filedate} |
| 73 |
% \maketitle |
| 74 |
% \begin{abstract} |
| 75 |
% \file{scrkernel-fonts.dtx} mainly implements the font selection of |
| 76 |
% \KOMAScript{}. This is not only the selection of the font sizes but also |
| 77 |
% the implementation of font elements. Additionally it provides package |
| 78 |
% \pkg*{scrfontsizes} to generate new font size files. |
| 79 |
% \end{abstract} |
| 80 |
% \tableofcontents |
| 81 |
% |
| 82 |
% \section{User Manual} |
| 83 |
% |
| 84 |
% You can find the user documentation the commands implemented here in the |
| 85 |
% \KOMAScript{} manual, either the German \file{scrguide-de.pdf} or the |
| 86 |
% English \file{scrguide-en.pdf}. The user documentation of alpha package |
| 87 |
% \pkg*{scrfontsizes} is still missing. |
| 88 |
% |
| 89 |
% |
| 90 |
% \MaybeStop{\PrintIndex} |
| 91 |
% |
| 92 |
% |
| 93 |
% \section{Implementation of Options of the Font Fize Files Fenerator Package} |
| 94 |
% |
| 95 |
% From version 3.09 there exist package \pkg*{scrfontsizes}, which is currently |
| 96 |
% very rudimentary. However it can used to generate font size files that can |
| 97 |
% be modified by the user afterwards. Currently it does not provide any options. |
| 98 |
% |
| 99 |
% \begin{macrocode} |
| 100 |
%<*generator&option> |
| 101 |
\ProcessOptions\relax |
| 102 |
%</generator&option> |
| 103 |
% \end{macrocode} |
| 104 |
% |
| 105 |
% \section{Implementation of Font Size Options of the \KOMAScript{} Classes} |
| 106 |
% |
| 107 |
% \begin{option}{10pt,11pt,12pt} |
| 108 |
% These options do not exist as explicit options but are handled by |
| 109 |
% \cs{DeclareOption*} via \cs{@pt@scan}. |
| 110 |
% \end{option} |
| 111 |
% |
| 112 |
% \begin{macro}{\@ptsize} |
| 113 |
% \changes{v2.96}{2006/08/11}{\cs{@ptsize} different temporary meaning} |
| 114 |
% \changes{v3.27}{2019/03/25}{\cs{providecommand} instead of \cs{newcommand}} |
| 115 |
% The main meaning of \cs{@ptsize} is the base font size minus 10\,pt, or in |
| 116 |
% other words: base font size = \cs{@ptsize} + 10\,pt. But, until the final |
| 117 |
% font size has been set, we use it for the default size. \cs{providecommand} |
| 118 |
% is used to define it, so a wrapper class can define a different default size |
| 119 |
% before loading the final class. |
| 120 |
% \begin{macrocode} |
| 121 |
%<*class&option> |
| 122 |
\providecommand*\@ptsize{% |
| 123 |
%<!letter> 11% |
| 124 |
%<letter> 12% |
| 125 |
} |
| 126 |
%</class&option> |
| 127 |
% \end{macrocode} |
| 128 |
% \end{macro} |
| 129 |
% |
| 130 |
% \begin{macro}{\@pt@scan} |
| 131 |
% \changes{v2.6}{2000/01/04}{added} |
| 132 |
% \begin{macro}{\@pt@@scan} |
| 133 |
% \changes{v2.6}{2000/01/04}{added} |
| 134 |
% \changes{v2.97c}{2007/05/12}{\cs{KOMA@UseObsolete} replaced by |
| 135 |
% \cs{KOMA@UseObsoleteOption}} |
| 136 |
% \changes{v2.98c}{2008/03/22}{Usage of \cs{KOMA@UseObsoleteOption} fixed} |
| 137 |
% \changes{v2.97d}{2007/10/03}{\cs{PackageInfo} replaced by \cs{PackageInfoNoLine}} |
| 138 |
% \changes{v3.12}{2013/03/04}{other font size options than \opt{10pt}, |
| 139 |
% \opt{11pt}, \opt{12pt} are deprecated} |
| 140 |
% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} |
| 141 |
% \changes{v3.28}{2019/11/18}{\cs{ifnumber} renamed to \cs{Ifnumber}} |
| 142 |
% This macro scans the current option and recognizes classic font size |
| 143 |
% options. It is used with \cs{DeclareOption*}. |
| 144 |
% \begin{macrocode} |
| 145 |
%<*class&option> |
| 146 |
\newcommand*{\@pt@scan}{% |
| 147 |
\expandafter\@pt@@scan\CurrentOption pt\@pt@@scan% |
| 148 |
} |
| 149 |
\newcommand*{\@pt@@scan}{} |
| 150 |
\def\@pt@@scan #1pt#2\@pt@@scan{% |
| 151 |
\Ifstr{#2}{pt}{% |
| 152 |
\Ifnumber{#1}{% |
| 153 |
\Ifstr{#1}{10}{% |
| 154 |
\KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}% |
| 155 |
{#1#2}{fontsize=#1#2}% |
| 156 |
}{% |
| 157 |
\Ifstr{#1}{11}{% |
| 158 |
\KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}% |
| 159 |
{#1#2}{fontsize=#1#2}% |
| 160 |
}{% |
| 161 |
\Ifstr{#1}{12}{% |
| 162 |
\KOMA@UseStandardOption{\PackageInfoNoLine{\KOMAClassName}}% |
| 163 |
{#1#2}{fontsize=#1#2}% |
| 164 |
}{% |
| 165 |
\KOMA@UseDeprecatedOption{\PackageWarningNoLine{\KOMAClassName}}% |
| 166 |
{#1#2}{fontsize=#1#2}% |
| 167 |
}% |
| 168 |
}% |
| 169 |
} |
| 170 |
}{\@headlines}% |
| 171 |
}{\@headlines}% |
| 172 |
} |
| 173 |
%</class&option> |
| 174 |
% \end{macrocode} |
| 175 |
% \end{macro}^^A \@pt@@scan |
| 176 |
% \end{macro}^^A \@pt@scan |
| 177 |
% |
| 178 |
% \begin{macro}{\@fontsizefilebase} |
| 179 |
% \changes{v2.96}{2006/08/11}{added} |
| 180 |
% \changes{v3.00}{2008/05/01}{definition earlier because of \pkg*{scrextend}} |
| 181 |
% This is the prefix for the \KOMAScript{} font size files. Wrapper classes |
| 182 |
% are allowed to change it to use their own font size files. |
| 183 |
% \begin{macrocode} |
| 184 |
%<*option&(class|extend)> |
| 185 |
\providecommand*{\@fontsizefilebase}{scrsize} |
| 186 |
% \end{macrocode} |
| 187 |
% \end{macro} |
| 188 |
% |
| 189 |
% \changes{v3.17}{2015/03/10}{saving option values in internal list} |
| 190 |
% \begin{option}{fontsize} |
| 191 |
% \changes{v2.96}{2006/08/11}{function rewritten} |
| 192 |
% \changes{v2.98c}{2008/03/26}{loading font size file if available} |
| 193 |
% \changes{v3.12}{2013/03/05}{signaling using \cs{FamilyKeyStateProcessed}} |
| 194 |
% \changes{v3.38}{2022/10/06}{error message in horizontal mode added} |
| 195 |
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of |
| 196 |
% option storage commands} |
| 197 |
% The option itself. Note, that it supports also font sizes like |
| 198 |
% \texttt{10.3pt}. |
| 199 |
% \begin{macrocode} |
| 200 |
\KOMA@key{fontsize}{% |
| 201 |
%<*!extend> |
| 202 |
\scr@ifundefinedorrelax{changefontsizes}{% |
| 203 |
\@defaultunits\@tempdima#1pt\relax\@nnil |
| 204 |
\edef\@ptsize{#1}% |
| 205 |
}{% |
| 206 |
%</!extend> |
| 207 |
\ifvmode\else |
| 208 |
\par |
| 209 |
%<class> \ClassError{\KOMAClassName}{% |
| 210 |
%<extend> \PackageError{scrextend}{% |
| 211 |
Option `fontsize' inside paragraph not allowed% |
| 212 |
}{% |
| 213 |
Option `fontsize' has been designed to change the base font size of |
| 214 |
a\MessageBreak |
| 215 |
document. It has not been made to change the current font |
| 216 |
size. Moreover\MessageBreak |
| 217 |
using it inside a paragraph mostly will not have the intended result, |
| 218 |
because\MessageBreak |
| 219 |
TeX always uses the setting of `\string\baselineskip' and other |
| 220 |
parameters from the\MessageBreak |
| 221 |
end of a paragraph for the whole paragraph. Therefore using option |
| 222 |
`fontsize'\MessageBreak |
| 223 |
in TeX's horizontal mode does not make sense and is not |
| 224 |
permitted.\MessageBreak |
| 225 |
You should use font size commands like `\string\Huge'…`\string\tiny' |
| 226 |
or `\string\fontsize' here.\MessageBreak |
| 227 |
See a LaTeX introduction for more information.\MessageBreak |
| 228 |
But maybe you've just forgotten to make a paragraph. So if you'd |
| 229 |
continue,\MessageBreak |
| 230 |
I'll add `\expandafter\string\csname par\endcsname'.% |
| 231 |
}% |
| 232 |
\fi |
| 233 |
\expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil |
| 234 |
\edef\@tempa{#1}% |
| 235 |
\setlength{\@tempdimb}{\@tempdima}% |
| 236 |
\edef\@tempb{\strip@pt\@tempdimb}% |
| 237 |
\addtolength{\@tempdimb}{-10\p@}% |
| 238 |
\edef\@ptsize{\strip@pt\@tempdimb}% |
| 239 |
\edef\@tempa{% |
| 240 |
\noexpand\makeatletter |
| 241 |
\noexpand\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{% |
| 242 |
%<!extend> \noexpand\ClassInfo{\KOMAClassName}{% |
| 243 |
%<extend> \noexpand\PackageInfo{scrextend}{% |
| 244 |
File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}% |
| 245 |
}{% |
| 246 |
\noexpand\InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{% |
| 247 |
%<!extend> \noexpand\ClassInfo{\KOMAClassName}{% |
| 248 |
%<extend> \noexpand\PackageInfo{scrextend}{% |
| 249 |
File `\@fontsizefilebase\@tempb pt.clo' used instead of% |
| 250 |
\noexpand\MessageBreak |
| 251 |
file `\@fontsizefilebase\@tempa.clo' to setup font sizes}% |
| 252 |
}{% |
| 253 |
\noexpand\changefontsizes{#1}% |
| 254 |
}% |
| 255 |
}% |
| 256 |
\noexpand\catcode`\noexpand\@=\the\catcode`\@ |
| 257 |
}% |
| 258 |
%<extend> \scr@ifundefinedorrelax{changefontsizes}{% |
| 259 |
%<extend> \expandafter\AtEndOfPackage\expandafter{\@tempa}% |
| 260 |
%<extend> }{% |
| 261 |
\@tempa |
| 262 |
}% |
| 263 |
\FamilyKeyStateProcessed |
| 264 |
\KOMA@kav@xreplacevalue{% |
| 265 |
%<class> \KOMAClassFileName |
| 266 |
%<extend> scrextend.\scr@pkgextension |
| 267 |
}{fontsize}{#1}% |
| 268 |
} |
| 269 |
%</option&(class|extend)> |
| 270 |
% \end{macrocode} |
| 271 |
% \end{option} |
| 272 |
% |
| 273 |
% |
| 274 |
% \section{Loading Packages Required by the Font Size File Generator Package} |
| 275 |
% |
| 276 |
% \pkg*{scrfontsizes} needs command \cs{changefontsizes}. This can either be |
| 277 |
% provided by a \KOMAScript{} class or package \pkg*{scrextend}. |
| 278 |
% \begin{macrocode} |
| 279 |
%<*generator&body> |
| 280 |
\@ifundefined{changefontsizes}{\RequirePackage{scrextend}}{} |
| 281 |
%</generator&body> |
| 282 |
% \end{macrocode} |
| 283 |
% |
| 284 |
% |
| 285 |
% \section{Implementation of The Font Size Files} |
| 286 |
% |
| 287 |
% \changes{v2.6}{2000/01/04}{reading font size files works independent from size} |
| 288 |
% \changes{v2.98c}{2008/03/26}{using my own \file{scrsize\dots.clo} files} |
| 289 |
% |
| 290 |
% We need at least the font size files for the three base sizes 10\,pt, 11\,pt |
| 291 |
% and 12\,pt. From version 2.98c \KOMAScript{} prefers to use its own files, |
| 292 |
% because these can be loaded without problems after |\begin{document}| and |
| 293 |
% after another font size file has already been loaded. Nevertheless the base |
| 294 |
% sizes are more or less from the standard classes. |
| 295 |
% |
| 296 |
% \begin{macrocode} |
| 297 |
%<*10pt|11pt|12pt> |
| 298 |
\ProvidesFile{% |
| 299 |
%<10pt> scrsize10pt.clo% |
| 300 |
%<11pt> scrsize11pt.clo% |
| 301 |
%<12pt> scrsize12pt.clo% |
| 302 |
}[\KOMAScriptVersion\space font size class option % |
| 303 |
%<10pt> (10pt)% |
| 304 |
%<11pt> (11pt)% |
| 305 |
%<12pt> (12pt)% |
| 306 |
] |
| 307 |
% \end{macrocode} |
| 308 |
% |
| 309 |
% \begin{command}{\normalsize,\small,\footnotesize,\scriptsize,\tiny,\large, |
| 310 |
% \Large,\LARGE,\huge,\Huge} |
| 311 |
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files} |
| 312 |
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files |
| 313 |
% from 2021/10/04} |
| 314 |
% \begin{macrocode} |
| 315 |
\let\normalsize\@undefined |
| 316 |
\DeclareRobustCommand\normalsize{% |
| 317 |
%<*10pt> |
| 318 |
\@setfontsize\normalsize\@xpt\@xiipt |
| 319 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 320 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 321 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 322 |
%</10pt> |
| 323 |
%<*11pt> |
| 324 |
\@setfontsize\normalsize\@xipt{13.6}% |
| 325 |
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ |
| 326 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 327 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 328 |
%</11pt> |
| 329 |
%<*12pt> |
| 330 |
\@setfontsize\normalsize\@xiipt{14.5}% |
| 331 |
\abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ |
| 332 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 333 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 334 |
%</12pt> |
| 335 |
\belowdisplayskip \abovedisplayskip |
| 336 |
\let\@listi\@listI |
| 337 |
} |
| 338 |
\let\small\@undefined |
| 339 |
\DeclareRobustCommand\small{% |
| 340 |
%<*10pt> |
| 341 |
\@setfontsize\small\@ixpt{11}% |
| 342 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ |
| 343 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 344 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 345 |
\def\@listi{\leftmargin\leftmargini |
| 346 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 347 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 348 |
\itemsep \parsep}% |
| 349 |
%</10pt> |
| 350 |
%<*11pt> |
| 351 |
\@setfontsize\small\@xpt\@xiipt |
| 352 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 353 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 354 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 355 |
\def\@listi{\leftmargin\leftmargini |
| 356 |
\topsep 6\p@ \@plus2\p@ \@minus2\p@ |
| 357 |
\parsep 3\p@ \@plus2\p@ \@minus\p@ |
| 358 |
\itemsep \parsep}% |
| 359 |
%</11pt> |
| 360 |
%<*12pt> |
| 361 |
\@setfontsize\small\@xipt{13.6}% |
| 362 |
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ |
| 363 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 364 |
\belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ |
| 365 |
\def\@listi{\leftmargin\leftmargini |
| 366 |
\topsep 9\p@ \@plus3\p@ \@minus5\p@ |
| 367 |
\parsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 368 |
\itemsep \parsep}% |
| 369 |
%</12pt> |
| 370 |
\belowdisplayskip \abovedisplayskip |
| 371 |
} |
| 372 |
\let\footnotesize\@undefined |
| 373 |
\DeclareRobustCommand\footnotesize{% |
| 374 |
%<*10pt> |
| 375 |
\@setfontsize\footnotesize\@viiipt{9.5}% |
| 376 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ |
| 377 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 378 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ |
| 379 |
\def\@listi{\leftmargin\leftmargini |
| 380 |
\topsep 3\p@ \@plus\p@ \@minus\p@ |
| 381 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 382 |
\itemsep \parsep}% |
| 383 |
%</10pt> |
| 384 |
%<*11pt> |
| 385 |
\@setfontsize\footnotesize\@ixpt{11}% |
| 386 |
\abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@ |
| 387 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 388 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 389 |
\def\@listi{\leftmargin\leftmargini |
| 390 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 391 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 392 |
\itemsep \parsep}% |
| 393 |
%</11pt> |
| 394 |
%<*12pt> |
| 395 |
\@setfontsize\footnotesize\@xpt\@xiipt |
| 396 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 397 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 398 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 399 |
\def\@listi{\leftmargin\leftmargini |
| 400 |
\topsep 6\p@ \@plus2\p@ \@minus2\p@ |
| 401 |
\parsep 3\p@ \@plus2\p@ \@minus\p@ |
| 402 |
\itemsep \parsep}% |
| 403 |
%</12pt> |
| 404 |
\belowdisplayskip \abovedisplayskip |
| 405 |
} |
| 406 |
%<*10pt> |
| 407 |
\let\scriptsize\@undefined |
| 408 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} |
| 409 |
\let\tiny\@undefined |
| 410 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vpt\@vipt} |
| 411 |
\let\large\@undefined |
| 412 |
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}} |
| 413 |
\let\Large\@undefined |
| 414 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}} |
| 415 |
\let\LARGE\@undefined |
| 416 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} |
| 417 |
\let\huge\@undefined |
| 418 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}} |
| 419 |
\let\Huge\@undefined |
| 420 |
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}} |
| 421 |
%</10pt> |
| 422 |
%<*11pt> |
| 423 |
\let\scriptsize\@undefined |
| 424 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}} |
| 425 |
\let\tiny\@undefined |
| 426 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt} |
| 427 |
\let\large\@undefined |
| 428 |
\DeclareRobustCommand\large{\@setfontsize\large\@xiipt{14}} |
| 429 |
\let\Large\@undefined |
| 430 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xivpt{18}} |
| 431 |
\let\LARGE\@undefined |
| 432 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} |
| 433 |
\let\huge\@undefined |
| 434 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxpt{25}} |
| 435 |
\let\Huge\@undefined |
| 436 |
\DeclareRobustCommand\Huge{\@setfontsize\Huge\@xxvpt{30}} |
| 437 |
%</11pt> |
| 438 |
%<*12pt> |
| 439 |
\let\scriptsize\@undefined |
| 440 |
\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}} |
| 441 |
\let\tiny\@undefined |
| 442 |
\DeclareRobustCommand\tiny{\@setfontsize\tiny\@vipt\@viipt} |
| 443 |
\let\large\@undefined |
| 444 |
\DeclareRobustCommand\large{\@setfontsize\large\@xivpt{18}} |
| 445 |
\let\Large\@undefined |
| 446 |
\DeclareRobustCommand\Large{\@setfontsize\Large\@xviipt{22}} |
| 447 |
\let\LARGE\@undefined |
| 448 |
\DeclareRobustCommand\LARGE{\@setfontsize\LARGE\@xxpt{25}} |
| 449 |
\let\huge\@undefined |
| 450 |
\DeclareRobustCommand\huge{\@setfontsize\huge\@xxvpt{30}} |
| 451 |
\@ifundefined{DeclareCommandCopy}{% |
| 452 |
\let\Huge\huge |
| 453 |
}{% |
| 454 |
\DeclareCommandCopy\Huge\huge |
| 455 |
} |
| 456 |
%</12pt> |
| 457 |
\normalsize |
| 458 |
% \end{macrocode} |
| 459 |
% \end{command} |
| 460 |
% |
| 461 |
% \begin{length}{\footnotesep,\footins,\floatsep,\textfloatsep,\intextsep, |
| 462 |
% \dblfloatsep,\sbltextfloatsep,\partopsep} |
| 463 |
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files} |
| 464 |
% \begin{ilength}{\@fptop,\@fpsep,\@fpbot,\@dblfptop,\@dblfpsep,\@dblfpbot} |
| 465 |
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files} |
| 466 |
% The values are same as with the standard classes. |
| 467 |
% \begin{macrocode} |
| 468 |
%<*10pt> |
| 469 |
\setlength\footnotesep {6.65\p@} |
| 470 |
\setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@} |
| 471 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 472 |
\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@} |
| 473 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 474 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 475 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 476 |
\setlength\partopsep {2\p@ \@plus 1\p@ \@minus 1\p@} |
| 477 |
\setlength\@fptop {0\p@ \@plus 1fil} |
| 478 |
\setlength\@fpsep {8\p@ \@plus 2fil} |
| 479 |
\setlength\@fpbot {0\p@ \@plus 1fil} |
| 480 |
\setlength\@dblfptop {0\p@ \@plus 1fil} |
| 481 |
\setlength\@dblfpsep {8\p@ \@plus 2fil} |
| 482 |
\setlength\@dblfpbot {0\p@ \@plus 1fil} |
| 483 |
%</10pt> |
| 484 |
%<*11pt> |
| 485 |
\setlength\footnotesep {7.7\p@} |
| 486 |
\setlength{\skip\footins} {10\p@ \@plus 4\p@ \@minus 2\p@} |
| 487 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 488 |
\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@} |
| 489 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 490 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 491 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 492 |
\setlength\partopsep {3\p@ \@plus 1\p@ \@minus 1\p@} |
| 493 |
\setlength\@fptop {0\p@ \@plus 1fil} |
| 494 |
\setlength\@fpsep {8\p@ \@plus 2fil} |
| 495 |
\setlength\@fpbot {0\p@ \@plus 1fil} |
| 496 |
\setlength\@dblfptop {0\p@ \@plus 1fil} |
| 497 |
\setlength\@dblfpsep {8\p@ \@plus 2fil} |
| 498 |
\setlength\@dblfpbot {0\p@ \@plus 1fil} |
| 499 |
%</11pt> |
| 500 |
%<*12pt> |
| 501 |
\setlength\footnotesep {8.4\p@} |
| 502 |
\setlength{\skip\footins} {10.8\p@ \@plus 4\p@ \@minus 2\p@} |
| 503 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 4\p@} |
| 504 |
\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@} |
| 505 |
\setlength\intextsep {14\p@ \@plus 4\p@ \@minus 4\p@} |
| 506 |
\setlength\dblfloatsep {14\p@ \@plus 2\p@ \@minus 4\p@} |
| 507 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 508 |
\setlength\partopsep {3\p@ \@plus 2\p@ \@minus 2\p@} |
| 509 |
\setlength\@fptop {0\p@ \@plus 1fil} |
| 510 |
\setlength\@fpsep {10\p@ \@plus 2fil} |
| 511 |
\setlength\@fpbot {0\p@ \@plus 1fil} |
| 512 |
\setlength\@dblfptop {0\p@ \@plus 1fil} |
| 513 |
\setlength\@dblfpsep {10\p@ \@plus 2fil} |
| 514 |
\setlength\@dblfpbot {0\p@ \@plus 1fil} |
| 515 |
%</12pt> |
| 516 |
% \end{macrocode} |
| 517 |
% \begin{macro}{\@listi,\@listii,\@listiii,\@listiv,\@listv,\@listvi} |
| 518 |
% \changes{v2.98c}{2008/03/26}{defined in the \file{scrsize\dots.clo} files} |
| 519 |
% The definitions are the same as with the standard classes. |
| 520 |
% \begin{macrocode} |
| 521 |
\def\@listi{\leftmargin\leftmargini |
| 522 |
%<*10pt> |
| 523 |
\parsep 4\p@ \@plus2\p@ \@minus\p@ |
| 524 |
\topsep 8\p@ \@plus2\p@ \@minus4\p@ |
| 525 |
\itemsep4\p@ \@plus2\p@ \@minus\p@} |
| 526 |
%</10pt> |
| 527 |
%<*11pt> |
| 528 |
\parsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 529 |
\topsep 9\p@ \@plus3\p@ \@minus5\p@ |
| 530 |
\itemsep4.5\p@ \@plus2\p@ \@minus\p@} |
| 531 |
%</11pt> |
| 532 |
%<*12pt> |
| 533 |
\parsep 5\p@ \@plus2.5\p@ \@minus\p@ |
| 534 |
\topsep 10\p@ \@plus4\p@ \@minus6\p@ |
| 535 |
\itemsep5\p@ \@plus2.5\p@ \@minus\p@} |
| 536 |
%</12pt> |
| 537 |
\let\@listI\@listi |
| 538 |
\def\@listii {\leftmargin\leftmarginii |
| 539 |
\labelwidth\leftmarginii |
| 540 |
\advance\labelwidth-\labelsep |
| 541 |
%<*10pt> |
| 542 |
\topsep 4\p@ \@plus2\p@ \@minus\p@ |
| 543 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 544 |
%</10pt> |
| 545 |
%<*11pt> |
| 546 |
\topsep 4.5\p@ \@plus2\p@ \@minus\p@ |
| 547 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 548 |
%</11pt> |
| 549 |
%<*12pt> |
| 550 |
\topsep 5\p@ \@plus2.5\p@ \@minus\p@ |
| 551 |
\parsep 2.5\p@ \@plus\p@ \@minus\p@ |
| 552 |
%</12pt> |
| 553 |
\itemsep \parsep} |
| 554 |
\def\@listiii{\leftmargin\leftmarginiii |
| 555 |
\labelwidth\leftmarginiii |
| 556 |
\advance\labelwidth-\labelsep |
| 557 |
%<10pt> \topsep 2\p@ \@plus\p@\@minus\p@ |
| 558 |
%<11pt> \topsep 2\p@ \@plus\p@\@minus\p@ |
| 559 |
%<12pt> \topsep 2.5\p@\@plus\p@\@minus\p@ |
| 560 |
\parsep \z@ |
| 561 |
\partopsep \p@ \@plus\z@ \@minus\p@ |
| 562 |
\itemsep \topsep} |
| 563 |
\def\@listiv {\leftmargin\leftmarginiv |
| 564 |
\labelwidth\leftmarginiv |
| 565 |
\advance\labelwidth-\labelsep} |
| 566 |
\def\@listv {\leftmargin\leftmarginv |
| 567 |
\labelwidth\leftmarginv |
| 568 |
\advance\labelwidth-\labelsep} |
| 569 |
\def\@listvi {\leftmargin\leftmarginvi |
| 570 |
\labelwidth\leftmarginvi |
| 571 |
\advance\labelwidth-\labelsep} |
| 572 |
%</10pt|11pt|12pt> |
| 573 |
% \end{macrocode} |
| 574 |
% \end{macro}^^A \@listi … \@listvi |
| 575 |
% \end{ilength}^^A \@fptop … \@dblfpbot |
| 576 |
% \end{length}^^A \footnotesep … \partopsep |
| 577 |
% |
| 578 |
% \begin{command}{\changefontsizes} |
| 579 |
% \changes{v2.96}{2006/08/11}{added} |
| 580 |
% \changes{v3.08b}{2011/02/22}{three \cs{def} replaced by \cs{edef}} |
| 581 |
% \changes{v3.17}{2015/02/23}{define if undefined only} |
| 582 |
% \changes{v3.17}{2015/02/23}{indirect definition for Falk} |
| 583 |
% \begin{macro}{\simple@changefontsizes} |
| 584 |
% \changes{v3.17}{2015/02/23}{added} |
| 585 |
% \changes{v3.17}{2015/03/25}{\cs{par@updaterelative} added} |
| 586 |
% \changes{v3.39}{2022/11/11}{initial dot removed from member argument of |
| 587 |
% option storage commands} |
| 588 |
% Fallback calculation of font size settings relative to known 10\,pt values: |
| 589 |
% \begin{quote} |
| 590 |
% \cs{changefontsizes}\oarg{baseline skip}\marg{font size} |
| 591 |
% \end{quote} |
| 592 |
% If the \meta{baseline skip} is given, it is used as \len{baselineskip} for |
| 593 |
% \cs{normalsize} and all other baseline skips are relative to it. If it is |
| 594 |
% not give, it is also calculated. |
| 595 |
% \begin{macro}{\scr@setlength} |
| 596 |
% \changes{v3.12}{2013/10/08}{added} |
| 597 |
% Command |
| 598 |
% \begin{quote} |
| 599 |
% \cs{scr@setlength}\marg{\LaTeX length}\marg{base dimension}\marg{plus |
| 600 |
% dimension}\marg{minus dimension} |
| 601 |
% \end{quote} |
| 602 |
% sets \meta{\LaTeX length} to \meta{base dimension} \texttt{plus} \meta{plus |
| 603 |
% dimension} \texttt{minus} \meta{minus dimension}. Minimum value for |
| 604 |
% \meta{plus dimension} and \meta{minus dimension} is 1\,pt. |
| 605 |
% \begin{macrocode} |
| 606 |
%<*body&(class|extend)> |
| 607 |
\newcommand*\scr@setlength[4]{% |
| 608 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 609 |
%<!v4> \setlength{#1}{#2 \@plus#3 \@minus#4}% |
| 610 |
%<!v4> \else |
| 611 |
\ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi |
| 612 |
\ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi |
| 613 |
\ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi |
| 614 |
\setlength{#1}{\p@ \@plus\p@ \@minus\p@}% |
| 615 |
\else |
| 616 |
\setlength{#1}{\p@ \@plus\p@ \@minus#4}% |
| 617 |
\fi |
| 618 |
\else |
| 619 |
\ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi |
| 620 |
\setlength{#1}{\p@ \@plus#3 \@minus\p@}% |
| 621 |
\else |
| 622 |
\setlength{#1}{\p@ \@plus#3 \@minus#4}% |
| 623 |
\fi |
| 624 |
\fi |
| 625 |
\else |
| 626 |
\ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi |
| 627 |
\ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi |
| 628 |
\setlength{#1}{#2 \@plus\p@ \@minus\p@}% |
| 629 |
\else |
| 630 |
\setlength{#1}{#2 \@plus\p@ \@minus#4}% |
| 631 |
\fi |
| 632 |
\else |
| 633 |
\ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi |
| 634 |
\setlength{#1}{#2 \@plus#3 \@minus\p@}% |
| 635 |
\else |
| 636 |
\setlength{#1}{#2 \@plus#3 \@minus#4}% |
| 637 |
\fi |
| 638 |
\fi |
| 639 |
\fi |
| 640 |
%<!v4> \fi |
| 641 |
} |
| 642 |
% \end{macrocode} |
| 643 |
% \end{macro} |
| 644 |
% \changes{v3.17}{2015/03/10}{\eTeX{} warning removed} |
| 645 |
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files |
| 646 |
% from 2021/10/04} |
| 647 |
% \begin{macrocode} |
| 648 |
\providecommand*{\simple@changefontsizes}[2][1.2\@tempdima]{% |
| 649 |
\KOMA@kav@removekey{% |
| 650 |
%<class> \KOMAClassFileName |
| 651 |
%<extend> scrextend.\scr@pkgextension |
| 652 |
}{fontsize}% |
| 653 |
\@defaultunits\@tempdima#2pt\relax\@nnil |
| 654 |
\setlength{\@tempdimc}{\@tempdima}% |
| 655 |
\addtolength{\@tempdimc}{-10\p@}% |
| 656 |
\edef\@ptsize{\strip@pt\@tempdimc}% |
| 657 |
\@defaultunits\@tempdimb#1pt\relax\@nnil |
| 658 |
\setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}% |
| 659 |
\edef\@tempb{\the\@tempdimc}% |
| 660 |
\setlength{\@tempdimc}{\@tempdima}% |
| 661 |
\def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}% |
| 662 |
\expandafter\@tempa\expandafter\@tempb\@tempb\@nnil% |
| 663 |
% \end{macrocode} |
| 664 |
% Now, \len{@temdimc} is the wanted basic font size in pt. \cs{@tempb} is the |
| 665 |
% factor of the baseline skip rounded to two decimals. \len{@tempdima} is also |
| 666 |
% the basic font size and \len{@tempdimb} the \len{baselineskip}. But |
| 667 |
% \len{@tempdima} and \len{tempdimb} will change in further calculations |
| 668 |
% depending on the wanted font size command. |
| 669 |
% |
| 670 |
% Calculation and definition of \cs{normalsize}: |
| 671 |
% \begin{macrocode} |
| 672 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 673 |
%<!v4> \setlength{\abovedisplayskip}{% |
| 674 |
%<!v4> \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% |
| 675 |
%<!v4> \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% |
| 676 |
%<!v4> \setlength{\belowdisplayshortskip}{% |
| 677 |
%<!v4> .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% |
| 678 |
%<!v4> \else |
| 679 |
\scr@setlength{\abovedisplayskip}% |
| 680 |
{.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% |
| 681 |
\scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% |
| 682 |
\scr@setlength{\belowdisplayshortskip}% |
| 683 |
{.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% |
| 684 |
%<!v4> \fi |
| 685 |
\setlength{\belowdisplayskip}{\abovedisplayskip}% |
| 686 |
\edef\reserved@a{% |
| 687 |
\noexpand\@setfontsize\noexpand\normalsize |
| 688 |
{\the\@tempdima}{\the\@tempdimb}% |
| 689 |
\abovedisplayskip \the\abovedisplayskip |
| 690 |
\abovedisplayshortskip \the\abovedisplayshortskip |
| 691 |
\belowdisplayskip \the\belowdisplayskip |
| 692 |
\belowdisplayshortskip \the\belowdisplayshortskip |
| 693 |
\let\noexpand\@listi\noexpand\@listI |
| 694 |
}% |
| 695 |
\let\normalsize\@undefined |
| 696 |
\expandafter\DeclareRobustCommand\expandafter\normalsize\expandafter{\reserved@a}% |
| 697 |
% \end{macrocode} |
| 698 |
% Calculation and definition of \cs{small}: |
| 699 |
% \begin{macrocode} |
| 700 |
\setlength{\@tempdima}{0.9125\@tempdimc}% |
| 701 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 702 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 703 |
%<!v4> \setlength{\abovedisplayskip}{% |
| 704 |
%<!v4> \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% |
| 705 |
%<!v4> \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% |
| 706 |
%<!v4> \setlength{\belowdisplayshortskip}{% |
| 707 |
%<!v4> .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% |
| 708 |
%<!v4> \else |
| 709 |
\scr@setlength{\abovedisplayskip}% |
| 710 |
{.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% |
| 711 |
\scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% |
| 712 |
\scr@setlength{\belowdisplayshortskip}% |
| 713 |
{.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% |
| 714 |
%<!v4> \fi |
| 715 |
\setlength{\belowdisplayskip}{\abovedisplayskip}% |
| 716 |
\edef\reserved@a{% |
| 717 |
\noexpand\@setfontsize\noexpand\small |
| 718 |
{\the\@tempdima}{\the\@tempdimb}% |
| 719 |
\abovedisplayskip \the\abovedisplayskip |
| 720 |
\abovedisplayshortskip \the\abovedisplayshortskip |
| 721 |
\belowdisplayskip \the\belowdisplayskip |
| 722 |
\belowdisplayshortskip \the\belowdisplayshortskip |
| 723 |
\let\noexpand\@listi\noexpand\@listi@small |
| 724 |
}% |
| 725 |
\let\small\@undefined |
| 726 |
\expandafter\DeclareRobustCommand\expandafter\small\expandafter{\reserved@a}% |
| 727 |
% \end{macrocode} |
| 728 |
% Calculation and definition of \cs{footnotesize}: |
| 729 |
% \begin{macrocode} |
| 730 |
\setlength{\@tempdima}{.83334\@tempdimc}% |
| 731 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 732 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 733 |
%<!v4> \setlength{\abovedisplayskip}{% |
| 734 |
%<!v4> \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}% |
| 735 |
%<!v4> \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}% |
| 736 |
%<!v4> \setlength{\belowdisplayshortskip}{% |
| 737 |
%<!v4> .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}% |
| 738 |
%<!v4> \else |
| 739 |
\scr@setlength{\abovedisplayskip}% |
| 740 |
{.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% |
| 741 |
\scr@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% |
| 742 |
\scr@setlength{\belowdisplayshortskip}% |
| 743 |
{.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% |
| 744 |
%<!v4> \fi |
| 745 |
\setlength{\belowdisplayskip}{\abovedisplayskip}% |
| 746 |
\edef\reserved@a{% |
| 747 |
\noexpand\@setfontsize\noexpand\footnotesize |
| 748 |
{\the\@tempdima}{\the\@tempdimb}% |
| 749 |
\abovedisplayskip \the\abovedisplayskip |
| 750 |
\abovedisplayshortskip \the\abovedisplayshortskip |
| 751 |
\belowdisplayskip \the\belowdisplayskip |
| 752 |
\belowdisplayshortskip \the\belowdisplayshortskip |
| 753 |
\let\noexpand\@listi\noexpand\@listi@footnotesize |
| 754 |
}% |
| 755 |
\let\footnotesize\@undefined |
| 756 |
\expandafter\DeclareRobustCommand\expandafter\footnotesize\expandafter{\reserved@a}% |
| 757 |
% \end{macrocode} |
| 758 |
% Calculation and definition of \cs{scriptsize}: |
| 759 |
% \begin{macrocode} |
| 760 |
\setlength{\@tempdima}{.66667\@tempdimc}% |
| 761 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 762 |
\edef\reserved@a{% |
| 763 |
\noexpand\@setfontsize\noexpand\scriptsize |
| 764 |
{\the\@tempdima}{\the\@tempdimb}% |
| 765 |
}% |
| 766 |
\let\scriptsize\@undefined |
| 767 |
\expandafter\DeclareRobustCommand\expandafter\scriptsize\expandafter{\reserved@a}% |
| 768 |
% \end{macrocode} |
| 769 |
% Calculation and definition of \cs{tiny}: |
| 770 |
% \begin{macrocode} |
| 771 |
\setlength{\@tempdima}{.5\@tempdimc}% |
| 772 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 773 |
\edef\reserved@a{% |
| 774 |
\noexpand\@setfontsize\noexpand\tiny |
| 775 |
{\the\@tempdima}{\the\@tempdimb}% |
| 776 |
}% |
| 777 |
\let\tiny\@undefined |
| 778 |
\expandafter\DeclareRobustCommand\expandafter\tiny\expandafter{\reserved@a}% |
| 779 |
% \end{macrocode} |
| 780 |
% Calculation and definition of \cs{large}: |
| 781 |
% \begin{macrocode} |
| 782 |
\setlength{\@tempdima}{1.2\@tempdimc}% |
| 783 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 784 |
\edef\reserved@a{% |
| 785 |
\noexpand\@setfontsize\noexpand\large |
| 786 |
{\the\@tempdima}{\the\@tempdimb}% |
| 787 |
}% |
| 788 |
\let\large\@undefined |
| 789 |
\expandafter\DeclareRobustCommand\expandafter\large\expandafter{\reserved@a}% |
| 790 |
% \end{macrocode} |
| 791 |
% Calculation and definition of \cs{Large}: |
| 792 |
% \begin{macrocode} |
| 793 |
\setlength{\@tempdima}{1.44\@tempdimc}% |
| 794 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 795 |
\edef\reserved@a{% |
| 796 |
\noexpand\@setfontsize\noexpand\Large |
| 797 |
{\the\@tempdima}{\the\@tempdimb}% |
| 798 |
}% |
| 799 |
\let\Large\@undefined |
| 800 |
\expandafter\DeclareRobustCommand\expandafter\Large\expandafter{\reserved@a}% |
| 801 |
% \end{macrocode} |
| 802 |
% Calculation and definition of \cs{LARGE}: |
| 803 |
% \begin{macrocode} |
| 804 |
\setlength{\@tempdima}{1.728\@tempdimc}% |
| 805 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 806 |
\edef\reserved@a{% |
| 807 |
\noexpand\@setfontsize\noexpand\LARGE |
| 808 |
{\the\@tempdima}{\the\@tempdimb}% |
| 809 |
}% |
| 810 |
\let\LARGE\@undefined |
| 811 |
\expandafter\DeclareRobustCommand\expandafter\LARGE\expandafter{\reserved@a}% |
| 812 |
% \end{macrocode} |
| 813 |
% Calculation and definition of \cs{huge}: |
| 814 |
% \begin{macrocode} |
| 815 |
\setlength{\@tempdima}{2.074\@tempdimc}% |
| 816 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 817 |
\edef\reserved@a{% |
| 818 |
\noexpand\@setfontsize\noexpand\huge |
| 819 |
{\the\@tempdima}{\the\@tempdimb}% |
| 820 |
}% |
| 821 |
\let\huge\@undefined |
| 822 |
\expandafter\DeclareRobustCommand\expandafter\huge\expandafter{\reserved@a}% |
| 823 |
% \end{macrocode} |
| 824 |
% Calculation and definition of \cs{Huge}: |
| 825 |
% \begin{macrocode} |
| 826 |
\setlength{\@tempdima}{2.488\@tempdimc}% |
| 827 |
\setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 828 |
\edef\reserved@a{% |
| 829 |
\noexpand\@setfontsize\noexpand\Huge |
| 830 |
{\the\@tempdima}{\the\@tempdimb}% |
| 831 |
}% |
| 832 |
\let\Huge\@undefined |
| 833 |
\expandafter\DeclareRobustCommand\expandafter\Huge\expandafter{\reserved@a}% |
| 834 |
% \end{macrocode} |
| 835 |
% Activation of \cs{normalsize} and calculation of additional font size |
| 836 |
% depending sized. |
| 837 |
% \begin{macrocode} |
| 838 |
\normalsize |
| 839 |
%<!extend&!v4> \expandafter\ifnum\scr@v@is@ge{3.17} |
| 840 |
%<!extend> \@nameuse{par@updaterelative}% |
| 841 |
%<!extend&!v4> \fi |
| 842 |
% \end{macrocode} |
| 843 |
% After the activation of \cs{normalsize} above, we can use \cs{f@size} and |
| 844 |
% \cs{f@baselineskip}. We cannot use \cs{baselineskip}, because this would be |
| 845 |
% influenced by \cs{baselinestretch}. |
| 846 |
% \begin{macrocode} |
| 847 |
%<*!v4> |
| 848 |
\expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 849 |
\setlength{\footnotesep}{.7\@tempdimc}% |
| 850 |
\setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus |
| 851 |
.6\@tempdimc}% |
| 852 |
\setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus |
| 853 |
.3333\@tempdimc}% |
| 854 |
\setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus |
| 855 |
.3333\@tempdimc}% |
| 856 |
\setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus |
| 857 |
.3333\@tempdimc}% |
| 858 |
\setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus |
| 859 |
.3333\@tempdimc}% |
| 860 |
\setlength{\dbltextfloatsep}{\textfloatsep}% |
| 861 |
\setlength{\@fptop}{0\p@ \@plus 1fil}% |
| 862 |
\setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}% |
| 863 |
\setlength{\@fpbot}{\@fptop}% |
| 864 |
\setlength{\@dblfptop}{0\p@ \@plus 1fil}% |
| 865 |
\setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}% |
| 866 |
\setlength{\@dblfpbot}{\@fptop}% |
| 867 |
\fi |
| 868 |
%</!v4> |
| 869 |
% \end{macrocode} |
| 870 |
% Calculation and definition of \cs{@listi} and \cs{@listI}: |
| 871 |
% \begin{macrocode} |
| 872 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 873 |
%<!v4> \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus |
| 874 |
%<!v4> .5\@tempdimc}% |
| 875 |
%<!v4> \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}% |
| 876 |
%<!v4> \else |
| 877 |
\setlength{\@tempdimb}{\f@baselineskip}% |
| 878 |
\scr@setlength{\parsep}% |
| 879 |
{.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}% |
| 880 |
\scr@setlength{\topsep}% |
| 881 |
{.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}% |
| 882 |
%<!v4> \fi |
| 883 |
\@tempswafalse |
| 884 |
\begingroup |
| 885 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 886 |
\csname @listi\endcsname |
| 887 |
\endgroup |
| 888 |
\edef\@listi{\leftmargin\leftmargini |
| 889 |
\topsep \the\topsep |
| 890 |
\parsep \the\parsep |
| 891 |
\itemsep \parsep |
| 892 |
\if@tempswa\noexpand\@list@extra\fi |
| 893 |
}% |
| 894 |
\let\@listI\@listi |
| 895 |
% \end{macrocode} |
| 896 |
% Calculation and definition of \cs{@listi@small}: |
| 897 |
% \begin{macrocode} |
| 898 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 899 |
%<!v4> \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus |
| 900 |
%<!v4> .41667\@tempdimc}% |
| 901 |
%<!v4> \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}% |
| 902 |
%<!v4> \else |
| 903 |
\scr@setlength{\parsep}% |
| 904 |
{.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% |
| 905 |
\scr@setlength{\topsep}% |
| 906 |
{.3333\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}% |
| 907 |
%<!v4> \fi |
| 908 |
\@tempswafalse |
| 909 |
\begingroup |
| 910 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 911 |
\csname @listi\endcsname |
| 912 |
\endgroup |
| 913 |
\edef\@listi@small{\leftmargin\leftmargini |
| 914 |
\topsep \the\topsep |
| 915 |
\parsep \the\parsep |
| 916 |
\itemsep \parsep |
| 917 |
\if@tempswa\noexpand\@list@extra\fi |
| 918 |
}% |
| 919 |
% \end{macrocode} |
| 920 |
% Calculation and definition of \cs{@listi@footnotesize}: |
| 921 |
% \begin{macrocode} |
| 922 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 923 |
%<!v4> \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus |
| 924 |
%<!v4> .16667\@tempdimc}% |
| 925 |
%<!v4> \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}% |
| 926 |
%<!v4> \else |
| 927 |
\scr@setlength{\parsep}% |
| 928 |
{.125\@tempdimb}{.0625\@tempdimb}{.0625\@tempdimb}% |
| 929 |
\scr@setlength{\topsep}% |
| 930 |
{.25\@tempdimb}{.125\@tempdimb}{.125\@tempdimb}% |
| 931 |
%<!v4> \fi |
| 932 |
\@tempswafalse |
| 933 |
\begingroup |
| 934 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 935 |
\csname @listi\endcsname |
| 936 |
\endgroup |
| 937 |
\edef\@listi@footnotesize{\leftmargin\leftmargini |
| 938 |
\topsep \the\topsep |
| 939 |
\parsep \the\parsep |
| 940 |
\itemsep \parsep |
| 941 |
\if@tempswa\noexpand\@list@extra\fi |
| 942 |
}% |
| 943 |
% \end{macrocode} |
| 944 |
% Calculation and definition of \cs{@listii}: |
| 945 |
% \begin{macrocode} |
| 946 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 947 |
%<!v4> \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}% |
| 948 |
%<!v4> \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}% |
| 949 |
%<!v4> \else |
| 950 |
\scr@setlength{\parsep}% |
| 951 |
{.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% |
| 952 |
\scr@setlength{\topsep}% |
| 953 |
{.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}% |
| 954 |
%<!v4> \fi |
| 955 |
\@tempswafalse |
| 956 |
\begingroup |
| 957 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 958 |
\csname @listii\endcsname |
| 959 |
\endgroup |
| 960 |
\edef\@listii{\leftmargin\leftmarginii |
| 961 |
\labelwidth=\dimexpr \leftmargin-\labelsep |
| 962 |
\topsep \the\topsep |
| 963 |
\parsep \the\parsep |
| 964 |
\itemsep \parsep |
| 965 |
\if@tempswa\noexpand\@list@extra\fi |
| 966 |
}% |
| 967 |
% \end{macrocode} |
| 968 |
% Calculation and definition of \cs{@listiii}: |
| 969 |
% \begin{macrocode} |
| 970 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 971 |
%<!v4> \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}% |
| 972 |
%<!v4> \else |
| 973 |
\scr@setlength{\topsep}% |
| 974 |
{.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% |
| 975 |
%<!v4> \fi |
| 976 |
\setlength{\partopsep}{\z@ \@plus\z@ \@minus\p@}% |
| 977 |
\@tempswafalse |
| 978 |
\begingroup |
| 979 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 980 |
\csname @listiii\endcsname |
| 981 |
\endgroup |
| 982 |
\edef\@listiii{\leftmargin\leftmarginiii |
| 983 |
\labelwidth=\dimexpr \leftmargin-\labelsep |
| 984 |
\topsep \the\topsep |
| 985 |
\parsep \z@ |
| 986 |
\partopsep \the\partopsep |
| 987 |
\itemsep \topsep |
| 988 |
\if@tempswa\noexpand\@list@extra\fi |
| 989 |
}% |
| 990 |
% \end{macrocode} |
| 991 |
% Calculation and definition of \cs{@listiv}: |
| 992 |
% \begin{macrocode} |
| 993 |
\@tempswafalse |
| 994 |
\begingroup |
| 995 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 996 |
\csname @listiv\endcsname |
| 997 |
\endgroup |
| 998 |
\edef\@listiv{\leftmargin\leftmarginiv |
| 999 |
\labelwidth=\dimexpr \leftmargin-\labelsep\relax |
| 1000 |
\if@tempswa\noexpand\@list@extra\fi |
| 1001 |
}% |
| 1002 |
% \end{macrocode} |
| 1003 |
% Calculation and definition of \cs{@listv}: |
| 1004 |
% \begin{macrocode} |
| 1005 |
\@tempswafalse |
| 1006 |
\begingroup |
| 1007 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 1008 |
\csname @listv\endcsname |
| 1009 |
\endgroup |
| 1010 |
\edef\@listv{\leftmargin\leftmarginv |
| 1011 |
\labelwidth=\dimexpr \leftmargin-\labelsep\relax |
| 1012 |
\if@tempswa\noexpand\@list@extra\fi |
| 1013 |
}% |
| 1014 |
% \end{macrocode} |
| 1015 |
% Calculation and definition of \cs{@listvi}: |
| 1016 |
% \begin{macrocode} |
| 1017 |
\@tempswafalse |
| 1018 |
\begingroup |
| 1019 |
\def\@list@extra{\aftergroup\@tempswatrue}% |
| 1020 |
\csname @listvi\endcsname |
| 1021 |
\endgroup |
| 1022 |
\edef\@listvi{\leftmargin\leftmarginvi |
| 1023 |
\labelwidth=\dimexpr \leftmargin-\labelsep\relax |
| 1024 |
\if@tempswa\noexpand\@list@extra\fi |
| 1025 |
}% |
| 1026 |
\@listi |
| 1027 |
% \end{macrocode} |
| 1028 |
% \changes{v2.97c}{2007/07/04}{setting \cs{intextsep}} |
| 1029 |
% \changes{v2.97c}{2007/07/04}{setting \cs{dblfloatsep}} |
| 1030 |
% \changes{v2.97c}{2007/07/04}{setting \cs{partopsep}} |
| 1031 |
% \changes{v3.12}{2013/10/08}{calculation of some lengths changed} |
| 1032 |
% Calculation and setting of \len{intextsep}, \len{dblfloatsep}, |
| 1033 |
% \len{partopsep}, \len{footnotesep}, \cs{skip}\len{footins}, \len{footsep}, |
| 1034 |
% \len{textfloatsep}, \len{@fptop}, \len{@fpsep}, \len{@fpbot}, |
| 1035 |
% \len{@dblfptop}, \len{@dblfpsep}, \len{@dblfpbot}. Setting of \len{topsep} |
| 1036 |
% and \len{parsep} is not needed because part of \cs{@listi}. |
| 1037 |
% \begin{macrocode} |
| 1038 |
%<!v4> \expandafter\ifnum\scr@v@is@lt{3.12}\relax |
| 1039 |
%<!v4> \setlength{\@tempdimb}{\@tempb\@tempdima}% |
| 1040 |
%<!v4> \setlength{\@tempdima}{\dimexpr \@tempdimb-\@tempdimc}% |
| 1041 |
%<!v4> \setlength\intextsep{\@tempdimb \@plus.2\@tempdima \@minus.2\@tempdima}% |
| 1042 |
%<!v4> \setlength\dblfloatsep\intextsep |
| 1043 |
%<!v4> \setlength\partopsep{.2\@tempdimc \@plus.1\@tempdimc \@minus.1\@tempdimc}% |
| 1044 |
%<!v4> \else |
| 1045 |
\setlength{\@tempdimb}{\f@baselineskip}% |
| 1046 |
\setlength{\footnotesep}{.555\@tempdimb}% |
| 1047 |
\scr@setlength{\skip\footins}% |
| 1048 |
{.75\@tempdimb}{.3333\@tempdimb}{.1667\@tempdimb}% |
| 1049 |
\scr@setlength{\floatsep}% |
| 1050 |
{\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}% |
| 1051 |
\scr@setlength{\textfloatsep}% |
| 1052 |
{1.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}% |
| 1053 |
\setlength{\intextsep}{\floatsep}% |
| 1054 |
\setlength{\dblfloatsep}{\floatsep}% |
| 1055 |
\setlength{\dbltextfloatsep}{\textfloatsep}% |
| 1056 |
\setlength{\@fptop}{\z@ \@plus 1fil}% |
| 1057 |
\setlength{\@fpsep}{.6667\@tempdimb \@plus 2fil}% |
| 1058 |
\setlength{\@fpbot}{\@fptop}% |
| 1059 |
\setlength{\@dblfptop}{\@fptop}% |
| 1060 |
\setlength{\@dblfpsep}{\@fpsep}% |
| 1061 |
\setlength{\@dblfpbot}{\@fptop}% |
| 1062 |
\scr@setlength{\partopsep}{.2\@tempdimb}{.1\@tempdimb}{.1\@tempdimb}% |
| 1063 |
%<!v4> \fi |
| 1064 |
} |
| 1065 |
\scr@ifundefinedorrelax{changefontsizes}{% |
| 1066 |
\let\changefontsizes\simple@changefontsizes |
| 1067 |
}{% |
| 1068 |
%<class> \ClassWarning{\KOMAClassName}{% |
| 1069 |
%<package&extend> \PackageWarning{scrextend}{% |
| 1070 |
\string\changefontsizes\space already defined.\MessageBreak |
| 1071 |
I hope, the definition is compatible,\MessageBreak |
| 1072 |
because I do not change it% |
| 1073 |
}% |
| 1074 |
} |
| 1075 |
%</body&(class|extend)> |
| 1076 |
% \end{macrocode} |
| 1077 |
% \end{macro}^^A \simple@changefontsizes |
| 1078 |
% \end{command}^^A \changefontsizes |
| 1079 |
% |
| 1080 |
% |
| 1081 |
% \begin{command}{\generatefontfile} |
| 1082 |
% \changes{v3.09}{2011/02/23}{added} |
| 1083 |
% \changes{v3.17}{2015/03/26}{\cs{par@updaterelative} added} |
| 1084 |
% \changes{v3.28}{2019/11/18}{\cs{ifstr} renamed to \cs{Ifstr}} |
| 1085 |
% The main command of the generator: |
| 1086 |
% \begin{quote} |
| 1087 |
% \cs{generatefontfile}\marg{base name}\oarg{baseline skip}\marg{font size} |
| 1088 |
% \end{quote} |
| 1089 |
% It writes a font size file ``\meta{base name}\meta{font |
| 1090 |
% size}.clo''. \meta{base name} ``\texttt{scrbase}'' is protected and results |
| 1091 |
% in an error message. |
| 1092 |
% \begin{macrocode} |
| 1093 |
%<*generator&body> |
| 1094 |
\newcommand*{\generatefontfile}[1]{% |
| 1095 |
\Ifstr{#1}{scrsize}{% |
| 1096 |
\ClassError{\KOMAClassName}{% |
| 1097 |
Font file name `scrsize' not allowed% |
| 1098 |
}{% |
| 1099 |
Font files with name `scrsize<fontsize>.clo' are reserved for |
| 1100 |
KOMA-Script.\MessageBreak |
| 1101 |
You should use another prefix and rename \string\@fontsizefilebase\space |
| 1102 |
either before\MessageBreak |
| 1103 |
loading a KOMA-Script class using one of \string\documentclass, |
| 1104 |
\string\LoadClass,\MessageBreak |
| 1105 |
or \string\LoadClassWithOptions\space or before loading package |
| 1106 |
`scrextend' using another\MessageBreak |
| 1107 |
class.}% |
| 1108 |
\@@@generatefontfile |
| 1109 |
}{% |
| 1110 |
% \end{macrocode} |
| 1111 |
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by \cs{kernel@ifnextchar}} |
| 1112 |
% Test for optional argument and use proper helper. |
| 1113 |
% \begin{macrocode} |
| 1114 |
\kernel@ifnextchar [{\@generatefontfile{#1}}{\@@generatefontfile{#1}}% |
| 1115 |
}% |
| 1116 |
} |
| 1117 |
% \end{macrocode} |
| 1118 |
% \begin{macro}{\@generatefontfile,\@@generatefontfile} |
| 1119 |
% \changes{v3.09}{2011/02/23}{added} |
| 1120 |
% The helper macros are needed, because we are not using \pkg{xparse} currently. |
| 1121 |
% \begin{macrocode} |
| 1122 |
\newcommand*{\@generatefontfile}{} |
| 1123 |
\def\@generatefontfile#1[#2]#3{% |
| 1124 |
\begingroup |
| 1125 |
\@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}% |
| 1126 |
{\setparsizes{0pt}{0pt}{0pt}}% |
| 1127 |
\changefontsizes[{#2}]{#3}% |
| 1128 |
\generate@fontfile{#1}{#3}% |
| 1129 |
\endgroup |
| 1130 |
} |
| 1131 |
\newcommand\@@generatefontfile[2]{% |
| 1132 |
\begingroup |
| 1133 |
\@ifundefined{setparsizes}{\setlength{\parskip}{0pt}}% |
| 1134 |
{\setparsizes{0pt}{0pt}{0pt}}% |
| 1135 |
\changefontsizes{#2}% |
| 1136 |
\generate@fontfile{#1}{#2}% |
| 1137 |
\endgroup |
| 1138 |
} |
| 1139 |
% \end{macrocode} |
| 1140 |
% \end{macro}^^A \@generatefontfile,\@@generatefontfile |
| 1141 |
% \begin{macro}{\@@@generatefontfile} |
| 1142 |
% \changes{v3.09}{2011/02/23}{added} |
| 1143 |
% Dummy used in error case to eat an optional and a mandatory argument. |
| 1144 |
% \begin{macrocode} |
| 1145 |
\newcommand*{\@@@generatefontfile}[2][]{} |
| 1146 |
% \end{macrocode} |
| 1147 |
% \end{macro}^^A \@@@generatefontfile |
| 1148 |
% \begin{macro}{\@fontfile} |
| 1149 |
% \changes{v3.09}{2011/02/23}{added} |
| 1150 |
% Because \cs{generatefontfile} is allowed in the document preamble only, when |
| 1151 |
% the main aux file is not yet opened, we can use \cs{@mainaux} as temporary |
| 1152 |
% file handle. |
| 1153 |
% \begin{macrocode} |
| 1154 |
\newcommand*{\@fontfile}{} |
| 1155 |
\let\@fontfile\@mainaux |
| 1156 |
% \end{macrocode} |
| 1157 |
% \begin{macro}{\generate@fontfile} |
| 1158 |
% \changes{v3.09}{2011/02/23}{added} |
| 1159 |
% \changes{v3.16a}{2015/02/11}{\cs{footnotesize} fixed} |
| 1160 |
% \changes{v3.38}{2022/07/30}{define the macros robust as the \file{clo} files |
| 1161 |
% from 2021/10/04} |
| 1162 |
% Output of the font size file using the current font setting. It has to be |
| 1163 |
% used inside a local group! |
| 1164 |
% \begin{macrocode} |
| 1165 |
\newcommand*{\generate@fontfile}[2]{% |
| 1166 |
\def\@ind{\space\space}% |
| 1167 |
\immediate\openout\@fontfile #1#2.clo |
| 1168 |
\immediate\write\@fontfile{\@percentchar^^J% |
| 1169 |
\@percentchar\space This is file `#1#2.clo', generated with^^J% |
| 1170 |
\@percentchar\space scrfontsizes |
| 1171 |
\csname ver@scrfontsizes.\scr@pkgextension\endcsname,^^J% |
| 1172 |
\@percentchar\space Copyright (c) Markus Kohm.^^J% |
| 1173 |
\@percentchar^^J% |
| 1174 |
\string\ProvidesFile{#1#2.clo}[% |
| 1175 |
\the\year/\ifnum\month<10 0\fi\the\month/\ifnum\day<10 0\fi\the\day% |
| 1176 |
\space generated font size class option (#2)]}% |
| 1177 |
\immediate\write\@fontfile{% |
| 1178 |
\string\let\string\normalsize\string\@undefined |
| 1179 |
\string\DeclareRobustCommand\string\normalsize{\@percentchar^^J% |
| 1180 |
\@ind\string\@setfontsize\string\normalsize{\f@size}{\f@baselineskip}% |
| 1181 |
\@percentchar^^J% |
| 1182 |
\@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J% |
| 1183 |
\@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J% |
| 1184 |
\@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J% |
| 1185 |
\@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J% |
| 1186 |
\@ind\string\let\string\@listi\string\@listI^^J% |
| 1187 |
}\@percentchar% |
| 1188 |
}% |
| 1189 |
\begingroup\small\@listi |
| 1190 |
\immediate\write\@fontfile{% |
| 1191 |
\string\let\string\small\string\@undefined |
| 1192 |
\string\DeclareRobustCommand\string\small{\@percentchar^^J% |
| 1193 |
\@ind\string\@setfontsize\string\small{\f@size}{\f@baselineskip}% |
| 1194 |
\@percentchar^^J% |
| 1195 |
\@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J% |
| 1196 |
\@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J% |
| 1197 |
\@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J% |
| 1198 |
\@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J% |
| 1199 |
\@ind\string\def\string\@listi{\@percentchar^^J% |
| 1200 |
\@ind\@ind\string\leftmargin\string\leftmargini^^J% |
| 1201 |
\@ind\@ind\string\topsep \the\topsep^^J% |
| 1202 |
\@ind\@ind\string\parsep \the\parsep^^J% |
| 1203 |
\@ind\@ind\string\itemsep \string\parsep^^J% |
| 1204 |
\@ind}\@percentchar^^J% |
| 1205 |
}\@percentchar% |
| 1206 |
}% |
| 1207 |
\endgroup |
| 1208 |
\begingroup\footnotesize\@listi |
| 1209 |
\immediate\write\@fontfile{% |
| 1210 |
\string\let\string\footnotesize\string\@undefined |
| 1211 |
\string\DeclareRobustCommand\string\footnotesize{\@percentchar^^J% |
| 1212 |
\@ind\string\@setfontsize\string\footnotesize{\f@size}{\f@baselineskip}% |
| 1213 |
\@percentchar^^J% |
| 1214 |
\@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J% |
| 1215 |
\@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J% |
| 1216 |
\@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J% |
| 1217 |
\@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J% |
| 1218 |
\@ind\string\def\string\@listi{\@percentchar^^J% |
| 1219 |
\@ind\@ind\string\leftmargin\string\leftmargini^^J% |
| 1220 |
\@ind\@ind\string\topsep \the\topsep^^J% |
| 1221 |
\@ind\@ind\string\parsep \the\parsep^^J% |
| 1222 |
\@ind\@ind\string\itemsep \string\parsep^^J% |
| 1223 |
\@ind}\@percentchar^^J% |
| 1224 |
}\@percentchar% |
| 1225 |
}% |
| 1226 |
\endgroup |
| 1227 |
\begingroup\scriptsize |
| 1228 |
\immediate\write\@fontfile{% |
| 1229 |
\string\let\string\scriptsize\string\@undefined |
| 1230 |
\string\DeclareRobustCommand\string\scriptsize{% |
| 1231 |
\string\@setfontsize\string\scriptsize{\f@size}{\f@baselineskip}% |
| 1232 |
}\@percentchar% |
| 1233 |
}% |
| 1234 |
\endgroup |
| 1235 |
\begingroup\tiny |
| 1236 |
\immediate\write\@fontfile{% |
| 1237 |
\string\let\string\tiny\string\@undefined |
| 1238 |
\string\DeclareRobustCommand\string\tiny{% |
| 1239 |
\string\@setfontsize\string\tiny{\f@size}{\f@baselineskip}% |
| 1240 |
}\@percentchar% |
| 1241 |
}% |
| 1242 |
\endgroup |
| 1243 |
\begingroup\large |
| 1244 |
\immediate\write\@fontfile{% |
| 1245 |
\string\let\string\large\string\@undefined |
| 1246 |
\string\DeclareRobustCommand\string\large{% |
| 1247 |
\string\@setfontsize\string\large{\f@size}{\f@baselineskip}% |
| 1248 |
}\@percentchar% |
| 1249 |
}% |
| 1250 |
\endgroup |
| 1251 |
\begingroup\Large |
| 1252 |
\immediate\write\@fontfile{% |
| 1253 |
\string\let\string\Large\@undefined |
| 1254 |
\string\DeclareRobustCommand\string\Large{% |
| 1255 |
\string\@setfontsize\string\Large{\f@size}{\f@baselineskip}% |
| 1256 |
}\@percentchar% |
| 1257 |
}% |
| 1258 |
\endgroup |
| 1259 |
\begingroup\LARGE |
| 1260 |
\immediate\write\@fontfile{% |
| 1261 |
\string\let\string\LARGE\@undefined |
| 1262 |
\string\DeclareRobustCommand\string\LARGE{% |
| 1263 |
\string\@setfontsize\string\LARGE{\f@size}{\f@baselineskip}% |
| 1264 |
}\@percentchar% |
| 1265 |
}% |
| 1266 |
\endgroup |
| 1267 |
\begingroup\huge |
| 1268 |
\immediate\write\@fontfile{% |
| 1269 |
\string\let\string\huge\@undefined |
| 1270 |
\string\DeclareRobustCommand\string\huge{% |
| 1271 |
\string\@setfontsize\string\huge{\f@size}{\f@baselineskip}% |
| 1272 |
}\@percentchar% |
| 1273 |
}% |
| 1274 |
\endgroup |
| 1275 |
\begingroup\Huge |
| 1276 |
\immediate\write\@fontfile{% |
| 1277 |
\string\let\string\Huge\@undefined |
| 1278 |
\string\DeclareRobustCommand\string\Huge{% |
| 1279 |
\string\@setfontsize\string\Huge{\f@size}{\f@baselineskip}% |
| 1280 |
}\@percentchar% |
| 1281 |
}% |
| 1282 |
\endgroup |
| 1283 |
\immediate\write\@fontfile{\string\normalsize}% |
| 1284 |
\immediate\write\@fontfile{% |
| 1285 |
\string\setlength{\string\footnotesep}{\the\footnotesep}\@percentchar |
| 1286 |
}% |
| 1287 |
\immediate\write\@fontfile{% |
| 1288 |
\string\setlength{\string\skip\string\footins}{\the\skip\footins}\@percentchar |
| 1289 |
}% |
| 1290 |
\immediate\write\@fontfile{% |
| 1291 |
\string\setlength{\string\floatsep}{\the\floatsep}\@percentchar |
| 1292 |
}% |
| 1293 |
\immediate\write\@fontfile{% |
| 1294 |
\string\setlength{\string\textfloatsep}{\the\textfloatsep}\@percentchar |
| 1295 |
}% |
| 1296 |
\immediate\write\@fontfile{% |
| 1297 |
\string\setlength{\string\intextsep}{\the\intextsep}\@percentchar |
| 1298 |
}% |
| 1299 |
\immediate\write\@fontfile{% |
| 1300 |
\string\setlength{\string\dblfloatsep}{\the\dblfloatsep}\@percentchar |
| 1301 |
}% |
| 1302 |
\immediate\write\@fontfile{% |
| 1303 |
\string\setlength{\string\dbltextfloatsep}{\the\dbltextfloatsep}\@percentchar |
| 1304 |
}% |
| 1305 |
\immediate\write\@fontfile{% |
| 1306 |
\string\setlength{\string\@fptop}{\the\@fptop}\@percentchar |
| 1307 |
}% |
| 1308 |
\immediate\write\@fontfile{% |
| 1309 |
\string\setlength{\string\@fpsep}{\the\@fpsep}\@percentchar |
| 1310 |
}% |
| 1311 |
\immediate\write\@fontfile{% |
| 1312 |
\string\setlength{\string\@fpbot}{\the\@fpbot}\@percentchar |
| 1313 |
}% |
| 1314 |
\immediate\write\@fontfile{% |
| 1315 |
\string\setlength{\string\@dblfptop}{\the\@dblfptop}\@percentchar |
| 1316 |
}% |
| 1317 |
\immediate\write\@fontfile{% |
| 1318 |
\string\setlength{\string\@dblfpsep}{\the\@dblfpsep}\@percentchar |
| 1319 |
}% |
| 1320 |
\immediate\write\@fontfile{% |
| 1321 |
\string\setlength{\string\@dblfpbot}{\the\@dblfpbot}\@percentchar |
| 1322 |
}% |
| 1323 |
\immediate\write\@fontfile{% |
| 1324 |
\string\setlength{\string\partopsep}{\the\partopsep}\@percentchar |
| 1325 |
}% |
| 1326 |
\begingroup |
| 1327 |
\@listi |
| 1328 |
\immediate\write\@fontfile{% |
| 1329 |
\string\def\string\@listi{\@percentchar^^J% |
| 1330 |
\@ind\string\leftmargin\string\leftmargini^^J% |
| 1331 |
\@ind\string\topsep \the\topsep^^J% |
| 1332 |
\@ind\string\parsep \the\parsep^^J% |
| 1333 |
\@ind\string\itemsep \string\parsep^^J% |
| 1334 |
}\@percentchar |
| 1335 |
}% |
| 1336 |
\endgroup |
| 1337 |
\immediate\write\@fontfile{% |
| 1338 |
\string\let\string\@listI\string\@listi |
| 1339 |
}% |
| 1340 |
\begingroup |
| 1341 |
\@listii |
| 1342 |
\immediate\write\@fontfile{% |
| 1343 |
\string\def\string\@listii{\@percentchar^^J% |
| 1344 |
\@ind\string\leftmargin\string\leftmarginii^^J% |
| 1345 |
\@ind\string\labelwidth\string\leftmarginii^^J% |
| 1346 |
\@ind\string\advance\string\labelwidth-\string\labelsep^^J% |
| 1347 |
\@ind\string\topsep \the\topsep^^J% |
| 1348 |
\@ind\string\parsep \the\parsep^^J% |
| 1349 |
\@ind\string\itemsep \string\parsep^^J% |
| 1350 |
}\@percentchar |
| 1351 |
}% |
| 1352 |
\endgroup |
| 1353 |
\begingroup |
| 1354 |
\@listiii |
| 1355 |
\immediate\write\@fontfile{% |
| 1356 |
\string\def\string\@listiii{\@percentchar^^J% |
| 1357 |
\@ind\string\leftmargin\string\leftmarginiii^^J% |
| 1358 |
\@ind\string\labelwidth\string\leftmarginiii^^J% |
| 1359 |
\@ind\string\advance\string\labelwidth-\string\labelsep^^J% |
| 1360 |
\@ind\string\topsep \the\topsep^^J% |
| 1361 |
\@ind\string\parsep \the\parsep^^J% |
| 1362 |
\@ind\string\partopsep \the\partopsep^^J% |
| 1363 |
\@ind\string\itemsep \string\topsep^^J% |
| 1364 |
}\@percentchar |
| 1365 |
}% |
| 1366 |
\endgroup |
| 1367 |
\begingroup |
| 1368 |
\@listiv |
| 1369 |
\immediate\write\@fontfile{% |
| 1370 |
\string\def\string\@listiv{\@percentchar^^J% |
| 1371 |
\@ind\string\leftmargin\string\leftmarginiv^^J% |
| 1372 |
\@ind\string\labelwidth\string\leftmarginiv^^J% |
| 1373 |
\@ind\string\advance\string\labelwidth-\string\labelsep^^J% |
| 1374 |
}\@percentchar |
| 1375 |
}% |
| 1376 |
\endgroup |
| 1377 |
\begingroup |
| 1378 |
\@listv |
| 1379 |
\immediate\write\@fontfile{% |
| 1380 |
\string\def\string\@listv{\@percentchar^^J% |
| 1381 |
\@ind\string\leftmargin\string\leftmarginv^^J% |
| 1382 |
\@ind\string\labelwidth\string\leftmarginv^^J% |
| 1383 |
\@ind\string\advance\string\labelwidth-\string\labelsep^^J% |
| 1384 |
}\@percentchar |
| 1385 |
}% |
| 1386 |
\endgroup |
| 1387 |
\begingroup |
| 1388 |
\@listvi |
| 1389 |
\immediate\write\@fontfile{% |
| 1390 |
\string\def\string\@listvi{\@percentchar^^J% |
| 1391 |
\@ind\string\leftmargin\string\leftmarginvi^^J% |
| 1392 |
\@ind\string\labelwidth\string\leftmarginvi^^J% |
| 1393 |
\@ind\string\advance\string\labelwidth-\string\labelsep^^J% |
| 1394 |
}\@percentchar |
| 1395 |
}% |
| 1396 |
\endgroup |
| 1397 |
\immediate\write\@fontfile{% |
| 1398 |
\string\@ifundefined{@list@extra}{}{\@percentchar^^J% |
| 1399 |
%<!v4> \string\expandafter\string\ifnum\string\scr@v@is@ge{3.17}^^J% |
| 1400 |
\string\par@updaterelative^^J% |
| 1401 |
%<!v4> \string\fi^^J% |
| 1402 |
\@ind\string\l@addto@macro{\string\@listi}{\string\@list@extra}% |
| 1403 |
\@percentchar^^J% |
| 1404 |
\@ind\string\let\string\@listI=\string\@listi^^J% |
| 1405 |
\@ind\string\l@addto@macro{\string\@listii}{\string\@list@extra}% |
| 1406 |
\@percentchar^^J% |
| 1407 |
\@ind\string\l@addto@macro{\string\@listiii}{\string\@list@extra}% |
| 1408 |
\@percentchar^^J% |
| 1409 |
\@ind\string\l@addto@macro{\string\footnotesize}{\string\protect |
| 1410 |
\string\add@extra@listi{ftns}}\@percentchar^^J% |
| 1411 |
\@ind\string\l@addto@macro{\string\small}{\string\protect |
| 1412 |
\string\add@extra@listi{sml}}\@percentchar^^J% |
| 1413 |
}\@percentchar^^J% |
| 1414 |
\string\@listi^^J% |
| 1415 |
\string\endinput^^J% |
| 1416 |
\@percentchar^^J% |
| 1417 |
\@percentchar\space End of file `#1#2.clo'. |
| 1418 |
} |
| 1419 |
\immediate\closeout\@fontfile |
| 1420 |
} |
| 1421 |
\@onlypreamble\generatefontfile |
| 1422 |
%</generator&body> |
| 1423 |
% \end{macrocode} |
| 1424 |
% \end{macro}^^A \generate@fontfile |
| 1425 |
% \end{macro}^^A \@fontfile |
| 1426 |
% \end{command}^^A \generatefontfile |
| 1427 |
% |
| 1428 |
% Now, we want to initially load the font size file into the class. First we |
| 1429 |
% have to convert the \cs{@ptsize} to a length. Note, \cs{@ptsize} can already |
| 1430 |
% have a unit or the unit is \texttt{pt}. The original value is stored in |
| 1431 |
% \cs{@tempa} to be able to use a font size files with the original |
| 1432 |
% unit. \cs{@tempb} is the size in \texttt{pt} without the \texttt{pt} to be |
| 1433 |
% able to use a standard font size file. After this, \cs{@ptsize} is reduced |
| 1434 |
% by 10\,pt and the unit is cut off. |
| 1435 |
% \begin{macrocode} |
| 1436 |
%<*class&body> |
| 1437 |
\expandafter\@defaultunits\expandafter\@tempdima\@ptsize pt\relax\@nnil |
| 1438 |
\edef\@tempa{\@ptsize}% |
| 1439 |
\setlength{\@tempdimb}{\@tempdima}% |
| 1440 |
\edef\@tempb{\strip@pt\@tempdimb}% |
| 1441 |
\addtolength{\@tempdimb}{-10\p@}% |
| 1442 |
\edef\@ptsize{\strip@pt\@tempdimb}% |
| 1443 |
% \end{macrocode} |
| 1444 |
% Now, let's try to input a file |
| 1445 |
% ``\file{\cs{fontsizefilebase}\cs{@tempa}.clo}''. This is a file with the |
| 1446 |
% original unit. |
| 1447 |
% \begin{macrocode} |
| 1448 |
\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{% |
| 1449 |
\ClassInfo{\KOMAClassName}{% |
| 1450 |
File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}% |
| 1451 |
\KOMA@kav@removekey{\KOMAClassFileName}{fontsize}% |
| 1452 |
\KOMA@kav@xadd{\KOMAClassFileName}{fontsize}{\@tempa}% |
| 1453 |
}{% |
| 1454 |
% \end{macrocode} |
| 1455 |
% If this is not successful, try |
| 1456 |
% ``\file{\cs{fontsizefilebase}\cs{@tempb}pt.clo}''. |
| 1457 |
% \begin{macrocode} |
| 1458 |
\InputIfFileExists{\@fontsizefilebase\@tempb pt.clo}{% |
| 1459 |
\ClassInfo{\KOMAClassName}{% |
| 1460 |
File `\@fontsizefilebase\@tempb pt.clo' used instead of\MessageBreak |
| 1461 |
file `\@fontsizefilebase\@tempa.clo' to setup font sizes}% |
| 1462 |
\KOMA@kav@removekey{\KOMAClassFileName}{fontsize}% |
| 1463 |
\KOMA@kav@xadd{\KOMAClassFileName}{fontsize}{\@tempb pt}% |
| 1464 |
}{% |
| 1465 |
% \end{macrocode} |
| 1466 |
% If this is still not successful try a font size file of the standard |
| 1467 |
% classes. |
| 1468 |
% \begin{macrocode} |
| 1469 |
%<*book> |
| 1470 |
\InputIfFileExists{bk\@tempb.clo}{% |
| 1471 |
\ClassInfo{\KOMAClassName}{% |
| 1472 |
File `bk\@tempb.clo' used to setup font sizes}% |
| 1473 |
\KOMA@kav@removekey{\KOMAClassFileName}{fontsize}% |
| 1474 |
\KOMA@kav@xadd{\KOMAClassFileName}{fontsize}{\@tempb}% |
| 1475 |
}{% |
| 1476 |
%</book> |
| 1477 |
\InputIfFileExists{size\@tempb.clo}{% |
| 1478 |
\ClassInfo{\KOMAClassName}{% |
| 1479 |
File `size\@tempb.clo' used to setup font sizes}% |
| 1480 |
\KOMA@kav@removekey{\KOMAClassFileName}{fontsize}% |
| 1481 |
\KOMA@kav@xadd{\KOMAClassFileName}{fontsize}{\@tempb}% |
| 1482 |
}{% |
| 1483 |
% \end{macrocode} |
| 1484 |
% If this is still not successful, use the fallback calculation. |
| 1485 |
% \begin{macrocode} |
| 1486 |
\edef\@tempa{% |
| 1487 |
\noexpand\changefontsizes{\@tempa}% |
| 1488 |
\noexpand\KOMA@kav@xadd{\KOMAClassFileName}{fontsize}{\@tempa}% |
| 1489 |
}\@tempa |
| 1490 |
}% |
| 1491 |
%<book> }% |
| 1492 |
}% |
| 1493 |
} |
| 1494 |
%</class&body> |
| 1495 |
% \end{macrocode} |
| 1496 |
% |
| 1497 |
% |
| 1498 |
% \section{Implementation of Deprecated Old Font Selection Commands} |
| 1499 |
% |
| 1500 |
% \begin{option}{enabledeprecatedfontcommands} |
| 1501 |
% \changes{v3.20}{2015/10/14}{added} |
| 1502 |
% \changes{v3.20}{2015/10/14}{deprecated} |
| 1503 |
% This option is deprecated by specification already when it has been defined |
| 1504 |
% first, because it is used to define deprecated old font selection commands, |
| 1505 |
% that should not be used any longer. So the usage of this options always |
| 1506 |
% results in a warning. It can be used at load time only. |
| 1507 |
% \begin{macro}{\scr@defineobsoletefonts} |
| 1508 |
% \changes{v3.20}{2015/10/14}{added} |
| 1509 |
% \changes{v3.20}{2015/10/14}{deprecated} |
| 1510 |
% Depending on this command |
| 1511 |
% \begin{itemize} |
| 1512 |
% \item[0] an internal error message, |
| 1513 |
% \item[1] a warning, |
| 1514 |
% \item[2] an info message, |
| 1515 |
% \item[3] no message |
| 1516 |
% \end{itemize} |
| 1517 |
% is added to the usage of any deprecated font command. Values less than 0 |
| 1518 |
% result in not defining the commands anyhow. |
| 1519 |
% \begin{macrocode} |
| 1520 |
%<*class&option> |
| 1521 |
\DeclareOption{enabledeprecatedfontcommands}{% |
| 1522 |
\ClassWarningNoLine{\KOMAClassName}{% |
| 1523 |
deprecated option `enabledeprecatedfontcommands'.\MessageBreak |
| 1524 |
Note, that this option was already depreacted when\MessageBreak |
| 1525 |
it has been defined. Support for old font commands\MessageBreak |
| 1526 |
has been removed from KOMA-Script more than one\MessageBreak |
| 1527 |
decade ago. It is not recommended to use them any\MessageBreak |
| 1528 |
longer. Therefore usage of this class option also\MessageBreak |
| 1529 |
is not recommended% |
| 1530 |
}% |
| 1531 |
\let\scr@defineobsoletefonts\@ne |
| 1532 |
} |
| 1533 |
\scr@ifundefinedorrelax{scr@defineobsoletefonts}{% |
| 1534 |
\let\scr@defineobsoletefonts\z@ |
| 1535 |
}{} |
| 1536 |
\BeforePackage{tex4ht}{% |
| 1537 |
\let\scr@defineobsoletefonts\thr@@ |
| 1538 |
} |
| 1539 |
%</class&option> |
| 1540 |
% \end{macrocode} |
| 1541 |
% \end{macro}^^A \scr@degineobsoletefonts |
| 1542 |
% \end{option}^^A enabledeprecatedfontcommands |
| 1543 |
% |
| 1544 |
% \begin{macro}{\scr@DeclareOldFontCommand} |
| 1545 |
% \changes{v3.12}{2013/10/31}{added} |
| 1546 |
% \changes{v3.20}{2015/10/14}{deprecated escalation} |
| 1547 |
% \changes{v3.38}{2022/08/28}{deprecated definition delayed} |
| 1548 |
% The command is similar to \cs{DeclareOldFontCommand} but adds a warning, |
| 1549 |
% info, error to the commands and delays the definition until |
| 1550 |
% |\begin{document}|. The delay is done to allow users or package authors to |
| 1551 |
% define the commands in the document preamble if they are not yet defined. So |
| 1552 |
% (package) authors do not need to detect \KOMAScript{} but only existence. |
| 1553 |
% \begin{macrocode} |
| 1554 |
%<*class&body> |
| 1555 |
\newcommand*{\scr@DeclareOldFontCommand}[3]{% |
| 1556 |
\ifnum\scr@defineobsoletefonts<\z@\else |
| 1557 |
\ifnum\scr@defineobsoletefonts>\tw@ |
| 1558 |
\DeclareOldFontCommand{#1}{#2}{#3}% |
| 1559 |
\else |
| 1560 |
\AtBeginDocument{% |
| 1561 |
\ifdefined#1\else |
| 1562 |
\DeclareOldFontCommand{#1}{% |
| 1563 |
\scr@ErrorWarningInfo{#1}{#2}#2% |
| 1564 |
}{% |
| 1565 |
\scr@ErrorWarningInfo{#1}{#3}#3% |
| 1566 |
}% |
| 1567 |
\fi |
| 1568 |
}% |
| 1569 |
\fi |
| 1570 |
\fi |
| 1571 |
} |
| 1572 |
% \end{macrocode} |
| 1573 |
% \begin{macro}{\scr@ErrorWarningInfo} |
| 1574 |
% \changes{v3.20}{2015/10/14}{added} |
| 1575 |
% \changes{v3.22}{2016/09/28}{message fixed} |
| 1576 |
% \begin{macrocode} |
| 1577 |
\DeclareRobustCommand*{\scr@ErrorWarningInfo}[2]{% |
| 1578 |
% \end{macrocode} |
| 1579 |
% \cs{scr@defineobsoletefonts} = 0 means an error message: |
| 1580 |
% \begin{macrocode} |
| 1581 |
\ifnum \scr@defineobsoletefonts=\z@ |
| 1582 |
\ClassError{\KOMAClassName}{undefined old font command `\string#1'}{% |
| 1583 |
You should note that since 1994 LaTeX2e provides a new font selection |
| 1584 |
scheme\MessageBreak |
| 1585 |
called NFSS2 with several new, combinable font commands. |
| 1586 |
KOMA-Script\MessageBreak |
| 1587 |
classes had defined the old font commands like `\string#1' |
| 1588 |
only for compatibility\MessageBreak |
| 1589 |
with old LaTeX 2.09 document styles of Script 2.0. Nevertheless, |
| 1590 |
these\MessageBreak |
| 1591 |
commands are deprecated and undocumented at least since 2003. Since |
| 1592 |
2013\MessageBreak |
| 1593 |
KOMA-Script classes warned about soon removement of these deprecated |
| 1594 |
commands.\MessageBreak |
| 1595 |
Now, after two decades of LaTeX2e and NFSS2, these commands will not |
| 1596 |
work any\MessageBreak |
| 1597 |
more. If loading a package results in this error message, you should |
| 1598 |
contact\MessageBreak |
| 1599 |
the author of that package and ask him to replace the deprecated font |
| 1600 |
command\MessageBreak |
| 1601 |
`\string#1', e.g., by `\detokenize{#2}`. Otherwise you should |
| 1602 |
reconfigure\MessageBreak |
| 1603 |
or replace the package. If you have used the old font command |
| 1604 |
`\string#1' yourself,\MessageBreak |
| 1605 |
you should replace it, e.g., by `\detokenize{#2}'.\MessageBreak |
| 1606 |
To make it work for now, you can use the already also deprecated class |
| 1607 |
option\MessageBreak |
| 1608 |
`enabledeprecatedfontcommands'.% |
| 1609 |
}% |
| 1610 |
\else |
| 1611 |
\ifcase \scr@defineobsoletefonts |
| 1612 |
% \end{macrocode} |
| 1613 |
% \cs{scr@defineobsoletefonts} = 0 means a warning: |
| 1614 |
% \begin{macrocode} |
| 1615 |
\or |
| 1616 |
\expandafter\ClassWarning |
| 1617 |
% \end{macrocode} |
| 1618 |
% \cs{scr@defineobsoletefonts} = 0 means an info message: |
| 1619 |
% \begin{macrocode} |
| 1620 |
\or |
| 1621 |
\expandafter\ClassInfo |
| 1622 |
% \end{macrocode} |
| 1623 |
% All other values mean no message: |
| 1624 |
% \begin{macrocode} |
| 1625 |
\else |
| 1626 |
\expandafter\@gobbletwo |
| 1627 |
\fi |
| 1628 |
{\KOMAClassName}{deprecated old font command `\string#1' used.\MessageBreak |
| 1629 |
You should note, that since 1994 LaTeX2e provides a\MessageBreak |
| 1630 |
new font selection scheme called NFSS2 with several\MessageBreak |
| 1631 |
new, combinable font commands. New KOMA-Script classes\MessageBreak |
| 1632 |
defined the old font commands like `\string#1' only for\MessageBreak |
| 1633 |
compatibility with LaTeX 2.09 document styles of\MessageBreak |
| 1634 |
Script 2.0. These commands are deprecated and\MessageBreak |
| 1635 |
undocumented at least since 2003. Since 2013,\MessageBreak |
| 1636 |
KOMA-Script classes warned about soon removement of\MessageBreak |
| 1637 |
these deprecated commands. Now, after two decades of\MessageBreak |
| 1638 |
LaTeX2e, NFSS2, and KOMA-Script these commands will\MessageBreak |
| 1639 |
not work any longer. If loading a package results in\MessageBreak |
| 1640 |
this message you should contact the author of that\MessageBreak |
| 1641 |
package and ask him to replace the depracted font\MessageBreak |
| 1642 |
command `\string#1', e.g., by `\detokenize{#2}'.\MessageBreak |
| 1643 |
Otherwise you should reconfigure or replace the\MessageBreak |
| 1644 |
package. If you have used the old font command\MessageBreak |
| 1645 |
`\string #1' yourself you should replace it, e.g., by\MessageBreak |
| 1646 |
`\detokenize{#2}'% |
| 1647 |
}% |
| 1648 |
\fi |
| 1649 |
} |
| 1650 |
%</class&body> |
| 1651 |
% \end{macrocode} |
| 1652 |
% \end{macro}^^A \scr@OldFontErrorWarningInfo |
| 1653 |
% \end{macro}^^A \scr@DeclareOldFontCommand |
| 1654 |
% |
| 1655 |
% \begin{command}{\rm,\sf,\tt,\bf,\it,\sl,\sc} |
| 1656 |
% \changes{v3.12}{2013/10/13}{deprecated} |
| 1657 |
% \begin{command}{\sfb} |
| 1658 |
% \changes{v2.2c}{1995/05/25}{not in math mode} |
| 1659 |
% \changes{v2.3a}{1995/07/08}{independent from compatibility mode} |
| 1660 |
% \changes{v3.12}{2013/10/13}{deprecated} |
| 1661 |
% The old font selection commands from \LaTeX~2.09. They are not supported any |
| 1662 |
% more. The same for the \pkg*{Script 2.0} command \cs{sfb}. |
| 1663 |
% \begin{macrocode} |
| 1664 |
%<*class&body> |
| 1665 |
\scr@DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} |
| 1666 |
\scr@DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} |
| 1667 |
\scr@DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} |
| 1668 |
\scr@DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} |
| 1669 |
\scr@DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} |
| 1670 |
\scr@DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} |
| 1671 |
\scr@DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} |
| 1672 |
\scr@DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{% |
| 1673 |
\@nomath\sfb} |
| 1674 |
%</class&body> |
| 1675 |
% \end{macrocode} |
| 1676 |
% \end{command} |
| 1677 |
% \end{command} |
| 1678 |
% |
| 1679 |
% \begin{command}{\cal,\mit} |
| 1680 |
% \changes{v2.3}{1995/06/25}{here instead in the \LaTeX{} kernel} |
| 1681 |
% \changes{v2.3g}{1996/01/14}{not needed braces removed} |
| 1682 |
% \begin{macrocode} |
| 1683 |
%<*class&body> |
| 1684 |
\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal} |
| 1685 |
\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal} |
| 1686 |
%</class&body> |
| 1687 |
% \end{macrocode} |
| 1688 |
% \end{command} |
| 1689 |
% |
| 1690 |
% |
| 1691 |
% \section{Implementation of Special Handling of Sans-Serif Defaults} |
| 1692 |
% |
| 1693 |
% \changes{v3.39}{2022/11/19}{moved from \file{scrkernel-miscellaneous.dtx}} |
| 1694 |
% |
| 1695 |
% Some users do not like the sans-serif defaults of \KOMAScript. Though each |
| 1696 |
% of these defaults could be changed easily using \cs{setkomafont} and |
| 1697 |
% \cs{addtokomafont}, one user requested an option to be able to do the change |
| 1698 |
% already when loading the classes resp. package \pkg*{scrextend}. He even |
| 1699 |
% pointed out that the lack of such an option is one reason for him not to use |
| 1700 |
% \KOMAScript. Although or just because such a statement of a renowned \LaTeX{} |
| 1701 |
% expert could almost be interpreted as a clear recommendation against |
| 1702 |
% \KOMAScript, a corresponding option was created immediately. |
| 1703 |
% |
| 1704 |
% \begin{option}{sfdefaults} |
| 1705 |
% Boolean option to change behave of \cs{maybesffamily}. |
| 1706 |
% \begin{command}{\textmaybesf,\maybesffamily} |
| 1707 |
% \changes{v3.39}{2023/04/04}{added} |
| 1708 |
% \begin{macro}{\@gr@gsffamily,\if@sfdefaults, |
| 1709 |
% \@sfdefaultfalse,\@sfdefaultstrue} |
| 1710 |
% \changes{v3.20}{2016/01/29}{added} |
| 1711 |
% \changes{v3.20a}{2016/05/19}{also for \cls*{scrlttr2}} |
| 1712 |
% \changes{v3.39}{2023/04/04}{\cs{@gr@gsffamily} renamed to \cs{maybesffamily}} |
| 1713 |
% \changes{v3.39}{2023/04/04}{\cs{if@egregdoesnotlikesansseriftitles} replaced |
| 1714 |
% by \cs{if@sfdefaults}} |
| 1715 |
% \changes{v3.40}{2023/04/20}{default to true} |
| 1716 |
% Used to switch on or off all the sans-serif defaults. |
| 1717 |
% \begin{macrocode} |
| 1718 |
%<*(class|extend)&option> |
| 1719 |
\newif\if@sfdefaults\@sfdefaultstrue |
| 1720 |
\KOMA@ifkey{sfdefaults}{@sfdefaults} |
| 1721 |
\newcommand*{\maybesffamily}{\if@sfdefaults \sffamily \fi} |
| 1722 |
\newcommand*{\textmaybesf}{% |
| 1723 |
\if@sfdefaults \expandafter\textsf \else \expandafter\@firstofone \fi |
| 1724 |
} |
| 1725 |
% \end{macrocode} |
| 1726 |
% \end{macro}^^A \if@sfdefaults, … |
| 1727 |
% \end{command}^^A \textmaybesf, \maybesffamily |
| 1728 |
% \end{option}^^A sfdefaults |
| 1729 |
%% \begin{option}{egegdoesnotlikesansseriftitles} |
| 1730 |
% \changes{v3.20}{2016/01/29}{added} |
| 1731 |
% \changes{v3.20a}{2016/05/19}{also for \cls*{scrlttr2}} |
| 1732 |
% \changes{v3.39}{2022/11/19}{deprecated} |
| 1733 |
% \changes{v3.39}{2023/04/04}{replaced by new option \opt{sfdefaults}} |
| 1734 |
% \begin{description} |
| 1735 |
% \item[Note:] Although the description found earlier at this place was never |
| 1736 |
% meant to be offensive, it was taken as offensive. Therefore, I expressly |
| 1737 |
% apologize for the earlier wording. |
| 1738 |
% \end{description} |
| 1739 |
% \begin{macrocode} |
| 1740 |
\KOMA@key{egregdoesnotlikesansseriftitles}[true]{% |
| 1741 |
%<class> \ClassWarningNoLine{\KOMAClassName}% |
| 1742 |
%<extend> \PackageWarningNoLine{scrextend}% |
| 1743 |
{% |
| 1744 |
You've used deprecated option `egregdoesnotlikesansseriftitles'.\MessageBreak |
| 1745 |
In 2016 this option has been implemented as a joke\MessageBreak |
| 1746 |
answer to egreg's comment:\MessageBreak |
| 1747 |
\space\space ``In my opinion there should be a document class\MessageBreak |
| 1748 |
\space\space option for it, instead of the |
| 1749 |
\string\setkomafont\MessageBreak |
| 1750 |
\space\space statement. And yes, I find imposing sans serif |
| 1751 |
for\MessageBreak |
| 1752 |
\space\space titles is not the best choice (one of the |
| 1753 |
reasons\MessageBreak |
| 1754 |
\space\space why I don't use Koma-script classes).''\MessageBreak |
| 1755 |
to question https://tex.stackexchange.com/q/289853\MessageBreak |
| 1756 |
at TeX.SX.\MessageBreak |
| 1757 |
The option has never been documented in the official\MessageBreak |
| 1758 |
user manuals and therefore should never have been\MessageBreak |
| 1759 |
used in real live documents. It was intended to be\MessageBreak |
| 1760 |
removed after some month.\MessageBreak |
| 1761 |
However, it has been used and also almost forgotten\MessageBreak |
| 1762 |
by the author.\MessageBreak |
| 1763 |
For this the author apologizes both to users but\MessageBreak |
| 1764 |
especially to egreg.\MessageBreak |
| 1765 |
Rightly, egreg has criticized the permanent retention\MessageBreak |
| 1766 |
of the option as unfunny to inappropriate and has\MessageBreak |
| 1767 |
asked that it be removed or replaced.\MessageBreak |
| 1768 |
It will be removed soon!\MessageBreak |
| 1769 |
You should use `sfdefaults=false` instead% |
| 1770 |
}% |
| 1771 |
\KOMA@set@ifkey{egregdoesnotlikesansseriftitles}% |
| 1772 |
{@sfdefaults}% |
| 1773 |
{#1}% |
| 1774 |
\ifx\FamilyKeyState\FamilyKeyStateProcessed |
| 1775 |
\if@sfdefault \@sfdefaultsfalse \else \@sfdefaulttrue \fi |
| 1776 |
%<class> \KOMA@kav@xreplacevalue{\KOMAClassFileName}% |
| 1777 |
%<extend> \KOMA@kav@xreplacevalue{scrextend.\scr@pkgextension}% |
| 1778 |
{sfdefaults}{\if@sfdefaults true\else false\fi}% |
| 1779 |
\fi |
| 1780 |
} |
| 1781 |
%</(class|extend)&option> |
| 1782 |
% \end{macrocode} |
| 1783 |
% \end{option}^^A egegdoesnotlikesansseriftitles |
| 1784 |
% |
| 1785 |
% \section{Implementation of Font Elements} |
| 1786 |
% |
| 1787 |
% |
| 1788 |
% \begin{command}{\IfExistskomafont} |
| 1789 |
% \changes{v3.15}{2014/11/21}{added} |
| 1790 |
% Command |
| 1791 |
% \begin{quote} |
| 1792 |
% \cs{IfExistskomafont}\marg{font element}\marg{then code}\marg{else code} |
| 1793 |
% \end{quote} |
| 1794 |
% executes \meta{then code} if the font element \meta{font element} exists |
| 1795 |
% either as a real font element or an alias. Otherwise \meta{else code} is used. |
| 1796 |
% \begin{macrocode} |
| 1797 |
%<*scrkbase&body> |
| 1798 |
\newcommand*{\IfExistskomafont}[1]{% |
| 1799 |
\scr@ifundefinedorrelax{scr@fnt@#1}{% |
| 1800 |
\scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}% |
| 1801 |
}{% |
| 1802 |
\@firstoftwo |
| 1803 |
}% |
| 1804 |
} |
| 1805 |
% \end{macrocode} |
| 1806 |
% \end{command}^^A \IfExistskomafont |
| 1807 |
% |
| 1808 |
% \begin{command}{\IfIsAliaskomafont} |
| 1809 |
% \changes{v3.25}{2017/12/08}{added} |
| 1810 |
% Command |
| 1811 |
% \begin{quote} |
| 1812 |
% \cs{IfIsAliaskomafont}\marg{font element}\marg{then code}\marg{else code} |
| 1813 |
% \end{quote} |
| 1814 |
% executes \meta{then code} if the font element \meta{font element} is an alias. |
| 1815 |
% Otherwise \meta{else code} is used. |
| 1816 |
% \begin{macrocode} |
| 1817 |
\newcommand*{\IfIsAliaskomafont}[1]{% |
| 1818 |
\scr@ifundefinedorrelax{scr@fnt@#1}{% |
| 1819 |
\scr@ifundefinedorrelax{scr@fnt@instead@#1}{\@secondoftwo}{\@firstoftwo}% |
| 1820 |
}{% |
| 1821 |
\@secondoftwo |
| 1822 |
}% |
| 1823 |
} |
| 1824 |
% \end{macrocode} |
| 1825 |
% \end{command}^^A \IfIsAliaskomafont |
| 1826 |
% |
| 1827 |
% \begin{command}{\setkomafont} |
| 1828 |
% \changes{v2.8o}{2001/09/14}{added} |
| 1829 |
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}} |
| 1830 |
% Command |
| 1831 |
% \begin{quote} |
| 1832 |
% \cs{setkomafont}\marg{element}\marg{font settings} |
| 1833 |
% \end{quote} |
| 1834 |
% sets the \meta{font settings} of font element \meta{element}. Setting of an |
| 1835 |
% unknown font element results in an error. Setting of an alias font element |
| 1836 |
% results in an info an the setting of the real element. Note: \meta{font |
| 1837 |
% settings} should be only font selection commands. |
| 1838 |
% \begin{macrocode} |
| 1839 |
\newcommand*{\setkomafont}[2]{% |
| 1840 |
\@ifundefined{scr@fnt@#1}{% |
| 1841 |
\@ifundefined{scr@fnt@instead@#1}{% |
| 1842 |
\PackageError{scrkbase}{% |
| 1843 |
font of element `#1' can't be set}{% |
| 1844 |
You've told me to redefine the font selection of the |
| 1845 |
element,\MessageBreak% |
| 1846 |
but either no such element is known by |
| 1847 |
KOMA-Script\MessageBreak% |
| 1848 |
or the element does not use a special font selection% |
| 1849 |
}% |
| 1850 |
}{% |
| 1851 |
\PackageInfo{scrkbase}{% |
| 1852 |
You've told me to redefine the font selection of the\MessageBreak |
| 1853 |
element `#1' that is an alias of element\MessageBreak |
| 1854 |
`\csname scr@fnt@instead@#1\endcsname'% |
| 1855 |
}% |
| 1856 |
\expandafter\setkomafont\expandafter{% |
| 1857 |
\csname scr@fnt@instead@#1\endcsname}{#2}% |
| 1858 |
}% |
| 1859 |
}{% |
| 1860 |
\expandafter\expandafter\expandafter\def\csname scr@fnt@#1\endcsname{#2}% |
| 1861 |
}% |
| 1862 |
\@ifundefined{scr@fnt@wrn@#1}{}{% |
| 1863 |
\PackageWarning{scrkbase}{% |
| 1864 |
\csname scr@fnt@wrn@#1\endcsname{#1}% |
| 1865 |
}% |
| 1866 |
}% |
| 1867 |
} |
| 1868 |
% \end{macrocode} |
| 1869 |
% \end{command}^^A \setkomafont |
| 1870 |
% |
| 1871 |
% \begin{command}{\addtokomafont} |
| 1872 |
% \changes{v2.8p}{2001/09/22}{added} |
| 1873 |
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}} |
| 1874 |
% Command |
| 1875 |
% \begin{quote} |
| 1876 |
% \cs{addtokomafont}\marg{element}\marg{font settings} |
| 1877 |
% \end{quote} |
| 1878 |
% adds the \meta{font settings} to the settings of font element |
| 1879 |
% \meta{element}. Setting of an unknown font element results in an |
| 1880 |
% error. Setting of an alias font element results in an info an the setting of |
| 1881 |
% the real element. |
| 1882 |
% \begin{macrocode} |
| 1883 |
\newcommand*{\addtokomafont}[2]{% |
| 1884 |
\@ifundefined{scr@fnt@#1}{% |
| 1885 |
\@ifundefined{scr@fnt@instead@#1}{% |
| 1886 |
\PackageError{scrkbase}{% |
| 1887 |
font of element `#1' can't be extended% |
| 1888 |
}{% |
| 1889 |
You've told me to extend the font selection of the |
| 1890 |
element,\MessageBreak |
| 1891 |
but either no such element is known by |
| 1892 |
KOMA-Script\MessageBreak |
| 1893 |
or the element does not use a special font selection% |
| 1894 |
}% |
| 1895 |
}{% |
| 1896 |
\PackageInfo{scrkbase}{% |
| 1897 |
You've told me to extend the font selection of the\MessageBreak |
| 1898 |
element `#1' that is an alias of element\MessageBreak |
| 1899 |
`\csname scr@fnt@instead@#1\endcsname'% |
| 1900 |
}% |
| 1901 |
\expandafter\addtokomafont\expandafter{% |
| 1902 |
\csname scr@fnt@instead@#1\endcsname}{#2}% |
| 1903 |
}% |
| 1904 |
}{% |
| 1905 |
\expandafter\expandafter\expandafter\l@addto@macro |
| 1906 |
\csname scr@fnt@#1\endcsname{#2}% |
| 1907 |
}% |
| 1908 |
\@ifundefined{scr@fnt@wrn@#1}{}{% |
| 1909 |
\PackageWarning{scrkbase}{% |
| 1910 |
\csname scr@fnt@wrn@#1\endcsname{#1}% |
| 1911 |
}% |
| 1912 |
}% |
| 1913 |
} |
| 1914 |
% \end{macrocode} |
| 1915 |
% \end{command}^^A \addtokomafont |
| 1916 |
% |
| 1917 |
% \begin{command}{\usekomafont} |
| 1918 |
% \changes{v2.8p}{2001/09/28}{added} |
| 1919 |
% \changes{v2.96}{2006/08/18}{alias usage fixed} |
| 1920 |
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}} |
| 1921 |
% Command |
| 1922 |
% \begin{quote} |
| 1923 |
% \cs{usekomafont}\marg{element} |
| 1924 |
% \end{quote} |
| 1925 |
% activates the font settings of the font \meta{element}. |
| 1926 |
% \begin{macrocode} |
| 1927 |
\newcommand*{\usekomafont}[1]{% |
| 1928 |
\@ifundefined{scr@fnt@#1}{% |
| 1929 |
\@ifundefined{scr@fnt@instead@#1}{% |
| 1930 |
\PackageError{scrkbase}{% |
| 1931 |
font of element `#1' can't be used% |
| 1932 |
}{% |
| 1933 |
You've told me to use the font selection of the |
| 1934 |
element,\MessageBreak |
| 1935 |
but either no such element is known by |
| 1936 |
KOMA-Script\MessageBreak |
| 1937 |
or the element does not use a special font selection% |
| 1938 |
}% |
| 1939 |
}{% |
| 1940 |
\PackageInfo{scrkbase}{% |
| 1941 |
You've told me to use the font selection of the |
| 1942 |
element\MessageBreak |
| 1943 |
`#1' that is an alias of element `\csname |
| 1944 |
scr@fnt@instead@#1\endcsname'\MessageBreak |
| 1945 |
}% |
| 1946 |
\expandafter\expandafter\expandafter\usekomafont |
| 1947 |
\expandafter\expandafter\expandafter{% |
| 1948 |
\csname scr@fnt@instead@#1\endcsname}% |
| 1949 |
}% |
| 1950 |
}{% |
| 1951 |
\@nameuse{scr@fnt@#1}% |
| 1952 |
}% |
| 1953 |
} |
| 1954 |
% \end{macrocode} |
| 1955 |
% \end{command}^^A \usekomafont |
| 1956 |
% |
| 1957 |
% |
| 1958 |
% \begin{command}{\usesizeofkomafont} |
| 1959 |
% \changes{v3.12}{2013/03/30}{added} |
| 1960 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 1961 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 1962 |
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change} |
| 1963 |
% \begin{command}{\usefamilyofkomafont,\useseriesofkomafont} |
| 1964 |
% \changes{v3.12}{2013/03/30}{added} |
| 1965 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 1966 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 1967 |
% \begin{command}{\useshapeofkomafont} |
| 1968 |
% \changes{v3.12}{2013/03/30}{added} |
| 1969 |
% \changes{v3.16a}{2015/02/20}{fix of macro name} |
| 1970 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 1971 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 1972 |
% \begin{command}{\useencodingofkomafont} |
| 1973 |
% \changes{v3.12}{2013/03/30}{added} |
| 1974 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 1975 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 1976 |
% \begin{command}{\usefontofkomafont} |
| 1977 |
% \changes{v3.12}{2013/03/30}{added} |
| 1978 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 1979 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 1980 |
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change} |
| 1981 |
% Sometimes not the whole font but only single elements of a font is |
| 1982 |
% wanted. |
| 1983 |
% \begin{macrocode} |
| 1984 |
\newcommand*{\usesizeofkomafont}[1]{% |
| 1985 |
\begingroup |
| 1986 |
\scr@prepareforkomafont |
| 1987 |
\sbox\@tempboxa{% |
| 1988 |
\usekomafont{#1}{% |
| 1989 |
\selectfont |
| 1990 |
\global\let\g@scr@f@size\f@size |
| 1991 |
\global\let\g@scr@f@baselineskip\f@baselineskip |
| 1992 |
\global\let\g@scr@f@linespread\f@linespread |
| 1993 |
}% |
| 1994 |
}% |
| 1995 |
\endgroup |
| 1996 |
\linespread{\g@scr@f@linespread}% |
| 1997 |
\fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}% |
| 1998 |
\selectfont |
| 1999 |
} |
| 2000 |
\newcommand*{\usefamilyofkomafont}{\use@ofkomafont{family}} |
| 2001 |
\newcommand*{\useseriesofkomafont}{\use@ofkomafont{series}} |
| 2002 |
\newcommand*{\useshapeofkomafont}{\use@ofkomafont{shape}} |
| 2003 |
\newcommand*{\useencodingofkomafont}{\use@ofkomafont{encoding}} |
| 2004 |
\newcommand*{\usefontofkomafont}[1]{% |
| 2005 |
\begingroup |
| 2006 |
\scr@prepareforkomafont |
| 2007 |
\sbox\@tempboxa{% |
| 2008 |
\usekomafont{#1}{% |
| 2009 |
\selectfont |
| 2010 |
\global\let\g@scr@f@encoding\f@encoding |
| 2011 |
\global\let\g@scr@f@family\f@family |
| 2012 |
\global\let\g@scr@f@series\f@series |
| 2013 |
\global\let\g@scr@f@shape\f@shape |
| 2014 |
\global\let\g@scr@f@size\f@size |
| 2015 |
\global\let\g@scr@f@baselineskip\f@baselineskip |
| 2016 |
\global\let\g@scr@f@linespread\f@linespread |
| 2017 |
}% |
| 2018 |
}% |
| 2019 |
\endgroup |
| 2020 |
\linespread{\g@scr@f@linespread}% |
| 2021 |
\fontsize{\g@scr@f@size}{\g@scr@f@baselineskip}% |
| 2022 |
\usefont{\g@scr@f@encoding}{\g@scr@f@family}{\g@scr@f@series}{\g@scr@f@shape}% |
| 2023 |
}% |
| 2024 |
% \end{macrocode} |
| 2025 |
% \begin{macro}{\use@ofkomafont} |
| 2026 |
% \changes{v3.12}{2013/03/30}{new (internal)} |
| 2027 |
% \changes{v3.17}{2015/04/03}{new more robust implementation} |
| 2028 |
% \changes{v3.24}{2017/05/06}{new more robust implementation} |
| 2029 |
% \changes{v3.34}{2021/05/17}{new implementation due to \LaTeX{} kernel change} |
| 2030 |
% Helper macro for all commands above despite the first and the last one. |
| 2031 |
% \begin{macrocode} |
| 2032 |
\newcommand*{\use@ofkomafont}[2]{% |
| 2033 |
\begingroup |
| 2034 |
\scr@prepareforkomafont |
| 2035 |
\sbox\@tempboxa{% |
| 2036 |
\usekomafont{#2}{% |
| 2037 |
\selectfont |
| 2038 |
\global\expandafter\let\csname g@scr@f@#1\expandafter\endcsname |
| 2039 |
\csname f@#1\endcsname |
| 2040 |
}% |
| 2041 |
}% |
| 2042 |
\endgroup |
| 2043 |
\@nameuse{font#1}{\csname g@scr@f@#1\endcsname}% |
| 2044 |
\selectfont |
| 2045 |
} |
| 2046 |
% \end{macrocode} |
| 2047 |
% \begin{macro}{\g@scr@usefont} |
| 2048 |
% \changes{v3.17}{2015/04/03}{added} |
| 2049 |
% \changes{v3.24}{2017/05/06}{removed} |
| 2050 |
% \end{macro}^^A \g@scr@usefont |
| 2051 |
% \begin{macro}{\g@scr@f@encoding,\g@scr@f@family,\g@scr@f@series,\g@scr@f@shape, |
| 2052 |
% \g@scr@f@size,\g@scr@f@baselineskip,\g@scr@f@linespread} |
| 2053 |
% \changes{v3.24}{2017/05/06}{added} |
| 2054 |
% \begin{macrocode} |
| 2055 |
\newcommand*{\g@scr@f@encoding}{}\let\g@scr@f@encoding\f@encoding |
| 2056 |
\newcommand*{\g@scr@f@family}{}\let\g@scr@f@family\f@family |
| 2057 |
\newcommand*{\g@scr@f@series}{}\let\g@scr@f@series\f@series |
| 2058 |
\newcommand*{\g@scr@f@shape}{}\let\g@scr@f@shape\f@shape |
| 2059 |
\newcommand*{\g@scr@f@size}{}\let\g@scr@f@size\f@size |
| 2060 |
\newcommand*{\g@scr@f@baselineskip}{}\let\g@scr@f@baselineskip\f@baselineskip |
| 2061 |
\newcommand*{\g@scr@f@linespread}{}\let\g@scr@f@linespread\f@linespread |
| 2062 |
% \end{macrocode} |
| 2063 |
% \end{macro}^^A \g@scr@f@encoding … \g@scr@f@linespread |
| 2064 |
% \begin{macro}{\scr@komafontrelaxlist} |
| 2065 |
% \changes{v3.17}{2015/04/03}{added} |
| 2066 |
% \changes{v3.24}{2017/05/05}{\cs{uppercase} and \cs{lowercase} removed} |
| 2067 |
% \changes{v3.24}{2017/05/05}{\cs{MakeUppercase} and \cs{MakeLowercase} moved to |
| 2068 |
% \cs{scr@komafontonearglist}} |
| 2069 |
% A \cs{do} list of all macros, that should become \cs{relax} in the previous |
| 2070 |
% commands. |
| 2071 |
% \begin{macrocode} |
| 2072 |
\newcommand*{\scr@komafontrelaxlist}{% |
| 2073 |
\do\normalcolor |
| 2074 |
} |
| 2075 |
% \end{macrocode} |
| 2076 |
% \end{macro}^^A \scr@komafontrelaxlist |
| 2077 |
% \begin{macro}{\scr@komafontgobblelist} |
| 2078 |
% \changes{v3.19}{2015/08/20}{added} |
| 2079 |
% Like \cs{scr@komafontrelaxlist} but with \cs{@gobble} instead of \cs{relax}. |
| 2080 |
% \begin{macrocode} |
| 2081 |
\newcommand*{\scr@komafontgobblelist}{% |
| 2082 |
\do\color |
| 2083 |
} |
| 2084 |
% \end{macrocode} |
| 2085 |
% \end{macro}^^A \scr@komafontgobblelist |
| 2086 |
% \begin{macro}{\scr@komafontonearglist} |
| 2087 |
% \changes{v3.24}{2017/05/05}{added} |
| 2088 |
% Like \cs{scr@komafontgobblelist} but with \cs{@firstofone} instead of |
| 2089 |
% \cs{@gobble}. |
| 2090 |
% \begin{macrocode} |
| 2091 |
\newcommand*{\scr@komafontonearglist}{% |
| 2092 |
\do\MakeUppercase \do\MakeLowercase |
| 2093 |
} |
| 2094 |
% \end{macrocode} |
| 2095 |
% \end{macro}^^A \scr@komafontonearglist |
| 2096 |
% \begin{macro}{\scr@prepareforkomafont} |
| 2097 |
% \changes{v3.17}{2015/04/03}{added} |
| 2098 |
% \changes{v3.19}{2015/08/20}{using \cs{scr@komafontgobblelist}} |
| 2099 |
% \changes{v3.24}{2017/05/05}{using \cs{scr@komafontonearglist}} |
| 2100 |
% Process all the \cs{do} lists. Note: Should be encapsulated into a local group. |
| 2101 |
% \begin{macrocode} |
| 2102 |
\newcommand*{\scr@prepareforkomafont}{% |
| 2103 |
\long\def\do##1{\let##1\relax}\scr@komafontrelaxlist |
| 2104 |
\long\def\do##1{\let##1\@gobble}\scr@komafontgobblelist |
| 2105 |
\long\def\do##1{\let##1\@firstofone}\scr@komafontonearglist |
| 2106 |
} |
| 2107 |
% \end{macrocode} |
| 2108 |
% \end{macro}^^A \scr@prepareforkomafont |
| 2109 |
% \begin{command}{\addtokomafontrelaxlist} |
| 2110 |
% \changes{v3.17}{2015/04/03}{added} |
| 2111 |
% Adds exactly one macro/command to \cs{scr@komafontrelaxlist}. |
| 2112 |
% \begin{macrocode} |
| 2113 |
\newcommand*{\addtokomafontrelaxlist}[1]{% |
| 2114 |
\l@addto@macro\scr@komafontrelaxlist{\do#1}% |
| 2115 |
} |
| 2116 |
% \end{macrocode} |
| 2117 |
% \end{command}^^A \addtokomafontrelaxlist |
| 2118 |
% \begin{command}{\addtokomafontgobblelist} |
| 2119 |
% \changes{v3.19}{2015/08/20}{added} |
| 2120 |
% Adds exactly one macro/command to \cs{scr@komafontgobblelist}. |
| 2121 |
% \begin{macrocode} |
| 2122 |
\newcommand*{\addtokomafontgobblelist}[1]{% |
| 2123 |
\l@addto@macro\scr@komafontgobblelist{\do#1}% |
| 2124 |
} |
| 2125 |
% \end{macrocode} |
| 2126 |
% \end{command}^^A \addtokomafontgobblelist |
| 2127 |
% \begin{command}{\addtokomafontonearglist} |
| 2128 |
% \changes{v3.24}{2017/05/05}{added} |
| 2129 |
% Adds exactly one macro/command to \cs{scr@komafontonearglist}. |
| 2130 |
% \begin{macrocode} |
| 2131 |
\newcommand*{\addtokomafontonearglist}[1]{% |
| 2132 |
\l@addto@macro\scr@komafontonearglist{\do#1}% |
| 2133 |
} |
| 2134 |
% \end{macrocode} |
| 2135 |
% \end{command}^^A \addtokonafontonearglist |
| 2136 |
% \end{macro}^^A \use@ofkomafont |
| 2137 |
% \end{command}^^A \usefontofkomafont |
| 2138 |
% \end{command}^^A \useencodingofkomafont |
| 2139 |
% \end{command}^^A \useshapeofkomafont |
| 2140 |
% \end{command}^^A \usefamilyofkomafont,\useseriesofkomafont |
| 2141 |
% \end{command}^^A \usesizeofkomafont |
| 2142 |
% |
| 2143 |
% |
| 2144 |
% \begin{command}{\newkomafont} |
| 2145 |
% \changes{v2.95}{2004/07/21}{added} |
| 2146 |
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}} |
| 2147 |
% \changes{v3.11c}{2013/02/18}{the warning needs an argument} |
| 2148 |
% \changes{v3.25}{2017/12/08}{warn if already exists as an alias} |
| 2149 |
% Command |
| 2150 |
% \begin{quote} |
| 2151 |
% \cs{newkomafont}\oarg{warning}\marg{element}\marg{font settings} |
| 2152 |
% \end{quote} |
| 2153 |
% defines a new font \meta{element} with the given \meta{font settings} as |
| 2154 |
% default. The optional \meta{warning} is shown whenever the font setting of |
| 2155 |
% the element is changed, but not when the element is used. Internally a macro |
| 2156 |
% \cs{@\meta{element}font} is defined with the \meta{font settings}. An |
| 2157 |
% additional macro \cs{scr@fnt@\meta{element}} is defined to just execute |
| 2158 |
% \cs{@meta{element}font}. But you also can define \cs{scr@fnt@\meta{element}} |
| 2159 |
% to use another internal font storage macro. So several elements can share |
| 2160 |
% the same font settings. |
| 2161 |
% \begin{macrocode} |
| 2162 |
\newcommand*{\newkomafont}[3][\relax]{% |
| 2163 |
\scr@ifundefinedorrelax{scr@fnt@instead@#2}{}{% |
| 2164 |
\PackageWarning{scrkbase}{% |
| 2165 |
Making stand-alone element `#2' from\MessageBreak |
| 2166 |
alias to `\@nameuse{scr@fnt@instead@#2}' |
| 2167 |
}% |
| 2168 |
\expandafter\let\csname scr@fnt@instead@#2\endcsname\relax |
| 2169 |
}% |
| 2170 |
\expandafter\newcommand\expandafter*\csname @#2font\endcsname{#3}% |
| 2171 |
\expandafter\expandafter\expandafter\newcommand |
| 2172 |
\expandafter\expandafter\expandafter*% |
| 2173 |
\expandafter\csname scr@fnt@#2\expandafter\endcsname\expandafter{% |
| 2174 |
\csname @#2font\endcsname% |
| 2175 |
}% |
| 2176 |
\ifx\relax#1\relax\else |
| 2177 |
\expandafter\newcommand\expandafter*\csname scr@fnt@wrn@#2\endcsname[1]{#1}% |
| 2178 |
\fi |
| 2179 |
} |
| 2180 |
% \end{macrocode} |
| 2181 |
% \begin{command}{\aliaskomafont} |
| 2182 |
% \changes{v2.95}{2004/07/21}{added} |
| 2183 |
% \changes{v3.05a}{2010/03/24}{moved to \pkg*{scrkbase}} |
| 2184 |
% \changes{v3.25}{2017/12/08}{warning if element is already defined} |
| 2185 |
% Another possibility to share fonts is to define an |
| 2186 |
% alias by defining \cs{scr@fnt@instead@\meta{element}} with the name of |
| 2187 |
% another element. This can be done using |
| 2188 |
% \begin{quote} |
| 2189 |
% \cs{aliaskomafont}\marg{alias}\marg{element} |
| 2190 |
% \end{quote} |
| 2191 |
% It defines \marg{alias} to be an alias of \meta{element}. |
| 2192 |
% \begin{macrocode} |
| 2193 |
\newcommand*{\aliaskomafont}[2]{% |
| 2194 |
\scr@ifundefinedorrelax{scr@fnt@#1}{}{% |
| 2195 |
\PackageWarning{scrkbase}{% |
| 2196 |
Redefining stand alone element `#1' as\MessageBreak |
| 2197 |
alias to `#2'% |
| 2198 |
} |
| 2199 |
\expandafter\let\csname scr@fnt@#1\endcsname\relax |
| 2200 |
}% |
| 2201 |
\scr@ifundefinedorrelax{scr@fnt@wrn@#1}{}{% |
| 2202 |
\expandafter\let\csname scr@fnt@wrn@#1\encsname\relax |
| 2203 |
} |
| 2204 |
\expandafter\newcommand\expandafter*\csname scr@fnt@instead@#1\endcsname{% |
| 2205 |
#2% |
| 2206 |
}% |
| 2207 |
} |
| 2208 |
%</scrkbase&body> |
| 2209 |
% \end{macrocode} |
| 2210 |
% \end{command} |
| 2211 |
% \end{command} |
| 2212 |
% |
| 2213 |
% \Finale |
| 2214 |
% \PrintChanges |
| 2215 |
% |
| 2216 |
\endinput |
| 2217 |
% Local Variables: |
| 2218 |
% mode: doctex |
| 2219 |
% ispell-local-dictionary: "en_US" |
| 2220 |
% eval: (flyspell-mode 1) |
| 2221 |
% TeX-master: t |
| 2222 |
% TeX-engine: luatex-dev |
| 2223 |
% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) |
| 2224 |
% End: |