diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-17 21:36:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-17 21:36:15 +0000 |
commit | 6b1820e5ae95cf2cb347e061eeb45f6ce2a456cb (patch) | |
tree | 3cefc306aa7992da2cb1c5e35ecec6a6a13a594b /Master/texmf-dist/tex/latex/xcharter-math | |
parent | 05328ed71a2c274508d48fb5435dad7654b9c607 (diff) |
xcharter-math (17feb22)
git-svn-id: svn://tug.org/texlive/trunk@62057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xcharter-math')
-rw-r--r-- | Master/texmf-dist/tex/latex/xcharter-math/xcharter-otf.sty | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xcharter-math/xcharter-otf.sty b/Master/texmf-dist/tex/latex/xcharter-math/xcharter-otf.sty new file mode 100644 index 00000000000..049b1654df2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/xcharter-math/xcharter-otf.sty @@ -0,0 +1,186 @@ +\NeedsTeXFormat{LaTeX2e}[2018/01/01] +\def\fileversion{0.30} +\def\filedate{2022-02-16} +\ProvidesPackage{xcharter-otf}[\filedate\space\fileversion] + +% Ensure luatex or xetex engine +\RequirePackage{iftex}[2019/10/24] +\RequireTUTeX +\RequirePackage{unicode-math} + +\newopentypefeature{Style}{upint}{ss03} +\newopentypefeature{Style}{leqslant}{ss04} +\newopentypefeature{Style}{smaller}{ss05} +\newopentypefeature{Style}{subsetneq}{ss06} +\newopentypefeature{Style}{parallelslant}{ss07} + +\newcommand*{\XCstore@KV@Option}[2]{% + \def\XCot@scale{Scale}\def\XCot@opt{#1}% + \ifx\XCot@opt\XCot@scale\XCottoksT={Scale={#2}}\fi + \XCottoksM=\expandafter{\the\XCottoksM #1={#2},}} + +% Options: forward them to \setmathfont except "tight", "loose" and "no-text". +\RequirePackage{xkeyval} +\newtoks\XCottoksT +\newtoks\XCottoksM + +\newif\ifXCot@tight +\newif\ifXCot@notext +\DeclareOptionX{no-text}{\XCot@notexttrue} +\DeclareOptionX{tight}{\XCot@tighttrue} +\DeclareOptionX{loose}{\XCot@tightfalse} +\DeclareOptionX{fulloldstyle}{\XCstore@KV@Option{Numbers}{OldStyle}} +\DeclareOptionX{math-style}{\XCstore@KV@Option{math-style}{#1}} +\DeclareOptionX{bold-style}{\XCstore@KV@Option{bold-style}{#1}} +\DeclareOptionX{nabla}{\XCstore@KV@Option{nabla}{#1}} +\DeclareOptionX{partial}{\XCstore@KV@Option{partial}{#1}} +\DeclareOptionX{CharacterVariant}{\XCstore@KV@Option{CharacterVariant}{#1}} +\DeclareOptionX{StylisticSet}{\XCstore@KV@Option{StylisticSet}{#1}} +\DeclareOptionX{Style}{\XCstore@KV@Option{Style}{#1}} +\DeclareOptionX{Scale}{\XCstore@KV@Option{Scale}{#1}} +\ExecuteOptionsX{tight} +\ProcessOptionsX +% Math fonts: XCharter-Math +% Following Joseph Wright in https://tex.stackexchange.com/questions/451 +\begingroup + \edef\temp{% + \endgroup + \noexpand\setmathfont{XCharter-Math.otf}% + [\unexpanded\expandafter{\the\XCottoksM}]% + } + \temp +% +\ifXCot@tight + \thinmuskip=2mu + \medmuskip=2.5mu plus 1mu minus 2.5mu + \thickmuskip=3.5mu plus 2.5mu +\fi +% Text Serif fonts: XCharter with possible scaling. +\ifXCot@notext +\else + \setmainfont{XCharter}[\unexpanded\expandafter{\the\XCottoksT}] +\fi + +% Text Sans Serif fonts: default (lmss unless specified) +% Text Typewriter fonts: default (lmtt unless specified) + +\AtBeginDocument{% + % XCharter specific math + \Umathchardef\Bbbbackslash = 0 0 "E020 \relax + \Umathchardef\varemptyset = 0 0 "E021 \relax + \Umathchardef\mupvarzero = 0 0 "E022 \relax + \Umathchardef\mbfvarzero = 0 0 "E023 \relax + \Umathchardef\mupvarvarpi = 0 0 "E032 \relax + \Umathchardef\mbfvarpartial = 0 0 "E040 \relax + \Umathchardef\mbfvarvarrho = 0 0 "E041 \relax + \Umathchardef\mbfvarvarpi = 0 0 "E042 \relax + \Umathchardef\mbfvec = 0 0 "E044 \relax + \Umathchardef\mbfwp = 0 0 "E045 \relax + \Umathchardef\mbfdotlessi = 0 0 "E046 \relax + \Umathchardef\mbfdotlessj = 0 0 "E047 \relax + \Umathchardef\mbfhbar = 0 0 "E048 \relax + \Umathchardef\mbfell = 0 0 "E049 \relax + \Umathchardef\mbftriangleleft = 0 0 "E04E \relax + \Umathchardef\mbftriangleright = 0 0 "E04F \relax + \Umathchardef\mbfitvarpartial = 0 0 "E060 \relax + \Umathchardef\mbfitvarvarrho = 0 0 "E061 \relax + \Umathchardef\mbfitvarvarpi = 0 0 "E062 \relax + \Umathchardef\mbfitwp = 0 0 "E065 \relax + \Umathchardef\mbfimath = 0 0 "E066 \relax + \Umathchardef\mbfjmath = 0 0 "E067 \relax + \Umathchardef\mbfithbar = 0 0 "E068 \relax + \Umathchardef\mbfitell = 0 0 "E069 \relax + \Umathchardef\varsymbfscrE = 0 0 "E06D \relax + \Umathchardef\varsymbfscrQ = 0 0 "E06E \relax + \Umathchardef\varsymbfscrT = 0 0 "E06F \relax + \Umathchardef\mitvarpartial = 0 0 "E070 \relax + \Umathchardef\mitvarvarrho = 0 0 "E071 \relax + \Umathchardef\mitvarvarpi = 0 0 "E072 \relax + \Umathchardef\mithbar = 0 0 "E078 \relax + \Umathchardef\varsymscrE = 0 0 "E07D \relax + \Umathchardef\varsymscrQ = 0 0 "E07E \relax + \Umathchardef\varsymscrT = 0 0 "E07F \relax + \Umathchardef\parallelslant = 3 0 "E090 \relax + \Umathchardef\nparallelslant = 3 0 "E091 \relax + \Umathchardef\shortparallelslant = 3 0 "E092 \relax + \Umathchardef\nshortparallelslant = 3 0 "E093 \relax + \Umathchardef\lesseqslantgtr = 3 0 "E094 \relax + \Umathchardef\gtreqslantless = 3 0 "E095 \relax + \Umathchardef\lesseqqslantgtr = 3 0 "E096 \relax + \Umathchardef\gtreqqslantless = 3 0 "E097 \relax + \Umathchardef\nsubseteqq = 3 0 "E0AE \relax + \Umathchardef\nsupseteqq = 3 0 "E0AF \relax + % \widearc and\overrightarc + \newcommand*{\widearc}{\Umathaccent 0 0 "E540 }% + \newcommand*{\overrightarc}{\Umathaccent 0 0 "20D5 }% + % amssymb + \@ifpackageloaded{amssymb}% + {\PackageWarning{xcharter-otf}{% + XCharter-Math provides all AMS symbols.\MessageBreak + Loading amssymb.sty is not advisable.\MessageBreak + Reported}% + }% + {% AMS Symbols not referenced in unicode-math-table.tex + % \Umathchardef\<cmd> = <math type> <family> <slot> + % <math type> : \mathord=0 \mathrel=3 ; <family>=0 + \Umathchardef\circledR = 0 0 "24C7 \relax + \Umathchardef\circledS = 0 0 "24C8 \relax + \Umathchardef\diagup = 0 0 "E0A0 \relax + \Umathchardef\diagdown = 0 0 "E0A1 \relax + \Umathchardef\shortmid = 3 0 "E0A2 \relax + \Umathchardef\shortparallel = 3 0 "E0A3 \relax + \Umathchardef\nshortmid = 3 0 "E0A4 \relax + \Umathchardef\nshortparallel = 3 0 "E0A5 \relax + \Umathchardef\lvertneqq = 3 0 "E0A6 \relax + \Umathchardef\gvertneqq = 3 0 "E0A7 \relax + \Umathchardef\varsubsetneq = 3 0 "E0AC \relax + \Umathchardef\varsupsetneq = 3 0 "E0AD \relax + \Umathchardef\varsubsetneqq = 3 0 "E09C \relax + \Umathchardef\varsupsetneqq = 3 0 "E09D \relax + \Umathchardef\nleqslant = 3 0 "E0A8 \relax + \Umathchardef\ngeqslant = 3 0 "E0A9 \relax + \Umathchardef\nleqq = 3 0 "E0AA \relax + \Umathchardef\ngeqq = 3 0 "E0AB \relax + \Umathchardef\npreceq = 3 0 "E098 \relax + \Umathchardef\nsucceq = 3 0 "E099 \relax + \let\centerdot\cdotp + \let\restriction\upharpoonright + \let\doteqdot\Doteq + \let\doublecup\Cup + \let\doublecap\Cap + \let\llless\lll + \let\gggtr\ggg + \let\circlearrowleft\acwopencirclearrow + \let\circlearrowright\cwopencirclearrow + \let\lozenge\mdlgwhtlozenge + \let\blacklozenge\mdlgblklozenge + \let\square\mdlgwhtsquare + \let\blacksquare\mdlgblksquare + \let\dashleftarrow\leftdasharrow + \let\dashrightarrow\rightdasharrow + \let\ntriangleleft\nvartriangleleft + \let\ntriangleright\nvartriangleright + \let\varpropto\propto + \let\thicksim\sim + \let\thickapprox\approx + \let\smallsmile\smile + \let\smallfrown\frown + }% + % latexsym + \@ifpackageloaded{latexsym}% + {\PackageWarning{xcharter-otf}{% + XCharter-Math provides all LaTeX symbols.\MessageBreak + Loading latexsym.sty is not advisable.\MessageBreak + Reported}% + }% + {\let\lhd\vartriangleleft + \let\rhd\vartriangleright + \let\unlhd\trianglelefteq + \let\unrhd\trianglerighteq + \let\leadsto\rightcurvedarrow + \let\Box\lgwhtsquare + \let\Diamond\mdlgwhtdiamond + }% +} + +\endinput |