From cd8e9b0b5b9b49590ed02fa237a2ab69686397b6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 18 Mar 2021 21:08:34 +0000 Subject: fontsize (18mar21) git-svn-id: svn://tug.org/texlive/trunk@58508 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/fontsize/fontsize.sty | 60 +++++++++-------------- 1 file changed, 23 insertions(+), 37 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/fontsize/fontsize.sty b/Master/texmf-dist/tex/latex/fontsize/fontsize.sty index b2905b61644..080ef528ba1 100644 --- a/Master/texmf-dist/tex/latex/fontsize/fontsize.sty +++ b/Master/texmf-dist/tex/latex/fontsize/fontsize.sty @@ -26,8 +26,9 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{fontsize} - [2021/03/04 v0.8 'fontsize' package. Set main font sizes (Ivan Valbusa)] + [2021/03/14 v0.8.1 'fontsize' package. Set main font sizes (Ivan Valbusa)] \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}} +\@ifpackageloaded{xfp}{}{\RequirePackage{xfp}} \DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}} \DeclareOptionX{fontsize}[10]{% \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil @@ -94,7 +95,7 @@ \addtolength{\@tempdimc}{-10\p@}% \edef\@ptsize{\strip@pt\@tempdimc}% \@defaultunits\@tempdimb#1pt\relax\@nnil - \setlength{\@tempdimc}{100\dimexpr (\@tempdimb * \p@ / \@tempdima)} + \setlength{\@tempdimc}{\fpeval{100*\@tempdimb/\@tempdima}pt}% \edef\@tempb{\the\@tempdimc}% \setlength{\@tempdimc}{\@tempdima}% \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}% @@ -437,10 +438,9 @@ }% \normalsize% \setlength\parindent{\@tempdimb}% -\setlength\headheight{\dimexpr(\@tempdimb+2pt)}% -\setlength\smallskipamount{\dimexpr(1.1\@tempdimb/4) \@plus 1\p@ \@minus 1\p@}% -\setlength\medskipamount{\dimexpr(1.1\@tempdimb/2) \@plus 2\p@ \@minus 2\p@}% -\setlength\bigskipamount{\dimexpr(1.1\@tempdimb) \@plus 4\p@ \@minus 4\p@}% +\setlength\smallskipamount{\fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}% +\setlength\medskipamount{\fpeval{1.090909091\@tempdimb/2}pt \@plus 2\p@ \@minus 2\p@}% +\setlength\bigskipamount{\fpeval{1.090909091\@tempdimb}pt \@plus 4\p@ \@minus 4\p@}% \setlength{\@tempdimb}{\f@baselineskip}% \ctm@setlength{\parsep}% {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}% @@ -1095,38 +1095,24 @@ }% \endgroup \immediate\write\@fontfile{% - \string\@ifundefined{@list@extra}{}{\@percentchar^^J% - \string\expandafter\string\ifnum\string\scr@v@is@ge{3.17}% - \string\par@updaterelative\string\fi^^J% - \@ind\string\l@addto@macro{\string\@listi}{\string\@list@extra}% - \@percentchar^^J% - \@ind\string\let\string\@listI=\string\@listi^^J% - \@ind\string\l@addto@macro{\string\@listii}{\string\@list@extra}% - \@percentchar^^J% - \@ind\string\l@addto@macro{\string\@listiii}{\string\@list@extra}% - \@percentchar^^J% - \@ind\string\l@addto@macro{\string\footnotesize}{\string\protect - \string\add@extra@listi{ftns}}\@percentchar^^J% - \@ind\string\l@addto@macro{\string\small}{\string\protect - \string\add@extra@listi{sml}}\@percentchar^^J% - }\@percentchar^^J% - \string\@listi^^J% - \string\endinput^^J% - \@percentchar^^J% - \@percentchar\space End of file `#1#2.clo'. - } - \immediate\closeout\@fontfile + \string\@listi^^J% + \string\endinput^^J% + \@percentchar^^J% + \@percentchar\space End of file `#1#2.clo'. +} +\immediate\closeout\@fontfile } \@onlypreamble\generateclofile -\def\fontsizelipsum{% - As any dedicated reader can clearly see, the Ideal of practical reason is a - representation of, as far as I know, the things in themselves; as I have shown - elsewhere, the phenomena should only be used as a canon for our understanding. - The paralogisms of practical reason are what first give rise to the - architectonic of practical reason. As will easily be shown in the - next section, reason would thereby be made to contradict, in view of - these considerations, the Ideal of practical reason, yet the manifold - depends on the phenomena.} +\newcommand{\sampletext}[1]{\def\fs@sampletext{#1}} +\def\fs@sampletext{% + As any dedicated reader can clearly see, the Ideal of practical reason + is a representation of, as far as I know, the things in themselves; as + I have shown elsewhere, the phenomena should only be used as a canon for + our understanding. The paralogisms of practical reason are what first give + rise to the architectonic of practical reason. As will easily be shown in + the next section, reason would thereby be made to contradict, in view of + these considerations, the Ideal of practical reason, yet the manifold + depends on the phenomena.} \ExplSyntaxOn @@ -1171,7 +1157,7 @@ \noindent\texttt{\symbol{92}##1}:~ % print the font size command \__fontsize_round_f:n {size}~on~ % print the size in points \__fontsize_round_f:n {baselineskip}.~ % print the baseline skip in points - \fontsizelipsum % sample text + \fs@sampletext % sample text \par\addvspace{\medskipamount} % finish up } % close the group -- cgit v1.2.3