texlive[57648] Master/texmf-dist: fontsize (6feb21)

commits+karl at tug.org commits+karl at tug.org
Sat Feb 6 23:32:42 CET 2021


Revision: 57648
          http://tug.org/svn/texlive?view=revision&revision=57648
Author:   karl
Date:     2021-02-06 23:32:42 +0100 (Sat, 06 Feb 2021)
Log Message:
-----------
fontsize (6feb21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf
    trunk/Master/texmf-dist/source/latex/fontsize/fontsize.dtx
    trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty

Modified: trunk/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/fontsize/fontsize.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fontsize/fontsize.dtx	2021-02-06 22:32:17 UTC (rev 57647)
+++ trunk/Master/texmf-dist/source/latex/fontsize/fontsize.dtx	2021-02-06 22:32:42 UTC (rev 57648)
@@ -56,7 +56,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
 %<package>\ProvidesPackage{fontsize}
 %<*package>
-  [2021/01/31 v0.5 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+  [2021/02/06 v0.6 'fontsize' package. Set main font sizes (Ivan Valbusa)]
 %</package>
 %<*driver>
 \documentclass[12pt]{ltxdoc}
@@ -86,6 +86,7 @@
 \let\cs\relax
 \let\cmd\relax
 \usepackage{ltxdockit}
+\usepackage{kantlipsum}
 %--------------------------------------------------------
 % FONTS
 %--------------------------------------------------------
@@ -96,7 +97,6 @@
 \usepackage[cochineal,bigdelims,cmintegrals,vvarbb]{newtxmath}
 \usepackage[cal=boondoxo]{mathalfa}
 \usepackage{manfnt}
-\usepackage{lettrine}
 %--------------------------------------------------------
 % LAYOUT
 %--------------------------------------------------------
@@ -199,7 +199,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{2372}
+% \CheckSum{2991}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -218,7 +218,8 @@
 %   Right brace   \}     Tilde         \~}
 %
 %
-% \changes{v0.5}{2021/01/31}{New font sizing commands \cmd{\meta{cmdname}r}, \cmd{\meta{cmdname}rr}, \cmd{\meta{cmdname}rrr}. New command \cmd{printsamples}. Updated documentation.}
+% \changes{v0.6}{2021/02/06}{New font sizing commands from \cmd{small} down. Updated documentation.}
+% \changes{v0.5}{2021/01/31}{New font sizing commands from \cmd{normalsize} up. New command \cmd{printsamples}. Updated documentation.}
 % \changes{v0.4}{2021/01/25}{Maintenance release. Updated documentation.}
 % \changes{v0.3}{2020/12/19}{Added definitions of some lengths omitted from KOMA-script files: \cmd{smallskiamount}, \cmd{medskiamount}, \cmd{bigskiamount}. Redefined \cmd{parindent} and \cmd{headheight}.}
 % \changes{v0.2}{2020/05/24}{Updated documentation and code comments.}
@@ -310,7 +311,8 @@
 % 
 % \begin{abstract}
 % \noindent The \sty{fontsize} package allows you to set arbitrary sizes 
-% for the main font of the document and to adjust the line spacing accordingly. You can also generate your own \file{.clo} file for better tuning.
+% for the main font of the document and to adjust the line spacing accordingly. 
+% It also provides new font sizing commands and lets you generate your own \file{.clo} file for better tuning.
 % \end{abstract}
 %
 % \tableofcontents
@@ -327,10 +329,10 @@
 % \section*{Caveat}
 %^^A---------------------------------------------------------------------
 %
-% Although effective with any value for the \meta{fontsize} (as long as the font 
+% Although effective with any value of the font size (as long as the font 
 % is scalable), the package is meant for small font size changes. 
 % For truly optimal results you should (re)define your own \file{.clo} file. 
-% Indeed note that the file generated with \cmd{generateclofile}, as well as the  macros redefined via \cmd{changefontsize}, are a subset of the standard \file{.clo} files.
+% In fact note that the file generated with \cmd{generateclofile}, as well as the  macros redefined via \cmd{changefontsize}, are a subset of the standard \file{.clo} files.
 %^^A---------------------------------------------------------------------
 % \section{Usage}
 %^^A---------------------------------------------------------------------
@@ -357,11 +359,11 @@
 % \cmd{small}, ecc.) and line spacings are set proportionally. 
 % You can use any unit recognized by \TeX\ and you can 
 % omit the unit as well (in which case it defaults to \texttt{pt}).
-% If a file named \file{\meta{name}\meta{fontsize}.clo} exists it is used to setup
+% If a file named \file{\meta{name}\meta{fontsize}.clo} exists, it is used to setup
 % the font sizes. This file can be generated through the \cmd{generateclofile}
 % command (see below).
 % 
-% \optitem[custom]{cloname}{\meta{name}}
+% \optitem[fontsize]{cloname}{\meta{name}}
 %  
 % Sets to \meta{name} the name prefix of the \file{.clo} file generated 
 % by \cmd{generateclofile} (see below). 
@@ -379,7 +381,7 @@
 % Sets the normal size to \meta{fontsize} and the normal line spacing to
 % \meta{baselineskip}. The other sizes (\cmd{tiny}, \cmd{scriptsize},
 % \cmd{small}, ecc.) and line spacings are set proportionally.
-% If the first optional argument is omitted the command has the same effect 
+% If the first optional argument is omitted, the command has the same effect 
 % of the \opt{fontsize} option. You can use any unit recognized by \TeX\ and 
 % you can omit the unit as well (in which case it defaults to \texttt{pt}).  
 % For example: 
@@ -398,17 +400,17 @@
 % You can use any unit recognized 
 % by \TeX\ and you can omit the unit as well (in which case it defaults 
 % to \texttt{pt}).
-% If \opt{cloname=\meta{name}} \textit{and} \opt{fontsize=\meta{fontsize}} 
+% If \opt{cloname=\meta{name}} \textit{and} \opt{fontsize=\meta{fontsize}},  
 % the generated file will be automatically used to setup the main sizes. 
 %
 % \alert \emph{In fact the \file{.clo} file is only needed if you intend to modify it. 
 %  In this case remember to comment the command, otherwise the edited 
-% file will be overwrittern}
+% file will be overwrittern.}
 %
 %\begin{latexcode}
 %\begin{verbatim}
