summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fontsize
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-18 03:01:04 +0000
committerNorbert Preining <norbert@preining.info>2021-04-18 03:01:04 +0000
commit1cb659efaeb0261c3f5267df4f47b6ad4d673f48 (patch)
treeff0f0a7727b3caa205f65e211239de226d5398d3 /macros/latex/contrib/fontsize
parent8ca7af6e140fdaee415715e4a537d8f1a9305198 (diff)
CTAN sync 202104180301
Diffstat (limited to 'macros/latex/contrib/fontsize')
-rw-r--r--macros/latex/contrib/fontsize/fontsize.dtx125
-rw-r--r--macros/latex/contrib/fontsize/fontsize.pdfbin399282 -> 404506 bytes
2 files changed, 82 insertions, 43 deletions
diff --git a/macros/latex/contrib/fontsize/fontsize.dtx b/macros/latex/contrib/fontsize/fontsize.dtx
index a471f4c5ca..cde1960fad 100644
--- a/macros/latex/contrib/fontsize/fontsize.dtx
+++ b/macros/latex/contrib/fontsize/fontsize.dtx
@@ -56,14 +56,13 @@ This work has the LPPL maintenance status "author-maintained".
%<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/17 v0.8.2 '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 @@ This work has the LPPL maintenance status "author-maintained".
%
% Commands for table 1 and 2
%
+\def\tabonefontsize{\fontsize{12}{14.2}\selectfont}
\ExplSyntaxOn
\NewExpandableDocumentCommand{\getsize}{O{5}m}
{
@@ -268,7 +268,7 @@ This work has the LPPL maintenance status "author-maintained".
%</driver>
% \fi
%
-% \CheckSum{3064}
+% \CheckSum{3067}
%
% \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,8 +287,9 @@ This work has the LPPL maintenance status "author-maintained".
% Right brace \} Tilde \~}
%
%
+% \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.}
+ % 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}.}
% \changes{v0.7}{2021/02/10}{New font sizing commands \cmd{HUGE}, \cmd{HUGEr}, \cmd{HUGErr}, \cmd{HUGErrr}. Changed default name for the \file{.clo} file to \opt{fontsize}. Updated documentation.}
% \changes{v0.6}{2021/02/06}{New font sizing commands from \cmd{small} down. Updated documentation.}
@@ -324,16 +325,19 @@ This work has the LPPL maintenance status "author-maintained".
% \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 +410,9 @@ This work has the LPPL maintenance status "author-maintained".
%
% 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 +421,13 @@ This work has the LPPL maintenance status "author-maintained".
% 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}
@@ -443,12 +451,14 @@ This work has the LPPL maintenance status "author-maintained".
% You can use any unit recognized by \TeX\ and you can
% 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}.
-% \end{footnotesize}
+%^^A \begin{footnotesize}
+%
+%^^A As \sty{fontsize} takes effect after the class is loaded, you should
+%^^A set a font size class option (if available) that comes close to the one
+%^^A loaded by the package. For example,
+%^^A if you set \opt{fontsize=12.2pt} you should load the class option \opt{12pt}.
+%
+%^^A \end{footnotesize}
%
% \optitem[fontsize]{cloname}{\meta{name}}
%
@@ -463,6 +473,11 @@ This work has the LPPL maintenance status "author-maintained".
%^^A \file{fontsize-std11pt.clo} or
%^^A \file{fontsize-std11pt.clo} will be used,
%
+% \optitem[1.5em]{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.
%
% \end{optionlist*}
%
@@ -534,7 +549,8 @@ This work has the LPPL maintenance status "author-maintained".
% \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
%
@@ -593,7 +609,6 @@ This work has the LPPL maintenance status "author-maintained".
% }
%\medskip
%
-% \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,11 +648,9 @@ This work has the LPPL maintenance status "author-maintained".
%^^A \cmd{RequirePackage}|{fix-cm}| just before \cmd{documentclass}.
%
%
-% \end{small}
-%
-%\newgeometry{top=2cm,bottom=3cm}
+%^^A\newgeometry{top=2cm,bottom=3cm}
%
-%\begin{smallrrr}
+%^^A\begin{smallrrr}
%
%\def\grayrule{\\\tabucline[0.4pt black!40 off 2pt]{-}\\[-2ex]\rowfont{\color{philA}}}
%
@@ -706,16 +719,17 @@ This work has the LPPL maintenance status "author-maintained".
% \tabrowone{HUGErrr}\\
%\end{longtabu}
%
-%\end{smallrrr}
+%^^A\end{smallrrr}
%
-%\restoregeometry
+%^^A\restoregeometry
%
%^^A---------------------------------------------------------------------
%
% \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 +746,21 @@ This work has the LPPL maintenance status "author-maintained".
%^^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.5em]{\def\@fontsizeparindent{#1}}
% \end{macrocode}
% \eaddition
%
@@ -750,7 +768,8 @@ This work has the LPPL maintenance status "author-maintained".
%
% 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 +798,15 @@ This work has the LPPL maintenance status "author-maintained".
\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@setlength} and \cmd{changefontsize} commands are simply new names, respectively, for \cmd{scr@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@setlength} and \cmd{changefontsize} commands
+% are simply new names, respectively, for \cmd{scr@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 +1016,8 @@ This work has the LPPL maintenance status "author-maintained".
\let\noexpand\@listi\noexpand\@listi@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 +1048,8 @@ This work has the LPPL maintenance status "author-maintained".
\let\noexpand\@listi\noexpand\@listi@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 +1093,8 @@ This work has the LPPL maintenance status "author-maintained".
{\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 +1235,8 @@ This work has the LPPL maintenance status "author-maintained".
{\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 +1269,21 @@ This work has the LPPL maintenance status "author-maintained".
\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}.
+% The value of \cmd{@fontsizeparindent} is controlled by the
+% \opt{parindent} option which defaults to
+% \SI{1.5}{em} and corresponds approximately to the values adopted
+% in the \file{bk*.clo} files for one-column documents:
% \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 +1441,11 @@ This work has the LPPL maintenance status "author-maintained".
%
% \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@ifnextchar [{\@generatefontfile{#1}}{\@@generatefontfile{#1}}%
@@ -1975,7 +2014,7 @@ This work has the LPPL maintenance status "author-maintained".
% \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}
diff --git a/macros/latex/contrib/fontsize/fontsize.pdf b/macros/latex/contrib/fontsize/fontsize.pdf
index 37a1db0cfa..5afc85d3dc 100644
--- a/macros/latex/contrib/fontsize/fontsize.pdf
+++ b/macros/latex/contrib/fontsize/fontsize.pdf
Binary files differ