From b7107e5924c67d251214ec24e021f79dc8aeaa88 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Jan 2019 23:18:53 +0000 Subject: mathfont (20jan19) git-svn-id: svn://tug.org/texlive/trunk@49773 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/mathfont/mathfont.sty | 112 ++++++++++++++++++++-- 1 file changed, 103 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/tex/latex/mathfont') diff --git a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty index cd5bf8ab5d2..db4e26242a5 100644 --- a/Master/texmf-dist/tex/latex/mathfont/mathfont.sty +++ b/Master/texmf-dist/tex/latex/mathfont/mathfont.sty @@ -17,20 +17,24 @@ %% 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 and mathfont_greek.tex, and -%% all other files created through the configuration process such as -%% mathfont.pdf, mathfont.idx, and mathfont.ind. For more +%% 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. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mathfont}[2018/08/01 v. 1.2 Package mathfont] +\ProvidesPackage{mathfont}[2019/01/19 v. 1.3 Package mathfont] \newif\if@packages +\newif\if@operators +\@operatorstrue \DeclareOption{packages}{\@packagestrue} +\DeclareOption{operators}{\@operatorstrue} +\DeclareOption{no-operators}{\@operatorsfalse} \DeclareOption*{\PackageError{mathfont} {Option "\CurrentOption" unknown} {I'm ignoring that option because\MessageBreak I don't know what it means.}} -\ProcessOptions\relax +\ProcessOptions* \def\M@FontChangeInfo#1{\PackageInfo{mathfont} {Changing #1 characters to\MessageBreak math font \csname M@font\the\M@count\endcsname\MessageBreak @@ -46,10 +50,10 @@ command}} \def\M@SetInternalsInfo{\PackageInfo{mathfont} {Adjusting \string\set@mathchar\space and\MessageBreak - \string\set@mathcode}} + \string\set@mathsymbol}} \def\M@RestoreInternalsInfo{\PackageInfo{mathfont} {Restoring \string\set@mathchar\space and\MessageBreak - \string\set@mathcode}} + \string\set@mathsymbol}} \def\M@CharsSetWarning#1{\PackageWarning{mathfont} {Font for #1 chars has already\MessageBreak been set}} @@ -151,6 +155,7 @@ \newif\if@greeklower \newif\if@operator \newif\if@digits +\newif\if@symbols \newif\if@bb \newif\if@cal \newif\if@frak @@ -162,6 +167,7 @@ \def\@greekuppershape{roman} \def\@greeklowershape{italic} \def\@digitsshape{roman} +\def\@symbolsshape{roman} \def\@operatorshape{roman} \def\@bbshape{roman} \def\@calshape{roman} @@ -182,7 +188,7 @@ \fi} \def\check@option@valid#1{% \def\@temperror{\M@InvalidOptionError{#1}} - \@for\@j:=upper,lower,greekupper,greeklower,digits,operator\do{% + \@for\@j:=upper,lower,greekupper,greeklower,digits,symbols,operator\do{% \ifx\@j#1 \let\@temperror\relax \fi} @@ -201,7 +207,7 @@ \@temperror} \def\gobble@equals#1=#2\@nil{#1} \def\mathfont{\@ifnextchar[{\@mathfont} - {\@mathfont[upper,lower,greekupper,greeklower,digits,operator]}} + {\@mathfont[upper,lower,greekupper,greeklower,digits,symbols,operator]}} \def\@mathfont[#1]#2{% \ifx\@@set@mathchar\set@mathchar \M@InternalsRestoredError @@ -232,6 +238,8 @@ \csname @\@tempa true\endcsname \fi} \advance\M@count\@ne\relax + \message{^^J:: mathfont :: math font for character keyword classes^^J#1^^J% + changed to #2^^J^^J} \fi} \@onlypreamble\mathfont \def\check@csarg#1#2#3{% @@ -430,6 +438,92 @@ \DeclareMathSymbol{7}{\mathalpha}{\M@digits}{`7} \DeclareMathSymbol{8}{\mathalpha}{\M@digits}{`8} \DeclareMathSymbol{9}{\mathalpha}{\M@digits}{`9}} +\def\M@symbols@set{% + \edef\M@symbols{M\@symbolsshape\the\M@count} + \DeclareMathSymbol{.}{\mathord}{\M@symbols}{"2E} + \DeclareMathSymbol{@}{\mathord}{\M@symbols}{"40} + \DeclareMathSymbol{\mathpound}{\mathord}{\M@symbols}{"23} + \DeclareMathSymbol{\mathdollar}{\mathord}{\M@symbols}{"24} + \DeclareMathSymbol{\mathpercent}{\mathord}{\M@symbols}{"25} + \DeclareMathSymbol{\mathand}{\mathord}{\M@symbols}{"26} + \DeclareMathSymbol{\mathparagraph}{\mathord}{\M@symbols}{"B6} + \DeclareMathSymbol{\mathsection}{\mathord}{\M@symbols}{"A7} + \DeclareMathSymbol{\mathsterling}{\mathord}{\M@symbols}{"A3} + \DeclareMathSymbol{|}{\mathord}{\M@symbols}{"7C} + \DeclareMathSymbol{\neg}{\mathord}{\M@symbols}{"AC} + \DeclareMathSymbol{\infty}{\mathord}{\M@symbols}{"221E} + \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{'}{\mathord}{\M@symbols}{"2032} + \DeclareMathSymbol{"}{\mathord}{\M@symbols}{"2033} + \if@operators + \DeclareMathSymbol{\sum}{\mathop}{\M@symbols}{"2211} + \DeclareMathSymbol{\prod}{\mathop}{\M@symbols}{"220F} + \DeclareMathSymbol{\intop}{\mathop}{\M@symbols}{"222B} + \fi + \DeclareMathSymbol{+}{\mathbin}{\M@symbols}{"2B} + \DeclareMathSymbol{-}{\mathbin}{\M@symbols}{"2212} + \DeclareMathSymbol{*}{\mathbin}{\M@symbols}{"2A} + \DeclareMathSymbol{\times}{\mathbin}{\M@symbols}{"D7} + \DeclareMathSymbol{/}{\mathbin}{\M@symbols}{"2215} + \DeclareMathSymbol{\div}{\mathbin}{\M@symbols}{"F7} + \DeclareMathSymbol{\pm}{\mathbin}{\M@symbols}{"B1} + \DeclareMathSymbol{\cdot}{\mathbin}{\M@symbols}{"2219} + \DeclareMathSymbol{\bullet}{\mathbin}{\M@symbols}{"2022} + \DeclareMathSymbol{\dagger}{\mathbin}{\M@symbols}{"2020} + \DeclareMathSymbol{\ddagger}{\mathbin}{\M@symbols}{"2021} + \DeclareMathSymbol{\setminus}{\mathbin}{\M@symbols}{"5C} + \DeclareMathSymbol{=}{\mathrel}{\M@symbols}{"3D} + \DeclareMathSymbol{<}{\mathrel}{\M@symbols}{"3C} + \DeclareMathSymbol{>}{\mathrel}{\M@symbols}{"3E} + \DeclareMathSymbol{\leq}{\mathrel}{\M@symbols}{"2264} + \DeclareMathSymbol{\geq}{\mathrel}{\M@symbols}{"2265} + \DeclareMathSymbol{\sim}{\mathrel}{\M@symbols}{"7E} + \DeclareMathSymbol{\approx}{\mathrel}{\M@symbols}{"2248} + \DeclareMathSymbol{\equiv}{\mathrel}{\M@symbols}{"2261} + \DeclareMathSymbol{\mid}{\mathrel}{\M@symbols}{"7C} + \DeclareMathSymbol{\parallel}{\mathrel}{\M@symbols}{"2016} + \DeclareMathSymbol{:}{\mathrel}{\M@symbols}{"3A} + \DeclareMathSymbol{(}{\mathopen}{\M@symbols}{"28} + \DeclareMathSymbol{)}{\mathclose}{\M@symbols}{"29} + \DeclareMathSymbol{[}{\mathopen}{\M@symbols}{"5B} + \DeclareMathSymbol{]}{\mathclose}{\M@symbols}{"5D} + \DeclareMathSymbol{\leftbrace}{\mathopen}{\M@symbols}{"7B} + \DeclareMathSymbol{\rightbrace}{\mathclose}{\M@symbols}{"7D} + \DeclareMathSymbol{?}{\mathclose}{\M@symbols}{"3F} + \DeclareMathSymbol{!}{\mathclose}{\M@symbols}{"21} + \DeclareMathSymbol{,}{\mathpunct}{\M@symbols}{"2C} + \DeclareMathSymbol{;}{\mathpunct}{\M@symbols}{"3B} + \DeclareMathSymbol{\colon}{\mathpunct}{\M@symbols}{"3A} + \let\mathellipsis\@undefined + \DeclareMathSymbol{\mathellipsis}{\mathinner}{\M@symbols}{"2026} + \count@\escapechar + \escapechar\m@ne + \edef\#{\noexpand\protect + \expandafter\noexpand\csname\string\# \endcsname} + \expandafter\def\csname\string\# \endcsname{\ifmmode + \mathpound\else\char"23\fi} + \edef\${\noexpand\protect + \expandafter\noexpand\csname\string\$ \endcsname} + \expandafter\def\csname\string\$ \endcsname{\ifmmode + \mathdollar\else\char"24\fi} + \edef\%{\noexpand\protect + \expandafter\noexpand\csname\string\% \endcsname} + \expandafter\def\csname\string\% \endcsname{\ifmmode + \mathpercent\else\char"25\fi} + \edef\&{\noexpand\protect + \expandafter\noexpand\csname\string\& \endcsname} + \expandafter\def\csname\string\& \endcsname{\ifmmode + \mathand\else\char"26\fi} + \escapechar\count@ + \DeclareMathSymbol{\@relbar}{\mathbin}{symbols}{"00} + \DeclareMathSymbol{\@Relbar}{\mathrel}{operators}{"3D} + \DeclareMathSymbol{\@verticalbar}{\mathord}{symbols}{"6A} + \DeclareRobustCommand\relbar{\mathrel{\smash\@relbar}} + \DeclareRobustCommand\Relbar{\mathrel{\@Relbar}} + \DeclareRobustCommand\models{\mathrel{\@verticalbar}\joinrel\Relbar}} \def\M@operator@set{% \edef\operator@font{\noexpand\mathgroup \expandafter\noexpand -- cgit v1.2.3