-%\usepackage[cloname=fs,fontsize=11.5pt]{fontsize} % loads fs11.5pt.clo
-% \generateclofile{fs}[13.5pt]{11.5pt}             % creates fs11.5pt.clo
+%\usepackage[cloname=fs,fontsize=11.5]{fontsize}    % loads fs11.5.clo
+% \generateclofile{fs}[13.5]{11.5}                  % creates fs11.5.clo
 %\end{verbatim}
 %\end{latexcode}
 %
@@ -416,7 +418,7 @@
 %
 % A command thought to test the \sty{fontsize} settings. 
 % It prints a text sample for every size given in the third optional argument.
-% If this argument is omitted it prints a sample for each available size. 
+% If this argument is omitted, it prints a sample for each available size. 
 %
 %\begin{latexcode}
 %\begin{verbatim}
@@ -427,26 +429,77 @@
 %
 % \end{ltxsyntax}
 %^^A---------------------------------------------------------------------
-% \section{New sizing commands}\label{sec:sizingcmd}
+% \section{New font sizing commands}\label{sec:sizingcmd}
 %^^A--------------------------------------------------------------------
-% The packages provides three variants for each size bigger then \cmd{normalsize}:
+% The package provides three additional font sizing commands for each standard size:
 %
-%\newcolumntype{L}{>{\color{sufred}}l}
-%\begin{tabular}{@{}LLLLLL}
-%  \cmd{normalsizer} & \cmd{larger} & \cmd{Larger} & \cmd{LARGEr}& \cmd{huger}& \cmd{Huger}\\
-%  \cmd{normalsizerr} & \cmd{largerr} & \cmd{Largerr} & \cmd{LARGErr}& \cmd{hugerr}& \cmd{Hugerr}\\
-%  \cmd{normalsizerrr} & \cmd{largerrr} & \cmd{Largerr} & \cmd{LARGErrr}& \cmd{hugerrr}& \cmd{Hugerrr}\\
+%\def\fshw{Lipsum}
+%\newcommand{\tcmd}[1]{\textcolor{sufred}{\cmd{#1}}}
+%\begin{center}
+%\begin{tabular}{@{}llll}
+%\cmd{tiny}            & \tiny \fshw            &\cmd{large}          & \large \fshw \\
+%\tcmd{tinyr}           & \tinyr \fshw           &\tcmd{larger}        & \larger \fshw \\
+%\tcmd{tinyrr}          & \tinyrr \fshw          &\tcmd{largerr}       & \largerr \fshw \\
+%\tcmd{tinyrrr}         & \tinyrrr \fshw         &\tcmd{largerrr}      & \largerrr \fshw \\
+%\cmd{scriptsize}      & \scriptsize \fshw      &\cmd{Large}          & \Large \fshw \\        
+%\tcmd{scriptsizer}     & \scriptsizer \fshw     &\tcmd{Larger}        & \Larger \fshw \\ 
+%\tcmd{scriptsizerr}    & \scriptsizerr \fshw    &\tcmd{Largerr}       &  \Largerr \fshw \\   
+%\tcmd{scriptsizerrr}   & \scriptsizerrr \fshw   &\tcmd{Largerrr}      & \Largerrr \fshw \\
+%\cmd{footnotesize}    & \footnotesize \fshw    &\cmd{LARGE}          & \LARGE \fshw \\
+%\tcmd{footnotesizer}   & \footnotesizer \fshw   &\tcmd{LARGEr}        & \LARGEr \fshw \\
+%\tcmd{footnotesizerr}  & \footnotesizerr \fshw  &\tcmd{LARGErr}       & \LARGErr \fshw \\
+%\tcmd{footnotesizerrr} & \footnotesizerrr \fshw &\tcmd{LARGErrr}      & \LARGErrr \fshw \\
+%\cmd{small}           & \small \fshw &\cmd{huge}           & \huge \fshw \\
+%\tcmd{smallr}        & \smallr \fshw  &\tcmd{huger}         & \huger \fshw \\   
+%\tcmd{smallrr}       & \smallrr \fshw    &\tcmd{huger}         & \hugerr \fshw \\ 
+%\tcmd{smallrrr}      & \smallrrr \fshw      &\tcmd{huger}         & \hugerrr \fshw \\
+%\cmd{normalsize}     & \normalsize \fshw &\cmd{Huge}           & \Huge \fshw \\
+%\tcmd{normalsizer}   & \normalsizer \fshw &\tcmd{Huger}         & \Huger \fshw \\
+%\tcmd{normalsizerr}  & \normalsizerr \fshw &\tcmd{Hugerr}        & \Hugerr \fshw \\
+%\tcmd{normalsizerrr} & \normalsizerrr \fshw &\tcmd{Hugerr}        & \Hugerrr \fshw
 %\end{tabular}
+%\end{center}
+%
+% \begin{normalsize}
+%\alert  If you want these commands to work as expected, the font must be 
+% smoothly scalable. This is the case of many Type 1 and Open Type fonts. 
+% Anyway, if the font has optical sizes, unusual things can happen: 
+% some larger sizes may appear smaller. For example, with the Latin Modern 12\,pt typeface a similar situation can be encountered:\medskip
+%
+% \begingroup
+% \centering
+% \fontfamily{lmr}\selectfont
+%\begin{minipage}[b]{8cm}
+% \begin{tabular}[b]{lll}
+% \tcmd{largerr} & \texttlf{15.84\,pt} &\largerr Hello world \\
+% \tcmd{larger}  & \texttlf{15.12\,pt} &\larger Hello world \\
+% \tcmd{large}   & \texttlf{14.40\,pt} &\large Hello world 
+% \end{tabular}
+%\end{minipage}
+% \tikz[overlay]{\draw[->,draw=red,very thick] (0.17,1.25) -- (3.7,1.4);}
+% \scalebox{3}{\large H} \scalebox{3}{\larger H} \scalebox{3}{\largerr H} 
+%
+% \endgroup
+% \end{normalsize}
+% \medskip
+%
+% In fact the font used for the \cmd{larger} `Hello world' is bigger than 
+% that used for the \cmd{large} one. This optical effect is due to the minor
+% thickness of the stems, which makes the words appear shorter and clearer, 
+% but not less high (as you can see in the figure on the
+% right which shows the letter H appropriately scaled to see the 
+% differences better).
+%
 %^^A---------------------------------------------------------------------
 % \section{Some text samples}\label{sec:example}
 %
 %^^A--------------------------------------------------------------------
 %
-% Below you can see some text samples scaled proportionally 
-% to match the different values of the selected normal size and line spacing. 
+%^^A Below you can see some text samples scaled proportionally 
+%^^A to match the different values of the selected normal size and line spacing. 
 %
-% \printsamples{13pt}{11pt}[normalsizer,normalsizerr,normalsizerrr]
-% \printsamples{13.5pt}{12pt}[large,larger]
+% \printsamples{13pt}{11pt}[normalsizerr,normalsizerrr,large]
+% \printsamples{13.4pt}{11.7pt}[normalsizerr,normalsizerrr]
 % 
 % \nocite{xkeyval,etoolbox}
 %
@@ -463,25 +516,21 @@
 %\alert \textcolor{DarkBlue}{The parts added to the basic structure of \file{scrextend} and \file{scrfontsizes} are highlighted in blue.}
 %
 %\noindent All the options of the package are defined via \sty{xkeyval}, while \sty{etoolbox} 
-% is required to execute \cmd{AtEndOfPackage}. It is probably not necessary but for the moment I prefer to take advantage of it.
-%
+% is required to execute \cmd{AtEndOfPackage}. It is probably not necessary 
+% but for the moment I prefer to take advantage of it. Only a new package
+% option called \opt{cloname} is defined.
 % \baddition
 %    \begin{macrocode}
 \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
 \@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}}
+\DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}}
 %    \end{macrocode}
 % \eaddition
-% Here we define the only new package option \opt{cloname}:
-% \baddition
-%    \begin{macrocode}
-\DeclareOptionX{cloname}[custom]{\def\@fontsizefilebase{#1}}
-%    \end{macrocode}
-% \eaddition
 %
 % \paragraph{Excerpt from \file{scrextend.sty}}
 %
 % Here the \sty{scrextend} code begins. Only a few names have been changed. 
-% The value of \cmd{|@|fontsizefilebase} is set to \texttt{custom} instead of \texttt{scrsize}.
+% The value of \cmd{|@|fontsizefilebase} is set to \texttt{fontsize} instead of \texttt{scrsize}.
 %    \begin{macrocode}
 \DeclareOptionX{fontsize}[10]{%
   \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil
@@ -653,34 +702,161 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
 %    \end{macrocode}
-% Here we define some new font sizing commands. There are three variants 
-% for each  standard command starting from \cmd{normalsize} to \cmd{Huge}:
+% We will now define some new font sizing commands. There are three variants 
+% for each  standard command:
 % \cmd{\meta{cmd}r} > \cmd{\meta{cmd}rr} > \cmd{\meta{cmd}rrr}. 
 % Every level is scaled proportionally in order to preserve the default 
 % value of the corresponding standard command.
 % \baddition
-% \paragraph{\color{black}Definition of \cmd{normalsizer}, \cmd{normalsizerr}, \cmd{normalsizerrr}. Scale factor: 0.05.}
 %    \begin{macrocode}
+ \def\fontsize at pre{%
+  \ctm at setlength{\abovedisplayskip}%
+  {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
+  \ctm at setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
+  \ctm at setlength{\belowdisplayshortskip}%
+  {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
+  \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ }
+ \def\fontsize at app{%
+  \abovedisplayskip \the\abovedisplayskip
+  \abovedisplayshortskip \the\abovedisplayshortskip
+  \belowdisplayskip \the\belowdisplayskip
+  \belowdisplayshortskip \the\belowdisplayshortskip
+ }
+%    \end{macrocode}
+% {\color{black}Definition of \cmd{smallr}, \cmd{smallrr}, \cmd{smallrrr}. Scale factor: 0,021875.}
+%    \begin{macrocode}
+ \setlength{\@tempdima}{0.934375\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallr{%
+  \noexpand\@setfontsize\noexpand\smallr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+ \setlength{\@tempdima}{0.95625\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallrr{%
+  \noexpand\@setfontsize\noexpand\smallrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+ \setlength{\@tempdima}{0.978125\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallrrr{%
+  \noexpand\@setfontsize\noexpand\smallrrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+%    \end{macrocode}
+% {\color{black}Definition of \cmd{footnotesizer}, \cmd{footnotesizerr}, \cmd{footnotesizerrr}. Scale factor: 0.01979.}
+%    \begin{macrocode}
+ \setlength{\@tempdima}{0.85313\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizer{%
+  \noexpand\@setfontsize\noexpand\footnotesizer
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+ \setlength{\@tempdima}{0.87292\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizerr{%
+  \noexpand\@setfontsize\noexpand\footnotesizerr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+ \setlength{\@tempdima}{0.89271\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizerrr{%
+  \noexpand\@setfontsize\noexpand\footnotesizerrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+%    \end{macrocode}
+% {\color{black}Definition of \cmd{scriptsizer}, \cmd{scriptsizerr}, \cmd{scriptsizerrr}. Scale factor: 0,0416675.}
+%    \begin{macrocode}
+ \setlength{\@tempdima}{0.7083375\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizer{%
+  \noexpand\@setfontsize\noexpand\scriptsizer
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.750005\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizerr{%
+  \noexpand\@setfontsize\noexpand\scriptsizerr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.7916725\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizerrr{%
+  \noexpand\@setfontsize\noexpand\scriptsizerrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+%    \end{macrocode}
+% {\color{black}Definition of \cmd{tinyr}, \cmd{tinyrr}, \cmd{tinyrrr}. Scale factor: 0.0416675.}
+%    \begin{macrocode}
+ \setlength{\@tempdima}{0.5416675\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyr{%
+  \noexpand\@setfontsize\noexpand\tinyr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.583335\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyrr{%
+  \noexpand\@setfontsize\noexpand\tinyrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.6250025\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyrrr{%
+  \noexpand\@setfontsize\noexpand\tinyrrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+%    \end{macrocode}
+% {\color{black}Definition of \cmd{normalsizer}, \cmd{normalsizerr}, \cmd{normalsizerrr}. Scale factor: 0.05.}
+%    \begin{macrocode}
   \setlength{\@tempdima}{1.05\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
+   \fontsize at pre
   \edef\normalsizer{%
     \noexpand\@setfontsize\noexpand\normalsizer
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
   \setlength{\@tempdima}{1.1\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
+   \fontsize at pre
   \edef\normalsizerr{%
     \noexpand\@setfontsize\noexpand\normalsizerr
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
   \setlength{\@tempdima}{1.15\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
   \edef\normalsizerrr{%
+   \fontsize at pre
     \noexpand\@setfontsize\noexpand\normalsizerrr
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
 %    \end{macrocode}
-% \paragraph{\color{black}Definition of \cmd{larger}, \cmd{largerr}, \cmd{largerrr}. Scale factor: 0,06.}
+% {\color{black}Definition of \cmd{larger}, \cmd{largerr}, \cmd{largerrr}. Scale factor: 0,06.}
 %    \begin{macrocode}
   \setlength{\@tempdima}{1.26\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -701,7 +877,7 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
 %    \end{macrocode}
-% \paragraph{\color{black}Definition of \cmd{Larger}, \cmd{Largerr}, \cmd{Largerrr}. Scale factor: 0,072.}
+% {\color{black}Definition of \cmd{Larger}, \cmd{Largerr}, \cmd{Largerrr}. Scale factor: 0,072.}
 %    \begin{macrocode}
   \setlength{\@tempdima}{1.512\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -722,7 +898,7 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
 %    \end{macrocode}
-% \paragraph{\color{black}Definition of \cmd{LARGEr}, \cmd{LARGErr}, \cmd{LARGErrr}. Scale factor: 0,0865.}
+% {\color{black}Definition of \cmd{LARGEr}, \cmd{LARGErr}, \cmd{LARGErrr}. Scale factor: 0,0865.}
 %    \begin{macrocode}
   \setlength{\@tempdima}{1.8145\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -743,7 +919,7 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
 %    \end{macrocode}
-% \paragraph{\color{black}Definition of \cmd{huger}, \cmd{hugerr}, \cmd{hugerrr}. Scale factor: 0,1035.}
+% {\color{black}Definition of \cmd{huger}, \cmd{hugerr}, \cmd{hugerrr}. Scale factor: 0,1035.}
 %    \begin{macrocode}
   \setlength{\@tempdima}{2.1775\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -764,7 +940,7 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
 %    \end{macrocode}
-% \paragraph{\color{black}Definition of \cmd{Huger}, \cmd{Hugerr}, \cmd{Hugerrr}. Scale factor: 0.123.}
+% {\color{black}Definition of \cmd{Huger}, \cmd{Hugerr}, \cmd{Hugerrr}. Scale factor: 0.123.}
 %    \begin{macrocode}
   \setlength{\@tempdima}{2.611\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -789,28 +965,27 @@
 %    \begin{macrocode}
   \normalsize%
 %    \end{macrocode}
-% The KOMA files do not define \cmd{parindent} and other lengths related to the page dimensions (\cmd{textheight}, \cmd{headheight}, \cmd{headsep}, etc.) Anyway I think that some of these lengths are strictly linked to the font rather than to the page and text dimensions. Particularly \cmd{headheight}, whose value may cause a well known warning if \sty{fancyhdr} is loaded. So we definte the following new
-% lengths:
+% The KOMA files do not define \cmd{parindent} and other lengths related to the page dimensions (\cmd{textheight}, \cmd{headheight}, \cmd{headsep}, etc.) Anyway, I think that some of these lengths are strictly linked to the font rather than to the dimensions of the page and the text, particularly \cmd{headheight}, whose value may cause a well known warning if \sty{fancyhdr} is loaded. So we define the following new lengths:
 % \baddition
 %    \begin{macrocode}
-\setlength\parindent{\f at size pt}%
-\setlength\headheight{\dimexpr(\f at size pt+2pt)}%
+\setlength\parindent{\@tempdimb}%
+\setlength\headheight{\dimexpr(\@tempdimb+2pt)}%
 %    \end{macrocode}
 % \eaddition
-% For these other lengths, all values are calculated proportionally to the main font. I took the \file{bk11.clo} file as a reference point. Note that the differences of these lengths in the files \file{bk10.clo} \file{bk11.clo} and \file{bk12.clo} only affect \cmd{headsep}, \cmd{topskip} and \cmd{footskip}, which are not redefined here.
+% For the following lengths, all values are calculated proportionally to the main font. I took the \file{bk11.clo} file as a reference point. Note that the differences of these lengths in the files \file{bk10.clo} \file{bk11.clo} and \file{bk12.clo} only affect \cmd{headsep}, \cmd{topskip} and \cmd{footskip}, which are not redefined here.
 % \baddition
 %    \begin{macrocode}
-\setlength\smallskipamount{\dimexpr((\f at size pt+1pt)/4) \@plus 1\p@ \@minus 1\p@}%
-\setlength\medskipamount{\dimexpr((\f at size pt+1pt)/2) \@plus 2\p@ \@minus 2\p@}%
-\setlength\bigskipamount{\dimexpr(\f at size pt+1pt) \@plus 4\p@ \@minus 4\p@}%
+\setlength\smallskipamount{\dimexpr((\@tempdimb+1pt)/4) \@plus 1\p@ \@minus 1\p@}%
+\setlength\medskipamount{\dimexpr((\@tempdimb+1pt)/2) \@plus 2\p@ \@minus 2\p@}%
+\setlength\bigskipamount{\dimexpr(\@tempdimb+1pt) \@plus 4\p@ \@minus 4\p@}%
 %    \end{macrocode}
 % \eaddition
 % The following table shows the values of some specific lengths 
-% defined by the pacakge, relative to some significant settings 
-% of the main font and line spacing. The values are exressed in pt 
+% defined by the package, in relation to some significant settings 
+% of the main font and line spacing. The values are expressed in pt 
 % and rounded to the second decimal place.
 % 
-% \begin{small}
+% \begin{footnotesizer}
 % \newcolumntype{Y}{@{}S[table-column-width=1.04cm]}
 % \noindent\begin{tabular}{@{}m{3.7cm}@{\hskip2mm}YYYYYYYYYYY@{\hskip-2mm}}
 % \toprule
@@ -823,7 +998,7 @@
 % \cmd{smallskipamount}\ \hfill$\pm$\SI{1}{pt} &2.75 &2.78 &2.8 &2.82 &2.85 &2.88 &2.9 &2.93 &2.95 &2.98 &3\\  
 % \bottomrule
 % \end{tabular}
-% \end{small}
+% \end{footnotesizer}
 %    \begin{macrocode}
   \setlength{\@tempdimb}{\f at baselineskip}%
   \ctm at setlength{\parsep}%
@@ -955,7 +1130,7 @@
 %
 % \paragraph{Excerpt from \file{scrfontsizes.sty}}
 %
-% Here is a portion of the \sty{scrfontsizes} package. It simply provides the \cmd{generateclofile} command, without the KOMA-related definitions. There are no reserved names for the \file{.clo} files. The command name is a new name for the KOMA \cmd{generatefontfile}. In fact, what the command generates, is a \file{.clo} file.
+% Here is a portion of the \sty{scrfontsizes} package. It simply provides the \cmd{generateclofile} command, without the KOMA-related definitions. There are no reserved names for the \file{.clo} files. The command name is a new name for the KOMA \cmd{generatefontfile}. In fact what the command generates is a \file{.clo} file.
 %    \begin{macrocode} 
 \newcommand*{\generateclofile}[1]{%
  \kernel at ifnextchar [{\@generatefontfile{#1}}{\@@generatefontfile{#1}}%
@@ -964,7 +1139,7 @@
 \def\@generatefontfile#1[#2]#3{%
  \begingroup
 %    \end{macrocode}
-% At least starting with version 3.31 of the \sty{scrfontsizes} package 
+% At least starting from version 3.31 of \sty{scrfontsizes}, 
 % the code of the \cmd{@generatefontfile} and \cmd{@@generatefontfile} 
 % commands sets the \cmd{parskip} value to |0pt|. We also use |[#2]| 
 % in place of |[{#2}]| for the optional argument of \cmd{changefontsize}
@@ -992,7 +1167,7 @@
   \@percentchar\space This is file `#1#2.clo', generated with^^J%
 %    \end{macrocode}
 % In the next three lines we only replace `scrfontsizes' with `fontsize'
-% and `Markus Kohm' with `Ivan Valbusa', in order to get the correc informations
+% and `Markus Kohm' with `Ivan Valbusa', in order to get the correct information
 % in the .log file.
 %    \begin{macrocode}  
   \@percentchar\space fontsize
@@ -1103,25 +1278,142 @@
 % written in the .clo file if the \cmd{generateclofile} command is used. 
 % \baddition
 %    \begin{macrocode}
+ \begingroup\tinyr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyr{%
+  \string\@setfontsize\string\tinyr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\tinyrr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyrr{%
+  \string\@setfontsize\string\tinyrr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\tinyrrr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyrrr{%
+  \string\@setfontsize\string\tinyrrr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+ \endgroup
+ \begingroup\scriptsizer
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizer{%
+   \string\@setfontsize\string\scriptsizer{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+ \endgroup
+ \begingroup\scriptsizerr
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizerr{%
+   \string\@setfontsize\string\scriptsizerr{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+\endgroup
+ \begingroup\scriptsizerrr
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizerrr{%
+   \string\@setfontsize\string\scriptsizerrr{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+ \endgroup
+%    \end{macrocode}
+% 
+%    \begin{macrocode}
+\def\fs at appnormal{
+ \@percentchar^^J%
+ \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
+ \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
+ \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
+ \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
+ \@ind\string\let\string\@listi\string\@listI^^J%
+}
+\def\fs at appsmall{%
+ \@percentchar^^J%
+ \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
+ \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
+ \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
+ \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
+ \@ind\string\def\string\@listi{\@percentchar^^J%
+  \@ind\@ind\string\leftmargin\string\leftmargini^^J%
+  \@ind\@ind\string\topsep \the\topsep^^J%
+  \@ind\@ind\string\parsep \the\parsep^^J%
+  \@ind\@ind\string\itemsep \string\parsep^^J%
+  \@ind}\@percentchar^^J%
+}
+ \begingroup\smallr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallr{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\smallrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallrr{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\smallrrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallrrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallrrr{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizer\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizer{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizer{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizerr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizerr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizerr{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizerrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizerrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizerrr{\f at size}{\f at baselineskip}%  
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
  \begingroup\normalsizer
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizer{%
-     \string\@setfontsize\string\normalsizer{\f at size}{\f at baselineskip}%
+ \string\def\string\normalsizer{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizer{\f at size}{\f at baselineskip}%
+  \fs at appnormal% 
    }\@percentchar%
  }%
  \endgroup
  \begingroup\normalsizerr
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizerr{%
-     \string\@setfontsize\string\normalsizerr{\f at size}{\f at baselineskip}%
-   }\@percentchar%
+  \string\def\string\normalsizerr{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizerr{\f at size}{\f at baselineskip}%
+   \fs at appnormal% 
+  }\@percentchar%
  }%
  \endgroup
  \begingroup\normalsizerrr
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizerrr{%
-     \string\@setfontsize\string\normalsizerrr{\f at size}{\f at baselineskip}%
-   }\@percentchar%
+ \string\def\string\normalsizerrr{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizerrr{\f at size}{\f at baselineskip}%
+   \fs at appnormal% 
+  }\@percentchar%
  }%
  \endgroup
  \begingroup\larger
@@ -1172,6 +1464,7 @@
      \string\@setfontsize\string\Largerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\LARGEr
  \immediate\write\@fontfile{%
    \string\def\string\LARGEr{%
@@ -1192,6 +1485,7 @@
      \string\@setfontsize\string\LARGErrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\huger
  \immediate\write\@fontfile{%
    \string\def\string\huger{%
@@ -1212,6 +1506,7 @@
      \string\@setfontsize\string\hugerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\Huger
  \immediate\write\@fontfile{%
    \string\def\string\Huger{%
@@ -1232,6 +1527,7 @@
      \string\@setfontsize\string\Hugerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
 %    \end{macrocode} 
 % \eaddition
 %    \begin{macrocode}
@@ -1392,45 +1688,60 @@
 \@onlypreamble\generateclofile
 %    \end{macrocode}
 % We will now define some internal commands to test the package functions.
+% Since version 0.6 I have been using the \LaTeX 3 solution provided by 
+% Enrico Gregorio in place of the previous macros based on \sty{etoolbox}.
 % \baddition
 %    \begin{macrocode}
 \ExplSyntaxOn
 
-\NewExpandableDocumentCommand{\getlength}{O{5}m}
+\NewDocumentCommand{\printsamples}
 {
-  \fp_eval:n { round(#2,#1) }
+ m
+ m
+ O{tiny,tinyr,tinyrr,tinyrrr,
+   scriptsize,scriptsizer,scriptsizerr,scriptsizerrr,
+   footnotesize,footnotesizer,footnotesizerr,footnotesizerrr,
+   small,smallr,smallrr,smallrrr,
+   normalsize,normalsizer,normalsizerr,normalsizerrr,
+   large,larger,largerr,largerrr,
+   Large,Larger,Largerr,Largerrr,
+   LARGE,LARGEr,LARGErr,LARGErrr,
+   huge,huger,hugerr,hugerrr,
+   Huge,Huger,Hugerr,Hugerrr}
 }
+{
+ \fontsize_printsamples:nnn { #1 } { #2 } { #3 }
+}
 
-\ExplSyntaxOff
-\def\fontsize at lipsum{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 be shown, reason would
-  be made to contradict.}
-\chardef\fsbslash=`\\
-% Thanks to @Werner (https://tex.stackexchange.com/a/87423/231952)
-\newcommand{\sizesamples}[1]{%
-  \def\nextitem{\par}% Separator
-  \renewcommand*{\do}[1]{\nextitem\bgroup\csname##1\endcsname
-    \noindent{\csname ##1\endcsname \texttt{\fsbslash ##1}: 
-      \getlength[2]{\f at size}\,pt on \getlength[2]{\the\baselineskip}\,pt.} \fontsize at lipsum\par\egroup
-  }% How to process each item
-  \docsvlist{#1}% Process list
+% helper function to print the rounded sizes
+\cs_new:Nn \__fontsize_round_f:n
+{
+ \fp_eval:n { round(\use:c{f@#1},1) } pt
 }
-\NewDocumentCommand \printsamples { m m O{
-  normalsize,normalsizer,normalsizerr,normalsizerrr,
-  large,larger,largerr,largerrr,
-  Large,Larger,Largerr,Largerrr,
-  LARGE,LARGEr,LARGErr,LARGErrr,
-  huge,huger,hugerr,hugerrr,
-  Huge,Huger,Hugerr,Hugerrr} } 
+
+% the main function
+\cs_new_protected:Nn \fontsize_printsamples:nnn
 {
- \changefontsize[#1]{#2}
- \subsubsection*{Text samples for #2 on #1}
- \sizesamples{#3} 
+ % group to bound the font changes
+ \group_begin:
+ % set the size
+ \changefontsize[#1]{#2}\selectfont
+ % header
+ \subsubsection*{Text~samples~for~#2~on~#1}
+ % map through the desired sizes
+ \clist_map_inline:nn { #3 }
+ {
+  \use:c{##1}                         % set the font size
+  \noindent\texttt{\symbol{92}##1}:~  % print the font size command
+  \__fontsize_round_f:n {size}~           % print the size in points
+  \__fontsize_round_f:n {baselineskip}.~  % print the baseline skip in points
+  \kant[1][1-3]                       % sample text
+  \par\addvspace{\medskipamount}      % finish up
+ }
+ % close the group
+ \group_end:
 }
+\ExplSyntaxOff
 %    \end{macrocode}
 % \eaddition
 % \iffalse

Modified: trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty	2021-02-06 22:32:17 UTC (rev 57647)
+++ trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty	2021-02-06 22:32:42 UTC (rev 57648)
@@ -26,10 +26,10 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
 \ProvidesPackage{fontsize}
-  [2021/01/31 v0.5 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+  [2021/02/06 v0.6 'fontsize' package. Set main font sizes (Ivan Valbusa)]
 \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
 \@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}}
-\DeclareOptionX{cloname}[custom]{\def\@fontsizefilebase{#1}}
+\DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}}
 \DeclareOptionX{fontsize}[10]{%
   \expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil
   \edef\@tempa{#1}%
@@ -191,23 +191,136 @@
     \noexpand\@setfontsize\noexpand\Huge
     {\the\@tempdima}{\the\@tempdimb}%
   }%
+ \def\fontsize at pre{%
+  \ctm at setlength{\abovedisplayskip}%
+  {.8333\@tempdimb}{.1667\@tempdimb}{.5\@tempdimb}%
+  \ctm at setlength{\abovedisplayshortskip}{\z@}{.25\@tempdimb}{\z@}%
+  \ctm at setlength{\belowdisplayshortskip}%
+  {.5\@tempdimb}{.25\@tempdimb}{.25\@tempdimb}%
+  \setlength{\belowdisplayskip}{\abovedisplayskip}%
+ }
+ \def\fontsize at app{%
+  \abovedisplayskip \the\abovedisplayskip
+  \abovedisplayshortskip \the\abovedisplayshortskip
+  \belowdisplayskip \the\belowdisplayskip
+  \belowdisplayshortskip \the\belowdisplayshortskip
+ }
+ \setlength{\@tempdima}{0.934375\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallr{%
+  \noexpand\@setfontsize\noexpand\smallr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+ \setlength{\@tempdima}{0.95625\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallrr{%
+  \noexpand\@setfontsize\noexpand\smallrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+ \setlength{\@tempdima}{0.978125\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\smallrrr{%
+  \noexpand\@setfontsize\noexpand\smallrrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at small
+ }%
+ \setlength{\@tempdima}{0.85313\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizer{%
+  \noexpand\@setfontsize\noexpand\footnotesizer
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+ \setlength{\@tempdima}{0.87292\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizerr{%
+  \noexpand\@setfontsize\noexpand\footnotesizerr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+ \setlength{\@tempdima}{0.89271\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \fontsize at pre
+ \edef\footnotesizerrr{%
+  \noexpand\@setfontsize\noexpand\footnotesizerrr
+  {\the\@tempdima}{\the\@tempdimb}%
+  \fontsize at app
+  \let\noexpand\@listi\noexpand\@listi at footnotesize
+ }%
+ \setlength{\@tempdima}{0.7083375\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizer{%
+  \noexpand\@setfontsize\noexpand\scriptsizer
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.750005\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizerr{%
+  \noexpand\@setfontsize\noexpand\scriptsizerr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.7916725\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\scriptsizerrr{%
+  \noexpand\@setfontsize\noexpand\scriptsizerrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.5416675\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyr{%
+  \noexpand\@setfontsize\noexpand\tinyr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.583335\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyrr{%
+  \noexpand\@setfontsize\noexpand\tinyrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
+ \setlength{\@tempdima}{0.6250025\@tempdimc}%
+ \setlength{\@tempdimb}{\@tempb\@tempdima}%
+ \edef\tinyrrr{%
+  \noexpand\@setfontsize\noexpand\tinyrrr
+  {\the\@tempdima}{\the\@tempdimb}%
+ }%
   \setlength{\@tempdima}{1.05\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
+   \fontsize at pre
   \edef\normalsizer{%
     \noexpand\@setfontsize\noexpand\normalsizer
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
   \setlength{\@tempdima}{1.1\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
+   \fontsize at pre
   \edef\normalsizerr{%
     \noexpand\@setfontsize\noexpand\normalsizerr
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
   \setlength{\@tempdima}{1.15\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
   \edef\normalsizerrr{%
+   \fontsize at pre
     \noexpand\@setfontsize\noexpand\normalsizerrr
     {\the\@tempdima}{\the\@tempdimb}%
+   \fontsize at app
+   \let\noexpand\@listi\noexpand\@listI
   }%
   \setlength{\@tempdima}{1.26\@tempdimc}%
   \setlength{\@tempdimb}{\@tempb\@tempdima}%
@@ -300,11 +413,11 @@
     {\the\@tempdima}{\the\@tempdimb}%
   }%
   \normalsize%
-\setlength\parindent{\f at size pt}%
-\setlength\headheight{\dimexpr(\f at size pt+2pt)}%
-\setlength\smallskipamount{\dimexpr((\f at size pt+1pt)/4) \@plus 1\p@ \@minus 1\p@}%
-\setlength\medskipamount{\dimexpr((\f at size pt+1pt)/2) \@plus 2\p@ \@minus 2\p@}%
-\setlength\bigskipamount{\dimexpr(\f at size pt+1pt) \@plus 4\p@ \@minus 4\p@}%
+\setlength\parindent{\@tempdimb}%
+\setlength\headheight{\dimexpr(\@tempdimb+2pt)}%
+\setlength\smallskipamount{\dimexpr((\@tempdimb+1pt)/4) \@plus 1\p@ \@minus 1\p@}%
+\setlength\medskipamount{\dimexpr((\@tempdimb+1pt)/2) \@plus 2\p@ \@minus 2\p@}%
+\setlength\bigskipamount{\dimexpr(\@tempdimb+1pt) \@plus 4\p@ \@minus 4\p@}%
   \setlength{\@tempdimb}{\f at baselineskip}%
   \ctm at setlength{\parsep}%
   {.3333\@tempdimb}{.1667\@tempdimb}{.0833\@tempdimb}%
@@ -560,25 +673,139 @@
   }\@percentchar%
  }%
  \endgroup
+ \begingroup\tinyr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyr{%
+  \string\@setfontsize\string\tinyr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\tinyrr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyrr{%
+  \string\@setfontsize\string\tinyrr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\tinyrrr
+\immediate\write\@fontfile{%
+ \string\def\string\tinyrrr{%
+  \string\@setfontsize\string\tinyrrr{\f at size}{\f at baselineskip}%
+ }\@percentchar%
+}%
+ \endgroup
+ \begingroup\scriptsizer
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizer{%
+   \string\@setfontsize\string\scriptsizer{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+ \endgroup
+ \begingroup\scriptsizerr
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizerr{%
+   \string\@setfontsize\string\scriptsizerr{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+\endgroup
+ \begingroup\scriptsizerrr
+ \immediate\write\@fontfile{%
+  \string\def\string\scriptsizerrr{%
+   \string\@setfontsize\string\scriptsizerrr{\f at size}{\f at baselineskip}%
+  }\@percentchar%
+ }%
+ \endgroup
+\def\fs at appnormal{
+ \@percentchar^^J%
+ \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
+ \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
+ \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
+ \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
+ \@ind\string\let\string\@listi\string\@listI^^J%
+}
+\def\fs at appsmall{%
+ \@percentchar^^J%
+ \@ind\string\abovedisplayskip\space \the\abovedisplayskip^^J%
+ \@ind\string\abovedisplayshortskip\space \the\abovedisplayshortskip^^J%
+ \@ind\string\belowdisplayskip\space \the\belowdisplayskip^^J%
+ \@ind\string\belowdisplayshortskip\space \the\belowdisplayshortskip^^J%
+ \@ind\string\def\string\@listi{\@percentchar^^J%
+  \@ind\@ind\string\leftmargin\string\leftmargini^^J%
+  \@ind\@ind\string\topsep \the\topsep^^J%
+  \@ind\@ind\string\parsep \the\parsep^^J%
+  \@ind\@ind\string\itemsep \string\parsep^^J%
+  \@ind}\@percentchar^^J%
+}
+ \begingroup\smallr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallr{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\smallrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallrr{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\smallrrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\smallrrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\smallrrr{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizer\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizer{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizer{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizerr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizerr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizerr{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
+\begingroup\footnotesizerrr\@listi
+\immediate\write\@fontfile{%
+ \string\def\string\footnotesizerrr{\@percentchar^^J%
+  \@ind\string\@setfontsize\string\footnotesizerrr{\f at size}{\f at baselineskip}%
+  \fs at appsmall%
+ }\@percentchar%
+}%
+\endgroup
  \begingroup\normalsizer
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizer{%
-     \string\@setfontsize\string\normalsizer{\f at size}{\f at baselineskip}%
+ \string\def\string\normalsizer{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizer{\f at size}{\f at baselineskip}%
+  \fs at appnormal%
    }\@percentchar%
  }%
  \endgroup
  \begingroup\normalsizerr
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizerr{%
-     \string\@setfontsize\string\normalsizerr{\f at size}{\f at baselineskip}%
-   }\@percentchar%
+  \string\def\string\normalsizerr{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizerr{\f at size}{\f at baselineskip}%
+   \fs at appnormal%
+  }\@percentchar%
  }%
  \endgroup
  \begingroup\normalsizerrr
  \immediate\write\@fontfile{%
-   \string\def\string\normalsizerrr{%
-     \string\@setfontsize\string\normalsizerrr{\f at size}{\f at baselineskip}%
-   }\@percentchar%
+ \string\def\string\normalsizerrr{\@percentchar^^J%
+   \@ind\string\@setfontsize\string\normalsizerrr{\f at size}{\f at baselineskip}%
+   \fs at appnormal%
+  }\@percentchar%
  }%
  \endgroup
  \begingroup\larger
@@ -629,6 +856,7 @@
      \string\@setfontsize\string\Largerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\LARGEr
  \immediate\write\@fontfile{%
    \string\def\string\LARGEr{%
@@ -649,6 +877,7 @@
      \string\@setfontsize\string\LARGErrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\huger
  \immediate\write\@fontfile{%
    \string\def\string\huger{%
@@ -669,6 +898,7 @@
      \string\@setfontsize\string\hugerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \begingroup\Huger
  \immediate\write\@fontfile{%
    \string\def\string\Huger{%
@@ -689,6 +919,7 @@
      \string\@setfontsize\string\Hugerrr{\f at size}{\f at baselineskip}%
    }\@percentchar%
  }%
+\endgroup
  \immediate\write\@fontfile{\string\normalsize}%
 \begingroup
 \immediate\write\@fontfile{%
@@ -838,40 +1069,52 @@
 \@onlypreamble\generateclofile
 \ExplSyntaxOn
 
-\NewExpandableDocumentCommand{\getlength}{O{5}m}
+\NewDocumentCommand{\printsamples}
 {
-  \fp_eval:n { round(#2,#1) }
+ m
+ m
+ O{tiny,tinyr,tinyrr,tinyrrr,
+   scriptsize,scriptsizer,scriptsizerr,scriptsizerrr,
+   footnotesize,footnotesizer,footnotesizerr,footnotesizerrr,
+   small,smallr,smallrr,smallrrr,
+   normalsize,normalsizer,normalsizerr,normalsizerrr,
+   large,larger,largerr,largerrr,
+   Large,Larger,Largerr,Largerrr,
+   LARGE,LARGEr,LARGErr,LARGErrr,
+   huge,huger,hugerr,hugerrr,
+   Huge,Huger,Hugerr,Hugerrr}
 }
+{
+ \fontsize_printsamples:nnn { #1 } { #2 } { #3 }
+}
 
-\ExplSyntaxOff
-\def\fontsize at lipsum{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 be shown, reason would
-  be made to contradict.}
-\chardef\fsbslash=`\\
-\newcommand{\sizesamples}[1]{%
-  \def\nextitem{\par}% Separator
-  \renewcommand*{\do}[1]{\nextitem\bgroup\csname##1\endcsname
-    \noindent{\csname ##1\endcsname \texttt{\fsbslash ##1}:
-      \getlength[2]{\f at size}\,pt on \getlength[2]{\the\baselineskip}\,pt.} \fontsize at lipsum\par\egroup
-  }% How to process each item
-  \docsvlist{#1}% Process list
+\cs_new:Nn \__fontsize_round_f:n
+{
+ \fp_eval:n { round(\use:c{f@#1},1) } pt
 }
-\NewDocumentCommand \printsamples { m m O{
-  normalsize,normalsizer,normalsizerr,normalsizerrr,
-  large,larger,largerr,largerrr,
-  Large,Larger,Largerr,Largerrr,
-  LARGE,LARGEr,LARGErr,LARGErrr,
-  huge,huger,hugerr,hugerrr,
-  Huge,Huger,Hugerr,Hugerrr} }
+
+\cs_new_protected:Nn \fontsize_printsamples:nnn
 {
- \changefontsize[#1]{#2}
- \subsubsection*{Text samples for #2 on #1}
- \sizesamples{#3}
+ % group to bound the font changes
+ \group_begin:
+ % set the size
+ \changefontsize[#1]{#2}\selectfont
+ % header
+ \subsubsection*{Text~samples~for~#2~on~#1}
+ % map through the desired sizes
+ \clist_map_inline:nn { #3 }
+ {
+  \use:c{##1}                         % set the font size
+  \noindent\texttt{\symbol{92}##1}:~  % print the font size command
+  \__fontsize_round_f:n {size}~           % print the size in points
+  \__fontsize_round_f:n {baselineskip}.~  % print the baseline skip in points
+  \kant[1][1-3]                       % sample text
+  \par\addvspace{\medskipamount}      % finish up
+ }
+ % close the group
+ \group_end:
 }
+\ExplSyntaxOff
 \endinput
 %%
 %% End of file `fontsize.sty'.



More information about the tex-live-commits mailing list.