diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-31 21:35:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-31 21:35:43 +0000 |
commit | 8eb2f29b3002e7813205145304a311d3354cbb74 (patch) | |
tree | 261ad6bd1c00384d65ef5583d567818e76b248c2 /Master | |
parent | bec0946e87427c37bef90f3fb27626d1bb294909 (diff) |
fontsize (31jan21)
git-svn-id: svn://tug.org/texlive/trunk@57579 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/fontsize/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fontsize/fontsize.pdf | bin | 287477 -> 296971 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fontsize/fontsize.dtx | 399 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fontsize/fontsize.sty | 270 |
4 files changed, 622 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/latex/fontsize/README b/Master/texmf-dist/doc/latex/fontsize/README index 44a32291f16..4627a651404 100644 --- a/Master/texmf-dist/doc/latex/fontsize/README +++ b/Master/texmf-dist/doc/latex/fontsize/README @@ -1,7 +1,7 @@ ----------------------------------------------------------------------- The 'fontsize' package for LaTeX Author: Ivan Valbusa - ivan dot valbusa at univr dot it + ivan dot valbusa at gmail dot com This work has the LPPL maintenance status "author-maintained". This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf b/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf Binary files differindex b5fe2ea30ad..742ff73fe38 100644 --- a/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf +++ b/Master/texmf-dist/doc/latex/fontsize/fontsize.pdf diff --git a/Master/texmf-dist/source/latex/fontsize/fontsize.dtx b/Master/texmf-dist/source/latex/fontsize/fontsize.dtx index 6bebf8241bd..3d3d31f92f9 100644 --- a/Master/texmf-dist/source/latex/fontsize/fontsize.dtx +++ b/Master/texmf-dist/source/latex/fontsize/fontsize.dtx @@ -56,7 +56,7 @@ This work has the LPPL maintenance status "author-maintained". %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesPackage{fontsize} %<*package> - [2021/01/25 v0.4 'fontsize' package. Set main font sizes (Ivan Valbusa)] + [2021/01/31 v0.5 'fontsize' package. Set main font sizes (Ivan Valbusa)] %</package> %<*driver> \documentclass[12pt]{ltxdoc} @@ -64,6 +64,7 @@ This work has the LPPL maintenance status "author-maintained". \usepackage[utf8]{inputenc} \usepackage[fontsize=12pt]{fontsize} \usepackage{array,booktabs,siunitx} +\usepackage{multicol} %-------------------------------------------------------- % GRAPHICS %-------------------------------------------------------- @@ -95,6 +96,7 @@ This work has the LPPL maintenance status "author-maintained". \usepackage[cochineal,bigdelims,cmintegrals,vvarbb]{newtxmath} \usepackage[cal=boondoxo]{mathalfa} \usepackage{manfnt} +\usepackage{lettrine} %-------------------------------------------------------- % LAYOUT %-------------------------------------------------------- @@ -130,6 +132,14 @@ This work has the LPPL maintenance status "author-maintained". \DeclareRobustCommand*{\arm}[1]{\ar{\meta{\argstyle#1}}} \DeclareRobustCommand*{\oarm}[1]{\oar{\meta{\argstyle#1}}} \newcommand*{\OR}{${}\mid{}$} +\makeatletter +\newlength\CLett +\newcommand*\alert{ + \par\noindent + \setbox\z@\hbox{\textdbend}\CLett=\wd\z@% + \raisebox{-1.05\baselineskip}[0pt][0pt]{% + \llap{\box\z@\kern6pt}}} +\makeatother % % New environments % @@ -138,11 +148,9 @@ This work has the LPPL maintenance status "author-maintained". \newenvironment{latexcode}{\begin{mdframed}}{\end{mdframed}} \makeatletter % Customizing option and value list: -\patchcmd{\optionlist}{\marglistwidth}{0pt}{}{} -\patchcmd{\optionlist}{\hss}{\phantom{\rule{1pt}{20pt}}\hss}{}{} -\patchcmd{\ltd@option@i}{\linewidth}{\linewidth-\marglistwidth}{}{} \patchcmd{\ltxsyntax}{\marglistwidth}{0pt}{}{} \patchcmd{\ltd@option@i}{=}{\ = }{}{} +\patchcmd{\ltd@option@ii}{=}{\ = }{}{} % New color for items \renewcommand*{\optionlistfont}{% \color{philA}\sffamily\displayverbfont} @@ -191,7 +199,7 @@ This work has the LPPL maintenance status "author-maintained". %</driver> % \fi % -% \CheckSum{1731} +% \CheckSum{2372} % % \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 @@ -210,6 +218,7 @@ This work has the LPPL maintenance status "author-maintained". % 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.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.} @@ -325,7 +334,7 @@ This work has the LPPL maintenance status "author-maintained". %^^A--------------------------------------------------------------------- % \section{Usage} %^^A--------------------------------------------------------------------- -% \enlargethispage{\baselineskip} +% \enlargethispage{\baselineskip} % % The package can be loaded, as usual, with: % \begin{ttquote} @@ -339,7 +348,7 @@ This work has the LPPL maintenance status "author-maintained". % \subsection{Options} %^^A--------------------------------------------------------------------- % -% \begin{optionlist} +% \begin{optionlist*} % % \optitem[10pt]{fontsize}{\meta{fontsize}} % @@ -353,11 +362,11 @@ This work has the LPPL maintenance status "author-maintained". % command (see below). % % \optitem[custom]{cloname}{\meta{name}} -% +% % Sets to \meta{name} the name prefix of the \file{.clo} file generated -% by the \cmd{generateclofile} command (see below). +% by \cmd{generateclofile} (see below). % -% \end{optionlist} +% \end{optionlist*} % %^^A--------------------------------------------------------------------- % \subsection{Commands} @@ -373,7 +382,12 @@ This work has the LPPL maintenance status "author-maintained". % 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: \verb|\changefontsize[13.5pt]{11.5pt}|. +% For example: +%\begin{latexcode} +%\begin{verbatim} +%\changefontsize[13.5pt]{11.5pt} +%\end{verbatim} +%\end{latexcode} % % \cmditem{generateclofile}{name}[baselineskip]{fontsize} \hfill iff \meta{baselineskip} $\geq$\meta{fontsize} % @@ -385,39 +399,54 @@ This work has the LPPL maintenance status "author-maintained". % 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}} -% the generated file will be automatically used to setup the main font sizes. +% the generated file will be automatically used to setup the main sizes. % -% \begin{tabular}{@{}m{0.05\textwidth}@{}m{0.95\textwidth}@{}} -% \raisebox{1.475\height}{\dbend} & -% \emph{In fact the \file{.clo} file is only needed if you intend to modify it. +% \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} -% \end{tabular} % -% \begin{ttquote}\small -% \cmd{usepackage}|[fontsize=11.5pt]{fontsize}| |% loads custom11.5pt.clo|\\ -% \cmd{generateclofile}|{custom}[13.5pt]{11.5pt}| |% generates custom11.5pt.clo| -% -% \cmd{usepackage}|[fontsize=11.5pt,cloname=fs]{fontsize}| |% loads fs11.5pt.clo| \\ -% \cmd{generateclofile}|{fs}[13.5pt]{11.5pt}| |% generates fs11.5pt.clo| -% \end{ttquote} +%\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 +%\end{verbatim} +%\end{latexcode} % -% \cmditem{printfontsize}[baselineskip]{fontsize} \hfill iff \meta{baselineskip} $\geq$\meta{fontsize} +% \cmditem{printsamples}{baselineskip}{fontsize}[sizes] \hfill iff \meta{baselineskip} $\geq$\meta{fontsize} % % A command thought to test the \sty{fontsize} settings. -% It prints a text sample for every sizing commands, showing the -% value of the normal size and line spacing. -% The section \ref{sec:example} below is generated by this command. +% 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. +% +%\begin{latexcode} +%\begin{verbatim} +%\printsamples{13pt}{11pt}[normalsizer,normalsizerr,normalsizerrr] +%\printsamples{13.5pt}{12pt} +%\end{verbatim} +%\end{latexcode} % % \end{ltxsyntax} +%^^A--------------------------------------------------------------------- +% \section{New sizing commands}\label{sec:sizingcmd} +%^^A-------------------------------------------------------------------- +% The packages provides three variants for each size bigger then \cmd{normalsize}: % +%\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}\\ +%\end{tabular} %^^A--------------------------------------------------------------------- -% \section{An example of font settings}\label{sec:example} +% \section{Some text samples}\label{sec:example} +% %^^A-------------------------------------------------------------------- % -% This section shows the values of the standard font sizing commands corresponding to \cmd{changefontsize}\texttt{[13]\{11\}}, which sets the normal size and line spacing, respectively, to 11\,pt and 13\,pt. The other sizes are scaled proportionally. -% -% \printfontsize[13]{11} +% Below you can see some text samples scaled proportionally +% 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] % % \nocite{xkeyval,etoolbox} % @@ -431,8 +460,9 @@ This work has the LPPL maintenance status "author-maintained". %^^A--------------------------------------------------------------------- % \section{The Code} %^^A--------------------------------------------------------------------- -%\textcolor{DarkBlue}{The parts added to the basic structure of \file{scrextend} and \file{scrfontsizes} are highlighted in blue.} -% All the options of the package are defined via \sty{xkeyval}, while \sty{etoolbox} +%\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. % % \baddition @@ -475,6 +505,7 @@ This work has the LPPL maintenance status "author-maintained". \noexpand\changefontsize{#1}% }% }% + \noexpand\catcode`\noexpand\@=\the\catcode`\@ }% \expandafter\AtEndOfPackage\expandafter{\@tempa}% } @@ -621,6 +652,141 @@ This work has the LPPL maintenance status "author-maintained". \noexpand\@setfontsize\noexpand\Huge {\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}: +% \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} + \setlength{\@tempdima}{1.05\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizer{% + \noexpand\@setfontsize\noexpand\normalsizer + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.1\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizerr{% + \noexpand\@setfontsize\noexpand\normalsizerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.15\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizerrr{% + \noexpand\@setfontsize\noexpand\normalsizerrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \paragraph{\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}% + \edef\larger{% + \noexpand\@setfontsize\noexpand\larger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.32\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\largerr{% + \noexpand\@setfontsize\noexpand\largerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.38\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\largerrr{% + \noexpand\@setfontsize\noexpand\largerrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \paragraph{\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}% + \edef\Larger{% + \noexpand\@setfontsize\noexpand\Larger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.584\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Largerr{% + \noexpand\@setfontsize\noexpand\Largerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.656\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Largerrr{% + \noexpand\@setfontsize\noexpand\Largerrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \paragraph{\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}% + \edef\LARGEr{% + \noexpand\@setfontsize\noexpand\LARGEr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.901\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGErr{% + \noexpand\@setfontsize\noexpand\LARGErr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.9875\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGErrr{% + \noexpand\@setfontsize\noexpand\LARGErrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \paragraph{\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}% + \edef\huger{% + \noexpand\@setfontsize\noexpand\huger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.281\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\hugerr{% + \noexpand\@setfontsize\noexpand\hugerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.3845\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\hugerrr{% + \noexpand\@setfontsize\noexpand\hugerrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \paragraph{\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}% + \edef\Huger{% + \noexpand\@setfontsize\noexpand\Huger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.734\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Hugerr{% + \noexpand\@setfontsize\noexpand\Hugerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.857\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Hugerrr{% + \noexpand\@setfontsize\noexpand\Hugerrr + {\the\@tempdima}{\the\@tempdimb}% + }% +% \end{macrocode} +% \eaddition +% \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 @@ -932,6 +1098,143 @@ This work has the LPPL maintenance status "author-maintained". }\@percentchar% }% \endgroup +% \end{macrocode} +% The new sizing commands previously defined are recalled here and +% written in the .clo file if the \cmd{generateclofile} command is used. +% \baddition +% \begin{macrocode} + \begingroup\normalsizer + \immediate\write\@fontfile{% + \string\def\string\normalsizer{% + \string\@setfontsize\string\normalsizer{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\normalsizerr + \immediate\write\@fontfile{% + \string\def\string\normalsizerr{% + \string\@setfontsize\string\normalsizerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\normalsizerrr + \immediate\write\@fontfile{% + \string\def\string\normalsizerrr{% + \string\@setfontsize\string\normalsizerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\larger + \immediate\write\@fontfile{% + \string\def\string\larger{% + \string\@setfontsize\string\larger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\largerr + \immediate\write\@fontfile{% + \string\def\string\largerr{% + \string\@setfontsize\string\largerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\largerrr + \immediate\write\@fontfile{% + \string\def\string\largerrr{% + \string\@setfontsize\string\largerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Large + \immediate\write\@fontfile{% + \string\def\string\Large{% + \string\@setfontsize\string\Large{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Larger + \immediate\write\@fontfile{% + \string\def\string\Larger{% + \string\@setfontsize\string\Larger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Largerr + \immediate\write\@fontfile{% + \string\def\string\Largerr{% + \string\@setfontsize\string\Largerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Largerrr + \immediate\write\@fontfile{% + \string\def\string\Largerrr{% + \string\@setfontsize\string\Largerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\LARGEr + \immediate\write\@fontfile{% + \string\def\string\LARGEr{% + \string\@setfontsize\string\LARGEr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\LARGErr + \immediate\write\@fontfile{% + \string\def\string\LARGErr{% + \string\@setfontsize\string\LARGErr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\LARGErrr + \immediate\write\@fontfile{% + \string\def\string\LARGErrr{% + \string\@setfontsize\string\LARGErrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\huger + \immediate\write\@fontfile{% + \string\def\string\huger{% + \string\@setfontsize\string\huger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\hugerr + \immediate\write\@fontfile{% + \string\def\string\hugerr{% + \string\@setfontsize\string\hugerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\hugerrr + \immediate\write\@fontfile{% + \string\def\string\hugerrr{% + \string\@setfontsize\string\hugerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\Huger + \immediate\write\@fontfile{% + \string\def\string\Huger{% + \string\@setfontsize\string\Huger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Hugerr + \immediate\write\@fontfile{% + \string\def\string\Hugerr{% + \string\@setfontsize\string\Hugerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Hugerrr + \immediate\write\@fontfile{% + \string\def\string\Hugerrr{% + \string\@setfontsize\string\Hugerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% +% \end{macrocode} +% \eaddition +% \begin{macrocode} \immediate\write\@fontfile{\string\normalsize}% % \end{macrocode} % The new lengths previously defined are recalled here and written in the .clo file @@ -1091,27 +1394,43 @@ This work has the LPPL maintenance status "author-maintained". % We will now define some internal commands to test the package functions. % \baddition % \begin{macrocode} +\ExplSyntaxOn + +\NewExpandableDocumentCommand{\getlength}{O{5}m} +{ + \fp_eval:n { round(#2,#1) } +} + +\ExplSyntaxOff \def\fontsize@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 - thereby be made to contradict.} + 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\textbf{\csname ##1\endcsname \texttt{\fsbslash ##1}: - \f@size pt on \the\baselineskip} \fontsize@lipsum\par\egroup + \noindent{\csname ##1\endcsname \texttt{\fsbslash ##1}: + \getlength[2]{\f@size}\,pt on \getlength[2]{\the\baselineskip}\,pt.} \fontsize@lipsum\par\egroup }% How to process each item \docsvlist{#1}% Process list } -\newcommand{\printfontsize}[2][]{% - \changefontsize[#1]{#2} - \sizesamples{tiny,scriptsize,footnotesize,small, - normalsize,large,Large,LARGE,huge,Huge}} +\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} } +{ + \changefontsize[#1]{#2} + \subsubsection*{Text samples for #2 on #1} + \sizesamples{#3} +} % \end{macrocode} % \eaddition % \iffalse diff --git a/Master/texmf-dist/tex/latex/fontsize/fontsize.sty b/Master/texmf-dist/tex/latex/fontsize/fontsize.sty index c52bb589082..c87b7ad2a00 100644 --- a/Master/texmf-dist/tex/latex/fontsize/fontsize.sty +++ b/Master/texmf-dist/tex/latex/fontsize/fontsize.sty @@ -26,7 +26,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{fontsize} - [2021/01/25 v0.4 'fontsize' package. Set main font sizes (Ivan Valbusa)] + [2021/01/31 v0.5 'fontsize' package. Set main font sizes (Ivan Valbusa)] \@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}} \@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}} \DeclareOptionX{cloname}[custom]{\def\@fontsizefilebase{#1}} @@ -52,6 +52,7 @@ \noexpand\changefontsize{#1}% }% }% + \noexpand\catcode`\noexpand\@=\the\catcode`\@ }% \expandafter\AtEndOfPackage\expandafter{\@tempa}% } @@ -190,6 +191,114 @@ \noexpand\@setfontsize\noexpand\Huge {\the\@tempdima}{\the\@tempdimb}% }% + \setlength{\@tempdima}{1.05\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizer{% + \noexpand\@setfontsize\noexpand\normalsizer + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.1\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizerr{% + \noexpand\@setfontsize\noexpand\normalsizerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.15\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\normalsizerrr{% + \noexpand\@setfontsize\noexpand\normalsizerrr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.26\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\larger{% + \noexpand\@setfontsize\noexpand\larger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.32\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\largerr{% + \noexpand\@setfontsize\noexpand\largerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.38\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\largerrr{% + \noexpand\@setfontsize\noexpand\largerrr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.512\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Larger{% + \noexpand\@setfontsize\noexpand\Larger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.584\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Largerr{% + \noexpand\@setfontsize\noexpand\Largerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.656\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Largerrr{% + \noexpand\@setfontsize\noexpand\Largerrr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.8145\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGEr{% + \noexpand\@setfontsize\noexpand\LARGEr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.901\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGErr{% + \noexpand\@setfontsize\noexpand\LARGErr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{1.9875\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\LARGErrr{% + \noexpand\@setfontsize\noexpand\LARGErrr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.1775\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\huger{% + \noexpand\@setfontsize\noexpand\huger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.281\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\hugerr{% + \noexpand\@setfontsize\noexpand\hugerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.3845\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\hugerrr{% + \noexpand\@setfontsize\noexpand\hugerrr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.611\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Huger{% + \noexpand\@setfontsize\noexpand\Huger + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.734\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Hugerr{% + \noexpand\@setfontsize\noexpand\Hugerr + {\the\@tempdima}{\the\@tempdimb}% + }% + \setlength{\@tempdima}{2.857\@tempdimc}% + \setlength{\@tempdimb}{\@tempb\@tempdima}% + \edef\Hugerrr{% + \noexpand\@setfontsize\noexpand\Hugerrr + {\the\@tempdima}{\the\@tempdimb}% + }% \normalsize% \setlength\parindent{\f@size pt}% \setlength\headheight{\dimexpr(\f@size pt+2pt)}% @@ -451,6 +560,135 @@ }\@percentchar% }% \endgroup + \begingroup\normalsizer + \immediate\write\@fontfile{% + \string\def\string\normalsizer{% + \string\@setfontsize\string\normalsizer{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\normalsizerr + \immediate\write\@fontfile{% + \string\def\string\normalsizerr{% + \string\@setfontsize\string\normalsizerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\normalsizerrr + \immediate\write\@fontfile{% + \string\def\string\normalsizerrr{% + \string\@setfontsize\string\normalsizerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\larger + \immediate\write\@fontfile{% + \string\def\string\larger{% + \string\@setfontsize\string\larger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\largerr + \immediate\write\@fontfile{% + \string\def\string\largerr{% + \string\@setfontsize\string\largerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\largerrr + \immediate\write\@fontfile{% + \string\def\string\largerrr{% + \string\@setfontsize\string\largerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Large + \immediate\write\@fontfile{% + \string\def\string\Large{% + \string\@setfontsize\string\Large{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Larger + \immediate\write\@fontfile{% + \string\def\string\Larger{% + \string\@setfontsize\string\Larger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Largerr + \immediate\write\@fontfile{% + \string\def\string\Largerr{% + \string\@setfontsize\string\Largerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Largerrr + \immediate\write\@fontfile{% + \string\def\string\Largerrr{% + \string\@setfontsize\string\Largerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\LARGEr + \immediate\write\@fontfile{% + \string\def\string\LARGEr{% + \string\@setfontsize\string\LARGEr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\LARGErr + \immediate\write\@fontfile{% + \string\def\string\LARGErr{% + \string\@setfontsize\string\LARGErr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\LARGErrr + \immediate\write\@fontfile{% + \string\def\string\LARGErrr{% + \string\@setfontsize\string\LARGErrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\huger + \immediate\write\@fontfile{% + \string\def\string\huger{% + \string\@setfontsize\string\huger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\hugerr + \immediate\write\@fontfile{% + \string\def\string\hugerr{% + \string\@setfontsize\string\hugerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\hugerrr + \immediate\write\@fontfile{% + \string\def\string\hugerrr{% + \string\@setfontsize\string\hugerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \begingroup\Huger + \immediate\write\@fontfile{% + \string\def\string\Huger{% + \string\@setfontsize\string\Huger{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Hugerr + \immediate\write\@fontfile{% + \string\def\string\Hugerr{% + \string\@setfontsize\string\Hugerr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% + \endgroup + \begingroup\Hugerrr + \immediate\write\@fontfile{% + \string\def\string\Hugerrr{% + \string\@setfontsize\string\Hugerrr{\f@size}{\f@baselineskip}% + }\@percentchar% + }% \immediate\write\@fontfile{\string\normalsize}% \begingroup \immediate\write\@fontfile{% @@ -598,26 +836,42 @@ \immediate\closeout\@fontfile } \@onlypreamble\generateclofile +\ExplSyntaxOn + +\NewExpandableDocumentCommand{\getlength}{O{5}m} +{ + \fp_eval:n { round(#2,#1) } +} + +\ExplSyntaxOff \def\fontsize@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 - thereby be made to contradict.} + be made to contradict.} \chardef\fsbslash=`\\ \newcommand{\sizesamples}[1]{% \def\nextitem{\par}% Separator \renewcommand*{\do}[1]{\nextitem\bgroup\csname##1\endcsname - \noindent\textbf{\csname ##1\endcsname \texttt{\fsbslash ##1}: - \f@size pt on \the\baselineskip} \fontsize@lipsum\par\egroup + \noindent{\csname ##1\endcsname \texttt{\fsbslash ##1}: + \getlength[2]{\f@size}\,pt on \getlength[2]{\the\baselineskip}\,pt.} \fontsize@lipsum\par\egroup }% How to process each item \docsvlist{#1}% Process list } -\newcommand{\printfontsize}[2][]{% - \changefontsize[#1]{#2} - \sizesamples{tiny,scriptsize,footnotesize,small, - normalsize,large,Large,LARGE,huge,Huge}} +\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} } +{ + \changefontsize[#1]{#2} + \subsubsection*{Text samples for #2 on #1} + \sizesamples{#3} +} \endinput %% %% End of file `fontsize.sty'. |