texlive[58906] Master/texmf-dist: fontsize (18apr21)
commits+karl at tug.org
commits+karl at tug.org
Sun Apr 18 22:20:38 CEST 2021
Revision: 58906
http://tug.org/svn/texlive?view=revision&revision=58906
Author: karl
Date: 2021-04-18 22:20:37 +0200 (Sun, 18 Apr 2021)
Log Message:
-----------
fontsize (18apr21)
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-04-18 20:19:22 UTC (rev 58905)
+++ trunk/Master/texmf-dist/source/latex/fontsize/fontsize.dtx 2021-04-18 20:20:37 UTC (rev 58906)
@@ -56,14 +56,13 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{fontsize}
%<*package>
- [2021/03/14 v0.8.1 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+ [2021/04/18 v0.8.3 'fontsize' package. Set main font sizes (Ivan Valbusa)]
%</package>
%<*driver>
\documentclass[12pt]{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
-\usepackage{fontsize}
- \changefontsize[13.7]{11.7}
+\usepackage[fontsize=12]{fontsize}
%--------------------------------------------------------
% GRAPHICS
%--------------------------------------------------------
@@ -176,6 +175,7 @@
%
% Commands for table 1 and 2
%
+\def\tabonefontsize{\fontsize{12}{14.2}\selectfont}
\ExplSyntaxOn
\NewExpandableDocumentCommand{\getsize}{O{5}m}
{
@@ -268,7 +268,7 @@
%</driver>
% \fi
%
-% \CheckSum{3064}
+% \CheckSum{3068}
%
% \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
@@ -287,6 +287,9 @@
% Right brace \} Tilde \~}
%
%
+% \changes{v0.8.3}{2021/04/18}{Corrected a bug in the \cmd{parindent} option.
+% Updated documentation.}
+% \changes{v0.8.2}{2021/04/17}{New \cmd{parindent} option. Updated documentation.}
% \changes{v0.8.1}{2021/03/14}{New \cmd{sampletext} command.
% Some lengths are now defined via \sty{xfp} package. Removed \cmd{headheight} definition. Updated documentation.}
% \changes{v0.8}{2021/03/04}{Corrected a bug occuring when the line spacing is grater than \SI{163.84}{pt}.}
@@ -324,16 +327,19 @@
% \DoNotIndex{\huge,\large,\makebox,\ProcessOptions,\renewcommand}
%
% \thispagestyle{empty}
+%
% \begin{tikzpicture}[overlay,remember picture]
-% \draw[circular drop shadow,draw=none,fill=white] (current page.center) circle (6cm) node[align=center,anchor=center] {%
+% \draw[circular drop shadow,draw=none,fill=white] (current page.center) circle (6cm)
+% node[align=center,anchor=center] {%
% Ivan Valbusa\\[1cm]
%
-%\Huge\color{gray}\bfseries \parbox{10cm}{\centering The \\{{\color{philA}\fontsize{30}{32}\textsf{fontsize}}\\ package}}\\[1cm]
+% \Huge\color{gray}\bfseries \parbox{10cm}{\centering The
+% \\{{\color{philA}\fontsize{30}{32}\textsf{fontsize}}\\ package}}\\[1cm]
% \color{black!60!Goldenrod}
%
-%\normalsize \fileversion{} -- \filedate
+% \normalsize \fileversion{} -- \filedate
%
-%};
+% };
% \end{tikzpicture}
% \clearpage\thispagestyle{empty}
% \null\vspace{1cm}
@@ -406,7 +412,9 @@
%
% The code is an excerpt of the \sty{scrextend} and
% \sty{scrfontsizes} packages \parencite{koma}, with few minor
-% changes to make it completely independent of the KOMA-script bundle and with a couple of new features. The package is updated to version |3390 2019-11-18 17:09:35Z| of the \file{scrkernel-fonts.dtx} file.
+% changes to make it completely independent of the KOMA-script bundle and with
+% a couple of new features. The package is updated to version
+%|3390 2019-11-18 17:09:35Z| of the \file{scrkernel-fonts.dtx} file.
%
%^^A---------------------------------------------------------------------
% \section*{Caveat}
@@ -415,11 +423,13 @@
% 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.
-% 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.
+% 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---------------------------------------------------------------------
-%^^A \enlargethispage{\baselineskip}
+% \enlargethispage{\baselineskip}
%
% The package can be loaded, as usual, with:
% \begin{ttquote}
@@ -444,12 +454,34 @@
% omit the unit as well (in which case it defaults to \texttt{pt}).
%
% \begin{footnotesize}
-% As \sty{fontsize} takes effect after the class is loaded, you should
-% set a font size class option that comes close to the font size passed
-% to \sty{fontsize}. For example,
-% if you set \opt{fontsize=12.2pt} you should load the class option \opt{12pt}.
+%
+% Note that \sty{fontsize} does not redefine some commands of the standard
+% \textit{.clo} files such as those related to the page layout and few others.
+% For example the \opt{12pt} class option redefine \cmd{Huge} (via |\let\Huge=\huge|)
+% which is not redefined by \opt{fontsize=12pt}. For these reasons, if possible, you
+% should always set a font size class option that comes close to the one
+% loaded by the package. For example with \opt{fontsize=12.2pt}
+% you should load the \opt{12pt} class option.
+%
% \end{footnotesize}
%
+% \optitem[1.5\meta{fontsize}]{parindent}{\meta{dimen}}
+%
+% Sets the value of \cmd{parindent}. You can use any unit recognized by
+% \TeX\ but for consistency it is preferable to use a
+% font-dependent unit such as em.
+%
+% \begin{footnotesize}
+%
+% Note that the "em" is simply an arbitrary unit that comes with a particular font.
+% The value of \cmd{parindent} given in ems depends on both the font used and
+% on how or where it is set: whether before or after
+% |\begin{document}|. For this reason, don't expect \SI{1}{em} to always be equivalent
+% to the currently specified \meta{fontsize}. If you don't like this behavior,
+% use absolute units such as pt, cm or mm.
+%
+% \end{footnotesize}
+%
% \optitem[fontsize]{cloname}{\meta{name}}
%
% If declared \textit{before} \opt{fontsize}, it loads the file named
@@ -463,7 +495,6 @@
%^^A \file{fontsize-std11pt.clo} or
%^^A \file{fontsize-std11pt.clo} will be used,
%
-%
% \end{optionlist*}
%
%^^A---------------------------------------------------------------------
@@ -534,7 +565,8 @@
% \subsection{New font sizing commands}\label{sec:sizingcmd}
%^^A--------------------------------------------------------------------
%
-% The package provides three additional font sizing commands for each standard size (plus the new \cmd{HUGE} command).
+% The package provides three additional font sizing commands
+% for each standard size (plus the new \cmd{HUGE} command).
% See table \ref{tab:sizes} for details.
% \medskip
%
@@ -591,9 +623,8 @@
% \tcmd{HUGErrr} & \HUGErrr \fshw
% \end{tabular}
% }
-%\medskip
+%\bigskip
%
-% \begin{small}
%\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 such as Cochineal
@@ -633,12 +664,10 @@
%^^A \cmd{RequirePackage}|{fix-cm}| just before \cmd{documentclass}.
%
%
-% \end{small}
+%^^A\newgeometry{top=2cm,bottom=3cm}
%
-%\newgeometry{top=2cm,bottom=3cm}
+%^^A\begin{smallrrr}
%
-%\begin{smallrrr}
-%
%\def\grayrule{\\\tabucline[0.4pt black!40 off 2pt]{-}\\[-2ex]\rowfont{\color{philA}}}
%
%\begin{longtabu}{m{3.4cm}@{}*{8}{@{}r@{}}r}
@@ -706,9 +735,9 @@
% \tabrowone{HUGErrr}\\
%\end{longtabu}
%
-%\end{smallrrr}
+%^^A\end{smallrrr}
%
-%\restoregeometry
+%^^A\restoregeometry
%
%^^A---------------------------------------------------------------------
%
@@ -715,7 +744,8 @@
% \section{Some text samples}\label{sec:example}
%
%^^A--------------------------------------------------------------------
-% The following samples are obtained with the \cmd{printsamples} command (see section \ref{sec:commands}):
+% The following samples are obtained with the \cmd{printsamples}
+% command (see section \ref{sec:commands}):
%\begin{verbatim}
%\printsamples{12.6pt}{10.6pt}[normalsizerr,normalsizerrr,large,larger,largerr]
%\end{verbatim}
@@ -732,17 +762,22 @@
%^^A---------------------------------------------------------------------
% \section{The Code}
%^^A---------------------------------------------------------------------
-%\textcolor{DarkBlue}{The parts added to the basic code of \file{scrextend} and \file{scrfontsizes} are highlighted in blue.}
+% \textcolor{DarkBlue}{The parts added to the basic code of \file{scrextend}
+% and \file{scrfontsizes} are highlighted in blue.}
%
-%\noindent All the options of the package are defined via \sty{xkeyval} \parencite{xkeyval},
+% \noindent All the options of the package are defined via
+% \sty{xkeyval} \parencite{xkeyval},
% while the \sty{xfp} package \parencite{xfp} provides the \cmd{fpeval} command
% to use instead of \cmd{dimexpr} for some size calculations.
-% Only a new package option called \opt{cloname} is defined.
+% Only two new package options, called \opt{cloname} and \opt{parindent}
+% are defined.
+%
% \baddition
% \begin{macrocode}
\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
\@ifpackageloaded{xfp}{}{\RequirePackage{xfp}}
\DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}}
+\DeclareOptionX{parindent}[1.5\@tempdimb]{\def\@fontsizeparindent{#1}}
% \end{macrocode}
% \eaddition
%
@@ -750,7 +785,8 @@
%
% Here the \sty{scrextend} code begins. All the KOMA related codes have
% been removed and only a few names have been changed.
-% The value of \cmd{|@|fontsizefilebase} is set to \texttt{fontsize} 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
@@ -779,11 +815,15 @@
\expandafter\AtEndOfPackage\expandafter{\@tempa}%
}
% \end{macrocode}
-% Now we can execute and process the new options defined above. As \opt{cloname} is responsible for defining \cmd{|@|fontsizefilebase} it must precede \opt{fontsize} which uses this command.
-% The \cmd{ctm at setlength} and \cmd{changefontsize} commands are simply new names, respectively, for \cmd{scr at setlength} and \cmd{changefontsizes} used in \file{scrextend.sty}.
+% Now we can execute and process the new options defined above.
+% As \opt{cloname} is responsible for defining \cmd{|@|fontsizefilebase}
+% it must precede \opt{fontsize} which uses this command.
+% The \cmd{ctm at setlength} and \cmd{changefontsize} commands
+% are simply new names, respectively, for \cmd{scr at setlength}
+% and \cmd{changefontsizes} used in \file{scrextend.sty}.
% \baddition
% \begin{macrocode}
-\ExecuteOptionsX{cloname,fontsize}
+\ExecuteOptionsX{cloname,fontsize,parindent}
\ProcessOptionsX*\relax
% \end{macrocode}
% \eaddition
@@ -993,7 +1033,8 @@
\let\noexpand\@listi\noexpand\@listi at small
}%
% \end{macrocode}
-% {\color{black}Definition of \cmd{footnotesizer}, \cmd{footnotesizerr}, \cmd{footnotesizerrr}.\\
+% {\color{black}Definition of \cmd{footnotesizer}, \cmd{footnotesizerr},
+% \cmd{footnotesizerrr}.\\
% Scale factor: 0.01979.}
% \begin{macrocode}
\setlength{\@tempdima}{0.85313\@tempdimc}%
@@ -1024,7 +1065,8 @@
\let\noexpand\@listi\noexpand\@listi at footnotesize
}%
% \end{macrocode}
-% {\color{black}Definition of \cmd{scriptsizer}, \cmd{scriptsizerr}, \cmd{scriptsizerrr}.\\
+% {\color{black}Definition of \cmd{scriptsizer}, \cmd{scriptsizerr},
+% \cmd{scriptsizerrr}.\\
% Scale factor: 0,0416675.}
% \begin{macrocode}
\setlength{\@tempdima}{0.7083375\@tempdimc}%
@@ -1068,7 +1110,8 @@
{\the\@tempdima}{\the\@tempdimb}%
}%
% \end{macrocode}
-% {\color{black}Definition of \cmd{normalsizer}, \cmd{normalsizerr}, \cmd{normalsizerrr}.\\
+% {\color{black}Definition of \cmd{normalsizer}, \cmd{normalsizerr},
+% \cmd{normalsizerrr}.\\
% Scale factor: 0.05.}
% \begin{macrocode}
\setlength{\@tempdima}{1.05\@tempdimc}%
@@ -1209,7 +1252,8 @@
{\the\@tempdima}{\the\@tempdimb}%
}%
% \end{macrocode}
-% {\color{black}Definition of \cmd{HUGE}, \cmd{HUGER}, \cmd{HUGERR}, \cmd{HUGERRR}.\\
+% {\color{black}Definition of \cmd{HUGE}, \cmd{HUGER}, \cmd{HUGERR},
+% \cmd{HUGERRR}.\\
% Scale factor: 0,149.}
% \begin{macrocode}
\setlength{\@tempdima}{3.006\@tempdimc}%
@@ -1242,13 +1286,17 @@
\normalsize%
% \end{macrocode}
% The KOMA files do not define \cmd{parindent} and other lengths that are
-% are strictly linked to the font rather than to the dimensions of the page and the text. So first we set \cmd{parindent} to \cmd{normalsize}:
+% are strictly linked to the font rather than to the dimensions of the page
+% and the text. So we first define \cmd{parindent} which defaults to 1.5\meta{fontsize}:
% \baddition
% \begin{macrocode}
-\setlength\parindent{\@tempdimb}%
+\setlength\parindent{\@fontsizeparindent}%
% \end{macrocode}
% \eaddition
-% 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 the lengths in the files \file{bk*.clo} not affected by \sty{fontsize} only concern \cmd{headheight}, \cmd{headsep}, \cmd{topskip} and \cmd{footskip}.
+% 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
+% in lengths affected by \sty{fontsize} inside the \file{bk*.clo} files only concern
+% \cmd{headheight}, \cmd{headsep}, \cmd{topskip} and \cmd{footskip}.
% \baddition
% \begin{macrocode}
\setlength\smallskipamount{\fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}%
@@ -1406,7 +1454,11 @@
%
% \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}}%
@@ -1975,7 +2027,7 @@
% \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
+% Enrico Gregorio in place of the old macros based on
% \sty{etoolbox} \parencite{etoolbox}.
% \baddition
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty 2021-04-18 20:19:22 UTC (rev 58905)
+++ trunk/Master/texmf-dist/tex/latex/fontsize/fontsize.sty 2021-04-18 20:20:37 UTC (rev 58906)
@@ -26,10 +26,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{fontsize}
- [2021/03/14 v0.8.1 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+ [2021/04/18 v0.8.3 'fontsize' package. Set main font sizes (Ivan Valbusa)]
\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
\@ifpackageloaded{xfp}{}{\RequirePackage{xfp}}
\DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}}
+\DeclareOptionX{parindent}[1.5\@tempdimb]{\def\@fontsizeparindent{#1}}
\DeclareOptionX{fontsize}[10]{%
\expandafter\@defaultunits\expandafter\@tempdima#1 pt\relax\@nnil
\edef\@tempa{#1}%
@@ -56,7 +57,7 @@
}%
\expandafter\AtEndOfPackage\expandafter{\@tempa}%
}
-\ExecuteOptionsX{cloname,fontsize}
+\ExecuteOptionsX{cloname,fontsize,parindent}
\ProcessOptionsX*\relax
\newcommand*\ctm at setlength[4]{%
\ifdim #2<\ifdim #2=\z@ \z@ \else \p@\fi
@@ -437,7 +438,7 @@
{\the\@tempdima}{\the\@tempdimb}%
}%
\normalsize%
-\setlength\parindent{\@tempdimb}%
+\setlength\parindent{\@fontsizeparindent}%
\setlength\smallskipamount{\fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}%
\setlength\medskipamount{\fpeval{1.090909091\@tempdimb/2}pt \@plus 2\p@ \@minus 2\p@}%
\setlength\bigskipamount{\fpeval{1.090909091\@tempdimb}pt \@plus 4\p@ \@minus 4\p@}%
More information about the tex-live-commits
mailing list.