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/texmf-dist/tex | |
parent | bec0946e87427c37bef90f3fb27626d1bb294909 (diff) |
fontsize (31jan21)
git-svn-id: svn://tug.org/texlive/trunk@57579 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fontsize/fontsize.sty | 270 |
1 files changed, 262 insertions, 8 deletions
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'. |