%% %% This is file `fontsize.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% fontsize.dtx (with options: `package') %% %% Copyright 2020 Ivan Valbusa %% %% This program is provided under the terms of the %% LaTeX Project Public License distributed from CTAN %% archives in directory macros/latex/base/lppl.txt. %% %% Author: Ivan Valbusa %% Ivan dot Valbusa at gmail dot com %% %% This work has the LPPL maintenance status "author-maintained". %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{fontsize} [2020/02/20 v0.1 'fontsize' package. Set main font sizes (Ivan Valbusa)] \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}} \@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}} \providecommand*{\@fontsizefilebase}{custom} \DeclareOptionX{fontsize}[10]{% \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil \edef\@tempa{#1}% \setlength{\@tempdimb}{\@tempdima}% \edef\@tempb{\strip@pt\@tempdimb}% \addtolength{\@tempdimb}{-10\p@}% \edef\@ptsize{\strip@pt\@tempdimb}% \edef\@tempa{% \noexpand\makeatletter \noexpand\InputIfFileExists{\@fontsizefilebase\@tempa.clo}{% \noexpand\PackageInfo{fontsize}{% File `\@fontsizefilebase\@tempa.clo' used to setup font sizes}% }{% \noexpand\changefontsize{#1}% }% \noexpand\catcode`\noexpand\@=\the\catcode`\@ }% \expandafter\AtEndOfPackage\expandafter{\@tempa}% } \ProcessOptionsX*\relax \newcommand*\ctm@setlength[4]{% \ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi \setlength{#1}{\p@ \@plus\p@ \@minus\p@}% \else \setlength{#1}{\p@ \@plus\p@ \@minus#4}% \fi \else \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi \setlength{#1}{\p@ \@plus#3 \@minus\p@}% \else \setlength{#1}{\p@ \@plus#3 \@minus#4}% \fi \fi \else \ifdim #3<\ifdim #3=\z@ \z@ \else \p@\fi \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi \setlength{#1}{#2 \@plus\p@ \@minus\p@}% \else \setlength{#1}{#2 \@plus\p@ \@minus#4}% \fi \else \ifdim #4<\ifdim #4=\z@ \z@ \else \p@\fi \setlength{#1}{#2 \@plus#3 \@minus\p@}% \else \setlength{#1}{#2 \@plus#3 \@minus#4}% \fi \fi \fi } \providecommand*{\changefontsize}[2][1.2\@tempdima]{% \@defaultunits\@tempdima#2pt\relax\@nnil \setlength{\@tempdimc}{\@tempdima}% \addtolength{\@tempdimc}{-10\p@}% \edef\@ptsize{\strip@pt\@tempdimc}% \@defaultunits\@tempdimb#1pt\relax\@nnil \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}% \edef\@tempb{\the\@tempdimc}% \setlength{\@tempdimc}{\@tempdima}% \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}% \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil% \ctm@setlength{\abovedisplayskip}% {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% \ctm@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% \ctm@setlength{\belowdisplayshortskip}% {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% \setlength{\belowdisplayskip}{\abovedisplayskip}% \edef\normalsize{% \noexpand\@setfontsize\noexpand\normalsize {\the\@tempdima}{\the\@tempdimb}% \abovedisplayskip \the\abovedisplayskip \abovedisplayshortskip \the\abovedisplayshortskip \belowdisplayskip \the\belowdisplayskip \belowdisplayshortskip \the\belowdisplayshortskip \let\noexpand\@listi\noexpand\@listI }% \setlength{\@tempdima}{0.9125\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \ctm@setlength{\abovedisplayskip}% {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% \ctm@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% \ctm@setlength{\belowdisplayshortskip}% {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% \setlength{\belowdisplayskip}{\abovedisplayskip}% \edef\small{% \noexpand\@setfontsize\noexpand\small {\the\@tempdima}{\the\@tempdimb}% \abovedisplayskip \the\abovedisplayskip \abovedisplayshortskip \the\abovedisplayshortskip \belowdisplayskip \the\belowdisplayskip \belowdisplayshortskip \the\belowdisplayshortskip \let\noexpand\@listi\noexpand\@listi@small }% \setlength{\@tempdima}{.83334\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \ctm@setlength{\abovedisplayskip}% {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}% \ctm@setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}% \ctm@setlength{\belowdisplayshortskip}% {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}% \setlength{\belowdisplayskip}{\abovedisplayskip}% \edef\footnotesize{% \noexpand\@setfontsize\noexpand\footnotesize {\the\@tempdima}{\the\@tempdimb}% \abovedisplayskip \the\abovedisplayskip \abovedisplayshortskip \the\abovedisplayshortskip \belowdisplayskip \the\belowdisplayskip \belowdisplayshortskip \the\belowdisplayshortskip \let\noexpand\@listi\noexpand\@listi@footnotesize }% \setlength{\@tempdima}{.66667\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\scriptsize{% \noexpand\@setfontsize\noexpand\scriptsize {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{.5\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\tiny{% \noexpand\@setfontsize\noexpand\tiny {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{1.2\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\large{% \noexpand\@setfontsize\noexpand\large {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{1.44\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\Large{% \noexpand\@setfontsize\noexpand\Large {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{1.728\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\LARGE{% \noexpand\@setfontsize\noexpand\LARGE {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{2.074\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\huge{% \noexpand\@setfontsize\noexpand\huge {\the\@tempdima}{\the\@tempdimb}% }% \setlength{\@tempdima}{2.488\@tempdimc}% \setlength{\@tempdimb}{\@tempb\@tempdima}% \edef\Huge{% \noexpand\@setfontsize\noexpand\Huge {\the\@tempdima}{\the\@tempdimb}% }% \normalsize \setlength{\@tempdimb}{\f@baselineskip}% \ctm@setlength{\parsep}% {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}% \ctm@setlength{\topsep}% {.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listi\endcsname \endgroup \edef\@listi{\leftmargin\leftmargini \topsep \the\topsep \parsep \the\parsep \itemsep \parsep \if@tempswa\noexpand\@list@extra\fi }% \let\@listI\@listi \ctm@setlength{\parsep}% {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% \ctm@setlength{\topsep}% {.3333\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listi\endcsname \endgroup \edef\@listi@small{\leftmargin\leftmargini \topsep \the\topsep \parsep \the\parsep \itemsep \parsep \if@tempswa\noexpand\@list@extra\fi }% \ctm@setlength{\parsep}% {.125\@tempdimb}{.0625\@tempdimb}{.0625\@tempdimb}% \ctm@setlength{\topsep}% {.25\@tempdimb}{.125\@tempdimb}{.125\@tempdimb}% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listi\endcsname \endgroup \edef\@listi@footnotesize{\leftmargin\leftmargini \topsep \the\topsep \parsep \the\parsep \itemsep \parsep \if@tempswa\noexpand\@list@extra\fi }% \ctm@setlength{\parsep}% {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% \ctm@setlength{\topsep}% {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listii\endcsname \endgroup \edef\@listii{\leftmargin\leftmarginii \labelwidth=\dimexpr \leftmargin-\labelsep \topsep \the\topsep \parsep \the\parsep \itemsep \parsep \if@tempswa\noexpand\@list@extra\fi }% \ctm@setlength{\topsep}% {.1667\@tempdimb}{.0833\@tempdimb}{.0833\@tempdimb}% \setlength{\partopsep}{\z@ \@plus\z@ \@minus\p@}% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listiii\endcsname \endgroup \edef\@listiii{\leftmargin\leftmarginiii \labelwidth=\dimexpr \leftmargin-\labelsep \topsep \the\topsep \parsep \z@ \partopsep \the\partopsep \itemsep \topsep \if@tempswa\noexpand\@list@extra\fi }% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listiv\endcsname \endgroup \edef\@listiv{\leftmargin\leftmarginiv \labelwidth=\dimexpr \leftmargin-\labelsep\relax \if@tempswa\noexpand\@list@extra\fi }% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listv\endcsname \endgroup \edef\@listv{\leftmargin\leftmarginv \labelwidth=\dimexpr \leftmargin-\labelsep\relax \if@tempswa\noexpand\@list@extra\fi }% \@tempswafalse \begingroup \def\@list@extra{\aftergroup\@tempswatrue}% \csname @listvi\endcsname \endgroup \edef\@listvi{\leftmargin\leftmarginvi \labelwidth=\dimexpr \leftmargin-\labelsep\relax \if@tempswa\noexpand\@list@extra\fi }% \@listi \setlength{\@tempdimb}{\f@baselineskip}% \setlength{\footnotesep}{.555\@tempdimb}% \ctm@setlength{\skip\footins}% {.75\@tempdimb}{.3333\@tempdimb}{.1667\@tempdimb}% \ctm@setlength{\floatsep}% {\@tempdimb}{.1667\@tempdimb}{.1667\@tempdimb}% \ctm@setlength{\textfloatsep}% {1.6667\@tempdimb}{.1667\@tempdimb}{.3333\@tempdimb}% \setlength{\intextsep}{\floatsep}% \setlength{\dblfloatsep}{\floatsep}% \setlength{\dbltextfloatsep}{\textfloatsep}% \setlength{\@fptop}{\z@ \@plus 1fil}% \setlength{\@fpsep}{.6667\@tempdimb \@plus 2fil}% \setlength{\@fpbot}{\@fptop}% \setlength{\@dblfptop}{\@fptop}% \setlength{\@dblfpsep}{\@fpsep}% \setlength{\@dblfpbot}{\@fptop}% \ctm@setlength{\partopsep}{.2\@tempdimb}{.1\@tempdimb}{.1\@tempdimb}% } \endinput %% %% End of file `fontsize.sty'.