From 96f1d7a9e9fe6e682cbd19d1bf2b7797891160b6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 7 Sep 2023 03:00:40 +0000 Subject: CTAN sync 202309070300 --- fonts/arsenal/arsenal.dtx | 171 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 155 insertions(+), 16 deletions(-) (limited to 'fonts/arsenal/arsenal.dtx') diff --git a/fonts/arsenal/arsenal.dtx b/fonts/arsenal/arsenal.dtx index 3607489c58..16db2a0a07 100644 --- a/fonts/arsenal/arsenal.dtx +++ b/fonts/arsenal/arsenal.dtx @@ -17,11 +17,11 @@ \usepackage[tableposition=top]{caption} \urlstyle{rm} \begin{document} + \RecordChanges \DocInput{\jobname.dtx} \end{document} % % \fi -% % \GetFileInfo{arsenal.sty} % \title{\pkg{arsenal}---\LaTeX\ support of Arsenal fonts by Andrij Shevchenko} % \date{\fileversion, \filedate} @@ -69,6 +69,7 @@ %\label{sec:ug-options} % % \begin{variable}{default, sfdefault, math, scale, Scale} +% \changes{v0.2}{2023/09/04}{Added arsenal+kpsans value for math option} % The options for the package use the key-value interface. % The part |=true| for the boolean options can be dropped. % @@ -79,12 +80,28 @@ % \item[sfdefault] whether to make Arsenal the sans serif font of your % document, either |true| or |false| (the default). % \item[math] whether to enable math support. The currently -% recognized options are |none|, |kpsans|, and |iwona|. The -% default depends on whether Arsenal is your main font: it is -% |iwona| if yes, and |none| otherwise. If |iwona| is selected, we use -% \pkg{iwonamath}~\citep{iwonamath}. If |kpsans| is selected, -% we use \textsc{otf} version of KpSans -% fonts~\citep{kpfonts-otf}. +% recognized options are |none|, |arsenal+kpsans|, |kpsans|, and +% |iwona|. The meaning is the following: +% \begin{description} +% \item[arsenal+kpsans] Use native font for math, adding missing +% letter from the \textsc{otf} version of KpSans +% font~\citep{kpfonts-otf}. Unfortunately this option presently +% does not work properly with \XeTeX, using wrong font +% dimensions resulting in rather bad spacing. +% \item[kpsans] Use \textsc{otf} version of KpSans +% font~\citep{kpfonts-otf} for math. +% \item[iwona] Use use \pkg{iwonamath}~\citep{iwonamath} for math. +% \item[none] Do not define math fonts, leaving the math setup to the user. +% \end{description} +% The default depends on whether Arsenal is your main font and +% which engine is used: +% \begin{enumerate} +% \item If Arsenal is the main font, and \XeTeX\ is used, then +% |iwona|. +% \item If Arsenal is the main font, and Lua\TeX\ is used, then +% |arsenal+kpsans|. +% \item If Arsenal is not your main font, then |none|. +% \end{enumerate} % \item[scale] the scale for the font, by default 0.89. The option % |Scale| is a synonym. % \end{description} @@ -162,8 +179,29 @@ % \cs{textsmileblack} (\textsmileblack). % \end{function} % -% \end{documentation} % +%\subsection{Math support} +%\label{sec:ug-math} +% \changes{v0.2}{2023/09/04}{Added a section about math support} +% +% The support of math is presently experimental. We offer several +% options, as discussed above in Section~\ref{sec:ug-options}. Iwona font +% matches Arsenal in color and sizes, but some letters and proportions +% are different from those for Arsenal. KpSans seems to be slightly +% darker. The option of taking Latin letters from Arsenal and the +% missing symbols from KpSans is attractive, but is currently +% recommended for Lua\TeX\ only, since the font parameters seem to be +% misinterpreted by the \XeTeX\ engine. +% +% +% As discussed in \pkg{kpsans} documentation, if you use this package +% (options |kpsans| and |arsenal+kpsans|), do \emph{not} use +% \pkg{amssymb}. The corresponding symbols are reimplemented in +% \pkg{kpsans}, and (almost) all \pkg{amssymb} commands are available +% by default when one of these options is chosen. +% +% \end{documentation} +% \clearpage % % \begin{implementation} % @@ -182,7 +220,7 @@ %<@@=arsenal> %<*package> \ProvidesExplPackage {arsenal} -{2023-09-03} {0.1} +{2023-09-05} {v0.2} {Arsenal font by Andrij Shevchenko} % \end{macrocode} % @@ -206,10 +244,10 @@ \keys_define:nn {arsenal} { default .bool_set:N = \l_@@_default_bool, - defaul .default:n = true, + default .default:n = true, sfdefault .bool_set:N = \l_@@_sfdefault_bool, sfdefault .default:n = true, - math .choices:nn = {none, kpsans, iwona} + math .choices:nn = {none, arsenal+kpsans, kpsans, iwona} {\tl_set_eq:NN \l_@@_math_tl \l_keys_choice_tl }, scale .tl_set:N = \l_@@_scale_tl, Scale .tl_set:N = \l_@@_scale_tl, @@ -239,7 +277,13 @@ { \bool_if:NTF \l_@@_default_bool { - \tl_set:Nn \l_@@_math_tl {iwona} + \sys_if_engine_xetex:TF + { + \tl_set:Nn \l_@@_math_tl {iwona} + } + { + \tl_set:Nn \l_@@_math_tl {arsenal+kpsans} + } } { \tl_set:Nn \l_@@_math_tl {none} @@ -302,7 +346,7 @@ % \texttenge, % \textruble % } -% Currency symbolse +% Currency symbols % \begin{macrocode} \DeclareUnicodeSymbol{\texthryvnia} {"20B4} \DeclareUnicodeSymbol{\texttugrik} {"20AE} @@ -339,7 +383,10 @@ } % \end{macrocode} % -% Now kpsans. Mostly from~\citep{kpfonts-otf}. +% \changes{v0.2}{2023/09/04}{Separate scaling for upper and lowercase +% for kpsans} +% Now kpsans, see~\citep{kpfonts-otf}. We adjust separately +% upper and lower cases\ldots % \begin{macrocode} \tl_if_eq:NnT \l_@@_math_tl {kpsans} { @@ -355,9 +402,101 @@ Scale=\l_@@_tmp_tl, BoldFont=KpMath-SansBold.otf] + \setmathfont{KpMath-Sans.otf}[ + range={ + scr/{Latin}, + bfscr/{Latin}, + frak/{Latin}, + bffrak/{Latin}, + up/{Latin, Greek, misc}, + bb/{Latin, Greek, misc}, + it/{Latin, Greek, misc}, + bbit/{Latin, Greek, misc}, + tt/{Latin, Greek, misc}, + sfup/{Latin, Greek, misc}, + sfit/{Latin, Greek, misc}, + bfup/{Latin, Greek, misc}, + bfit/{Latin, Greek, misc}, + bfsfup/{Latin, Greek, misc}, + bfsfit/{Latin, Greek, misc}, + }, + Scale=\fp_to_tl:n {\l_@@_tmp_tl * 0.9}, + BoldFont=KpMath-SansBold.otf] } % \end{macrocode} % +% \changes{v0.2}{2023/09/04}{Added the warining about using +% arsenal+kpsans with \XeTeX} +% And arsenal+kpsans. We again adjust separately upper and lower cases\ldots +% \begin{macrocode} +\tl_if_eq:NnT \l_@@_math_tl {arsenal+kpsans} +{ + \sys_if_engine_xetex:T + { + \ClassWarningNoLine{arsenal}{Option~ arsenal+kpsans~ may~ not~ work~ + with~ XeTeX~ engine.~ Please~ use~ lualatex} + } + \tl_set:Ne \l_@@_tmp_tl {\fp_to_tl:n {\l_@@_scale_tl * 1.1}} + \RequirePackage[symbols]{kpfonts-otf} + + \setmathfont{KpMath-Sans.otf}[ + Scale=\l_@@_tmp_tl, + BoldFont=KpMath-SansBold.otf] + + \setmathfont{KpMath-Sans.otf}[ + range={cal/{Latin},bfcal/{Latin}}, + RawFeature=+ss01, + Scale=\fp_to_tl:n {\l_@@_tmp_tl * 0.9}, + BoldFont=KpMath-SansBold.otf] + + \setmathfont{KpMath-Sans.otf}[ + range={ + scr/{Latin, num}, + bfscr/{Latin, num}, + frak/{Latin, num}, + bffrak/{Latin, num}, + up/{Greek, misc, num}, + bb/{Latin, Greek, misc, num}, + it/{Greek, misc, num}, + bbit/{Greek, misc, num}, + tt/{Greek, misc, num}, + sfup/{Greek, misc, num}, + sfit/{Greek, misc, num}, + bfup/{Greek, misc, num}, + bfit/{Greek, misc, num}, + bfsfup/{Greek, misc, num}, + bfsfit/{Greek, misc, num}, + }, + Scale=\fp_to_tl:n {\l_@@_tmp_tl * 0.9}, + BoldFont=KpMath-SansBold.otf] + + + \setmathfont{Arsenal-Regular.otf}[ + range={ + up/{Latin, latin, num}, + tt/{Latin, latin, num}, + sfup/{Latin, latin, num}, + bfup/{Latin, latin, num}, + bfsfup/{Latin, latin, num}, + }, + Scale=\l_@@_scale_tl, + BoldFont=Arsenal-Bold.otf] + + \setmathfont{Arsenal-Italic.otf}[ + range={ + it/{Latin, latin, num}, + bbit/{Latin, latin, num}, + sfit/{Latin, latin, num}, + bfit/{Latin, latin, num}, + bfsfit/{Latin, latin, num}, + }, + Scale=\l_@@_scale_tl, + BoldFont=Arsenal-BoldItalic.otf] + + +} +% \end{macrocode} +% % \begin{macrocode} % % \end{macrocode} @@ -367,5 +506,5 @@ % \bibliographystyle{plainnat} % % -%\PrintIndex -% \ No newline at end of file +% \PrintIndex +% \PrintChanges \ No newline at end of file -- cgit v1.2.3