summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-12-05 21:24:22 +0000
committerKarl Berry <karl@freefriends.org>2022-12-05 21:24:22 +0000
commit2598aecacc6b815dc556224b2c0be626bb78e969 (patch)
tree7cdce25f2e122326edbca572c454dec3ac006725 /Master/texmf-dist
parent5caccaedbc1e667bc6c77cd4121b3aa42fd0cbba (diff)
mathfont (5dec22)
git-svn-id: svn://tug.org/texlive/trunk@65205 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/README.txt8
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdfbin363665 -> 364537 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex7
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_equations.tex7
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.pdfbin51367 -> 51296 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.tex28
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.pdfbin85049 -> 85047 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.tex21
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.pdfbin54342 -> 54342 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.tex21
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.pdfbin47387 -> 47388 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.tex24
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex17
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdfbin186232 -> 186433 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex7
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdfbin115314 -> 115613 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex15
-rw-r--r--Master/texmf-dist/source/latex/mathfont/mathfont_code.dtx144
-rw-r--r--Master/texmf-dist/tex/latex/mathfont/mathfont.sty30
19 files changed, 223 insertions, 106 deletions
diff --git a/Master/texmf-dist/doc/latex/mathfont/README.txt b/Master/texmf-dist/doc/latex/mathfont/README.txt
index 99ed16767f2..6a7a6ca9caa 100644
--- a/Master/texmf-dist/doc/latex/mathfont/README.txt
+++ b/Master/texmf-dist/doc/latex/mathfont/README.txt
@@ -1,7 +1,7 @@
-LaTeX package mathfont version 2.2 installation information,
+LaTeX package mathfont version 2.2a installation information,
released December 2022.
-This file is README.txt from version 2.2 of the free and
+This file is README.txt from version 2.2a of the free and
open-source LaTeX package "mathfont," to be used with the
XeTeX or LuaTeX engines. The package is designed to adapt
text fonts for use in math mode, and if you typeset your
@@ -14,8 +14,8 @@ To install mathfont automatically, update your TeXLive or
MacTeX distribution or use a package manager such as tlmgr.
To install mathfont manually, you need to generate the
-package file mathfont.sty from mathfont.dtx. You can do
-this in two ways:
+package file mathfont.sty from mathfont_code.dtx. You can
+do this in two ways:
(1) Running Plain TeX on mathfont_code.dtx will create
mathfont.sty as well as several other tex files
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf
index 1b581325fed..39ee46157c9 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex
index 34d629031af..8ae2dd586b1 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `doc')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_equations.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_equations.tex
index 0814fe65625..58aaa31bcee 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_equations.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_equations.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `equations')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.pdf
index ef8e4439c2a..8dd3e85a979 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.tex
index 102d106d834..c8c661700f2 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_cormorant.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `cormorant')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -58,29 +59,34 @@
%%
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_cormorant.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
\usepackage{amsmath}
\DeclareMathOperator{\Res}{Res}
\usepackage{mathfont}
-\DeclareFontFamily{TU}{Cormorant}{}
-\DeclareFontShape{TU}{Cormorant}{m}{n}
- {<->"Cormorant Medium:\M@otf@features;-liga"}{}
-\DeclareFontShape{TU}{Cormorant}{m}{it}
- {<->"Cormorant Medium Italic:\M@otf@features"}{}
\mathfont[greeklower=upright,greekupper]{Crimson}
\mathfont[diacritics]{Bona Nova}
-\setfont{Cormorant}
+\setfont{Cormorant:-liga}
\RuleThicknessFactor{600}
\DeclareMathSymbol{\nabla}{\mathord}{Mupright0}{"2207}
\DeclareMathSymbol{\nabla}{\mathord}{Mupright0}{"2207}
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.pdf
index 3ba67383209..7bdc3e3db0b 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.tex
index 0b45b8ee39b..f62187b96a8 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_kelvinch.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `kelvinch')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -58,8 +59,18 @@
%%
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_kelvinch.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -73,7 +84,7 @@
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.pdf
index 221f66ba6b8..e5fa29a0e9f 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.tex
index 31b71a7e371..fbd91df1f64 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_roboto.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `roboto')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -58,8 +59,18 @@
%%
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_roboto.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -77,7 +88,7 @@
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.pdf
index 25b8de05670..5e67db5cdd9 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.tex
index 21c9efc3434..951dfc6a7a4 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example_typey.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `typey')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -58,8 +59,18 @@
%%
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_typey.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, retypeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -72,6 +83,7 @@
%% it has no bold fontface---we use embolden from luaotflaod
%% to make a fake bold
+\makeatletter
\DeclareFontFamily{TU}{Typey}{}
\DeclareFontShape{TU}{Typey}{m}{n}
{<->"Typey McTypeface:\M@otf@features"}{}
@@ -93,6 +105,8 @@
{<->"Typey McTypeface:\M@otf@features;embolden=6;mode=base"}{}
\DeclareFontShape{TU}{Typey-base}{\bfdefault}{\itdefault}
{<->"Typey McTypeface/I:\M@otf@features;embolden=6;mode=base"}{}
+\makeatother
+
\setfont{Typey}
\mathfont[]{STIXGeneral}
\DeclareSymbolFont{Mroman2}{TU}{STIXGeneral}{m}{n}
@@ -102,7 +116,7 @@
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex
index d3139fa1f9c..0ea1d3f59f5 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `heading')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -59,8 +60,11 @@
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
+\csname count@\endcsname\catcode`\@
+\makeatletter
+
\def\packagedate{December 2022}
-\def\packageversion{2.2}
+\def\packageversion{2.2a}
\let\@@section\section
@@ -148,7 +152,7 @@
\noindent\printchars\loweralphabet\hbox to 0.6em{$\@tempstyle{z}$\hss}\par}
{\large\parindent=0pt\leftskip=0pt plus 1 fil\rightskip=0pt plus 1fil\parfillskip=0pt
-{\strut\Large Package \textsf{mathfont} v.\ \packageversion\ \documentname\let\thefootnote\relax\footnote{Acknowledgements: Thanks to Lyric Bingham for her work checking my unicode hex values. Thanks to Herbert Voss and Andreas Zidak for pointing out bugs in previous versions of \textsf{mathfont}. Thanks to Jean-Fran\c cois Burnol for pointing out an error in the documentation in reference to their \textsf{mathastext} package.}\global\advance\c@footnote\m@ne}\par
+{\strut\Large Package \textsf{mathfont} v.\ \packageversion\ \documentname\let\thefootnote\relax\footnote{Acknowledgements: Thanks to Lyric Bingham for her work checking my unicode hex values. Thanks to Shyam Sundar, Adrian Vollmer, Herbert Voss, and Andreas Zidak for pointing out bugs in previous versions of \textsf{mathfont}. Thanks to Jean-Fran\c cois Burnol for pointing out an error in the documentation in reference to their \textsf{mathastext} package.}\global\advance\c@footnote\m@ne}\par
{\strut Conrad Kosowsky}\par
{\strut\packagedate}\par
{\strut\ttfamily kosowsky.latex@gmail.com}\par}
@@ -180,6 +184,9 @@
\bigskip\bigskip\nointerlineskip
\centerline{\vrule height 0.5pt width 2.5in}\bigskip\medskip
\fi
+
+\catcode`\@\count@
+
\endinput
%%
%% End of file `mathfont_heading.tex'.
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdf
index 13281e93c00..21c4c40e908 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex
index dc55d180f08..1c587148a6a 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `chars')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf
index b55e9db8fec..3ffe92b216b 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex
index 7dda09d536b..3f6495802e5 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `user')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -90,13 +91,13 @@
\def\showabstract{1}
\input mathfont_heading.tex
-Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task because fonts are complicated objects.\footnote{The last 30 years have seen huge advances in loading fonts with \TeX. Donald Knuth originally designed \TeX\ to load fonts created with Metafont, and only more recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ have extended \TeX's font-loading capabilities to unicode. \XeTeX\ supports OpenType and TrueType fonts natively, and Lua\TeX\ can load OpenType fonts through the \textsf{luaotfload} package. Information on \XeTeX\ is available at \link{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \link{http://www.luatex.org/}. See also Ulrike Fischer, et al., ``\textsf{luaotfload}---OpenType `loader' for Plain \TeX\ and \LaTeX,'' \link{https://ctan.org/pkg/luaotfload}.} The \textsf{mathfont} package loads TrueType and OpenType fonts for use in math mode, and this document explains the package's user-level commands. For version history and code implementation, see |mathfont_code.pdf|, and for a list of all symbols accessible with \textsf{mathfont}, see |mathfont_symbol_list.pdf|. The \textsf{mathfont} installation also includes four example files, and all \textsf{mathfont} pdf documentation files are available on \textsc{ctan}.
+Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task because fonts are complicated.\footnote{The last 30 years have seen huge advances in loading fonts with \TeX. Donald Knuth originally designed \TeX\ to load fonts created with Metafont, and only more recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ have extended \TeX's font-loading capabilities to unicode. \XeTeX\ supports OpenType and TrueType fonts natively, and Lua\TeX\ can load OpenType fonts through the \textsf{luaotfload} package. Information on \XeTeX\ is available at \link{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \link{http://www.luatex.org/}. See also Ulrike Fischer, et al., ``\textsf{luaotfload}---OpenType `loader' for Plain \TeX\ and \LaTeX,'' \link{https://ctan.org/pkg/luaotfload}.} The \textsf{mathfont} package loads TrueType and OpenType fonts for use in math mode, and this document explains the package's user-level commands. For version history and code implementation, see |mathfont_code.pdf|, and for a list of all symbols accessible with \textsf{mathfont}, see |mathfont_symbol_list.pdf|. The \textsf{mathfont} installation also includes four example files, and all \textsf{mathfont} pdf documentation files are available on \textsc{ctan}. Because unicode text fonts outnumber unicode math fonts, I hope that my package will expand the set of possibilities for typesetting math in \LaTeX.
\section{Loading and Basic Functionality}
-Loading fonts for math typesetting is more complicated than for regular text. First, the commands to select fonts for math mode, both in plain \TeX\ and in the \textsc{nfss}, are more complicated than the macros to select text fonts, and second, \TeX\ expects fonts for math to contain extra information that it uses to format equations.\footnote{Specifically, this extra information is a set of large variants, math-specific parameter values associated with individual characters, and a MathConstants table. Also, math fonts often use slightly wider bounding boxes for letters in math mode---the Computer Modern $f$ is a famous example. For this reason, \textsf{mathfont} also provides an interface to enlarge the bounding boxes of Latin letters when they appear in math mode. See section 4 for details.} Broadly speaking, we say that a \textit{math font} contains this extra information, whereas a \textit{text font} does not, and typesetting math with glyphs from one or more text fonts usually results in equations that are less aesthetically pleasing than using a properly prepared math font. The functionality of \textsf{mathfont} then is twofold: (1) provide a wrapper around the \textsc{nfss} commands for math typesetting that serves as a high-level interface; and (2) implement Lua\TeX\ callbacks that artificially convert text fonts into math fonts at loading.\footnote{Values for MathConstants table are different from but inspired by Ulrik Vieth, ``Understanding the \AE sthetics of Math Typesetting,'' (Bacho\TeX\ Conference, 2008) and Ulrik Vieth ``OpenType Math Illuminated,'' \textit{TUGboat} 30 (2009): 22--31. See also Bogus\l aw Jackowski, ``Appendix G Illuminated,'' \textit{TUGboat} 27 (2006): 83--90.} Please note that \textsf{mathfont} tries its best to get your fonts right, but if you run into trouble loading the correct font files, you should declare your font family and shapes in the \textsc{nfss} before setting any fonts with \textsf{mathfont}. Because unicode text fonts greatly outnumber unicode math fonts, I hope that my package will expand the set of fonts available for typesetting math in \LaTeX.
+Loading fonts for math typesetting is more complicated than for regular text. First, selecting fonts for math mode, both in plain \TeX\ and in the \textsc{nfss}, involves additional macros above and beyond what we need to load text fonts. Second, \TeX\ expects fonts for math to contain extra information for formatting equations.\footnote{Specifically, this extra information is a set of large variants, math-specific parameter values associated with individual characters, and a MathConstants table. Also, math fonts often use slightly wider bounding boxes for letters in math mode---the Computer Modern $f$ is a well-known example. (Compare \fbox{$f$} and \fbox{\texttt{f}}.) For this reason, \textsf{mathfont} also provides an interface to enlarge the bounding boxes of Latin letters when they appear in math mode. See section 5 for details.} Broadly speaking, we say that a \textit{math font} contains this extra information, whereas a \textit{text font} does not, and typesetting math with glyphs from one or more text fonts usually results in equations that are less aesthetically pleasing than using a properly prepared math font. The functionality of \textsf{mathfont} then is twofold: (1) provide a wrapper around the \textsc{nfss} commands for math typesetting that serves as a high-level interface; and (2) implement Lua\TeX\ callbacks that artificially convert text fonts into math fonts at loading.\footnote{Values for MathConstants table are different from but inspired by Ulrik Vieth, ``Understanding the \AE sthetics of Math Typesetting,'' (Bacho\TeX\ Conference, 2008) and Ulrik Vieth ``OpenType Math Illuminated,'' \textit{TUGboat} 30 (2009): 22--31. See also Bogus\l aw Jackowski, ``Appendix G Illuminated,'' \textit{TUGboat} 27 (2006): 83--90.} Although \textsf{mathfont} tries its best to get your fonts right, it may run into trouble when picking fonts to load. If this happens, you should declare your font family and shapes in the \textsc{nfss} before setting any fonts with \textsf{mathfont}.
-You must use one of \XeLaTeX\ or Lua\LaTeX\ to typeset a document with \textsf{mathfont}. You can load \textsf{mathfont} with the standard |\usepackage{mathfont}| syntax, and the package accepts three optional arguments. If you use Lua\TeX, the options |adjust| or |no-adjust| will manually specify whether \textsf{mathfont} should adapt text fonts for math mode, and \textsf{mathfont} selects |adjust| by default. If you use \XeTeX, \textsf{mathfont} cannot adjust any font objects with Lua callbacks, and either of these package options will cause an error.\footnote{In particular, with \XeLaTeX\ \textsf{mathfont} does not add big operators or resizable delimiters. This means you will have to use the Computer Modern defaults, load a separate math font for resizable characters, or end up with a document where large operators and delimiters do not scale like they do normally.} For this reason, using Lua\TeX\ with \textsf{mathfont} is recommended as of version 2.0. If you load \textsf{mathfont} with any other optional argument, the package will interpret it as a font name and call |\setfont| (described in the next section) on your argument. Doing so selects that font for the text of your document and for the character classes in the upper section of Table~1.
+You must use one of \XeLaTeX\ or Lua\LaTeX\ to typeset a document with \textsf{mathfont}. You can load \textsf{mathfont} with the standard |\usepackage{mathfont}| syntax, and the package accepts three optional arguments. If you use Lua\TeX, the options |adjust| or |no-adjust| will manually specify whether \textsf{mathfont} should adapt text fonts for math mode, and \textsf{mathfont} selects |adjust| by default. If you use \XeTeX, \textsf{mathfont} cannot adjust any font objects with Lua callbacks, and either of these package options will cause an error.\footnote{With \XeLaTeX, \textsf{mathfont} does not add big operators or resizable delimiters. This means you will have to use the Computer Modern defaults, load a separate math font for resizable characters, or end up with a document where large operators and delimiters do not scale like they do normally.} For this reason, using Lua\TeX\ with \textsf{mathfont} is recommended as of version 2.0. If you load \textsf{mathfont} with any other optional argument, the package will interpret it as a font name and call |\setfont| (described in the next section) on your argument. Doing so selects that font for the text of your document and for the character classes in the upper section of Table~1.
The \textsf{mathfont} package is closely related to several other \LaTeX\ packages. The functionality is closest to that of \textsf{mathspec} by Andrew Gilbert Moschou, which is compatible with \XeTeX\ only and selects characters from text fonts for math.\footnote{Andrew Gilbert Moschou, ``\textsf{mathspec}---Specify arbitrary fonts for mathematics in \XeTeX,'' \link{https://ctan.org/pkg/mathspec}.} The \textsf{unicode-math} package is the standard \LaTeX\ package for loading actual unicode math fonts, and if you have a unicode font with proper math support, rather than a text font that you want to use for equations, consider using this package instead of \textsf{mathfont}.\footnote{Will Robertson, et al., ``\textsf{unicode-math}---Unicode mathematics support for XeTeX and LuaTeX,'' \link{https://ctan.org/pkg/unicode-math}.} Users who want to a text font for math with pdf\LaTeX\ should consider Jean-Fran\c cois Burnol's \textsf{mathastext} because \textsf{mathfont} is incompatible with pdf\TeX.\footnote{Jean-Fran\c cois Burnol, ``\textsf{mathastext}---Use the text font in maths mode,'' \link{https://ctan.org/pkg/mathastext}. In several previous versions of this documentation, I mischaracterized the approach of \textsf{mathastext} to \TeX's internal mathematics spacing. In fact, \textsf{mathastext} preserves and in some cases extends rules for space between various math-mode characters.} Finally, you will probably be better off using \textsf{fontspec} if your document does not contain any math.\footnote{Will Robertson and Khaled Hosny, ``\textsf{fontspec}---Advanced font selection in \XeLaTeX\ and Lua\LaTeX,'' \link{https://ctan.org/pkg/fontspec}.} The \textsf{fontspec} package is designed to load TrueType and OpenType fonts for text and provides a high-level interface for selecting OpenType font features.
@@ -289,7 +290,7 @@ Callback Name & What It Does By Default\\\midrule
\end{tabularx}
\end{figure}
-Finally, advanced users who want to interact with the font adjustment process directly should use the six callbacks in Table~\ref{Callbacks}. When Lua\TeX\ loads a font, \textsf{mathfont} (1) always calls |mathfont.inspect_font| and (2) calls the other five callbacks in the order that they appear in Table~\ref{Callbacks} if the font object contains |nomath=true|. Functions added to these callbacks should accept a font object as a single argument and return nothing. Further, please be careful when loading functions in the |disable_nomath|, |add_math_constants|, and |fix_character_metrics| callbacks. If you add a function there, Lua\TeX\ will not carry out the default behvaior associated with the callback, so do not mess with these three callbacks unless you are duplicating the default behavior of the callback or you really know what you're doing. Otherwise, you risk breaking the package. See |mathfont_code.pdf| for more information.
+Finally, advanced users who want to interact with the font adjustment process directly should use the six callbacks in Table~\ref{Callbacks}. When \textsf{luaotfload} loads a font, \textsf{mathfont} (1) always calls |mathfont.inspect_font| and (2) calls the other five callbacks in the order that they appear in Table~\ref{Callbacks} if the font object contains |nomath=true|. Functions added to these callbacks should accept a font object as a single argument and return nothing. Further, please be careful when loading functions in the |disable_nomath|, |add_math_constants|, and |fix_character_metrics| callbacks. If you add a function there, Lua\TeX\ will not carry out the default behvaior associated with the callback, so do not mess with these three callbacks unless you are duplicating the default behavior or you really know what you're doing. Otherwise, you risk breaking the package. See |mathfont_code.pdf| for more information.
\end{document}
\endinput
diff --git a/Master/texmf-dist/source/latex/mathfont/mathfont_code.dtx b/Master/texmf-dist/source/latex/mathfont/mathfont_code.dtx
index 8b73b6d5878..d1129f6fe14 100644
--- a/Master/texmf-dist/source/latex/mathfont/mathfont_code.dtx
+++ b/Master/texmf-dist/source/latex/mathfont/mathfont_code.dtx
@@ -1,10 +1,11 @@
% \iffalse ---!!! FIRST META-COMMENT !!!---
%
%
-% This file is mathfont_code.dtx from version 2.2 of the
-% free and open-source LaTeX package "mathfont," to be
-% used with the XeTeX or LuaTeX engines. Running Plain
-% TeX mathfont_code.dtx will produce the following files:
+% This file is mathfont_code.dtx from version 2.2a of the
+% free and open-source LaTeX package "mathfont," released
+% December 2022, to be used with the XeTeX or LuaTeX engines.
+% Running Plain TeX mathfont_code.dtx will produce the
+% following files:
%
% (1) the package file mathfont.sty;
%
@@ -41,9 +42,10 @@
% \iffalse ---!!! SECOND META-COMMENT !!!---
%
%
-% This file is from version 2.2 of the free and open-source
-% LaTeX package "mathfont," to be used with the XeTeX or
-% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+% This file is from version 2.2a of the free and open-source
+% LaTeX package "mathfont," released December 2022, to be used
+% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+% is recommended.)
%
% Copyright 2018-2022 by Conrad Kosowsky
%
@@ -151,9 +153,10 @@
\askforoverwritefalse
\preamble
-This file is from version 2.2 of the free and open-source
-LaTeX package "mathfont," to be used with the XeTeX or
-LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+This file is from version 2.2a of the free and open-source
+LaTeX package "mathfont," released December 2022, to be used
+with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+is recommended.)
Copyright 2018-2022 by Conrad Kosowsky
@@ -281,7 +284,7 @@ For more information, see mathfont_code.dtx. Happy TeXing!
% \fi
%
%
-% \CheckSum{6615}
+% \CheckSum{6619}
% \init@checksum
%
%
@@ -390,7 +393,7 @@ For more information, see mathfont_code.dtx. Happy TeXing!
% First and foremost, the package needs to declare itself.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathfont}[2022/12/04 v. 2.2 Package mathfont]
+\ProvidesPackage{mathfont}[2022/12/05 v. 2.2a Package mathfont]
% \end{macrocode}
% We specify conditionals that we will use later in handling options and setup.
% \begin{macrocode}
@@ -1469,18 +1472,18 @@ For more information, see mathfont_code.dtx. Happy TeXing!
\def\@tempb{#1}
\def\@tempc{upright}
\ifx\@tempb\@tempc
- \let\@tempc\shapedefault
+ \let\m@th@const@nts@font@sh@pe\shapedefault
\else
\def\@tempc{italic}
\ifx\@tempb\@tempc
- \let\@tempc\itdefault
+ \let\m@th@const@nts@font@sh@pe\itdefault
\else
\M@BadMathConstantsFontTypeError{#1}
\fi
\fi
\ifcsname symM#1\csname M@fontid@\@tempa\endcsname\endcsname\else
\DeclareSymbolFont{M#1\csname M@fontid@\@tempa\endcsname}
- {TU}{\@tempa}{\mddefault}{\@tempc}
+ {TU}{\@tempa}{\mddefault}{\m@th@const@nts@font@sh@pe}
\fi
\let\m@th@const@nts@font\@tempa
% \end{macrocode}
@@ -1495,8 +1498,10 @@ For more information, see mathfont_code.dtx. Happy TeXing!
\csname symM#1\csname M@fontid@\m@th@const@nts@font\endcsname
\expandafter
\endcsname % expands to \symMupright<id>
- \csname TU/\m@th@const@nts@font/\seriesdefault/\@tempc
- \endcsname % expands to \TU/<nfss family name>/m/<shape>
+ \csname TU/\m@th@const@nts@font
+ /\seriesdefault
+ /\m@th@const@nts@font@sh@pe\endcsname
+ % above \csname expands to \TU/<nfss family name>/m/<shape>
\globaldefs\@ne
\expandafter\@gobbletwo\math@fonts % gobble to avoid infinite loop
\endgroup}
@@ -1613,13 +1618,18 @@ For more information, see mathfont_code.dtx. Happy TeXing!
\else
\directlua{
local num = tonumber("\@tempa")
+ local bool = 0 % keep track if \@tempa is (int >= 0)
if num then % if number?
if num == num - (num \@percentchar 1) then % if integer?
if num >= 0 then % if nonnegative?
- tex.print("\@backslashchar\@backslashchar endgroup%
- \@backslashchar\@backslashchar M@arg@goodtrue")
+ bool = 1
end
end
+ end
+ tex.print("\@backslashchar\@backslashchar endgroup")
+ if bool == 1 then
+ tex.print("\@backslashchar\@backslashchar csname M@arg@goodtrue%
+ \@backslashchar\@backslashchar endcsname")
end}
\fi
\fi}
@@ -4693,9 +4703,15 @@ mathfont:add_extensible_variants(smash, int_glyphs, int_scale)
%
% \version{2.2}{December 2022\strut}
% \item changed the easter egg text
-% \item updated patch for |\DeclareSymbolFont| to work with changes to the kernel
+% \item updated patch for |\DeclareSymbolFont| to work with changes to the kernel (eliminated |\M@p@tch@decl@re| error message)
% \item calling Plain \TeX\ on \texttt{mathfont\_code.dtx} produces sty file and no pdf file
%
+% \version{2.2a}{December 2022\strut}
+% \item bug fix for |\mathconstantsfont|
+% \item bug fix for |\M@check@int|
+% \item removed |\makeatletter| from example files
+% \item added |doc2| option to |ltxdoc| in \texttt{mathfont\_code.dtx}
+%
%
% \egroup
% \end{multicols*}
@@ -4742,15 +4758,14 @@ mathfont:add_extensible_variants(smash, int_glyphs, int_scale)
\input mathfont_heading.tex
-Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task because fonts are complicated objects.\footnote{The last 30 years have seen huge advances in loading fonts with \TeX. Donald Knuth originally designed \TeX\ to load fonts created with Metafont, and only more recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ have extended \TeX's font-loading capabilities to unicode. \XeTeX\ supports OpenType and TrueType fonts natively, and Lua\TeX\ can load OpenType fonts through the \textsf{luaotfload} package. Information on \XeTeX\ is available at \link{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \link{http://www.luatex.org/}. See also Ulrike Fischer, et al., ``\textsf{luaotfload}---OpenType `loader' for Plain \TeX\ and \LaTeX,'' \link{https://ctan.org/pkg/luaotfload}.} The \textsf{mathfont} package loads TrueType and OpenType fonts for use in math mode, and this document explains the package's user-level commands. For version history and code implementation, see |mathfont_code.pdf|, and for a list of all symbols accessible with \textsf{mathfont}, see |mathfont_symbol_list.pdf|. The \textsf{mathfont} installation also includes four example files, and all \textsf{mathfont} pdf documentation files are available on \textsc{ctan}.
+Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task because fonts are complicated.\footnote{The last 30 years have seen huge advances in loading fonts with \TeX. Donald Knuth originally designed \TeX\ to load fonts created with Metafont, and only more recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ have extended \TeX's font-loading capabilities to unicode. \XeTeX\ supports OpenType and TrueType fonts natively, and Lua\TeX\ can load OpenType fonts through the \textsf{luaotfload} package. Information on \XeTeX\ is available at \link{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \link{http://www.luatex.org/}. See also Ulrike Fischer, et al., ``\textsf{luaotfload}---OpenType `loader' for Plain \TeX\ and \LaTeX,'' \link{https://ctan.org/pkg/luaotfload}.} The \textsf{mathfont} package loads TrueType and OpenType fonts for use in math mode, and this document explains the package's user-level commands. For version history and code implementation, see |mathfont_code.pdf|, and for a list of all symbols accessible with \textsf{mathfont}, see |mathfont_symbol_list.pdf|. The \textsf{mathfont} installation also includes four example files, and all \textsf{mathfont} pdf documentation files are available on \textsc{ctan}. Because unicode text fonts outnumber unicode math fonts, I hope that my package will expand the set of possibilities for typesetting math in \LaTeX.
\section{Loading and Basic Functionality}
-Loading fonts for math typesetting is more complicated than for regular text. First, the commands to select fonts for math mode, both in plain \TeX\ and in the \textsc{nfss}, are more complicated than the macros to select text fonts, and second, \TeX\ expects fonts for math to contain extra information that it uses to format equations.\footnote{Specifically, this extra information is a set of large variants, math-specific parameter values associated with individual characters, and a MathConstants table. Also, math fonts often use slightly wider bounding boxes for letters in math mode---the Computer Modern $f$ is a famous example. For this reason, \textsf{mathfont} also provides an interface to enlarge the bounding boxes of Latin letters when they appear in math mode. See section 4 for details.} Broadly speaking, we say that a \textit{math font} contains this extra information, whereas a \textit{text font} does not, and typesetting math with glyphs from one or more text fonts usually results in equations that are less aesthetically pleasing than using a properly prepared math font. The functionality of \textsf{mathfont} then is twofold: (1) provide a wrapper around the \textsc{nfss} commands for math typesetting that serves as a high-level interface; and (2) implement Lua\TeX\ callbacks that artificially convert text fonts into math fonts at loading.\footnote{Values for MathConstants table are different from but inspired by Ulrik Vieth, ``Understanding the \AE sthetics of Math Typesetting,'' (Bacho\TeX\ Conference, 2008) and Ulrik Vieth ``OpenType Math Illuminated,'' \textit{TUGboat} 30 (2009): 22--31. See also Bogus\l aw Jackowski, ``Appendix G Illuminated,'' \textit{TUGboat} 27 (2006): 83--90.} Please note that \textsf{mathfont} tries its best to get your fonts right, but if you run into trouble loading the correct font files, you should declare your font family and shapes in the \textsc{nfss} before setting any fonts with \textsf{mathfont}. Because unicode text fonts greatly outnumber unicode math fonts, I hope that my package will expand the set of fonts available for typesetting math in \LaTeX.
-
+Loading fonts for math typesetting is more complicated than for regular text. First, selecting fonts for math mode, both in plain \TeX\ and in the \textsc{nfss}, involves additional macros above and beyond what we need to load text fonts. Second, \TeX\ expects fonts for math to contain extra information for formatting equations.\footnote{Specifically, this extra information is a set of large variants, math-specific parameter values associated with individual characters, and a MathConstants table. Also, math fonts often use slightly wider bounding boxes for letters in math mode---the Computer Modern $f$ is a well-known example. (Compare \fbox{$f$} and \fbox{\texttt{f}}.) For this reason, \textsf{mathfont} also provides an interface to enlarge the bounding boxes of Latin letters when they appear in math mode. See section 5 for details.} Broadly speaking, we say that a \textit{math font} contains this extra information, whereas a \textit{text font} does not, and typesetting math with glyphs from one or more text fonts usually results in equations that are less aesthetically pleasing than using a properly prepared math font. The functionality of \textsf{mathfont} then is twofold: (1) provide a wrapper around the \textsc{nfss} commands for math typesetting that serves as a high-level interface; and (2) implement Lua\TeX\ callbacks that artificially convert text fonts into math fonts at loading.\footnote{Values for MathConstants table are different from but inspired by Ulrik Vieth, ``Understanding the \AE sthetics of Math Typesetting,'' (Bacho\TeX\ Conference, 2008) and Ulrik Vieth ``OpenType Math Illuminated,'' \textit{TUGboat} 30 (2009): 22--31. See also Bogus\l aw Jackowski, ``Appendix G Illuminated,'' \textit{TUGboat} 27 (2006): 83--90.} Although \textsf{mathfont} tries its best to get your fonts right, it may run into trouble when picking fonts to load. If this happens, you should declare your font family and shapes in the \textsc{nfss} before setting any fonts with \textsf{mathfont}.
-You must use one of \XeLaTeX\ or Lua\LaTeX\ to typeset a document with \textsf{mathfont}. You can load \textsf{mathfont} with the standard |\usepackage{mathfont}| syntax, and the package accepts three optional arguments. If you use Lua\TeX, the options |adjust| or |no-adjust| will manually specify whether \textsf{mathfont} should adapt text fonts for math mode, and \textsf{mathfont} selects |adjust| by default. If you use \XeTeX, \textsf{mathfont} cannot adjust any font objects with Lua callbacks, and either of these package options will cause an error.\footnote{In particular, with \XeLaTeX\ \textsf{mathfont} does not add big operators or resizable delimiters. This means you will have to use the Computer Modern defaults, load a separate math font for resizable characters, or end up with a document where large operators and delimiters do not scale like they do normally.} For this reason, using Lua\TeX\ with \textsf{mathfont} is recommended as of version 2.0. If you load \textsf{mathfont} with any other optional argument, the package will interpret it as a font name and call |\setfont| (described in the next section) on your argument. Doing so selects that font for the text of your document and for the character classes in the upper section of Table~1.
+You must use one of \XeLaTeX\ or Lua\LaTeX\ to typeset a document with \textsf{mathfont}. You can load \textsf{mathfont} with the standard |\usepackage{mathfont}| syntax, and the package accepts three optional arguments. If you use Lua\TeX, the options |adjust| or |no-adjust| will manually specify whether \textsf{mathfont} should adapt text fonts for math mode, and \textsf{mathfont} selects |adjust| by default. If you use \XeTeX, \textsf{mathfont} cannot adjust any font objects with Lua callbacks, and either of these package options will cause an error.\footnote{With \XeLaTeX, \textsf{mathfont} does not add big operators or resizable delimiters. This means you will have to use the Computer Modern defaults, load a separate math font for resizable characters, or end up with a document where large operators and delimiters do not scale like they do normally.} For this reason, using Lua\TeX\ with \textsf{mathfont} is recommended as of version 2.0. If you load \textsf{mathfont} with any other optional argument, the package will interpret it as a font name and call |\setfont| (described in the next section) on your argument. Doing so selects that font for the text of your document and for the character classes in the upper section of Table~1.
The \textsf{mathfont} package is closely related to several other \LaTeX\ packages. The functionality is closest to that of \textsf{mathspec} by Andrew Gilbert Moschou, which is compatible with \XeTeX\ only and selects characters from text fonts for math.\footnote{Andrew Gilbert Moschou, ``\textsf{mathspec}---Specify arbitrary fonts for mathematics in \XeTeX,'' \link{https://ctan.org/pkg/mathspec}.} The \textsf{unicode-math} package is the standard \LaTeX\ package for loading actual unicode math fonts, and if you have a unicode font with proper math support, rather than a text font that you want to use for equations, consider using this package instead of \textsf{mathfont}.\footnote{Will Robertson, et al., ``\textsf{unicode-math}---Unicode mathematics support for XeTeX and LuaTeX,'' \link{https://ctan.org/pkg/unicode-math}.} Users who want to a text font for math with pdf\LaTeX\ should consider Jean-Fran\c cois Burnol's \textsf{mathastext} because \textsf{mathfont} is incompatible with pdf\TeX.\footnote{Jean-Fran\c cois Burnol, ``\textsf{mathastext}---Use the text font in maths mode,'' \link{https://ctan.org/pkg/mathastext}. In several previous versions of this documentation, I mischaracterized the approach of \textsf{mathastext} to \TeX's internal mathematics spacing. In fact, \textsf{mathastext} preserves and in some cases extends rules for space between various math-mode characters.} Finally, you will probably be better off using \textsf{fontspec} if your document does not contain any math.\footnote{Will Robertson and Khaled Hosny, ``\textsf{fontspec}---Advanced font selection in \XeLaTeX\ and Lua\LaTeX,'' \link{https://ctan.org/pkg/fontspec}.} The \textsf{fontspec} package is designed to load TrueType and OpenType fonts for text and provides a high-level interface for selecting OpenType font features.
@@ -4955,8 +4970,7 @@ Callback Name & What It Does By Default\\\midrule
\end{tabularx}
\end{figure}
-Finally, advanced users who want to interact with the font adjustment process directly should use the six callbacks in Table~\ref{Callbacks}. When Lua\TeX\ loads a font, \textsf{mathfont} (1) always calls |mathfont.inspect_font| and (2) calls the other five callbacks in the order that they appear in Table~\ref{Callbacks} if the font object contains |nomath=true|. Functions added to these callbacks should accept a font object as a single argument and return nothing. Further, please be careful when loading functions in the |disable_nomath|, |add_math_constants|, and |fix_character_metrics| callbacks. If you add a function there, Lua\TeX\ will not carry out the default behvaior associated with the callback, so do not mess with these three callbacks unless you are duplicating the default behavior of the callback or you really know what you're doing. Otherwise, you risk breaking the package. See |mathfont_code.pdf| for more information.
-
+Finally, advanced users who want to interact with the font adjustment process directly should use the six callbacks in Table~\ref{Callbacks}. When \textsf{luaotfload} loads a font, \textsf{mathfont} (1) always calls |mathfont.inspect_font| and (2) calls the other five callbacks in the order that they appear in Table~\ref{Callbacks} if the font object contains |nomath=true|. Functions added to these callbacks should accept a font object as a single argument and return nothing. Further, please be careful when loading functions in the |disable_nomath|, |add_math_constants|, and |fix_character_metrics| callbacks. If you add a function there, Lua\TeX\ will not carry out the default behvaior associated with the callback, so do not mess with these three callbacks unless you are duplicating the default behavior or you really know what you're doing. Otherwise, you risk breaking the package. See |mathfont_code.pdf| for more information.
\end{document}
@@ -5890,29 +5904,34 @@ t'=\left(t-\frac{vx}{c^2}\right)\frac1{\sqrt{1-\frac{v^2}{c^2}}}
\end{multicols}
%</equations>
%<*cormorant>
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_cormorant.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
\usepackage{amsmath}
\DeclareMathOperator{\Res}{Res}
\usepackage{mathfont}
-\DeclareFontFamily{TU}{Cormorant}{}
-\DeclareFontShape{TU}{Cormorant}{m}{n}
- {<->"Cormorant Medium:\M@otf@features;-liga"}{}
-\DeclareFontShape{TU}{Cormorant}{m}{it}
- {<->"Cormorant Medium Italic:\M@otf@features"}{}
\mathfont[greeklower=upright,greekupper]{Crimson}
\mathfont[diacritics]{Bona Nova}
-\setfont{Cormorant}
+\setfont{Cormorant:-liga}
\RuleThicknessFactor{600}
\DeclareMathSymbol{\nabla}{\mathord}{Mupright0}{"2207}
\DeclareMathSymbol{\nabla}{\mathord}{Mupright0}{"2207}
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
@@ -5928,8 +5947,18 @@ This is Cormorant with Crimson for Greek characters and Bona Nova for diacritics
\end{document}
%</cormorant>
%<*kelvinch>
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_kelvinch.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -5943,7 +5972,7 @@ This is Cormorant with Crimson for Greek characters and Bona Nova for diacritics
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
@@ -5958,8 +5987,18 @@ This is Kelvinch with Crimson for the radical signs. ``Testing. Testing.'' Brown
\end{document}
%</kelvinch>
%<*roboto>
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_roboto.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, typeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -5977,7 +6016,7 @@ This is Kelvinch with Crimson for the radical signs. ``Testing. Testing.'' Brown
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
@@ -5993,8 +6032,18 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
\end{document}
%</roboto>
%<*typey>
+\ifx\directlua\undefined
+ \PackageError{mathfont}
+ {\MessageBreak
+ LuaLaTeX is recommended for\MessageBreak
+ mathfont_example_typey.tex}
+ {It's recommended that you typset this file\MessageBreak
+ with LuaTeX. You can use a different engine\MessageBreak
+ if you want, but things will turn out weird.\MessageBreak
+ To resolve this error, retypeset this file\MessageBreak
+ with LuaLaTeX.}
+\fi
\documentclass[12pt]{article}
-\makeatletter
\usepackage[margin=1in]{geometry}
\usepackage{innerscript}
\usepackage{multicol}
@@ -6007,6 +6056,7 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
%% it has no bold fontface---we use embolden from luaotflaod
%% to make a fake bold
+\makeatletter
\DeclareFontFamily{TU}{Typey}{}
\DeclareFontShape{TU}{Typey}{m}{n}
{<->"Typey McTypeface:\M@otf@features"}{}
@@ -6028,6 +6078,8 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
{<->"Typey McTypeface:\M@otf@features;embolden=6;mode=base"}{}
\DeclareFontShape{TU}{Typey-base}{\bfdefault}{\itdefault}
{<->"Typey McTypeface/I:\M@otf@features;embolden=6;mode=base"}{}
+\makeatother
+
\setfont{Typey}
\mathfont[]{STIXGeneral}
\DeclareSymbolFont{Mroman2}{TU}{STIXGeneral}{m}{n}
@@ -6037,7 +6089,7 @@ This is Roboto with Overpass for the radical signs and STIXGeneral for the tenso
\parindent=0pt\relax
\begin{document}
-\let\footnote\@gobble
+\def\footnote#1{}
\def\showabstract{0}
\let\textsf\relax
\let\ttfamily\relax
@@ -6054,14 +6106,15 @@ This is Typey McTypeface with Crimson for the radical signs and STIXGeneral for
%</typey>
%<*heading>
+\csname count@\endcsname\catcode`\@
+\makeatletter
+
% package date and edition
\def\packagedate{December 2022}
-\def\packageversion{2.2}
+\def\packageversion{2.2a}
% header and footer commands
-
-
\let\@@section\section
\def\section{\@ifstar\star@sect\no@star@sect}
\def\star@sect#1{\@@section*{#1}\section@name{#1}}
@@ -6151,7 +6204,7 @@ This is Typey McTypeface with Crimson for the radical signs and STIXGeneral for
% title information
{\large\parindent=0pt\leftskip=0pt plus 1 fil\rightskip=0pt plus 1fil\parfillskip=0pt
-{\strut\Large Package \textsf{mathfont} v.\ \packageversion\ \documentname\let\thefootnote\relax\footnote{Acknowledgements: Thanks to Lyric Bingham for her work checking my unicode hex values. Thanks to Herbert Voss and Andreas Zidak for pointing out bugs in previous versions of \textsf{mathfont}. Thanks to Jean-Fran\c cois Burnol for pointing out an error in the documentation in reference to their \textsf{mathastext} package.}\global\advance\c@footnote\m@ne}\par
+{\strut\Large Package \textsf{mathfont} v.\ \packageversion\ \documentname\let\thefootnote\relax\footnote{Acknowledgements: Thanks to Lyric Bingham for her work checking my unicode hex values. Thanks to Shyam Sundar, Adrian Vollmer, Herbert Voss, and Andreas Zidak for pointing out bugs in previous versions of \textsf{mathfont}. Thanks to Jean-Fran\c cois Burnol for pointing out an error in the documentation in reference to their \textsf{mathastext} package.}\global\advance\c@footnote\m@ne}\par
{\strut Conrad Kosowsky}\par
{\strut\packagedate}\par
{\strut\ttfamily kosowsky.latex@gmail.com}\par}
@@ -6184,6 +6237,9 @@ This is Typey McTypeface with Crimson for the radical signs and STIXGeneral for
\bigskip\bigskip\nointerlineskip
\centerline{\vrule height 0.5pt width 2.5in}\bigskip\medskip
\fi
+
+\catcode`\@\count@
+
%</heading>
%<*doc>
diff --git a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
index 028bc72670f..17556e8a5ab 100644
--- a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
+++ b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
@@ -6,9 +6,10 @@
%%
%% mathfont_code.dtx (with options: `package')
%%
-%% This file is from version 2.2 of the free and open-source
-%% LaTeX package "mathfont," to be used with the XeTeX or
-%% LuaTeX engines. (As of version 2.0, LuaTeX is recommended.)
+%% This file is from version 2.2a of the free and open-source
+%% LaTeX package "mathfont," released December 2022, to be used
+%% with the XeTeX or LuaTeX engines. (As of version 2.0, LuaTeX
+%% is recommended.)
%%
%% Copyright 2018-2022 by Conrad Kosowsky
%%
@@ -59,7 +60,7 @@
%% For more information, see mathfont_code.dtx. Happy TeXing!
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathfont}[2022/12/04 v. 2.2 Package mathfont]
+\ProvidesPackage{mathfont}[2022/12/05 v. 2.2a Package mathfont]
\newif\ifM@XeTeXLuaTeX % is engine one of xetex or luatex?
\newif\ifM@Noluaotfload % cannot find luaotfload.sty?
\newif\ifM@adjust@font % should adjust fonts with lua script?
@@ -797,18 +798,18 @@
\def\@tempb{#1}
\def\@tempc{upright}
\ifx\@tempb\@tempc
- \let\@tempc\shapedefault
+ \let\m@th@const@nts@font@sh@pe\shapedefault
\else
\def\@tempc{italic}
\ifx\@tempb\@tempc
- \let\@tempc\itdefault
+ \let\m@th@const@nts@font@sh@pe\itdefault
\else
\M@BadMathConstantsFontTypeError{#1}
\fi
\fi
\ifcsname symM#1\csname M@fontid@\@tempa\endcsname\endcsname\else
\DeclareSymbolFont{M#1\csname M@fontid@\@tempa\endcsname}
- {TU}{\@tempa}{\mddefault}{\@tempc}
+ {TU}{\@tempa}{\mddefault}{\m@th@const@nts@font@sh@pe}
\fi
\let\m@th@const@nts@font\@tempa
\protected\def\M@SetMathConstants{%
@@ -818,8 +819,10 @@
\csname symM#1\csname M@fontid@\m@th@const@nts@font\endcsname
\expandafter
\endcsname % expands to \symMupright<id>
- \csname TU/\m@th@const@nts@font/\seriesdefault/\@tempc
- \endcsname % expands to \TU/<nfss family name>/m/<shape>
+ \csname TU/\m@th@const@nts@font
+ /\seriesdefault
+ /\m@th@const@nts@font@sh@pe\endcsname
+ % above \csname expands to \TU/<nfss family name>/m/<shape>
\globaldefs\@ne
\expandafter\@gobbletwo\math@fonts % gobble to avoid infinite loop
\endgroup}
@@ -904,13 +907,18 @@
\else
\directlua{
local num = tonumber("\@tempa")
+ local bool = 0 % keep track if \@tempa is (int >= 0)
if num then % if number?
if num == num - (num \@percentchar 1) then % if integer?
if num >= 0 then % if nonnegative?
- tex.print("\@backslashchar\@backslashchar endgroup%
- \@backslashchar\@backslashchar M@arg@goodtrue")
+ bool = 1
end
end
+ end
+ tex.print("\@backslashchar\@backslashchar endgroup")
+ if bool == 1 then
+ tex.print("\@backslashchar\@backslashchar csname M@arg@goodtrue%
+ \@backslashchar\@backslashchar endcsname")
end}
\fi
\fi}