diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/notomath/notomath.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/notomath/notomath.sty | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/notomath/notomath.sty b/Master/texmf-dist/tex/latex/notomath/notomath.sty new file mode 100644 index 00000000000..715d9d341ba --- /dev/null +++ b/Master/texmf-dist/tex/latex/notomath/notomath.sty @@ -0,0 +1,73 @@ +\NeedsTeXFormat{LaTeX2e} +\def\fileversion{1.00} +\def\filedate{2020/08/04} +\ProvidesPackage{notomath} + [\filedate\space v\fileversion.\space (Michael Sharpe) Supports Noto text and math fonts for LaTeX usage.] + +\RequirePackage{fontenc,fontaxes,mweights} +\RequirePackage{xkeyval,textcomp} +%\PassOptionsToPackage{proportional,pf,oldstyle,osf,type1}{noto-serif} +%\PassOptionsToPackage{proportional,pf,oldstyle,osf,type1,sfdefault}{noto-sans} +%\PassOptionsToPackage{}{newtxmath} +%\PassOptionsToPackage{varbb,vvarbb,upint,noamssymbols,slantedGreek,frenchmath,nosymbolsc,subscriptcorrection,timesmathacc,uprightscript,smallerops,useBImacros,noOT1}{newtxmath} +% This seems to pass options that were not specified +% Have to handle less efficiently by parsing args + +\newcommand*{\NotoMath@scale}{1} +\newcommand*{\NotoText@scale}{1} +\newif\ifnoto@sfdefault \noto@sfdefaultfalse +\newif\ifnoto@pf \noto@pffalse +\newif\ifnoto@osf \noto@osffalse +%\newcommand*{\NotoSerifMono@scale}{1} +\DeclareOptionX{scaled}{\renewcommand*{\NotoMath@scale}{#1}} +\DeclareOptionX{scale}{\renewcommand*{\NotoMath@scale}{#1}} + +\edef\noto@mopt{noto} + +\newif\ifnotomath@mono \notomath@monofalse + +\DeclareOptionX{sfdefault}{\edef\noto@mopt{notosans}\noto@sfdefaulttrue} +\DeclareOptionX{proportional}{\noto@pftrue} +\DeclareOptionX{pf}{\noto@pftrue} +\DeclareOptionX{oldstyle}{\noto@osftrue} +\DeclareOptionX{osf}{\noto@osftrue} +\DeclareOptionX{mono}{\notomath@monotrue} +\DeclareOptionX{varbb}{\edef\noto@mopt{\noto@mopt,varbb}} +\DeclareOptionX{vvarbb}{\edef\noto@mopt{\noto@mopt,vvarbb}} +\DeclareOptionX{upint}{\edef\noto@mopt{\noto@mopt,upint}} +\DeclareOptionX{noamssymbols}{\edef\noto@mopt{\noto@mopt,noamssymbols}} +\DeclareOptionX{slantedGreek}{\edef\noto@mopt{\noto@mopt,slantedGreek}} +\DeclareOptionX{frenchmath}{\edef\noto@mopt{\noto@mopt,frenchmath}} +\DeclareOptionX{nosymbolsc}{\edef\noto@mopt{\noto@mopt,nosymbolsc}} +\DeclareOptionX{subscriptcorrection}{\edef\noto@mopt{\noto@mopt,subscriptcorrection}} +\DeclareOptionX{timesmathacc}{\edef\noto@mopt{\noto@mopt,timesmathacc}} +\DeclareOptionX{uprightscript}{\edef\noto@mopt{\noto@mopt,uprightscript}} +\DeclareOptionX{smallerops}{\edef\noto@mopt{\noto@mopt,smallerops}} +\DeclareOptionX{useBImacros}{\edef\noto@mopt{\noto@mopt,useBImacros}} +\DeclareOptionX{noOT1}{\edef\noto@mopt{\noto@mopt,noOT1}} + +\ProcessOptionsX\relax +\edef\noto@mopt{scale=\NotoMath@scale,\noto@mopt} +%\show\noto@mopt +\newdimen\notomath@dima +% use the scale for math to set noto text scale factors +\notomath@dima=\NotoMath@scale\p@ +\notomath@dima=.9\notomath@dima +\edef\NotoText@scale{\strip@pt\notomath@dima} +%\let\NotoSans@scale\NotoText@scale +%\let\NotoSansMono@scale\NotoSerif@scale +\edef\nototext@opt{scale=\NotoText@scale} +\ifnoto@pf\edef\nototext@opt{\nototext@opt,pf}\fi +\ifnoto@osf\edef\nototext@opt{\nototext@opt,osf}\fi +\usepackage[\nototext@opt]{noto-serif} +\ifnoto@sfdefault\edef\nototext@opt{\nototext@opt,sfdefault}\fi +\usepackage[\nototext@opt]{noto-sans} +\ifnotomath@mono\usepackage[type1,scale=\NotoText@scale]{noto-mono}\fi +%\show\noto@mopt +\usepackage[\noto@mopt]{newtxmath} +\def\seriesdefault{\mdseries@rm} +\def\mdseries@rm{m} +\def\bfseries@rm{b} + +\endinput + |