diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-05 21:26:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-05 21:26:54 +0000 |
commit | fb1c9fdec84c69824b12e4f231a0d2c7642b2d6a (patch) | |
tree | c06af5661bbd4ef7cf43ccf7e581c25ab339d479 /Master/texmf-dist/doc/latex | |
parent | 0ed7b2cd92f7a81334f612df3e37211f8333ae75 (diff) |
mathfont (5dec19)
git-svn-id: svn://tug.org/texlive/trunk@53035 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
14 files changed, 1335 insertions, 196 deletions
diff --git a/Master/texmf-dist/doc/latex/mathfont/README.TEXLIVE b/Master/texmf-dist/doc/latex/mathfont/README.TEXLIVE deleted file mode 100644 index 2f9452f9ef9..00000000000 --- a/Master/texmf-dist/doc/latex/mathfont/README.TEXLIVE +++ /dev/null @@ -1,7 +0,0 @@ -The following files have been removed in the TeX Live installation of -the current package, typically due to duplication, lack of space, or -missing source code. You can find these files on CTAN at - http://mirror.ctan.org/macros/latex/contrib/mathfont -If questions or concerns, email tex-live@tug.org. - - mathfont_greek.pdf diff --git a/Master/texmf-dist/doc/latex/mathfont/README.txt b/Master/texmf-dist/doc/latex/mathfont/README.txt index 5805abdad7e..bedf4d70352 100644 --- a/Master/texmf-dist/doc/latex/mathfont/README.txt +++ b/Master/texmf-dist/doc/latex/mathfont/README.txt @@ -1,37 +1,51 @@ -This file contains information about the mathfont LaTeX package -installation. Besides this README, the installation contains the -following files: +This README file contains information about the LaTeX2e package +"mathfont" installation version 1.6. Besides this README, the +installation contains the following files: -1. mathfont.dtx: the main package file. Typeset this file to generate -the corresponding .sty file and complete the installation. +1. mathfont_code.dtx: the primary file. Typeset this file with +LaTeX to generate mathfont.sty and complete the installation. -2. mathfont.pdf: the package documentation. +2. mathfont_code.pdf: documentation of the package code. -3. mathfont_greek.pdf: a table of Greek characters provided by -mathfont. +3. mathfont_symbol_list.pdf: a typeset list of symbols that +mathfont can act on. -4. mathfont_example.pdf: an example of mathfont in action. +4. mathfont_user_guide.pdf: user-level documentation. -The mathfont package is Copyright 2018-2019 by Conrad Kosowsky. -This work may be distributed and modified under the terms -of the LaTeX Public Project License, version 1.3c or any later version. + + +Copyright 2018-2019 by Conrad Kosowsky + +This file may be distributed and modified under the terms of the +LaTeX Public Project License, version 1.3c or any later version. The most recent version of this license is available online at - https://www.latex-project.org/lppl/. - -This work has the LPPL status "maintained," and the current maintainer -is the package author, Conrad Kosowsky. He can be reached at -kosowsky.latex@gmail.com. The work consists of the file mathfont.dtx; -the derived files mathfont.sty, mathfont_greek.tex, and -mathfont_example.tex; and all other files created through the configuration -process such as mathfont.pdf, mathfont.idx, and mathfont.ind. - -To install mathfont, run mathfont.dtx through LaTeX and move -the generated file mathfont.sty into a directory searchable by TeX. -Running mathfont.dtx through LaTeX will produce the derived files -mathfont.sty, mathfont_greek.tex, and mathfont_example.tex. The first -of these documents is the actual package code, and the second and third -are the source code for mathfont_greek.pdf and mathfont_example.pdf, -respectively. + https://www.latex-project.org/lppl/. + +This work has the LPPL status "maintained," and the current +maintainer is the package author, Conrad Kosowsky. He can be +reached at kosowsky.latex@gmail.com. The work consists of the +following items: + + (1) the base file mathfont_code.dtx; + + (2) the package code contained in mathfont.sty; + + (3) the derived files mathfont_symbol_list.tex, +mathfont_user_guide.tex, mathfont_heading.tex, and +mathfont_doc_patch.tex, and mathfont_index_warning.tex; + + (4) the pdf documentation files mathfont_code.pdf, +mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; + + (5) all other files created through the configuration +process including mathfont_code.ind; and + + (6) this README.txt file. + +For more information, see the original mathfont.dtx file. To +install mathfont on your computer, run mathfont_code.dtx through +LaTeX and place the derived file mathfont.sty in a directory +searchable by TeX. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf Binary files differdeleted file mode 100644 index eef2355f748..00000000000 --- a/Master/texmf-dist/doc/latex/mathfont/mathfont.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf Binary files differnew file mode 100644 index 00000000000..f2e7a0ccb95 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_code.pdf diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex new file mode 100644 index 00000000000..3f4d09dfd5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_doc_patch.tex @@ -0,0 +1,124 @@ +%% +%% This is file `mathfont_doc_patch.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mathfont_code.dtx (with options: `doc') +%% +%% This file is file from version 1.6 of the LaTeX package "mathfont," +%% to be used in conjunction with the XeTeX or LuaTeX engines. +%% +%% Copyright 2018-2019 by Conrad Kosowsky +%% +%% This file may be distributed and modified under the terms of the +%% LaTeX Public Project License, version 1.3c or any later version. +%% The most recent version of this license is available online at +%% +%% https://www.latex-project.org/lppl/. +%% +%% This work has the LPPL status "maintained," and the current +%% maintainer is the package author, Conrad Kosowsky. He can be +%% reached at kosowsky.latex@gmail.com. The work consists of the +%% following items: +%% +%% (1) the base file mathfont_code.dtx; +%% +%% (2) the package code contained in mathfont.sty; +%% +%% (3) the derived files mathfont_symbol_list.tex, +%% mathfont_user_guide.tex, mathfont_heading.tex, and +%% mathfont_doc_patch.tex; +%% +%% (4) the pdf documentation files mathfont_code.pdf, +%% mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; +%% +%% (5) all other files created through the configuration process +%% such as mathfont.idx and mathfont.ind; and +%% +%% (6) the associated README.txt file. +%% +%% For more information, see the original mathfont.dtx file. To +%% install mathfont on your computer, run mathfont_code.dtx through +%% LaTeX and place the derived file mathfont.sty in a directory +%% searchable by TeX. +%% + +\let\?\SpecialUsageIndex +\expandafter\newif\csname if@def\endcsname +\newtoks\index@nomainlist +\index@nomainlist{} +\MacrocodeTopsep=2.5pt plus 3pt minus 1pt +\def\@defname{def} +\def\@edefname{edef} +\def\@letname{let} +\let\main\textbf + +\def\DoNotIndexMain{\bgroup + \catcode`\\=12\relax + \do@not@index@main} +\def\do@not@index@main#1{\egroup + \index@nomainlist\expandafter{\the\index@nomainlist#1,}} + +\def\macro@finish{\macro@namepart + \if@def + \@deffalse + \@expandtwoargs\in@{\macro@namepart}{\the\index@excludelist}\relax + \ifin@ + \else + \@expandtwoargs\in@{\macro@namepart}{\the\index@nomainlist}\relax + \ifin@ + \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}\relax + \@tempa + \else + \edef\@tempa{\noexpand\SpecialMainIndex{\bslash\macro@namepart}}\relax + \@tempa + \fi + \fi + \else + \ifx\macro@namepart\@defname + \@deftrue + \else + \ifx\macro@namepart\@edefname + \@deftrue + \else + \ifx\macro@namepart\@letname + \@deftrue + \fi + \fi + \fi + \@expandtwoargs\in@{\macro@namepart}{\the\index@excludelist}\relax + \ifin@ + \else + \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}\relax + \@tempa + \fi + \fi} + +\def\macro@code{% + \topsep \MacrocodeTopsep + \@beginparpenalty0% \predisplaypenalty + \if@inlabel\leavevmode\fi + \trivlist \parskip 0pt plus 0.2pt \item[]% + \macro@font + \leftskip\@totalleftmargin \advance\leftskip\MacroIndent + \rightskip\z@ \parindent\z@ \parfillskip\@flushglue + \blank@linefalse \def\par{\ifblank@line + \leavevmode\fi + \blank@linetrue\@@par + \penalty\interlinepenalty} + \obeylines + \let\do\do@noligs \verbatim@nolig@list + \let\do\@makeother \dospecials + \global\@newlistfalse + \global\@minipagefalse + \ifcodeline@index + \everypar{\global\advance\c@CodelineNo\@ne + \llap{\theCodelineNo\ \hskip\@totalleftmargin}% + \check@module}% + \else \everypar{\check@module}% + \fi + \init@crossref} +\endinput +%% +%% End of file `mathfont_doc_patch.tex'. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf Binary files differdeleted file mode 100644 index c7bf1445ae0..00000000000 --- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex deleted file mode 100644 index 7def38f99f9..00000000000 --- a/Master/texmf-dist/doc/latex/mathfont/mathfont_example.tex +++ /dev/null @@ -1,77 +0,0 @@ -%% -%% This is file `mathfont_example.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% mathfont.dtx (with options: `example') -%% -%% Copyright 2018-2019 by Conrad Kosowsky -%% -%% This file may be distributed and modified under the terms -%% of the LaTeX Public Project License, version 1.3c or any later version. -%% The most recent version of this license is available online at -%% -%% https://www.latex-project.org/lppl/. -%% -%% This work has the LPPL status "maintained," and the current maintainer -%% is the package author, Conrad Kosowsky. He can be reached at -%% kosowsky.latex@gmail.com. The work consists of the file mathfont.dtx, -%% the derived files mathfont.sty, mathfont_greek.tex, and -%% mathfont_example.tex, and all other files created through the configuration -%% process such as mathfont.pdf, mathfont.idx, and mathfont.ind. For more -%% information, see the original mathfont.dtx file. -%% -\documentclass[12pt]{article} -\usepackage[margin=72.27pt]{geometry} -\usepackage[factor=600,stretch=14,shrink=14,step=1]{microtype} -\usepackage{mathfont} -\setfont{Times New Roman} -\mathfont[bb]{Symbola} -\restoremathinternals -\hyphenpenalty=10 -\exhyphenpenalty=5 -\pretolerance=30 -\finalhyphendemerits=300 -\pagestyle{empty} -\begin{document} - -\centerline{The \textsf{mathfont} Package in Action: Two Mathematical Snippets Rendered in Times New Roman} -\centerline{Conrad Kosowsky} - -\bigskip - -Mathematicians usually define $e$ in one of two ways: as the horizontal asymptote of a certain function or as the limit of an infinite series. Specifically, it's most common to see $e$ defined as either -\[ -e=\lim_{x\to\infty}\left(1+\frac1x\right)^x -\] -or -\[ -e=\sum_{k=0}^\infty\frac1{k!}. -\] -The first definition is simpler in that involves a limit of a single expression, not a limit of partial sums, but in practice, the second tends to be more tractable. The power series expression of $e^x$ is given by -\[ -\sum_{n=0}^\infty\frac{x^n}{n!}, -\] -and the relationship between this expression and the series definition is much more apparent than it is for the first limit. This relationship arises in a variety of different mathematical contexts, for example the famous Euler's formula $e^{i\theta}=\cos\theta+i\sin\theta$ or the related definition of the characteristic function for a random variable $X$: -\[ -\phi_X(t)=\mathbb E\left(e^{iX}\right). -\] -Expanding $e^{iX}$ as a power series gives an expression for $\phi_X$ that we can differentiate term by term. - -\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$ 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} -\] -is itself smooth, where $\leftbrace\psi_i\rightbrace$ is a smooth atlas for $N$. Differentiating $f$ produces the associated tangent map $Df$. The function $Df$ maps the tangent bundle $TM$ to the tangent bundle $TN$ and is linear when restricted to individual tangent spaces $T_pM$. If $M$ can be written as a product $M_1\times M_2$, we can consider the partial tangent maps $\partial_1f$ and $\partial_2f$ by considering the compositions $f\circ\iota_1$ and $f\circ\iota_2$, where $\iota_1$ and $\iota_2$ are inclusion maps with respect to a particular point. Combining both maps, we have the equation -\[ -Df(u,v)=\partial_1f(u)+\partial_2f(v), -\] -and this relationship can be thought of as an adaption of the standard product rule. - -\end{document} -\endinput -%% -%% End of file `mathfont_example.tex'. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_greek.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_greek.tex deleted file mode 100644 index 7f5d9ec66ff..00000000000 --- a/Master/texmf-dist/doc/latex/mathfont/mathfont_greek.tex +++ /dev/null @@ -1,84 +0,0 @@ -%% -%% This is file `mathfont_greek.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% mathfont.dtx (with options: `greek') -%% -%% Copyright 2018-2019 by Conrad Kosowsky -%% -%% This file may be distributed and modified under the terms -%% of the LaTeX Public Project License, version 1.3c or any later version. -%% The most recent version of this license is available online at -%% -%% https://www.latex-project.org/lppl/. -%% -%% This work has the LPPL status "maintained," and the current maintainer -%% is the package author, Conrad Kosowsky. He can be reached at -%% kosowsky.latex@gmail.com. The work consists of the file mathfont.dtx, -%% the derived files mathfont.sty, mathfont_greek.tex, and -%% mathfont_example.tex, and all other files created through the configuration -%% process such as mathfont.pdf, mathfont.idx, and mathfont.ind. For more -%% information, see the original mathfont.dtx file. -%% -\documentclass[12pt]{article} -\usepackage[margin=72.27pt]{geometry} -\usepackage{booktabs} -\usepackage{mathfont} -\mathfont{Symbola} -\usepackage{shortvrb} -\MakeShortVerb{|} -\pagestyle{empty} -\begin{document} - -\topskip=0pt - -\centering - -\vbox to 0pt{}\vfil\nointerlineskip - -Greek Characters Provided by \textsf{mathfont}, Rendered in Symbola\par\penalty10000\smallskip -\begin{tabular}{llllllll} -\toprule -\multicolumn{4}{c}{Modern Greek Characters} & \multicolumn{4}{c}{Ancient Greek Characters}\\ -\cmidrule(r{4pt}){1-4}\cmidrule(l{4pt}){5-8} -\multicolumn{2}{c}{Capital} & \multicolumn{2}{c}{Minuscule} & \multicolumn{2}{c}{Capital} & \multicolumn{2}{c}{Minuscule}\\ -\midrule -|\Alpha| & $\Alpha$ & |\alpha| & $\alpha$ & |\Heta| & $\Heta$ & |\heta| & $\heta$ \\ -|\Beta| & $\Beta$ & |\beta| & $\beta$ & |\Sampi| & $\Sampi$ & |\sampi| & $\sampi$ \\ -|\Gamma| & $\Gamma$ & |\gamma| & $\gamma$ & |\Diagamma| & $\Diagamma$ & |\diagamma| & $\diagamma$ \\ -|\Delta| & $\Delta$ & |\delta| & $\delta$ & |\Koppa| & $\Koppa$ & |\koppa| & $\koppa$ \\ -|\Epsilon| & $\Epsilon$ & |\epsilon| & $\epsilon$ & |\Stigma| & $\Stigma$ & |\stigma| & $\stigma$ \\ -|\Zeta| & $\Zeta$ & |\zeta| & $\zeta$ & |\Sho| & $\Sho$ & |\sho| & $\sho$ \\ -|\Eta| & $\Eta$ & |\eta| & $\eta$ & |\San| & $\San$ & |\san| & $\san$ \\ -|\Theta| & $\Theta$ & |\theta| & $\theta$ & |\varSampi | & $\varSampi$ & |\varsampi| & $\varsampi$ \\ -|\Iota| & $\Iota$ & |\iota| & $\iota$ & |\varDiagamma| & $\varDiagamma$ & |\vardiagamma| & $\vardiagamma$ \\ -|\Kappa| & $\Kappa$ & |\kappa| & $\kappa$ & |\varKoppa| & $\varKoppa$ & |\varkoppa| & $\varkoppa$ \\ -|\Lambda| & $\Lambda$ & |\lambda| & $\lambda$ & & & & \\ -|\Mu| & $\Mu$ & |\mu| & $\mu$ & & & & \\ -|\Nu| & $\Nu$ & |\nu| & $\nu$ & & & & \\ -|\Xi| & $\Xi$ & |\xi| & $\xi$ & & & & \\ -|\Omicron| & $\Omicron$ & |\omicron| & $\omicron$ & & & & \\ -|\Pi| & $\Pi$ & |\pi| & $\pi$ & & & & \\ -|\Rho| & $\Rho$ & |\rho| & $\rho$ & & & & \\ -|\Sigma| & $\Sigma$ & |\sigma| & $\sigma$ & & & & \\ -|\Tau| & $\Tau$ & |\tau| & $\tau$ & & & & \\ -|\Upsilon| & $\Upsilon$ & |\upsilon| & $\upsilon$ & & & & \\ -|\Phi| & $\Phi$ & |\phi| & $\phi$ & & & & \\ -|\Chi| & $\Chi$ & |\chi| & $\chi$ & & & & \\ -|\Psi| & $\Psi$ & |\psi| & $\psi$ & & & & \\ -|\Omega| & $\Omega$ & |\omega| & $\omega$ & & & & \\ -|\varTheta| & $\varTheta$ & |\varbeta| & $\varbeta$ & & & & \\ - & & |\varepsilon| & $\varepsilon$ & & & & \\ - & & |\vartheta| & $\vartheta$ & & & & \\ - & & |\varrho| & $\varrho$ & & & & \\ - & & |\varsigma| & $\varsigma$ & & & & \\ - & & |\varphi| & $\varphi$ & & & & \\ -\bottomrule -\end{tabular} - -\end{document} -\endinput -%% -%% End of file `mathfont_greek.tex'. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex new file mode 100644 index 00000000000..3a0c576d19d --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_heading.tex @@ -0,0 +1,133 @@ +%% +%% This is file `mathfont_heading.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mathfont_code.dtx (with options: `heading') +%% +%% This file is file from version 1.6 of the LaTeX package "mathfont," +%% to be used in conjunction with the XeTeX or LuaTeX engines. +%% +%% Copyright 2018-2019 by Conrad Kosowsky +%% +%% This file may be distributed and modified under the terms of the +%% LaTeX Public Project License, version 1.3c or any later version. +%% The most recent version of this license is available online at +%% +%% https://www.latex-project.org/lppl/. +%% +%% This work has the LPPL status "maintained," and the current +%% maintainer is the package author, Conrad Kosowsky. He can be +%% reached at kosowsky.latex@gmail.com. The work consists of the +%% following items: +%% +%% (1) the base file mathfont_code.dtx; +%% +%% (2) the package code contained in mathfont.sty; +%% +%% (3) the derived files mathfont_symbol_list.tex, +%% mathfont_user_guide.tex, mathfont_heading.tex, and +%% mathfont_doc_patch.tex; +%% +%% (4) the pdf documentation files mathfont_code.pdf, +%% mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; +%% +%% (5) all other files created through the configuration process +%% such as mathfont.idx and mathfont.ind; and +%% +%% (6) the associated README.txt file. +%% +%% For more information, see the original mathfont.dtx file. To +%% install mathfont on your computer, run mathfont_code.dtx through +%% LaTeX and place the derived file mathfont.sty in a directory +%% searchable by TeX. +%% + +\def\packagedate{December 2019} +\def\packageversion{1.6} + +\let\@@section\section +\let\@sectionname\relax +\def\@tempsec#1{\penalty-1000\@@section{#1}\penalty0\gdef\@sectionname{#1}} +\def\@tempsecstar#1{\@@section*{#1}\gdef\@sectionname{#1}} +\def\section{\@ifstar\@tempsecstar\@tempsec} +\def\@oddhead{\ifnum\count0>1\relax + \rlap{\textit{\@sectionname}}\hfil + \hbox to 0pt{\hss\documentname\hss}\hfil + \llap{\the\count0}\fi} +\def\@evenhead{\ifnum\count0>1\relax + \rlap{\the\count0}\hfil + \hbox to 0pt{\hss\documentname\hss}\hfil + \llap{\textit{\@sectionname}}\fi} +\def\@oddfoot{\hfil\ifnum\count0=1\relax1\fi\hfil} +\let\@evenfoot\@empty + +\DeclareRobustCommand\XeTeX{X\kern-0.1em + \raise-0.5ex\hbox{\rotatebox[origin=c]{180}{E}}\kern-0.15em + \TeX} +\DeclareRobustCommand\XeLaTeX{X\kern-0.1em + \raise-0.5ex\hbox{\rotatebox[origin=c]{180}{E}}\kern-0.13em + \LaTeX} +\bgroup + \count@\catcode`\| + \catcode`\|=12\relax + \gdef\indexpage#1{\index{#1|textit}} + \catcode`\|\count@ +\egroup +\edef\fontspeccommand{\noexpand\protect\expandafter\noexpand\csname fontspeccommand \endcsname} +\bgroup +\catcode`\_=12 + \expandafter\gdef\csname fontspeccommand \endcsname{% + \texttt{\string\fontspec_set_family:Nnn}} +\egroup +\renewcommand\topfraction{1} +\renewcommand\bottomfraction{1} +\newenvironment{code} + {\strut\vadjust\bgroup\medskip\parindent=4em\relax\indent\strut\ignorespaces} + {\strut\par\medskip\egroup\hfill\break\strut\ignorespacesafterend} +\def\argtext#1{\ensuremath{\langle$\textit{#1}$\rangle}} +\def\vrb#1{\expandafter\texttt\expandafter{\string#1}} +\parskip=0pt + +\def\makechar#1{\noindent\hbox to 0.4in{$#1{}$\hfil}\vrb#1\par} +\def\makeaccent#1{\noindent\hbox to 0.4in{$#1 a$\hfil}\vrb#1\par} +\def\blockheader#1#2#3{\smallskip\bigskip\centerline{#2 Characters (\texttt{#1})} + \penalty\@M{\noindent\hfil\fontsize{9pt}{12pt}\selectfont + \strut Rendered in #3\par}\penalty\@M + \smallskip\hrule height 0.5pt\penalty\@M\smallskip} +\def\upperalphabet{ABCDEFGHIJKLMNOPQRSTUVWXY} +\def\loweralphabet{abcdefghijklmnopqrstuvwxy} +\def\digits{0123456789} +\def\printchars#1{% + \expandafter\@tfor\expandafter\letter\expandafter:\expandafter=#1\do{% + \rlap{$\@tempstyle{\letter}$}\hfill}} +\def\letterlikechars#1{\smallskip\let\@tempstyle#1 + \noindent\printchars\upperalphabet\hbox to 0.6em{$\@tempstyle{Z}$\hss}\par + \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}.}\global\advance\c@footnote\m@ne}\par +{\strut Conrad Kosowsky}\par +{\strut\packagedate}\par +{\strut\ttfamily kosowsky.latex@gmail.com}\par} + +\bigskip + +\begin{figure}[h] +\hrule height \p@\hbox{\vrule width \p@\kern-\p@\relax\vbox{\medskip +{\leftskip=7em\rightskip=7em +\noindent\strut For easy, off-the-shelf use, type the following in your document preamble and compile using \XeLaTeX\ or Lua\LaTeX:\par} +\medskip +\vbox{\noindent\hfil{|\usepackage[|\argtext{font name}|]{mathfont}|}\hfil} +\medskip}\kern-\p@\vrule width \p@}\hrule height \p@ +\end{figure} + +\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} + +\bigskip +\endinput +%% +%% End of file `mathfont_heading.tex'. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_index_warning.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_index_warning.tex new file mode 100644 index 00000000000..8ada1c04dd3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_index_warning.tex @@ -0,0 +1,70 @@ +%% +%% This is file `mathfont_index_warning.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mathfont_code.dtx (with options: `idxwarning') +%% +%% This file is file from version 1.6 of the LaTeX package "mathfont," +%% to be used in conjunction with the XeTeX or LuaTeX engines. +%% +%% Copyright 2018-2019 by Conrad Kosowsky +%% +%% This file may be distributed and modified under the terms of the +%% LaTeX Public Project License, version 1.3c or any later version. +%% The most recent version of this license is available online at +%% +%% https://www.latex-project.org/lppl/. +%% +%% This work has the LPPL status "maintained," and the current +%% maintainer is the package author, Conrad Kosowsky. He can be +%% reached at kosowsky.latex@gmail.com. The work consists of the +%% following items: +%% +%% (1) the base file mathfont_code.dtx; +%% +%% (2) the package code contained in mathfont.sty; +%% +%% (3) the derived files mathfont_symbol_list.tex, +%% mathfont_user_guide.tex, mathfont_heading.tex, and +%% mathfont_doc_patch.tex; +%% +%% (4) the pdf documentation files mathfont_code.pdf, +%% mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; +%% +%% (5) all other files created through the configuration process +%% such as mathfont.idx and mathfont.ind; and +%% +%% (6) the associated README.txt file. +%% +%% For more information, see the original mathfont.dtx file. To +%% install mathfont on your computer, run mathfont_code.dtx through +%% LaTeX and place the derived file mathfont.sty in a directory +%% searchable by TeX. +%% +\begingroup +\bigskip +\hrule height \p@\hbox{\vrule width \p@\kern-\p@\relax\vbox{\bigskip +{\leftskip=12pt\rightskip=12pt\parindent=0pt + +\hfil WARNING\hfil + +\medskip + +It looks like you obtained a copy of |mathfont_code.pdf| without the index. To produce documentation with index, do the following: (1) run |mathfont_code.dtx| through \LaTeX\ to produce the |idx| file; (2) while in the directory containing |mathfont_code.dtx|, type + +\medskip + +\hfil|makeindex -s gind.ist mathfont_code.idx|\hfil + +\medskip + +in the command line; and (3) rerun |mathfont_code.dtx| through \LaTeX\ to recreate the full documentation. + +}\bigskip}\kern-\p@\vrule width \p@}\hrule height \p@ +\bigskip +\endgroup +\endinput +%% +%% End of file `mathfont_index_warning.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 Binary files differnew file mode 100644 index 00000000000..8bb0bd0a429 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.pdf diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex new file mode 100644 index 00000000000..9580adaa20d --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_symbol_list.tex @@ -0,0 +1,717 @@ +%% +%% This is file `mathfont_symbol_list.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mathfont_code.dtx (with options: `chars') +%% +%% This file is file from version 1.6 of the LaTeX package "mathfont," +%% to be used in conjunction with the XeTeX or LuaTeX engines. +%% +%% Copyright 2018-2019 by Conrad Kosowsky +%% +%% This file may be distributed and modified under the terms of the +%% LaTeX Public Project License, version 1.3c or any later version. +%% The most recent version of this license is available online at +%% +%% https://www.latex-project.org/lppl/. +%% +%% This work has the LPPL status "maintained," and the current +%% maintainer is the package author, Conrad Kosowsky. He can be +%% reached at kosowsky.latex@gmail.com. The work consists of the +%% following items: +%% +%% (1) the base file mathfont_code.dtx; +%% +%% (2) the package code contained in mathfont.sty; +%% +%% (3) the derived files mathfont_symbol_list.tex, +%% mathfont_user_guide.tex, mathfont_heading.tex, and +%% mathfont_doc_patch.tex; +%% +%% (4) the pdf documentation files mathfont_code.pdf, +%% mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; +%% +%% (5) all other files created through the configuration process +%% such as mathfont.idx and mathfont.ind; and +%% +%% (6) the associated README.txt file. +%% +%% For more information, see the original mathfont.dtx file. To +%% install mathfont on your computer, run mathfont_code.dtx through +%% LaTeX and place the derived file mathfont.sty in a directory +%% searchable by TeX. +%% +\documentclass[12pt,twoside]{article} +\makeatletter +\let\@@imath\imath +\let\@@jmath\jmath +\usepackage[margin=72.27pt]{geometry} +\usepackage{multicol} +\usepackage{graphicx} +\usepackage{mathfont} +\mathfont[greekupper]{Courier New} +\mathfont[greeklower,delimiters,bigops]{Times New Roman} +\mathfont[agreekupper,extsymbols,bb,cal,frak,bcal,bfrak]{Symbola} +\mathfont[agreeklower=roman]{Didot Bold} +\mathfont[hebrew]{New Peninim MT} +\mathfont[cyrillicupper]{EB Garamond} +\mathfont[cyrilliclower=roman]{Comic Sans MS} +\mathfont[symbols]{Arial} +\mathfont[arrows,extbigops]{STIXGeneral} +\mathfont[diacritics,lower]{Baskerville} +\usepackage{shortvrb} +\MakeShortVerb{|} +\pretolerance=20 +\hyphenpenalty=10 +\exhyphenpenalty=5 +\brokenpenalty=0 +\finalhyphendemerits=300 +\doublehyphendemerits=500 +\raggedcolumns +\parskip=0pt +\smallskipamount=2pt plus 1pt minus 1pt +\multicolsep=0pt +\premulticols=0pt +\begin{document} + +\def\documentname{Symbol List} +\input mathfont_heading.tex + +The \textsf{mathfont} package acts on some 300 alphanumeric characters and 500 general math symbols, and this document lists all such symbols besides Latin characters and Arabic numerals. The characters are organized by keyword, and when the user calls |\mathfont| on one of the keyword classes below, the package acts on every control sequence listed under that keyword. It changes the math-mode font of the character-commands that already exist in \LaTeX, and for the control sequences that do not exist in \LaTeX, it defines them to be new characters for use in math mode. Unlike most character-providing packages, \textsf{mathfont} does not provide extra symbols by default, and users can access additional control sequences only once they act |\mathfont| on some keyword-option. Of course, typesetting these symbols depends on having a font that contains them, and most major unicode fonts lack many or most of the symbols in this document. Choose your font wisely! Finally, as stated in the user guide, the \texttt{delimiters}, \texttt{bigops}, and |\big|\argtext{symbol} (such as |\bigvee|) characters do not in general change size in different mathematical contexts. I hope to address this limitation in future package updates. For documentation of user-level commands, see |mathfont_user_guide.pdf|, and for version history and code implementation, see |mathfont_code.pdf|. Both documentation files are included with the \textsf{mathfont} installation and available on \textsc{ctan}. + +This document does not contain tables for the keywords |upper|, |lower|, and |digits|. The first of these keywords contains all capital Latin letters, and the second contains all lower-case Latin letters as well as the ``mathematical i'' $\@@imath$ coded with |\imath| and ``mathematical j'' $\@@jmath$ coded with |\jmath|. The |digits| category contains the digits 0 through 9. Unlike the \LaTeX\ kernel, \textsf{mathfont} declares both |\imath| and |\jmath| as math alphabet characters, so the package's local font-change commands will adjust the font of these two symbols. + +\catcode`\|=12 +\parskip=1pt + +\blockheader{diacritics}{Accent}{Baskerville} + +\begin{multicols}{3} +\makeaccent{\acute} +\makeaccent{\aacute} +\makeaccent{\dot} +\makeaccent{\ddot} +\makeaccent{\grave} +\makeaccent{\breve} +\makeaccent{\hat} +\makeaccent{\check} +\makeaccent{\bar} +\makeaccent{\mathring} +\makeaccent{\tilde} +\end{multicols} + +\blockheader{greekupper}{Upper-Case Greek}{Courier New} + +\begin{multicols}{3} +\makechar{\Alpha} +\makechar{\Beta} +\makechar{\Gamma} +\makechar{\Delta} +\makechar{\Epsilon} +\makechar{\Zeta} +\makechar{\Eta} +\makechar{\Theta} +\makechar{\Iota} +\makechar{\Kappa} +\makechar{\Lambda} +\makechar{\Mu} +\makechar{\Nu} +\makechar{\Xi} +\makechar{\Omicron} +\makechar{\Pi} +\makechar{\Rho} +\makechar{\Sigma} +\makechar{\Tau} +\makechar{\Upsilon} +\makechar{\Phi} +\makechar{\Chi} +\makechar{\Psi} +\makechar{\Omega} +\makechar{\varTheta} +\end{multicols} + +\blockheader{greeklower}{Lower-Case Greek}{Times New Roman} + +\begin{multicols}{3} +\makechar{\alpha} +\makechar{\beta} +\makechar{\gamma} +\makechar{\delta} +\makechar{\epsilon} +\makechar{\zeta} +\makechar{\eta} +\makechar{\theta} +\makechar{\iota} +\makechar{\kappa} +\makechar{\lambda} +\makechar{\mu} +\makechar{\nu} +\makechar{\xi} +\makechar{\omicron} +\makechar{\pi} +\makechar{\rho} +\makechar{\sigma} +\makechar{\tau} +\makechar{\upsilon} +\makechar{\phi} +\makechar{\chi} +\makechar{\psi} +\makechar{\omega} +\makechar{\varbeta} +\makechar{\varepsilon} +\makechar{\vartheta} +\makechar{\varrho} +\makechar{\varsigma} +\makechar{\varphi} +\end{multicols} + +\blockheader{agreekupper}{Upper-Case Ancient Greek}{Symbola} + +\begin{multicols}{3} +\makechar{\Heta} +\makechar{\Sampi} +\makechar{\Digamma} +\makechar{\Koppa} +\makechar{\Stigma} +\makechar{\Sho} +\makechar{\San} +\makechar{\varSampi} +\makechar{\varDigamma} +\makechar{\varKoppa} +\end{multicols} + +\blockheader{agreeklower}{Lower-Case Ancient Greek}{Didot Bold} + +\begin{multicols}{3} +\makechar{\heta} +\makechar{\sampi} +\makechar{\digamma} +\makechar{\koppa} +\makechar{\stigma} +\makechar{\sho} +\makechar{\san} +\makechar{\varsampi} +\makechar{\vardigamma} +\makechar{\varkoppa} +\end{multicols} + +\blockheader{cyrillicupper}{Upper-Case Cyrillic}{EB Garamond} + +\begin{multicols}{3} +\makechar{\cyrA} +\makechar{\cyrBe} +\makechar{\cyrVe} +\makechar{\cyrGhe} +\makechar{\cyrDe} +\makechar{\cyrIe} +\makechar{\cyrZhe} +\makechar{\cyrZe} +\makechar{\cyrI} +\makechar{\cyrKa} +\makechar{\cyrEl} +\makechar{\cyrEm} +\makechar{\cyrEn} +\makechar{\cyrO} +\makechar{\cyrPe} +\makechar{\cyrEr} +\makechar{\cyrEs} +\makechar{\cyrTe} +\makechar{\cyrU} +\makechar{\cyrEf} +\makechar{\cyrHa} +\makechar{\cyrTse} +\makechar{\cyrChe} +\makechar{\cyrSha} +\makechar{\cyrShcha} +\makechar{\cyrHard} +\makechar{\cyrYeru} +\makechar{\cyrSoft} +\makechar{\cyrE} +\makechar{\cyrYu} +\makechar{\cyrYa} +\makechar{\cyrvarI} +\end{multicols} + +\blockheader{cyrilliclower}{Lower-Case Cyrillic}{Comic Sans MS% + \footnote{Yes, you too can now create beautifully spaced mathematics in Comic Sans!}} + +\begin{multicols}{3} +\makechar{\cyra} +\makechar{\cyrbe} +\makechar{\cyrve} +\makechar{\cyrghe} +\makechar{\cyrde} +\makechar{\cyrie} +\makechar{\cyrzhe} +\makechar{\cyrze} +\makechar{\cyri} +\makechar{\cyrka} +\makechar{\cyrel} +\makechar{\cyrem} +\makechar{\cyren} +\makechar{\cyro} +\makechar{\cyrpe} +\makechar{\cyrer} +\makechar{\cyres} +\makechar{\cyrte} +\makechar{\cyru} +\makechar{\cyref} +\makechar{\cyrha} +\makechar{\cyrtse} +\makechar{\cyrche} +\makechar{\cyrsha} +\makechar{\cyrshcha} +\makechar{\cyrhard} +\makechar{\cyryeru} +\makechar{\cyrsoft} +\makechar{\cyre} +\makechar{\cyryu} +\makechar{\cyrya} +\makechar{\cyrvari} +\end{multicols} + +\blockheader{hebrew}{Hebrew}{New Peninim MT} + +\begin{multicols}{3} +\makechar{\aleph} +\makechar{\beth} +\makechar{\gimel} +\makechar{\daleth} +\makechar{\he} +\makechar{\vav} +\makechar{\zayin} +\makechar{\het} +\makechar{\tet} +\makechar{\yod} +\makechar{\kaf} +\makechar{\lamed} +\makechar{\mem} +\makechar{\nun} +\makechar{\samekh} +\makechar{\ayin} +\makechar{\pe} +\makechar{\tsadi} +\makechar{\qof} +\makechar{\resh} +\makechar{\shin} +\makechar{\tav} +\makechar{\varkaf} +\makechar{\varmem} +\makechar{\varnun} +\makechar{\varpe} +\makechar{\vartsadi} +\end{multicols} + +\blockheader{symbols}{Basic Math}{Arial} + +\begin{multicols}{3} +\makechar{.} +\makechar{@} +\let\par\relax +\makechar{\#}\footnote{When it acts on \vrb\#, \vrb\%, and \vrb\&, \textsf{mathfont} redefines them as robust commands that expand to their usual \vrb\char\ definition in horizontal mode and a math symbol in math mode. This prevents any changes to their font outside of math mode and is how other commands such as \vrb\$ or \vrb\P\ function in both math mode and horizontal mode.}\@@par +\makechar{\$}\footnote{Technically, \textsf{mathfont} doesn't redefine \vrb\$, \vrb\P, \vrb\S, \vrb\pounds, \vrb\dag, or \vrb\ddag. The package recodes the character-command that these macros expand to when in math mode.}\@par +\makechar{\%} +\makechar{\&} +\makechar{\P} +\makechar{\S} +\makechar{\pounds} +\makechar{|} +\makechar{\neg} +\makechar{\infty} +\makechar{\partial} +\makechar{\mathbackslash} +\makechar{\degree} +\makechar{\increment} +\makechar{\hbar} +\makechar{'} +\makechar{"} +\let\par\relax +\makechar{\comma}\footnote{In addition to the comma and colon punctuation marks, the package defines \vrb\comma\ and \vrb\colon. The difference lies in the spacing. \TeX\ treats the comma and colon keystrokes as \vrb\mathpunct\ and \vrb\mathrel\ types respectively. The package codes the \vrb\comma\ and \vrb\colon\ control sequences as \vrb\mathord\ and \vrb\mathpunct\ types respectively, so both control sequence result in less space than the corresponding keystroke. I recommend using \vrb\comma\ to typeset commas in large real numbers and \vrb\colon\ to typeset colon punctuation marks, for example following a function or to indicate a subset specification.}\@par +\makechar{+} +\makechar{-} +\makechar{*} +\makechar{\times} +\makechar{/} +\makechar{\div} +\makechar{\pm} +\makechar{\bullet} +\makechar{\dag} +\makechar{\ddag} +\makechar{\cdot} +\makechar{\setminus} +\makechar{=} +\makechar{<} +\makechar{>} +\makechar{\leq} +\makechar{\geq} +\makechar{\sim} +\makechar{\approx} +\makechar{\equiv} +\makechar{\mid} +\makechar{\parallel} +\makechar{:} +\makechar{?} +\makechar{!} +\makechar{,} +\makechar{;} +\makechar{\colon} +\makechar{\mathellipsis} +\end{multicols} + +\blockheader{extsymbols}{Extended Math}{Symbola} + +\begin{multicols}{3} +\makechar{\wp} +\makechar{\Re} +\makechar{\Im} +\makechar{\ell} +\makechar{\forall} +\makechar{\exists} +\makechar{\emptyset} +\makechar{\nabla} +\makechar{\in} +\makechar{\ni} +\makechar{\mp} +\makechar{\angle} +\makechar{\top} +\makechar{\bot} +\makechar{\vdash} +\makechar{\dashv} +\makechar{\flat} +\makechar{\natural} +\makechar{\sharp} +\makechar{\fflat} +\makechar{\ssharp} +\let\par\relax +\makechar{\bclubsuit}\footnote{Also \vrb\clubsuit.}\@par +\makechar{\bdiamondsuit} +\makechar{\bheartsuit} +\let\par\relax +\makechar{\bspadesuit}\footnote{Also \vrb\spadesuit.}\@par +\makechar{\wclubsuit} +\let\par\relax +\makechar{\wdiamondsuit}\footnote{Also \vrb\diamondsuit.}\@@par +\makechar{\wheartsuit}\footnote{Also \vrb\heartsuit.}\@par +\makechar{\wspadesuit} +\makechar{\wedge} +\makechar{\vee} +\makechar{\cap} +\makechar{\cup} +\makechar{\sqcap} +\makechar{\sqcup} +\makechar{\amalg} +\makechar{\wr} +\makechar{\ast} +\makechar{\star} +\makechar{\diamond} +\makechar{\varcdot} +\makechar{\varsetminus} +\makechar{\oplus} +\makechar{\otimes} +\makechar{\ominus} +\makechar{\odiv} +\makechar{\oslash} +\makechar{\odot} +\makechar{\sqplus} +\makechar{\sqtimes} +\makechar{\sqminus} +\makechar{\sqdot} +\makechar{\in} +\makechar{\ni} +\makechar{\subset} +\makechar{\supset} +\makechar{\subseteq} +\makechar{\supseteq} +\makechar{\sqsubset} +\makechar{\sqsupset} +\makechar{\sqsubseteq} +\makechar{\sqsupseteq} +\makechar{\triangleleft} +\makechar{\triangleright} +\makechar{\trianglelefteq} +\makechar{\trianglerighteq} +\makechar{\propto} +\makechar{\bowtie} +\makechar{\hourglass} +\makechar{\therefore} +\makechar{\because} +\makechar{\ratio} +\makechar{\proportion} +\makechar{\ll} +\makechar{\gg} +\makechar{\lll} +\makechar{\ggg} +\makechar{\leqq} +\makechar{\geqq} +\makechar{\lapprox} +\makechar{\gapprox} +\makechar{\simeq} +\makechar{\eqsim} +\let\par\relax +\makechar{\simeqq}\footnote{Also \vrb\cong.}\@par +\makechar{\approxeq} +\makechar{\sssim} +\makechar{\seq} +\makechar{\doteq} +\makechar{\coloneq} +\makechar{\eqcolon} +\makechar{\ringeq} +\makechar{\arceq} +\makechar{\wedgeeq} +\makechar{\veeeq} +\makechar{\stareq} +\makechar{\triangleeq} +\makechar{\defeq} +\makechar{\qeq} +\makechar{\lsim} +\makechar{\gsim} +\makechar{\prec} +\makechar{\succ} +\makechar{\preceq} +\makechar{\succeq} +\makechar{\preceqq} +\makechar{\succeqq} +\makechar{\precsim} +\makechar{\succsim} +\makechar{\precapprox} +\makechar{\succapprox} +\makechar{\precprec} +\makechar{\succsucc} +\makechar{\asymp} +\makechar{\nin} +\makechar{\nni} +\makechar{\nsubset} +\makechar{\nsupset} +\makechar{\nsubseteq} +\makechar{\nsupseteq} +\makechar{\subsetneq} +\makechar{\supsetneq} +\makechar{\nsqsubseteq} +\makechar{\nsqsupseteq} +\makechar{\sqsubsetneq} +\makechar{\sqsupsetneq} +\makechar{\neq} +\makechar{\nl} +\makechar{\ng} +\makechar{\nleq} +\makechar{\ngeq} +\makechar{\lneq} +\makechar{\gneq} +\makechar{\lneqq} +\makechar{\gneqq} +\makechar{\ntriangleleft} +\makechar{\ntriangleright} +\makechar{\ntrianglelefteq} +\makechar{\ntrianglerighteq} +\makechar{\nsim} +\makechar{\napprox} +\makechar{\nsimeq} +\makechar{\nsimeqq} +\makechar{\simneqq} +\makechar{\nlsim} +\makechar{\ngsim} +\makechar{\lnsim} +\makechar{\gnsim} +\makechar{\lnapprox} +\makechar{\gnapprox} +\makechar{\nprec} +\makechar{\nsucc} +\makechar{\npreceq} +\makechar{\nsucceq} +\makechar{\precneq} +\makechar{\succneq} +\makechar{\precneqq} +\makechar{\succneqq} +\makechar{\precnsim} +\makechar{\succnsim} +\makechar{\precnapprox} +\makechar{\succnapprox} +\makechar{\nequiv} +\end{multicols} + +\blockheader{delimiters}{Delimiter}{Times New Roman} + +\begin{multicols}{3} +\makechar{(} +\makechar{)} +\makechar{[} +\makechar{]} +\makechar{\leftbrace} +\makechar{\rightbrace} +\end{multicols} + +\blockheader{arrows}{Arrow}{STIXGeneral} + +\begin{multicols}{2} +\let\par\relax +\makechar{\rightarrow}\footnote{Also \vrb\to.}\@par +\makechar{\nrightarrow} +\makechar{\Rightarrow} +\makechar{\nRightarrow} +\makechar{\Rrightarrow} +\makechar{\longrightarrow} +\makechar{\Longrightarrow} +\let\par\relax +\makechar{\rightbararrow}\footnote{Also \vrb\mapsto.}\@par +\makechar{\Rightbararrow} +\let\par\relax +\makechar{\longrightbararrow}\footnote{Also \vrb\longmapsto.}\@par +\makechar{\Longrightbararrow} +\makechar{\hookrightarrow} +\makechar{\rightdasharrow} +\makechar{\rightharpoonup} +\makechar{\rightharpoondown} +\makechar{\rightarrowtail} +\makechar{\rightoplusarrow} +\makechar{\rightwavearrow} +\makechar{\rightsquigarrow} +\makechar{\longrightsquigarrow} +\makechar{\looparrowright} +\makechar{\curvearrowright} +\makechar{\circlearrowright} +\makechar{\twoheadrightarrow} +\makechar{\rightarrowtobar} +\makechar{\rightwhitearrow} +\makechar{\rightrightarrows} +\makechar{\rightrightrightarrows} +\let\par\relax +\makechar{\leftarrow}\footnote{Also \vrb\from.}\@par +\makechar{\nleftarrow} +\makechar{\Leftarrow} +\makechar{\nLeftarrow} +\makechar{\Lleftarrow} +\makechar{\longleftarrow} +\makechar{\Longleftarrow} +\let\par\relax +\makechar{\leftbararrow}\footnote{Also \vrb\mapsfrom.}\@par +\makechar{\Leftbararrow} +\let\par\relax +\makechar{\longleftbararrow}\footnote{Also \vrb\longmapsfrom.}\@par +\makechar{\Longleftbararrow} +\makechar{\hookleftarrow} +\makechar{\leftdasharrow} +\makechar{\leftharpoonup} +\makechar{\leftharpoondown} +\makechar{\leftarrowtail} +\makechar{\leftoplusarrow} +\makechar{\leftwavearrow} +\makechar{\leftsquigarrow} +\makechar{\longleftsquigarrow} +\makechar{\looparrowleft} +\makechar{\curvearrowleft} +\makechar{\circlearrowleft} +\makechar{\twoheadleftarrow} +\makechar{\leftarrowtobar} +\makechar{\leftwhitearrow} +\makechar{\leftleftarrows} +\makechar{\leftleftleftarrows} +\makechar{\leftrightarrow} +\makechar{\Leftrightarrow} +\makechar{\nLeftrightarrow} +\makechar{\longleftrightarrow} +\makechar{\Longleftrightarrow} +\makechar{\leftrightwavearrow} +\makechar{\leftrightarrows} +\makechar{\leftrightharpoons} +\makechar{\leftrightarrowstobar} +\makechar{\rightleftarrows} +\makechar{\rightleftharpoons} +\makechar{\uparrow} +\makechar{\Uparrow} +\makechar{\Uuparrow} +\makechar{\upbararrow} +\makechar{\updasharrow} +\makechar{\upharpoonleft} +\makechar{\upharpoonright} +\makechar{\twoheaduparrow} +\makechar{\uparrowtobar} +\makechar{\upwhitearrow} +\makechar{\upwhitebararrow} +\makechar{\upuparrows} +\makechar{\downarrow} +\makechar{\Downarrow} +\makechar{\Ddownarrow} +\makechar{\downbararrow} +\makechar{\downdasharrow} +\makechar{\zigzagarrow} +\makechar{\downharpoonleft} +\makechar{\downharpoonright} +\makechar{\twoheaddownarrow} +\makechar{\downarrowtobar} +\makechar{\downwhitearrow} +\makechar{\downdownarrows} +\makechar{\updownarrow} +\makechar{\Updownarrow} +\makechar{\updownarrows} +\makechar{\downuparrows} +\makechar{\updownharpoons} +\makechar{\downupharpoons} +\makechar{\nearrow} +\makechar{\Nearrow} +\makechar{\nwarrow} +\makechar{\Nwarrow} +\makechar{\searrow} +\makechar{\Searrow} +\makechar{\swarrow} +\makechar{\Swarrow} +\makechar{\nwsearrow} +\makechar{\neswarrow} +\makechar{\lcirclearrow} +\makechar{\rcirclearrow} +\end{multicols} + +\blockheader{bigops}{Big Operator}{Times New Roman} + +\begin{multicols}{3} +\makechar{\sum} +\makechar{\prod} +\makechar{\intop} +\end{multicols} + +\blockheader{extbigops}{Extended Big Operators}{STIXGeneral} + +\begin{multicols}{3} +\makechar{\coprod} +\makechar{\bigvee} +\makechar{\bigwedge} +\makechar{\bigcup} +\makechar{\bigcap} +\makechar{\iint} +\makechar{\iiint} +\makechar{\oint} +\makechar{\oiint} +\makechar{\oiiint} +\makechar{\bigoplus} +\makechar{\bigotimes} +\makechar{\bigodot} +\makechar{\bigsqcap} +\makechar{\bigsqcup} +\end{multicols} + +\blockheader{bb}{Blackboard Bold}{Symbola and Accessed with \vrb\mathbb} + +\letterlikechars\mathbb +\hbox to 10em{\printchars\digits} + +\blockheader{cal}{Calligraphic}{Symbola and Accessed with \vrb\mathcal} + +\letterlikechars\mathcal + +\blockheader{frak}{Fraktur}{Symbola and Accessed with \vrb\mathfrak} + +\letterlikechars\mathfrak + +\blockheader{bcal}{Bold Calligraphic}{Symbola and Accessed with \vrb\mathbcal} + +\letterlikechars\mathbcal + +\blockheader{bfrak}{Bold Fraktur}{Symbola and Accessed with \vrb\mathbfrak} + +\letterlikechars\mathbfrak + +\end{document} +\endinput +%% +%% End of file `mathfont_symbol_list.tex'. diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf Binary files differnew file mode 100644 index 00000000000..f18825134bd --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.pdf diff --git a/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex new file mode 100644 index 00000000000..61eb4efb753 --- /dev/null +++ b/Master/texmf-dist/doc/latex/mathfont/mathfont_user_guide.tex @@ -0,0 +1,249 @@ +%% +%% This is file `mathfont_user_guide.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mathfont_code.dtx (with options: `user') +%% +%% This file is file from version 1.6 of the LaTeX package "mathfont," +%% to be used in conjunction with the XeTeX or LuaTeX engines. +%% +%% Copyright 2018-2019 by Conrad Kosowsky +%% +%% This file may be distributed and modified under the terms of the +%% LaTeX Public Project License, version 1.3c or any later version. +%% The most recent version of this license is available online at +%% +%% https://www.latex-project.org/lppl/. +%% +%% This work has the LPPL status "maintained," and the current +%% maintainer is the package author, Conrad Kosowsky. He can be +%% reached at kosowsky.latex@gmail.com. The work consists of the +%% following items: +%% +%% (1) the base file mathfont_code.dtx; +%% +%% (2) the package code contained in mathfont.sty; +%% +%% (3) the derived files mathfont_symbol_list.tex, +%% mathfont_user_guide.tex, mathfont_heading.tex, and +%% mathfont_doc_patch.tex; +%% +%% (4) the pdf documentation files mathfont_code.pdf, +%% mathfont_symbol_list.pdf, and mathfont_user_guide.pdf; +%% +%% (5) all other files created through the configuration process +%% such as mathfont.idx and mathfont.ind; and +%% +%% (6) the associated README.txt file. +%% +%% For more information, see the original mathfont.dtx file. To +%% install mathfont on your computer, run mathfont_code.dtx through +%% LaTeX and place the derived file mathfont.sty in a directory +%% searchable by TeX. +%% +\documentclass[12pt,twoside]{article} +\makeatletter +\usepackage[margin=72.27pt]{geometry} +\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype} +\usepackage[bottom]{footmisc} +\usepackage{booktabs} +\usepackage{graphicx} +\usepackage{tabularx} +\usepackage{shortvrb} +\skip\footins=7pt +\MakeShortVerb{|} +\hyphenpenalty=10 +\pretolerance=20 +\hyphenpenalty=10 +\exhyphenpenalty=5 +\brokenpenalty=0 +\clubpenalty=5 +\widowpenalty=5 +\finalhyphendemerits=300 +\doublehyphendemerits=500 +\renewcommand\textfraction{0.4} +\begin{document} + +\def\documentname{User Guide} +\input mathfont_heading.tex + +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: after loading 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. 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, and 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}.} + +The \textsf{mathfont} package applies \textsf{fontspec}'s advances in font selection to mathematics typesetting, and this document explains the package's user-level commands. Section~1 presents the basic functionality and related packages. Section~2 explains how to use the default font-change commands, and users in a hurry will find the most important information here. Section~3 describes the local font-change commands, and section~4 discusses mathematical symbols and aspects of their implementation. Section~5 addresses error messages. 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|. Both of these documentation files are included with the \textsf{mathfont} installation and are 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 package can change the default math-mode font used for Latin, Greek, Cyrillic, and Hebrew letters; Arabic numerals; roughly 300 unicode math symbols; and standard unicode alphanumeric characters. The package accepts any OpenType or TrueType font, and tables~1 and 2 display the specific classes of characters that \textsf{mathfont}'s default font-change command acts on. The default math-alphabet characters are Latin letters, Arabic numerals, upper-case Greek characters, and diacritics. When \textsf{mathfont} sets the default font for any of these four character classes, it preserves their math alphabet status, and when the package sets the default font for lower-case Greek, ancient Greek, Cyrillic, or Hebrew characters, it recodes each symbol in the class as math-alphabet type. At that point, the local font-change commands will act on any characters in those classes. + +The package must be loaded with \XeLaTeX or Lua\LaTeX. It can be loaded with the standard |\usepackage| syntax, and it accepts one optional argument. It treats the argument as a font name and changes all main fonts to that option. Specifically, the package invokes both |\mathfont| and \textsf{fontspec}'s |\setmainfont|, and it defines the four local font-changing commands |\mathrm|, |\mathit|, |\mathbf|, and |\mathbfit| to produce text from the desired font in combinations of upright, italic, and bold styles according to the control sequences' last letters. \XeTeX\ users may run into trouble with fonts whose name contains multiple words because \LaTeX\ eats spaces during package-option parsing. In this case, you will have to load the package and separately declare |\setfont| in your preamble. 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}. Regardless, I strongly recommend that \textsf{fontspec} be loaded with |no-math| because otherwise some font changes may not render properly. + +During loading, \textsf{mathfont} redefines three \LaTeX\ internal macros to make symbol declaration compatible with unicode fonts, and default math-font changes work only with the redefinitions in place. Because the internal changes are relatively unobtrusive, \textsf{mathfont}'s adjustments almost certainly do not affect \LaTeX\ packages loaded later, and the package does not restore the commands automatically. Instead, |\restoremathinternals| returns the internal commands to their default definitions, and users who want the previous definitions should reset the kernel manually. The corollary is that |\mathfont| and |\setfont| work before |\restoremathinternals| but not after. As of version~1.6, the package optional arguments |packages|, |operators|, and |no-operators| are depreciated. Instead, \textsf{mathfont} offers |\restoremathinternals| as the only way to interact directly with the kernel.\footnote{To be clear, as of version~1.6, \textsf{mathfont} does not restore the \LaTeX\ kernel when the user loads other packages. Given the scope and nature of the changes, I determined that the convenience factor of being able to use \vrb\mathfont\ anywhere in the preamble outweighs the incredibly small risk of interfering with another package. As far as I can tell, the biggest change is using a different primitive to code math symbols, but even that will probably never affect practical applications. The test \expandafter\vrb\csname if\endcsname\vrb\mathchar\vrb\alpha\ succeeds both before and after calling \vrb\mathfont, even though afterwards \vrb\alpha\ is defined with \vrb\Umathchar\ instead.} For changes to big operators, use the |bigops| keyword in section~2. + +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: (1) \textsf{mathfont} is compatible with Lua\LaTeX; (2) it can adjust the font of basic mathematical symbols such as those in the first half of table~2; and (3) \textsf{mathfont} lacks \textsf{mathspec}'s convenient space-adjustment character |"|.% footnote % +\footnote{Compatibility with Lua\LaTeX\ comes at the expense of \textsf{mathspec}'s space-adjustment character |"|, and spacing-conscientious users can either manually add |\string\kern| or |\string\muskip| to their equations or redefine an active version of |"|. For example, the code +\begin{code} % footnotes and verbatim really don't play well together +\begingroup\texttt{\string\catcode`\string\"=\string\active}\par +\texttt{\string\def"\expandafter\@gobble\string\#1\char"7B\relax + \expandafter\string\csname ifmmode\endcsname}\par +\texttt{\ \ \string\kern}\argtext{dimension}% + \texttt{\string\relax\ \expandafter\@gobble\string\#1\string\kern}% + \argtext{other dimension}\texttt{\string\relax}\par +\texttt{\expandafter\string\csname else\endcsname}\par +\texttt{\ \ \string\char`\string\"\expandafter\@gobble\string\#1\%}\par +\texttt{\expandafter\string\csname fi\endcsname\char"7D\relax}\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 each side respectively of the next character. More advanced users can automate the dimensions by using \TeX's \texttt{\expandafter\string\csname if\endcsname} or \LaTeX's |\string\@ifnextchar| conditionals to test whether the following character needs a particular spacing adjustment.} % end footnote % +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} 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. 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 only the local font changes outlined in section~3. + +\section{Setting the Default Font} + +The |\mathfont| command sets the default font for certain classes of characters. Its structure is given by +\begin{code} +|\mathfont[|\argtext{optional character classes}|]{|\argtext{font name}|}|, +\end{code} +where the \textit{optional character classes} can be any set of keywords from Tables~1 and 2 separated by commas, and the \textit{font name} can be any OpenType or TrueType font in a directory searchable by \TeX.\footnote{When specifying the \textit{font name}, users need to input a name that \textsf{fontspec} will recognize and be able to load. Advanced users will note that \vrb\mathfont\ uses \fontspeccommand\ and therefore loads fonts in the same way as \vrb\fontspec\ and related macros from that package.} The command loops through all keywords in the optional argument, and for each keyword, it changes the math-mode font for every character in that class to the \textit{font name}.\footnote{These changes happen through \LaTeX's \vrb\DeclareMathSymbol, and \vrb\mathfont\ is basically a very elaborately wrapped version of this command.} Currently, \textsf{mathfont} does not support OpenType features in math mode. To change both math and text fonts simultaneously, the package provides the command +\begin{code} +|\setfont{|\argtext{font name}|}|, +\end{code} +which calls both |\mathfont| and \textsf{fontspec}'s |\setmainfont| using the \textit{font name} as arguments. The package's optional argument is equivalent to calling |\setfont| and three local font-change commands from section 3, and most users will find this command sufficient for most applications. Both |\mathfont| and |\setfont| should appear only in the document preamble, i.e.\ before |\begin{document}|. + +The user should specify any optional arguments for |\mathfont| as entries in a comma-separated list. The order is irrelevant, and spaces throughout the optional argument are permitted. The argument should contain no braces! Leaving out the optional argument will cause the command to revert to its default behavior, where it acts on keyword classes |upper|, |lower|, |diacritics|, |greekupper|, |greeklower|, |digits|, |operator|, and |symbols|. For example, if the user writes +\begin{code} +|\mathfont{Arial}|, +\end{code} +\textsf{mathfont} will change the font of all Latin characters, Greek characters, diacritics, digits, operators such as $\log$ or $\sin$, and |symbols| characters to Arial whenever they come up in math mode. The package provides control sequences to typeset many symbols that \LaTeX\ does not include by default, and users gain access to these commands when they call |\mathfont| or |\setfont| with the appropriate keyword-option. In total, the package is capable of acting on some 800 unicode characters, and for a full list of symbols and control sequences, see |mathfont_symbol_list.pdf|, which is included in the \textsf{mathfont} installation and is available on \textsc{ctan}. Users can feed |\mathfont| a control sequence as its optional argument as long as the macro eventually expands to a comma-separated list of keywords and suboptions without braces.% footnote +\footnote{Technically, \vrb\mathfont\ expands its optional argument inside an \vrb\edef. When it scans an optional argument, \textsf{mathfont} temporarily converts spaces to catcode~9 and ignores them. However, if you feed \vrb\mathfont\ a macro with spaces in it, \TeX\ has already scanned and tokenized those spaces, so we use \vrb\zap@space\ from the \LaTeX\ kernel instead. Braces will wreck both this process and the \vrb\@for\ loop that comes later.} % end footnote +Finally, |\mathfont| and |\setfont| will not change the default font for a class of symbols once one of them has already done so. + +\begin{figure}[tb] +\centering +Table~1: Math Alphabet Characters\par\penalty\@M\smallskip +\begin{tabularx}\hsize{p{1.8in}Xp{1.3in}} +\toprule +Keyword & Meaning & Default shape\\ +\midrule +|upper| & Capital Latin Letters & Italic\\ +|lower| & Minuscule Latin Letters & Italic\\ +|diacritics| & Diacritics & Upright\\ +|greekupper| & Capital Greek Letters & Upright\\ +|greeklower| & Minuscule Greek Letters & Italic\\ +|agreekupper| & Capital Ancient Greek Letters & Upright\\ +|agreeklower| & Minuscule Ancient Greek Letters & Italic\\ +|cyrillicupper| & Capital Cyrillic Letters & Upright\\ +|cyrilliclower| & Minuscule Cyrillic Letters & Italic\\ +|hebrew| & Hebrew Letters & Upright\\ +|digits| & Arabic Numerals & Upright\\ +|operator| & Operator Font & Upright\\ +\bottomrule +\end{tabularx} +\end{figure} + +By default, \textsf{mathfont} will use one of an upright or italic shape for every character class, and users can override this setting by writing an |=| next to the keyword and either |roman| or |italic| following that. These two suboptions correspond respectively to an upright shape---normal shape in the language of the \textsc{nfss}---and an italic shape. Table~1 includes the default shape-values for each keyword, and the package declares characters for all keywords in table~2 as upright by default. For example, the command +\begin{code} +|\mathfont[upper=roman,lower=roman]{Times New Roman}| +\end{code} +changes all math-mode Latin letters to Times New Roman with upright shape. + +\begin{figure}[t] +\centering +Table~2: Letter-Like and Other Symbols\par\penalty\@M\smallskip +\begin{tabularx}\hsize{p{1.8in}X} +\toprule +Keyword & Meaning\\ +\midrule +|symbols| & Basic Symbols\\ +|extsymbols| & Extended Symbols\\ +|delimiters| & Parentheses, Brackets, and Braces\\ +|arrows| & Arrows\\ +|bigops| & ``Big'' Operators (see section 4)\\ +|extbigops| & Extended ``Big'' Operators\\ +|bb| & Blackboard Bold (double-struck)\\ +|cal| & Caligraphic\\ +|frak| & Fraktur\\ +|bcal| & Bold Caligraphic\\ +|bfrak| & Bold Fraktur\\ +\bottomrule +\end{tabularx} +\end{figure} + +The package provides access to several types of letterlike symbols that appear frequently in mathematical writing, and the last five keywords in table~2 constitute these classes. Unlike with other keywords, \textsf{mathfont} doesn't create control sequences to access the symbols directly but rather defines a new command that converts letters into the appropriate style. When the user calls |\mathfont| with any of the last five keywords from table~2, the package both declares the appropriate unicode characters as math symbols and defines the macro +\begin{code} +|\math|\argtext{keyword}|{|\argtext{argument}|}| +\end{code} +to typeset them. For example, +\begin{code} +|\mathfont[bcal]{STIXGeneral}| +\end{code} +will set STIXGeneral as the font for bold calligraphic characters and define the command |\mathbcal| to access them in math mode. For the |bb| case, the associated command acts on Latin letters and Arabic numerals, and for the other four keywords, the associated command acts just on Latin letters. \TeX\ will ignore and issue a warning in response to any other characters in the \textit{argument}. + +\section{Local Font Changes} + +With \textsf{mathfont}, users can locally change the font in math mode by creating and then using a new control sequence for each new font desired.\footnote{The five macros in this section are basically wrapped versions of \LaTeX's \vrb\DeclareMathAlphabet.} The control sequences created this way function analogously to the standard math font macros such as |\mathrm|, |\mathit|, and |\mathnormal| from the \LaTeX\ kernel, and the package provides four basic commands to produce them. Table~3 lists these commands. All four have the same argument structure: a control sequence as the first mandatory argument and a font name as the second. For example, the macro |\newmathrm| looks like +\begin{code} +|\newmathrm{|\argtext{control sequence}|}{|\argtext{font name}|}|. +\end{code} +It defines the \textit{control sequence} in its first argument to accept a string of characters that it then converts to the \textit{font name} in the second argument with upright shape and medium weight. Writing +\begin{code} +|\newmathrm{\matharial}{Arial}| +\end{code} +would create the macro +\begin{code} +|\matharial{|\argtext{argument}|}|, +\end{code} +which can be used only in math mode and which converts the math alphabet characters in its \textit{argument} into the Arial font with upright shape and medium weight. The other three commands in table~3 function in the same way except that they select different series or shape values for the font in question. Table~3 lists this information. As of version~1.6, |\newmathbold| has been renamed to |\newmathbf| to put it in line with \textsc{nfss} naming conventions. + +\begin{figure}[t] +\centering +Table 3: Font-changing Commands\par\penalty\@M\smallskip +\begin{tabularx}\hsize{p{1.8in}X} +\toprule +Command & Font Characteristics\\ +\midrule +|\newmathrm| & Upright shape; medium weight\\ +|\newmathit| & Italic shape; medium weight\\ +|\newmathbf| & Upright shape; bold-expanded weight\\ +|\newmathbfit| & Italic shape; bold-expanded weight\\ +\bottomrule +\end{tabularx} +\end{figure} + +Together these four commands will provide users with the tools for almost all desired local font changes, but they inevitably will be insufficient for some particular case. Accordingly, \textsf{mathfont} provides the more general |\newmathfontcommand| macro that functions similarly to the commands from table~3 but allows for more general font characteristics.\footnote{The package defines the four commands from table~3 in terms of \vrb\newmathfontcommand, and it specifies their style characteristics according to the kernel commands \vrb\updefault, \vrb\itdefault, \vrb\mddefault, and \vrb\bfdefault. Changing these macros will implicitly change the characteristics of the commands in table~3.} Its structure is +\begin{code} +|\newmathfontcommand{|\argtext{control sequence}|}{|\argtext{font name}|}{|\argtext{series}|}{|\argtext{shape}|}|, +\end{code} +where the control sequence in the first argument again becomes the macro that allows the user to access the specified font. The font name means any OpenType or TrueType font in a directory searchable by \TeX, and the series and shape information refers to the \textsc{nfss} codes for these attributes. Like |\mathfont| and |\setfont|, these commands should appear only in the document preamble. + +Unlike the traditional |\mathrm| and company, \textsf{mathfont}'s local font change commands create macros that can act on Greek characters. If the user specifies the font for Greek letters using |\mathfont|, macros created with the commands from Table~3 will affect those characters; otherwise, they will not.\footnote{\LaTeXe\ defines lower-case Greek letters as \vrb\mathord\ characters, and \textsf{mathfont} changes this classification to \vrb\mathalpha\ type when it declares them as symbols. The local font change commands act only on characters of class \vrb\mathalpha, so these commands will act on lower-case Greek letters if \vrb\mathfont\ redefines them to be \vrb\mathalpha.} Similarly, the local font-change commands will act on Cyrillic and Hebrew characters after the user calls |\mathfont| for those keyword-classes. + +\section{Math Symbols} + +Choosing which unicode characters to recode is something of a delicate task because few unicode fonts contain more than the most basic math 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 I coded those characters in the |symbols| keyword. This keyword contains punctuation and common symbols such as $\pm$, $\div$, and $\infty$, and it will be sufficient for basic math typesetting. That being said, most math relies on a much broader collection of characters and arrows, and in other keywords, I coded every unicode math symbol that I could reasonably see being useful. The extended math symbols keyword |extsymbols| contains quantifiers, set and element relations, just about any binary relation you can imagine, and a few miscellaneous symbols such as |\sharp| and |\flat|. The |arrows| keyword contains a swath of hooked, curved, and bar arrows and even one lightning bolt arrow. Most standard unicode fonts don't contain many of those glyphs, and users who call |\mathfont| for a font without certain characters will see blank spaces in their final output instead of the corresponding symbols from |mathfont_symbol_list.pdf|. If this happens, check the |log| file because it will display any missing characters in your fonts. + +It's worth emphasizing three aspects of \textsf{mathfont}'s symbol declaration process. First, the package does not provide any symbols in and of itself but rather gives users access to symbols that already exist on their computers. This is why \textsf{mathfont} provides no additional symbols directly at loading and why some package commands can create blank spaces rather than their intended output. Second, \textsf{mathfont}'s functionality currently does not include math symbols of variable sizes.% footnote +\footnote{Dynamic math-mode character sizing is a surprisingly thorny task. OpenType font designers specifically code certain characters to change size when they design the font, and Lua\TeX's \vrb\Udelimiter\ and \vrb\Umathoperatorsize\ depend on this embedded feature. Because most unicode fonts come without resizing information, \textsf{mathfont} would have to manually add these settings to the Lua\TeX\ font table. I intend to add this functionality in some future update, but I do not know what the timeframe looks like for those changes.} % end footnote +Recoded delimiters do not respond to |\left| and |\right|, and \LaTeX\ replaces them with their original Latin Modern equivalents before rescaling appropriately. Thus |\mathfont| with the |delimiters| keyword will produce normally sized delimiters in the font of your choice and big delimiters in Latin Modern Roman. Similarly, big operators such as |\sum| and |\prod| appear normally sized instead of larger after setting their font with |\mathfont|. This is undesirable! I have isolated all delimiter and big operator characters in their own keywords, and I hope to address this limitation in future updates. Third, the package provides an extra comma character, similar to \LaTeX's |\colon|.% footnote +\footnote{Consider $\{x:x\not=0\}$ versus $\{x\colon x\not=0\}$. The first specification uses |:| while the second uses \vrb\colon. As a rule of thumb, use |:| for ratios and \vrb\colon\ as a punctuation mark.} % end footnote +\TeX\ users have likely noticed the extra space surrounding commas in math mode, e.g.\ $10,000$ versus $10\mathord,000$, and \textsf{mathfont}'s |\comma| addresses this problem. Here the first ten thousand uses a standard~|,|~while the second uses |\comma|. As a rule of thumb, use |,| as a punctuation mark and |\comma| as a character separator. + +\section{Handling Errors} + +I have tried to make \textsf{mathfont}'s error messages as clear as possible, and the help text will contain instructions for how to resolve the problem. Nevertheless, some of the possible error messages warrant additional explanation. + +The most salient errors are the ``Could not find \textsf{fontspec}'' and ``Missing \XeTeX\ or Lua\TeX'' fatal errors. When the user loads \textsf{mathfont}, \TeX\ must be able to find the package file |fontspec.sty|, and \TeX\ must be operating under the \XeTeX\ or Lua\TeX\ engine. If either condition fails, \TeX\ will stop reading in |mathfont.sty|.% footnote +\footnote{Note that \textsf{mathfont} doesn't actually determine the typesetting engine. Rather, it checks whether the \XeTeX\ and Lua\TeX\ primitives \vrb\Umathcode, \vrb\Umathchardef, and \vrb\Umathaccent\ are defined, so if for some reason these control sequences have definitions when the user loads \textsf{mathfont} with another engine, \textsf{fontspec}'s more robust engine checks will take over and cause \TeX\ to abort. The reasoning here is straightforward: \textsf{mathfont} verifies only that the current typesetting engine provides the commands that it directly needs, so its potential functionality remains as broad as possible. If \textsf{fontspec} becomes compatible with a third engine that also provides (analogues of) these primitives, there is no reason to prevent \textsf{mathfont} from working with that engine as well.} % end footnote +As of version 1.6, \textsf{mathfont}'s fatal errors prevent \TeX\ from reading in the rest of the |sty| file but do not crash the compilation process, and users who continue past one of \textsf{mathfont}'s fatal error messages will see an ``invalid command'' error if they call a user-level command in their document. I designed these errors to be unobtrusive, and users can safely ignore them. Because of how \textsf{mathfont} performs its engine check, it is theoretically possible that users with very old \XeTeX\ or Lua\TeX\ distributions may see the second fatal error even when running one of these two engines, and the solution is probably to upgrade to a more recent version of the engine in question. Unfortunately, I do not know what the exact cutoff for \XeTeX\ and Lua\TeX\ versions is.\footnote{However, the manual for a beta version of Lua\TeX, v.\ 0.70.1, includes these primitives, so they are at least as old as May 2011. See\hfill\break \texttt{https://osl.ugr.es/CTAN/obsolete/systems/luatex/base/manual/luatexref-t.pdf}} + +The \textsf{fontspec} package includes a ``|no-math|'' option, and \textsf{mathfont} expects \textsf{fontspec} to be loaded with this option. As mentioned previously, \textsf{mathfont} loads \textsf{fontspec} by default, but users can load \textsf{fontspec} before \textsf{mathfont} if they want to manually specify the package options. Alternatively, \LaTeX's |\PassOptionsToPackage| may be an even better way to proceed. If \textsf{mathfont} detects that \textsf{fontspec} was loaded without the |no-math| option, it will issue an error message saying so. This error is not paramount in the sense that the document will compile normally if a user ignores it, but \textsf{mathfont} will probably have trouble changing the font of certain math-mode characters in this situation. During development, Arabic numerals posed a particular challenge in this regard. + +The ``internal commands restored'' error arises when the user calls |\mathfont| after the package already restored the small portion of the \LaTeX\ kernel that it adjusts when loaded. Typically this happens when the user calls |\mathfont| after |\restoremathinternals|. The package will ignore any |\mathfont| commands in this situation, so while the error is technically harmless, you may not see some font changes you might have been expecting. Similarly, if the user tries to set the default font multiple times for some character class, the package will ignore any additional attempts, issue a warning, and continue the compilation process. + +What should you do if you can't resolve an error? First, always, always make sure that you spelled all of your commands correctly and closed all braces and brackets. Then check the \textsf{mathfont} documentation---you may be trying to do something outside the scope of the package, or you may be dealing with a special case. The internet is a great resource, and websites such as the \TeX\ StackExchange, Share\LaTeX, and Wikibooks' \LaTeX\ wiki are often invaluable when dealing with \TeX-related issues. Definitely ask another human as well! At that point you should email the author about your code---you might have identified a bug. I welcome emails about \textsf{mathfont} and will make every effort to write back to correspondence about the package, but I cannot guarantee a timely response. + +\end{document} +\endinput +%% +%% End of file `mathfont_user_guide.tex'. |