summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont.pdfbin297850 -> 302105 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdfbin86282 -> 86247 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex2
-rw-r--r--Master/texmf-dist/source/latex/mathfont/mathfont.dtx256
-rw-r--r--Master/texmf-dist/tex/latex/mathfont/mathfont.sty20
5 files changed, 171 insertions, 107 deletions
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf
index b9945378efe..eef2355f748 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf
index a441a812a4f..c7bf1445ae0 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex
index d69aace431e..7def38f99f9 100644
--- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex
+++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex
@@ -61,7 +61,7 @@ Expanding $e^{iX}$ as a power series gives an expression for $\phi_X$ that we ca
\vfil
-A smooth manifold consists of a topological space $M$ equipped with a smooth maximal atlas $\leftbrace \phi_i\rightbrace$. The maps $\phi_i\colon U_i\longrightarrow\mathbb R$ technically aren't themselves differentiable, but their compositions $\phi_i^{}\circ\phi_j^{-1}$ are diffeomorphisms on subsets of $\mathbb R^n$. If we have a map $f\colon M\longrightarrow N$ between manifolds, this structure allows us to talk about differentiability of $f$. Specifically, we say that $f$ is smooth if for any $i$ and $j$, the composition
+A smooth manifold consists of a topological space $M$ equipped with a smooth maximal atlas $\leftbrace \phi_i\rightbrace$. The maps $\phi_i\colon U_i\longrightarrow\mathbb R$ are continuous, and their compositions $\phi_i^{}\circ\phi_j^{-1}$ are diffeomorphisms on subsets of $\mathbb R^n$. If we have a map $f\colon M\longrightarrow N$ between manifolds, this structure allows us to talk about differentiability of $f$. Specifically, we say that $f$ is smooth if for any $i$ and $j$, the composition
\[
\psi_j^{}\circ f\circ\phi_i^{-1}
\]
diff --git a/Master/texmf-dist/source/latex/mathfont/mathfont.dtx b/Master/texmf-dist/source/latex/mathfont/mathfont.dtx
index a0ed6fab636..9c723e6f553 100644
--- a/Master/texmf-dist/source/latex/mathfont/mathfont.dtx
+++ b/Master/texmf-dist/source/latex/mathfont/mathfont.dtx
@@ -81,6 +81,7 @@ information, see the original mathfont.dtx file.
\makeatletter
\usepackage[margin=72.27pt]{geometry}
\usepackage[factor=600,stretch=14,shrink=14,step=1]{microtype}
+\usepackage[bottom]{footmisc}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{tabularx}
@@ -101,24 +102,24 @@ information, see the original mathfont.dtx file.
%
% \fi
%
-% \CheckSum{2651}
+% \CheckSum{2653}
% \init@checksum
%
% \makeatother\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
% Lower-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
% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
% \makeatletter
%
%
@@ -133,7 +134,7 @@ information, see the original mathfont.dtx file.
% \DoNotIndex{\M@lower,\M@upper,\M@greeklower,\M@greekupper,\M@digits}
% \DoNotIndex{\M@bb,\M@cal,\M@frak,\M@bcal,\M@bfrak,\mathinner}
% \DoNotIndex{\DeclareRobustCommand,\joinrel,\smash,\newtoks,\if,\\,\@nil,\leavevmode}
-% \DoNotIndex{\begingroup,\endgroup,\+,\active,\@gobbletwo,\GenericError}
+% \DoNotIndex{\begingroup,\endgroup,\+,\active,\@gobbletwo,\GenericError,\catcode}
% \DoNotIndex{\M@bb@A,\M@bb@B,\M@bb@C,\M@bb@D,\M@bb@E,\M@bb@F}
% \DoNotIndex{\M@bb@G,\M@bb@H,\M@bb@I,\M@bb@J,\M@bb@K,\M@bb@L}
% \DoNotIndex{\M@bb@M,\M@bb@N,\M@bb@O,\M@bb@P,\M@bb@Q,\M@bb@R}
@@ -198,34 +199,50 @@ information, see the original mathfont.dtx file.
% \renewcommand\bottomfraction{1}
%
% {\large
-% \centerline{\Large Package \textsf{mathfont} v.\ 1.4 Documentation}\par
+% \centerline{\Large Package \textsf{mathfont} v.\ 1.5 Documentation}\par
% \centerline{Conrad Kosowsky}\par
% \centerline{April 2019}\par
% \centerline{\ttfamily kosowsky.latex@gmail.com}\par}
%
% \bigskip
%
-% \begin{abstract}
-% The \textsf{mathfont} package provides a flexible interface for changing the font of math-mode characters. The package allows the user to specify a default unicode font for each of six basic classes of Latin and Greek characters, and it provides additional support for unicode math and alphanumeric symbols, including punctuation. Crucially, \textsf{mathfont} is compatible with both Lua\LaTeX\ and \XeLaTeX, and it provides several font-loading commands that allow the user to change fonts locally or for individual characters within math mode.
-% \end{abstract}
+% \begin{abstract}
+% The \textsf{mathfont} package provides a flexible interface for changing the font of math-mode characters. The package allows the user to specify a default unicode font for each of six basic classes of Latin and Greek characters, and it provides additional support for unicode math and alphanumeric symbols, including punctuation. Crucially, \textsf{mathfont} is compatible with both \XeLaTeX\ and Lua\LaTeX, and it provides several font-loading commands that allow the user to change fonts locally or for individual characters within math mode.
+% \end{abstract}
+%
+% \begin{figure}[hb]
+% \hrule height \p@\hbox{\vrule width \p@\kern-\p@\relax\vbox{\medskip\relax
+% {\leftskip=4em\rightskip=4em
+% \noindent\strut For easy, ``off-the-shelf'' use, type the following in your document preamble and compile using \XeLaTeX\ or Lua\LaTeX:\par}
+%
+% \medskip
+%
+% \noindent\hfil\vbox{\hbox{|\usepackage{mathfont}|}
+% \hbox{|\setfont{|\argtext{font name}|}|}}
+%
+% \medskip}\kern-\p@\vrule width \p@}\hrule height \p@
+% \end{figure}
+%
+%
+%
%
-% Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task. Donald Knuth originally designed \TeX\ to support fonts created with Metafont, and while subsequent versions of \TeX\ extended this functionality to postscript fonts, Plain \TeX's font-loading capabilities remain limited. Many, if not most, \LaTeX\ users are unfamiliar with the |.fd| files that must be used in font declaration, and the minutiae of \TeX's |\font| primitive can be esoteric and confusing. \LaTeXe's New Font Selection System (\textsc{nfss}) implemented a straightforward syntax for loading and managing fonts, but \LaTeX\ macros overlaying a \TeX\ core face the same versatility issues as Plain \TeX\ itself. Fonts in math mode present a double challenge: even if the user successfully loads a font either in Plain \TeX\ or through the \textsc{nfss}, defining math symbols can be unintuitive for users who are unfamiliar with \TeX's |\mathcode| primitive. Again, \LaTeXe\ simplifies much of the coding challenges with its |\DeclareMathSymbol| macro, but from the computer's perspective, the fundamental aspects of the task remain the same.
+% Handling fonts in \TeX\ and \LaTeX\ is a notoriously difficult task. Donald Knuth originally designed \TeX\ to support fonts created with Metafont, and while subsequent versions of \TeX\ extended this functionality to postscript fonts, Plain \TeX's font-loading capabilities remain limited. Many, if not most, \LaTeX\ users are unfamiliar with the |.fd| files that must be used in font declaration, and the minutiae of \TeX's |\font| primitive can be esoteric and confusing. \LaTeXe's New Font Selection System (\textsc{nfss}) implemented a straightforward syntax for loading and managing fonts, but \LaTeX\ macros overlaying a \TeX\ core face the same versatility issues as Plain \TeX\ itself. Fonts in math mode present a double challenge: even if the user successfully loads a font either in Plain \TeX\ or through the \textsc{nfss}, defining math symbols can be unintuitive for users who are unfamiliar with \TeX's |\mathcode| primitive. Again, \LaTeXe\ simplifies much of the coding challenges with its |\DeclareMathSymbol| macro, but from the computer's perspective, the fundamental aspects of the task remain the same.
%
-% More recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ significantly extend the font-loading capabilities of \TeX.\footnote{Information on \XeTeX\ is available at \texttt{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \texttt{http://www.luatex.org/}.} Both support TrueType and OpenType font formats and provide many additional primitives for managing fonts. The \textsf{fontspec} package by Will Robertson and Khaled Hosny acts as a front-end for the font management built into these two engines.\footnote{Will Robertson and Khaled Hosny, ``\textsf{fontspec}---Advanced font selection in \XeLaTeX\ and Lua\LaTeX,'' \texttt{https://ctan.org/pkg/fontspec}.} It allows users to easily load new fonts and transition between those ones already in memory, and users who are interested in changing text fonts should consult the documentation for that package. Notably, \textsf{fontspec} provides users with the tools to manually adjust OpenType features of the fonts they load, so the package gives equivalent or in some cases superior font management capabilities to a modern WYSIWYG word processor. (Of course, the efficiency depends on the skill of the \LaTeX\ user.) In situations where a font's OpenType features are unclear or difficult to access, \textsf{fontspec}'s typographical advantages can significantly outweigh the accessibility of a word processor.
+% More recent engines such as Jonathan Kew's \XeTeX\ and Hans Hagen, et al.'s Lua\TeX\ significantly extend the font-loading capabilities of \TeX.\footnote{Information on \XeTeX\ is available at \texttt{https://tug.org/xetex/}, and information on Lua\TeX\ is available at the official website for Lua\TeX: \texttt{http://www.luatex.org/}.} Both support TrueType and OpenType font formats and provide many additional primitives for managing fonts. The \textsf{fontspec} package by Will Robertson and Khaled Hosny acts as a front-end for the font management built into these two engines.\footnote{Will Robertson and Khaled Hosny, ``\textsf{fontspec}---Advanced font selection in \XeLaTeX\ and Lua\LaTeX,'' \texttt{https://ctan.org/pkg/fontspec}.} It allows users to easily load new fonts and transition between those ones already in memory, and users who are interested in changing text fonts should consult the documentation for that package. Notably, \textsf{fontspec} provides users with the tools to manually adjust OpenType features of the fonts they load, so the package gives equivalent or in some cases superior font management capabilities to a modern WYSIWYG word processor. (Of course, the efficiency depends on the skill of the \LaTeX\ user.) In situations where a font's OpenType features are unclear or difficult to access, \textsf{fontspec}'s typographical advantages can significantly outweigh the accessibility of a word processor.
%
-% The \textsf{mathfont} package applies \textsf{fontspec}'s advances in font selection to math-mode typesetting, and this documentation explains \textsf{mathfont} as follows. Section~1 presents the basic functionality and related packages. Sections~2 and 3 explain how to use the default and local font-change commands, and users in a hurry will find the most important information here. Sections~4 and 5 discuss the Greek characters and mathematical symbols that \textsf{mathfont} provides, and section~6 describes the more complicated error messages that \textsf{mathfont} may throw. The remaining five sections detail the implementation. Section~7 lays out the initial implementation for the package, and sections~8 and 9 lay out the \LaTeX\ code for default and local font changes, respectively. Section~10 covers the code for the unicode alphanumeric letterlike symbols, and the final section~11 contains the unicode hex values for every character supported by \textsf{mathfont}. For an example of the package in action, see |mathfont_example.pdf|, which is included with the \textsf{mathfont} installation and is available on \textsc{ctan}.
+% The \textsf{mathfont} package applies \textsf{fontspec}'s advances in font selection to math-mode typesetting, and this documentation explains \textsf{mathfont} as follows. Section~1 presents the basic functionality and related packages. Sections~2 and 3 explain how to use the default and local font-change commands, and users in a hurry will find the most important information here. Sections~4 and 5 discuss the Greek characters and mathematical symbols that \textsf{mathfont} provides, and section~6 describes the more complicated error messages that \textsf{mathfont} may throw. The remaining five sections detail the implementation. Section~7 lays out the initial implementation for the package, and sections~8 and 9 lay out the \LaTeX\ code for default and local font changes, respectively. Section~10 covers the code for the unicode alphanumeric letterlike symbols, and the final section~11 contains the unicode hex values for every character supported by \textsf{mathfont}. Version history occurs on page p.~\pageref{version}. For an example of the package in action, see |mathfont_example.pdf|, which is included with the \textsf{mathfont} installation and is available on \textsc{ctan}.
%
% \section{Basic Functionality}
%
% The \textsf{mathfont} package uses \textsf{fontspec} as a back end to load fonts for use in math mode, and it provides two ways to do this: (1) changing the default font for certain classes of math mode characters; and (2) defining new commands that change the font locally for the so-called ``math alphabet'' characters. (The math alphabet characters are all Latin letters, all Arabic numerals, and any Greek letters that \textsf{mathfont} has set the font for.) The package can change the default math font for Latin and Greek letters, Arabic numerals, and unicode alphanumeric symbols to any unicode OpenType or TrueType font. Tables~1 and 2 display the specific classes of characters that \textsf{mathfont}'s default font-change command acts on.
%
-% The package can be loaded with the standard |\usepackage| syntax, and it has three optional arguments: \texttt{packages}, \texttt{operators}, and \texttt{no-operators}. During loading, \textsf{mathfont} redefines two \LaTeX\ internal macros to make symbol declaration compatible with unicode fonts, and the |packages| option determines when \textsf{mathfont} resets the two internal commands. If the user loads the package without the |packages| option, \textsf{mathfont} will reset the internal commands at the next |\usepackage| declaration, but with the argument, \textsf{mathfont} does not reset them at all. In practice, using this option should be harmless in most situations, and the issue is primarily one of convenience. The |\mathfont| command works only with these redefinitions, so once the package has reset the \LaTeX\ kernel, it will not adjust the default font for any class of characters. Thus the \texttt{packages} option allows users to sprinkle |\mathfont| declarations throughout their preamble, and doing so may be advantageous depending on the situation. However, leaving the kernel modified could induce clashes with other packages, so proceed at your own risk! For users who provided the \texttt{packages} argument or are loading packages before the |\documentclass| declaration, the control sequence |\restoremathinternals| manually returns the internal commands to their default definitions. It should be considered best practice to load \textsf{mathfont} without \texttt{packages} and put all |\mathfont| commands as soon after loading the package as possible.
+% The package can be loaded with the standard |\usepackage| syntax, and it has three optional arguments: \texttt{packages}, \texttt{operators}, and \texttt{no-operators}. During loading, \textsf{mathfont} redefines two \LaTeX\ internal macros to make symbol declaration compatible with unicode fonts, and the |packages| option determines when \textsf{mathfont} resets the two internal commands. If the user loads the package without the |packages| option, \textsf{mathfont} will reset the internal commands at the next |\usepackage| declaration, but with the argument, \textsf{mathfont} does not reset them at all. In practice, using this option should be harmless in most situations, and the issue is primarily one of convenience. The |\mathfont| command works only with these redefinitions, so once the package has reset the \LaTeX\ kernel, it will not adjust the default font for any class of characters. Thus the \texttt{packages} option allows users to sprinkle |\mathfont| declarations throughout their preamble, and doing so may be advantageous depending on the situation. However, leaving the kernel modified could induce clashes with other packages, so proceed at your own risk! For users who provided the \texttt{packages} argument or are loading packages before the |\documentclass| declaration, the control sequence |\restoremathinternals| manually returns the internal commands to their default definitions. It should be considered best practice to load \textsf{mathfont} without \texttt{packages} and put all |\mathfont| commands as soon after loading as possible.
%
-% The package arguments \texttt{operators} and \texttt{no-operators} determine \textsf{mathfont}'s behavior regarding the integral, summation, and product signs. The \texttt{operators} argument tells the package to adjust the font for these three symbols, and the \texttt{no-operators} argument does the opposite. By default, the package executes the \texttt{operators} option, but users may want to disable this behavior depending on the desired math font and other symbols being used. See sections~2 and 5 for more information.
+% The package arguments \texttt{operators} and \texttt{no-operators} determine \textsf{mathfont}'s behavior regarding the integral, summation, and product signs. The \texttt{operators} argument tells the package to adjust the font for these three symbols, and the \texttt{no-operators} argument does the opposite. As of version 1.4, the package executes the \texttt{no-operators} option by default, but users may want to enable this behavior depending on the desired math font and other symbols being used. See sections~2 and 5 for more information.
%
-% The package loads \textsf{fontspec} with the ``|no-math|'' option if and only if the user has not already loaded \textsf{fontspec}. Users who want \textsf{fontspec} without |no-math| or with other options in place should manually load it before requiring \textsf{mathfont}, and I strongly recommend that users who do so load \textsf{fontspec} with the |no-math| option. Alternatively, users who want to pass options to \textsf{fontspec} without loading it themselves can use \LaTeX's |\PassOptionsToPackage| command.
+% The package loads \textsf{fontspec} with the |no-math| option if and only if the user has not already loaded \textsf{fontspec}. Users who want \textsf{fontspec} without |no-math| or with other options in place can manually load it before requiring \textsf{mathfont}, and I strongly recommend that users who do so load \textsf{fontspec} with |no-math|. Alternatively, users who want to pass options to \textsf{fontspec} without loading it themselves can use \LaTeX's |\PassOptionsToPackage| command before loading \textsf{mathfont}.
%
-% Compatibility with Lua\LaTeX\ comes at the expense of \textsf{mathspec}'s convenient space-adjustment character |"|, and spacing-conscientious users can either manually add |\kern| or |\muskip| to their equations or redefine an active version of |"|.\footnote{The problem isn't one of ability---Lua\TeX's programming capabilities tend to outweigh those of \XeTeX. Rather, I'm unfamiliar with most of the workings of Lua\TeX. One of my eventual goals for this package is a Lua script that could automatically adjust spacing in math mode for any combination of two characters, but I don't know if or when I will be able to do that.} For example, the code
+% Compatibility with Lua\LaTeX\ comes at the expense of \textsf{mathspec}'s convenient space-adjustment character |"|, and spacing-conscientious users can either manually add |\kern| or |\muskip| to their equations or redefine an active version of |"|.\footnote{The problem isn't one of ability---Lua\TeX's programming capabilities tend to outweigh those of \XeTeX. Rather, I'm unfamiliar with most of the workings of Lua\TeX. One of my eventual goals for this package is a Lua script that could automatically adjust spacing in math mode for any combination of two characters, but I don't know if or when I will be able to do that.} For example, the code\label{code-example}
% \begin{code}
% \begingroup\obeylines|\catcode`\"=\active|
% |\def"#1{\ifmmode|
@@ -234,11 +251,11 @@ information, see the original mathfont.dtx file.
% | \char`\"#1%|
% | \fi}|\endgroup
% \end{code}
-% will serve as a hack that very roughly approximates \textsf{mathspec}'s |"|. This code will redefine |"| to typeset a right double quotation mark in horizontal mode, but in math mode, the character will insert \textit{dimension} and \textit{other dimension} of white space on either side respectively of the following character. More advanced users can automate the dimensions by using \TeX's |\if| conditional to test whether the following character needs a particular spacing adjustment. (For example, Computer Modern's math mode $f$ is notorious for being significantly wider than its italic counterpart.) Future versions of \textsf{mathfont} may provide an automated space-adjustment command, but it is not one of my priorities.
+% will serve as a hack that very roughly approximates \textsf{mathspec}'s |"|. This code will redefine |"| to typeset a right double quotation mark in horizontal mode, but in math mode, the character will insert \textit{dimension} and \textit{other dimension} of white space on either side respectively of the following character. More advanced users can automate the dimensions by using \TeX's |\if| conditional to test whether the following character needs a particular spacing adjustment. (For example, Computer Modern's math-mode $f$ is notorious for being significantly wider than its italic counterpart.) Future versions of \textsf{mathfont} may provide an automated space-adjustment command, but it is not one of my priorities.
%
% The functionality of \textsf{mathfont} is most closely related to that of the \textsf{mathspec} package by Andrew Gilbert Moschou.\footnote{Andrew Gilbert Moschou, ``\textsf{mathspec}---Specify arbitrary fonts for mathematics in \XeTeX,''\hfil\break\texttt{https://ctan.org/pkg/mathspec}.} These two packages incorporate the use of individual unicode characters into math mode, and their symbol declaration process is similar. Both use \textsf{fontspec} as a back end, and both create font-changing commands for math-mode characters. However, the functionality differs in three crucial respects: \textsf{mathfont} is compatible with Lua\LaTeX; it can adjust the font of basic mathematical symbols such as those in tables~5 and 6; and its local math-font-changing mechanisms provide a slightly greater level of flexibility than what users can achieve with \textsf{mathspec}. Further, as far as I am aware, this package is the first to provide support for the unicode alphanumeric symbols listed in Table~2, even in the context of fonts without built-in math support. (Please let me know if this is incorrect!) In this way \textsf{mathfont}, like \textsf{mathspec}, is more versatile than the \textsf{unicode-math} package, although potentially less far-reaching.\footnote{Will Robertson, ``\textsf{unicode-math}---Unicode mathematics support for \XeTeX\ and Lua\TeX,''\hfil\break\texttt{https://ctan.org/pkg/unicode-math}.}
%
-% Users who want to stick with pdf\LaTeX\ should consider Jean-Fran\c cois Burnol's \textsf{mathastext} as a useful alternative to \textsf{mathfont}.\footnote{Jean-Fran\c cois Burnol, ``\textsf{mathastext}---Use the text font in maths mode,''\hfil\break\texttt{https://ctan.org/pkg/mathastext}. In several previous versions of this documentation, I mistakenly stated that \textsf{mathastext} distorts \TeX's internal mathematics spacing. In fact the opposite is true: \textsf{mathastext} goes to significant lengths to preserve and even extend rules for space between various math-mode characters.} This package allows the user to specify the math-mode font for a large subset of the ASCII characters and is the most closely related package to \textsf{mathfont} among those packages designed specifically for the \LaTeX\ kernel in conjunction with Plain \TeX. Whereas \textsf{mathfont} works exclusively in the context of unicode fonts, \textsf{mathastext} was designed for the T1 and related encodings of Plain \TeX\ and \LaTeX, and \textsf{mathfont} provides support for a larger class of symbols. However, the \textsf{mathastext} functionality extends beyond that of \textsf{mathfont} in two notable aspects: (1) \textsf{mathastext} makes use of math versions, extra spacing, and italic corrections; and (2) \textsf{mathastext} allows users to change the font for the twenty-five non-alphanumeric characters supported by that package multiple times. After setting the default font for a class of characters, \textsf{mathfont} allows for that class only the local font changes outlined in section~3.
+% Users who want to stick with pdf\LaTeX\ should consider Jean-Fran\c cois Burnol's \textsf{mathastext} as a useful alternative to \textsf{mathfont}.\footnote{Jean-Fran\c cois Burnol, ``\textsf{mathastext}---Use the text font in maths mode,''\hfil\break\texttt{https://ctan.org/pkg/mathastext}. In several previous versions of this documentation, I mistakenly stated that \textsf{mathastext} distorts \TeX's internal mathematics spacing. In fact the opposite is true: \textsf{mathastext} preserves and in some cases extends rules for space between various math-mode characters.} This package allows the user to specify the math-mode font for a large subset of the ASCII characters and is the most closely related package to \textsf{mathfont} among those packages designed specifically for pdf\LaTeX. Whereas \textsf{mathfont} works exclusively in the context of unicode fonts, \textsf{mathastext} was designed for the T1 and related encodings of Plain \TeX\ and \LaTeX, and \textsf{mathfont} provides support for a larger class of symbols. However, the \textsf{mathastext} functionality extends beyond that of \textsf{mathfont} in two notable aspects: (1) \textsf{mathastext} makes use of math versions, extra spacing, and italic corrections; and (2) \textsf{mathastext} allows users to change the font for the twenty-five non-alphanumeric characters supported by that package multiple times. After setting the default font for a class of characters, \textsf{mathfont} allows for that class only the local font changes outlined in section~3.
%
% \section{Setting the Default Font}
%
@@ -252,7 +269,13 @@ information, see the original mathfont.dtx file.
% \end{code}
% which calls both |\mathfont| and \textsf{fontspec}'s |\setmainfont| using the \textit{font name} as arguments. Most users will probably find this command sufficient for most applications. Both |\mathfont| and |\setfont| should appear only in the document preamble.
%
-% \begin{figure}[htb]
+% The user should specify any keyword optional arguments for |\mathfont| as entries in a comma-separated list. The order is irrelevant, and spaces between entries are permitted. For each item in the list, the package will change the math-mode font for that class of characters to the mandatory argument. Leaving out the optional argument will cause the command to revert to its default behavior, and for most applications, that will be sufficient. If the user does not specify an optional argument for |\mathfont|, e.g.\ writes
+% \begin{code}
+% |\mathfont{Helvetica}|,
+% \end{code}
+% the package will change all math-mode Latin characters, Greek characters, digits, operators such as $\log$ or $\sin$, and all symbols from Tables~5 and 6 to the font in the mandatory argument. (Specifically, all keywords from Table~1 and the |symbol| keyword from Table~2.) In this example, the new font would be Helvetica.
+%
+% \begin{figure}[tb]
% \centering
% Table~1: Math Alphabet Characters\par\penalty\@M\smallskip
% \begin{tabular}{lll}
@@ -269,13 +292,7 @@ information, see the original mathfont.dtx file.
% \end{tabular}
% \end{figure}
%
-% The user should specify any keyword optional arguments for |\mathfont| as entries in a comma-separated list. The order is irrelevant, and spaces between entries are permitted. For each item in the list, the package will change the math-mode font for that class of characters to the mandatory argument. Leaving out the optional argument will cause the command to revert to its default behavior, and for most applications, that will be sufficient. If the user does not specify an optional argument for |\mathfont|, e.g.\ writes
-% \begin{code}
-% |\mathfont{Helvetica}|,
-% \end{code}
-% the package will change all math-mode Latin characters, Greek characters, digits, operators such as $\log$ or $\sin$, and all symbols from Tables~5 and 6 to the font in the mandatory argument. (Specifically, all keywords from Table~1 and the |symbol| keyword from Table~2.) In this example, the new font would be Helvetica.
-%
-% By default, \textsf{mathfont} will use either an upright or italic shape corresponding to each character-class keyword, but the user can override this setting by writing an equals sign next to the keyword and a shape suboption---either ``|roman|'' or ``|italic|''---following that. Table~1 contains the default shapes for the keywords listed there, while the default shape for all classes of characters in Table~2 is upright. The package interprets the |roman| suboption as specifying an upright shape---normal shape in the language of the \textsc{nfss}---and the |italic| suboption as specifying an italic shape. Currently \textsf{mathfont} does not support default font shapes beyond these two. For example, the command
+% By default, \textsf{mathfont} will use either an upright or italic shape corresponding to each character-class keyword, but the user can override this setting by writing an equals sign next to the keyword and a shape suboption---either |roman| or |italic|---following that. Table~1 contains the default shapes for the keywords listed there, while the default shape for all classes of characters in Table~2 is upright. The package interprets the |roman| suboption as specifying an upright shape---normal shape in the language of the \textsc{nfss}---and the |italic| suboption as specifying an italic shape. Currently \textsf{mathfont} does not support default font shapes beyond these two. For example, the command
% \begin{code}
% |\mathfont[upper=roman,lower=roman]{Times New Roman}|
% \end{code}
@@ -293,7 +310,7 @@ information, see the original mathfont.dtx file.
% Keyword & Meaning\\
% \midrule
% |symbols| & Basic mathematical symbols (includes punctuation)\\
-% |bb| & Blackboard Bold (Double-struck)\\
+% |bb| & Blackboard Bold (double-struck)\\
% |cal| & Caligraphic\\
% |frak| & Fraktur\\
% |bcal| & Bold Caligraphic\\
@@ -355,7 +372,7 @@ information, see the original mathfont.dtx file.
%
% \section{Greek Characters}
%
-% \begin{figure}[b]
+% \begin{figure}[t]
% \centerline{Table 4: Greek Character Control Sequences}\penalty\@M\smallskip
% \begin{tabularx}{\textwidth}{XXXX}
% \toprule
@@ -395,72 +412,74 @@ information, see the original mathfont.dtx file.
% & |\varphi| & & \\
% \bottomrule
% \end{tabularx}
-% \par\penalty\@M\smallskip
-% \vbox{\small\hsize=\textwidth\noindent\strut*Starred Modern Greek and all Ancient Greek letters are not provided by default and are defined only when the user calls |\mathfont| for |greekupper| and/or |greeklower| characters.}
+% \par\penalty\@M\medskip\small
+% \noindent*Starred Modern Greek and all Ancient Greek letters are not provided by default and are defined only when the user calls |\mathfont| for |greekupper| and/or |greeklower| characters.
% \end{figure}
%
% Unlike Plain \TeX\ and \LaTeXe, \textsf{mathfont} defines control sequences for all characters in the Greek alphabet. (\TeX's OT encodings do not include the capital Greek characters that resemble Latin letters. Presumably Donald Knuth made this decision to conserve encoding slots.) All such control sequences instruct \LaTeX\ to typeset the corresponding unicode Greek character, and \textsf{mathfont} also provides control sequences for several ancient Greek letters. This package's additional Greek character control sequences will become available once the user calls |\mathfont| for the corresponding class of Greek characters. Table~4 lists all such control sequences. I do not include typeset versions of these characters in this documentation because I wanted to avoid potential compilation problems regarding \texttt{mathfont.dtx}. However, see the file \texttt{mathfont\char`\_greek.pdf}, which is included with the \textsf{mathfont} installation and is available on \textsc{ctan}. As with the unicode letterlike symbols, not all fonts contain ancient Greek or even modern Greek characters, and setting \texttt{greekupper} and \texttt{greeklower} to a font without these symbols will produce a document with missing characters.
%
-% \section{Math Symbols}
+% \begin{figure}[bt]
%
-% \begin{figure}[b]
-% \centering
-% Table 5: Characters Corresponding to the |symbols| Keyword\par\penalty\@M\smallskip
-% \begin{tabularx}{\textwidth}{Xp{9em}XXX}
-% \toprule
-% Character & Control Sequence & Class & Punctuation & Class \\\cmidrule(r{4pt}){1-3}\cmidrule(l{4pt}){4-5}
-% $\#$ & |\#| & |\mathord| & |.| & |\mathord|\\
-% $\$$ & |\$| & |\mathord| & |@| & |\mathord|\\
-% $\%$ & |\%| & |\mathord| & \texttt{\string|} & |\mathord|\\
-% $\&$ & |\&| & |\mathord| & |'| & |\mathord|\\
-% $\P$ & |\P| & |\mathord| & |"| & |\mathord|\\
-% $\S$ & |\S| & |\mathord| & |+| & |\mathbin|\\
-% $\pounds$ & |\pounds| & |\mathord| & |-| & |\mathbin|\\
-% $\neg$ & |\neg| & |\mathord| & |*| & |\mathbin|\\
-% $\infty$ & |\infty| & |\mathord| & |/| & |\mathbin|\\
-% $\partial$ & |\partial| & |\mathord| & |=| & |\mathrel|\\
-% $\Delta$ & |\Delta| & |\mathord| & |<| & |\mathrel|\\
-% $\sum$* & |\sum| & |\mathop| & |>| & |\mathrel|\\
-% $\prod$* & |\prod| & |\mathop| & |:| & |\mathrel|\\
-% $\int$* & |\int| & |\mathop| & |(| & |\mathopen|\\
-% $\times$ & |\times| & |\mathbin| & |)| & |\mathclose|\\
-% $\div$ & |\div| & |\mathbin| & |[| & |\mathopen|\\
-% $\pm$ & |\pm| & |\mathbin| & |]| & |\mathclose|\\
-% $\cdot$ & |\cdot| & |\mathbin| & |!| & |\mathclose|\\
-% $\bullet$ & |\bullet| & |\mathbin| & |?| & |\mathclose|\\
-% $\dagger$ & |\dag| & |\mathbin| & |,| & |\mathpunct|\\
-% $\ddagger$ & |\ddag| & |\mathbin| & |;| & |\mathpunct|\\
-% $\setminus$ & |\setminus| & |\mathbin| & & \\
-% $\leq$ & |\leq| & |\mathrel| & & \\
-% $\geq$ & |\geq| & |\mathrel| & & \\
-% $\sim$ & |\sim| & |\mathrel| & & \\
-% $\approx$ & |\approx| & |\mathrel| & & \\
-% $\equiv$ & |\equiv| & |\mathrel| & & \\
-% $\mid$ & |\mid| & |\mathrel| & & \\
-% $\parallel$ & |\parallel| & |\mathrel| & &\\
-% $\colon$ & |\colon| & |\mathpunct| & & \\
-% $\dots$ & |\dots| & |\mathinner| & & \\\bottomrule
-% \end{tabularx}
-% \par\penalty\@M\smallskip
-% \hbox to \hsize{\small\strut*If the package option |operators| is enabled.\hfill}
+% \centerline{Table 5: Characters Corresponding to the |symbols| Keyword}\penalty\@M\smallskip
+% \begin{tabularx}{\textwidth}{Xp{9em}XXX}
+% \toprule
+% Character & Control Sequence & Class & Punctuation & Class \\\cmidrule(r{4pt}){1-3}\cmidrule(l{4pt}){4-5}
+% $\#$ & |\#| & |\mathord| & |.| & |\mathord|\\
+% $\$$ & |\$| & |\mathord| & |@| & |\mathord|\\
+% $\%$ & |\%| & |\mathord| & \texttt{\string|} & |\mathord|\\
+% $\&$ & |\&| & |\mathord| & |'| & |\mathord|\\
+% $\P$ & |\P| & |\mathord| & |"| & |\mathord|\\
+% $\S$ & |\S| & |\mathord| & |+| & |\mathbin|\\
+% $\pounds$ & |\pounds| & |\mathord| & |-| & |\mathbin|\\
+% $\neg$ & |\neg| & |\mathord| & |*| & |\mathbin|\\
+% $\infty$ & |\infty| & |\mathord| & |/| & |\mathbin|\\
+% $\partial$ & |\partial| & |\mathord| & |=| & |\mathrel|\\
+% $\sum$* & |\sum| & |\mathop| & |<| & |\mathrel|\\
+% $\prod$* & |\prod| & |\mathop| & |>| & |\mathrel|\\
+% $\int$* & |\int| & |\mathop| & |:| & |\mathrel|\\
+% $\times$ & |\times| & |\mathbin| & |(| & |\mathopen|\\
+% $\div$ & |\div| & |\mathbin| & |)| & |\mathclose|\\
+% $\pm$ & |\pm| & |\mathbin| & |[| & |\mathopen|\\
+% $\cdot$ & |\cdot| & |\mathbin| & |]| & |\mathclose|\\
+% $\bullet$ & |\bullet| & |\mathbin| & |!| & |\mathclose|\\
+% $\dagger$ & |\dag| & |\mathbin| & |?| & |\mathclose|\\
+% $\ddagger$ & |\ddag| & |\mathbin| & |,| & |\mathpunct|\\
+% $\setminus$ & |\setminus| & |\mathbin| & |;| & |\mathpunct|\\
+% $\leq$ & |\leq| & |\mathrel| & & \\
+% $\geq$ & |\geq| & |\mathrel| & & \\
+% $\sim$ & |\sim| & |\mathrel| & & \\
+% $\approx$ & |\approx| & |\mathrel| & & \\
+% $\equiv$ & |\equiv| & |\mathrel| & & \\
+% $\mid$ & |\mid| & |\mathrel| & & \\
+% $\parallel$ & |\parallel| & |\mathrel| & &\\
+% $\colon$ & |\colon| & |\mathpunct| & & \\
+% $\dots$ & |\dots| & |\mathinner| & & \\
+% \bottomrule
+% \end{tabularx}
+% \par\small\penalty\@M\medskip
+% \noindent*If the package option |operators| is enabled.\par
% \end{figure}
%
-% \begin{figure}[bt]
-% \centering
-% Table 6: Extra Macros Created with the |symbols| Keyword\par\penalty\@M\smallskip
+% \begin{figure}[t]
+% \centerline{Table 6: Extra Macros Created with the |symbols| Keyword}\penalty\@M\smallskip
% \begin{tabularx}{\textwidth}{XllXll}
% \toprule
% Character & Control Sequence & Class & Character & Control Sequence & Class\\\cmidrule(r{4pt}){1-3}\cmidrule(l{4pt}){4-6}
% $\backslash$ & |\mathbackslash| & |\mathord| & $\{$ & |\leftbrace| & |\mathopen|\\
% $^\circ$ & |\degree| & |\mathord| & $\}$ & |\rightbrace| & |\mathclose|\\
+% $\Delta$* & |\increment| & |\mathord| & & \\
% , & |\comma| & |\mathord| & & & \\
% \bottomrule
% \end{tabularx}
+% \par\small\penalty\@M\medskip
+% \noindent*As of version 1.5, |\Delta| typesets the Greek letter and |\increment| typesets the increment symbol. The difference will become significant in several situations: (1) when a font contains only one of the symbols or contains two glyphs that appear different; (2) when using local font change commands, which can act on |\Delta| but not |\increment|; or (3) when the user wants to change the font for only one of the Greek letter or increment character. Note that most major unicode fonts contain separate Delta and increment symbols.
% \end{figure}
%
-% With the |symbols| keyword, the |\mathfont| command will change the default math-mode font for all characters in Table~5. For the control sequences on the left half of the table that function in both math and horizontal modes, \textsf{mathfont} acts on the character only when it appears in math mode, so the character will be unaffected when used in regular text. The same is true for the punctuation marks on the right side. Notice that by default the package acts on the integral, summation, and product symbols. As stated previously, users can enable or disable this behavior with the optional package arguments |operators| and |no-operators| respectively, and doing so may be desirable depending on which math symbols the user wants and the math font in use. Finally, a technical point: when \textsf{mathfont} acts on the |symbols| characters, it redefines the four macros |\#|, |\$|, |\%|, and |\&| as robust commands more complicated than a single |\char|, so constructs like |\number\#| will need to be rewritten as |\number`\#|.
+% \section{Math Symbols}
+%
+% With the |symbols| keyword, the |\mathfont| command will change the default math-mode font for all characters in Table~5. For the control sequences on the left half of the table that function in both math and horizontal modes, \textsf{mathfont} acts on the character only when it appears in math mode, so the character will be unaffected when used in regular text. The same is true for the punctuation marks on the right side. By default the package does not act on the integral, summation, and product symbols. As stated previously, users can enable or disable this behavior with the optional package arguments |operators| and |no-operators| respectively, and doing so may be desirable depending on which math symbols the user wants and the math font in use. Finally, a technical point: when \textsf{mathfont} acts on the |symbols| characters, it redefines the four macros |\#|, |\$|, |\%|, and |\&| as robust commands more complicated than a single |\char|, so constructs like |\number\#| will need to be rewritten as |\number`\#|.
%
-% Choosing which unicode characters to recode is something of a delicate task because so few unicode fonts contain more than the most basic mathematics symbols. In designing this portion of \textsf{mathfont}, I attempted to find the largest set of characters that reliably appears in every or nearly every major unicode font, and that's why Table~5 contains no arrows, subset and element symbols, quantifiers, and complicated operation and grouping symbols. Most standard unicode fonts don't contain those glyphs, and I wanted \textsf{mathfont} to be useful for as many fonts as possible. That being said, the package provides the five new control sequences listed in Table~6. The |\degree| command functions as the unicode alternative to the |$^\circ$| construction, and the other four control sequences print the associated unicode character. None of these characters are coded as delimiters, so they will not respond to \LaTeX's |\left| and |\right| sizing commands.\footnote{Because of time constraints, I couldn't figure out how to use Lua\TeX's \texttt{\string\Udelimiter} primitive to code the backslash and braces properly. Any suggestions in this area are welcome.} The package also provides an additional comma character to typeset large integers. \TeX\ users have likely noticed the extra space after commas in math mode, e.g.\ $10,000$ versus $10\mathord,000$, and \textsf{mathfont}'s |\comma| solves this problem. Here the first ten thousand uses a standard~|,|~while the second uses |\comma|. In other words, the control sequence typesets a comma in math mode but does not insert the extra space following it. I recommend using |\comma| basically only for large integers, but I leave the ultimate decision up to the user.
+% Choosing which unicode characters to recode is something of a delicate task because so few unicode fonts contain more than the most basic mathematics symbols. In designing this portion of \textsf{mathfont}, I attempted to find the largest set of characters that reliably appears in every or nearly every major unicode font, and that's why Table~5 contains no arrows, subset and element symbols, quantifiers, and complicated operation and grouping symbols. Most standard unicode fonts don't contain those glyphs, and I wanted \textsf{mathfont} to be useful for as many fonts as possible. That being said, the package provides the five new control sequences listed in Table~6. The |\degree| command functions as the unicode alternative to the |$^\circ$| construction, and the other four control sequences print the associated unicode character. None of these characters are coded as delimiters, so they will not respond to \LaTeX's |\left| and |\right| sizing commands.\footnote{Because of time constraints, I couldn't figure out how to use Lua\TeX's \texttt{\string\Udelimiter} primitive to code the backslash and braces properly. Any suggestions in this area are welcome.} The package also provides an additional comma character to typeset large integers. \TeX\ users have likely noticed the extra space after commas in math mode, e.g.\ $10,000$ versus $10\mathord,000$, and \textsf{mathfont}'s |\comma| solves this problem. Here the first ten thousand uses a standard~|,|~while the second uses |\comma|. In other words, the control sequence typesets a comma in math mode but does not insert the extra space following it. I recommend using |\comma| basically only for large integers, but I leave the ultimate decision to the user.
%
%
% \section{Handling Errors}
@@ -479,10 +498,10 @@ information, see the original mathfont.dtx file.
%
% \section{Implementation}
%
-% First and foremost, the package needs to declare itself.\vadjust{\penalty0} The \texttt{packages} option changes the |\if@packages| boolean from false to true.
+% First and foremost, the package needs to declare itself. The \texttt{packages} option changes the |\if@packages| boolean from false to true. Ditto for |operators|.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathfont}[2019/04/01 v. 1.4 Package mathfont]
+\ProvidesPackage{mathfont}[2019/04/07 v. 1.5 Package mathfont]
\newif\if@packages
\newif\if@operators
\DeclareOption{packages}{\@packagestrue}
@@ -497,10 +516,9 @@ information, see the original mathfont.dtx file.
% Some error and informational messages.
% \begin{macrocode}
\def\M@FontChangeInfo#1{\PackageInfo{mathfont}
- {Changing #1 characters to\MessageBreak
- math font \csname M@font\the\M@count\endcsname\MessageBreak
- with \csname @#1 shape\endcsname\MessageBreak
- shape}}
+ {Changing math-mode #1\MessageBreak
+ characters to \csname M@font\the\M@count\endcsname\MessageBreak
+ with \csname @#1shape\endcsname\space shape}}
\def\M@NewFontCommandInfo#1#2#3#4{\PackageInfo{mathfont}
{Creating math alphabet\MessageBreak
command \string#1 using #2\MessageBreak
@@ -679,6 +697,7 @@ information, see the original mathfont.dtx file.
\newif\if@bcal
\newif\if@bfrak
\newif\if@suboptionpresent
+\newif\if@mathfont@firstoption
\def\@uppershape{italic}
\def\@lowershape{italic}
\def\@greekuppershape{roman}
@@ -757,7 +776,7 @@ information, see the original mathfont.dtx file.
%
% \section{Implementation of Default Font Changes}
%
-% The user-level\vadjust{\penalty0} command |\mathfont| passes its mandatory argument to |\@newfont| through the |\@mathfont| command. If the user includes |\mathfont| with an optional argument, |\@mathfont| will loop througheach item in the optional argumentusing |\@for| and set the math font for each of those classes of characters. If the user does not specify an optional argument, |\mathfont| calls |\@mathfont| with the list of entries from Table~1 in brackets. The |\@mathfont| macro proceeds in several steps. First, it checks if |\set@mathchar| has been reset, and if so, the current call to |\mathfont| will do nothing. If not, the macro loads the user's font with |\@newfont| and checks its keyword optional arguments. The command declares the appropriate symbol fonts if necessary, actually sets the math font by calling |\M@|\argtext{keyword}|@set| command, and records that the font change occurred by switching the appropriate boolean to true. Finally, |\@mathfont| increments |\M@count| by one.
+% The user-level command |\mathfont| passes its mandatory argument to |\@newfont| through the |\@mathfont| command. If the user includes |\mathfont| with an optional argument, |\@mathfont| will loop througheach item in the optional argumentusing |\@for| and set the math font for each of those classes of characters. If the user does not specify an optional argument, |\mathfont| calls |\@mathfont| with the list of entries from Table~1 in brackets. The |\@mathfont| macro proceeds in several steps. First, it checks if |\set@mathchar| has been reset, and if so, the current call to |\mathfont| will do nothing. If not, the macro loads the user's font with |\@newfont| and checks its keyword optional arguments. The command declares the appropriate symbol fonts if necessary, actually sets the math font by calling |\M@|\argtext{keyword}|@set| command, and records that the font change occurred by switching the appropriate boolean to true. Finally, |\@mathfont| increments |\M@count| by one.
%
% The package stores each new font in a macro of the form |\M@font|\argtext{number}, where \textit{number} is given by the current value of |\M@count|. The name of the corresponding symbol fonts is |M|\argtext{shape}\argtext{number}, where \textit{shape} is either \texttt{roman} or \texttt{italic} and \textit{number} is again the value of |\M@count|. For each keyword from Tables~1 and 2, the package originally defines |\@|\argtext{keyword}|shape| as the default shape for that collection of characters. If the user specifies a suboption for any keyword in the optional argument of |\mathfont|, the package overrides the default shape by redefining |\@|\argtext{keyword}|shape| to the value of the suboption. For example, suppose the user loads \textsf{mathfont} and then immediately writes
% \begin{code}
@@ -772,7 +791,7 @@ information, see the original mathfont.dtx file.
\M@InternalsRestoredError
\else
\M@toks{}
- \@tempswafalse
+ \@mathfont@firstoptiontrue
\expandafter\@newfont\csname M@font\the\M@count\endcsname{}{#2}
\edef\@tempa{#1}
\@for\@i:=\@tempa\do{\expandafter\parse@suboption\@i=\@nil
@@ -783,10 +802,10 @@ information, see the original mathfont.dtx file.
\csname iftrue\endcsname
\M@CharsSetWarning{\@tempa}
\else
- \if@tempswa
- \expandafter\M@toks\expandafter{\the\M@toks, }
+ \if@mathfont@firstoption
+ \@mathfont@firstoptionfalse
\else
- \@tempswatrue
+ \expandafter\M@toks\expandafter{\the\M@toks, }
\fi
\edef\@tempc{\the\M@toks\@tempa}
\expandafter\M@toks\expandafter{\@tempc}
@@ -1084,7 +1103,7 @@ information, see the original mathfont.dtx file.
\DeclareMathSymbol{\partial}{\mathord}{\M@symbols}{"2202}
\DeclareMathSymbol{\mathbackslash}{\mathord}{\M@symbols}{"5C}
\DeclareMathSymbol{\degree}{\mathord}{\M@symbols}{"B0}
- \DeclareMathSymbol{\Delta}{\mathord}{\M@symbols}{"2206}
+ \DeclareMathSymbol{\increment}{\mathord}{\M@symbols}{"2206}
\DeclareMathSymbol{'}{\mathord}{\M@symbols}{"2032}
\DeclareMathSymbol{"}{\mathord}{\M@symbols}{"2033}
\DeclareMathSymbol{\comma}{\mathord}{\M@symbols}{"2C}
@@ -1474,6 +1493,51 @@ information, see the original mathfont.dtx file.
\fi
% \end{macrocode}
%
+% \eject
+%
+% \section*{Version History}\label{version}
+%
+%
+% \begin{multicols*}{2}
+% \bgroup\raggedright\parskip\z@\parindent\z@\leftskip1em\obeylines
+% \setbox0\hbox{\hskip 1pt.\hskip 1pt}
+% \def\version#1#2{\bigskip\hbox to \hsize{\textbf{#1} \cleaders\copy0\hfill\ #2}\par}
+% \def\item{\leavevmode\raise0.5ex\hbox{\vrule height 1pt width 0.5em}\kern1pt}
+%
+%
+% \version{1.1b}{July 2018}
+% \item initial release
+%
+% \version{1.2}{August 2018}
+% \item minor bug fix for |\mathfrak|
+% \item eliminated redundant batchfile
+%
+% \version{1.3}{January 2019}
+% \item added |symbols| keyword\par
+% \item created |mathfont_example.pdf|
+% \item corrected the description of the \textsf{mathastext} package
+% \item font-change |\message| added to |\mathfont|
+%
+% \version{1.4}{April 2019}
+% \item |\setfont| command added
+% \item |\mathfont| optional argument can parse spaces
+% \item |no-operators| now default package optional argument
+% \item added |\comma| command
+% \item new fancy fatal error message
+% \item improved messaging for |\mathfont|
+% \item internal command |\mathpound| changed to |\mathhash|
+% \item added a missing |#1| after |\char`\"| in the example code on p.~\pageref{code-example}
+%
+% \version{1.5}{April 2019}
+% \item separated |\increment| and |\Delta|
+% \item version history added
+% \item initial ``off-the-shelf'' use insert added
+%
+%
+%
+% \egroup
+% \end{multicols*}
+%
% \iffalse
%
%</package>
@@ -1576,7 +1640,7 @@ Expanding $e^{iX}$ as a power series gives an expression for $\phi_X$ that we ca
\vfil
-A smooth manifold consists of a topological space $M$ equipped with a smooth maximal atlas $\leftbrace \phi_i\rightbrace$. The maps $\phi_i\colon U_i\longrightarrow\mathbb R$ technically aren't themselves differentiable, but their compositions $\phi_i^{}\circ\phi_j^{-1}$ are diffeomorphisms on subsets of $\mathbb R^n$. If we have a map $f\colon M\longrightarrow N$ between manifolds, this structure allows us to talk about differentiability of $f$. Specifically, we say that $f$ is smooth if for any $i$ and $j$, the composition
+A smooth manifold consists of a topological space $M$ equipped with a smooth maximal atlas $\leftbrace \phi_i\rightbrace$. The maps $\phi_i\colon U_i\longrightarrow\mathbb R$ are continuous, and their compositions $\phi_i^{}\circ\phi_j^{-1}$ are diffeomorphisms on subsets of $\mathbb R^n$. If we have a map $f\colon M\longrightarrow N$ between manifolds, this structure allows us to talk about differentiability of $f$. Specifically, we say that $f$ is smooth if for any $i$ and $j$, the composition
\[
\psi_j^{}\circ f\circ\phi_i^{-1}
\]
diff --git a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
index b4512aa9d0e..b4b0c625553 100644
--- a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
+++ b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty
@@ -23,7 +23,7 @@
%% information, see the original mathfont.dtx file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathfont}[2019/04/01 v. 1.4 Package mathfont]
+\ProvidesPackage{mathfont}[2019/04/07 v. 1.5 Package mathfont]
\newif\if@packages
\newif\if@operators
\DeclareOption{packages}{\@packagestrue}
@@ -35,10 +35,9 @@
I don't know what it means.}}
\ProcessOptions*
\def\M@FontChangeInfo#1{\PackageInfo{mathfont}
- {Changing #1 characters to\MessageBreak
- math font \csname M@font\the\M@count\endcsname\MessageBreak
- with \csname @#1 shape\endcsname\MessageBreak
- shape}}
+ {Changing math-mode #1\MessageBreak
+ characters to \csname M@font\the\M@count\endcsname\MessageBreak
+ with \csname @#1shape\endcsname\space shape}}
\def\M@NewFontCommandInfo#1#2#3#4{\PackageInfo{mathfont}
{Creating math alphabet\MessageBreak
command \string#1 using #2\MessageBreak
@@ -187,6 +186,7 @@
\newif\if@bcal
\newif\if@bfrak
\newif\if@suboptionpresent
+\newif\if@mathfont@firstoption
\def\@uppershape{italic}
\def\@lowershape{italic}
\def\@greekuppershape{roman}
@@ -249,7 +249,7 @@
\M@InternalsRestoredError
\else
\M@toks{}
- \@tempswafalse
+ \@mathfont@firstoptiontrue
\expandafter\@newfont\csname M@font\the\M@count\endcsname{}{#2}
\edef\@tempa{#1}
\@for\@i:=\@tempa\do{\expandafter\parse@suboption\@i=\@nil
@@ -257,10 +257,10 @@
\csname iftrue\endcsname
\M@CharsSetWarning{\@tempa}
\else
- \if@tempswa
- \expandafter\M@toks\expandafter{\the\M@toks, }
+ \if@mathfont@firstoption
+ \@mathfont@firstoptionfalse
\else
- \@tempswatrue
+ \expandafter\M@toks\expandafter{\the\M@toks, }
\fi
\edef\@tempc{\the\M@toks\@tempa}
\expandafter\M@toks\expandafter{\@tempc}
@@ -505,7 +505,7 @@
\DeclareMathSymbol{\partial}{\mathord}{\M@symbols}{"2202}
\DeclareMathSymbol{\mathbackslash}{\mathord}{\M@symbols}{"5C}
\DeclareMathSymbol{\degree}{\mathord}{\M@symbols}{"B0}
- \DeclareMathSymbol{\Delta}{\mathord}{\M@symbols}{"2206}
+ \DeclareMathSymbol{\increment}{\mathord}{\M@symbols}{"2206}
\DeclareMathSymbol{'}{\mathord}{\M@symbols}{"2032}
\DeclareMathSymbol{"}{\mathord}{\M@symbols}{"2033}
\DeclareMathSymbol{\comma}{\mathord}{\M@symbols}{"2C}