summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty')
-rw-r--r--Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty106
1 files changed, 93 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty b/Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty
index 619f0385c89..5d8c0aaeb65 100644
--- a/Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty
+++ b/Master/texmf-dist/tex/latex/libertinust1math/libertinust1math.sty
@@ -1,20 +1,49 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\def\fileversion{1.0.3}
-\def\filedate{2016/08/21}
+\def\fileversion{1.1}
+\def\filedate{2017/08/16}
\ProvidesPackage{libertinust1math}
[\filedate\space v\fileversion---latex support for LibertinusT1Math (msharpe)]
+\RequirePackage{xkeyval}
\newif\iflibus@upint %\libus@upintfalse
+\newif\iflibus@ams % amsfonts
\newif\iflibus@frenchm
-\newif\iflibus@slantedG
+\newif\iflibus@slantedG % slanted capital Greek
+\newif\iflibus@sansmath %substitute sans for letters and operators
+\newif\iflibus@ISO %
+\newif\iflibus@nosans % do not load sans math, \mathsf excepted
+\newif\iflibus@reuseMathAlphabets
+\newif\iflibus@mathsfit %
\let\libus@lcgc\mathord
-\DeclareOption{lcgreekalpha}{\let\libus@lcgc\mathalpha}
-\DeclareOption{upint} {\libus@upinttrue}
-\DeclareOption{frenchmath} {\libus@frenchmtrue}
-\DeclareOption{slantedGreek} {\libus@slantedGtrue}
-\DeclareOption{uprightGreek} {\libus@slantedGfalse}
-\ProcessOptions\relax
+
+\DeclareOptionX{lcgreekalpha}{\let\libus@lcgc\mathalpha}
+\DeclareOptionX{upint} {\libus@upinttrue}
+\DeclareOptionX{frenchmath} {\libus@frenchmtrue}
+\DeclareOptionX{slantedGreek} {\libus@slantedGtrue}
+\DeclareOptionX{uprightGreek} {\libus@slantedGfalse}
+\DeclareOptionX{ISO} {\libus@ISOtrue}
+\DeclareOptionX{nosans} {\libus@nosanstrue}
+\DeclareOptionX{sansmath} {\libus@sansmathtrue}
+\DeclareOptionX{reuseMathAlphabets} {\libus@reuseMathAlphabetstrue}
+\DeclareOptionX{mathsfit} {\libus@mathsfittrue}
+\DeclareOptionX{scale} {\def\libus@scale{#1}}
+\DeclareOptionX{scaled} {\def\libus@scale{#1}}
+\ProcessOptionsX\relax
+
\iflibus@frenchm\libus@slantedGfalse\fi
+\iflibus@sansmath\libus@nosanstrue\fi
+\iflibus@mathsfit\libus@nosansfalse\fi
+\iflibus@ISO\libus@sansmathfalse%
+ \let\libus@lcgc\mathalpha\libus@slantedGtrue\fi
+\iflibus@reuseMathAlphabets\libus@nosansfalse\fi
+
+\iflibus@reuseMathAlphabets
+ \PackageWarningNoLine{libertinust1math}{%
+ Re-using math alphabet `mathsf' for \protect \mathsfbfit
+ \MessageBreak and `mathbf' for \protect \mathbfit
+ }
+\fi
+
\RequirePackage{amsmath}
\def\libus@undefine#1{%
\if\relax\noexpand#1\let#1=\@undefined\fi}
@@ -41,6 +70,17 @@
\DeclareSymbolFont{symbolsbb} {LS1}{libertinust1mathbb} {m} {n}
\DeclareSymbolFont{symbols} {LS2}{libertinust1mathsym} {m} {n}
\DeclareSymbolFont{largesymbols} {LS2}{libertinust1mathex} {m} {n}
+\DeclareMathAlphabet{\mathsf}{LS1}{libertinust1mathsf} {m} {n}
+\DeclareMathAlphabet{\mathsfbf} {LS1}{libertinust1mathsf} {b} {n}
+\iflibus@nosans
+\else
+% \DeclareSymbolFont{sans} {LS1}{libertinust1mathsf} {m} {n}
+% \DeclareSymbolFont{sansi} {LS1}{libertinust1mathsf} {m} {it}
+% \SetSymbolFont{sans} {bold}{LS1}{libertinust1mathsf} {b} {n}
+% \SetSymbolFont{sansi} {bold}{LS1}{libertinust1mathsf} {b} {it}
+ \DeclareMathAlphabet{\mathsfbfit} {LS1}{libertinust1mathsf} {b} {it}
+ \DeclareMathAlphabet{\mathsfbf} {LS1}{libertinust1mathsf} {b} {n}
+\fi
\SetSymbolFont{letters} {bold}{LS1}{libertinust1math} {b}{it}
\SetSymbolFont{operators} {bold}{LS1}{libertinust1math} {b} {n}
\DeclareSymbolFont{bold-operators}{LS1}{libertinust1math} {b} {n}
@@ -48,8 +88,42 @@
\DeclareSymbolFontAlphabet{\mathit} {letters}
\DeclareSymbolFontAlphabet{\mathrm} {operators}
\DeclareSymbolFontAlphabet{\mathbf} {bold-operators}
-\DeclareMathAlphabet{\mathbfit} {LS1}{libertinust1math} {b}{it}
+\iflibus@reuseMathAlphabets
+ \DeclareSymbolFontAlphabet{\mathbf} {bold-letters}
+ \def\mathbfit{\mathbf}
+\else
+ \DeclareSymbolFontAlphabet{\mathbfit}{bold-letters}
+\fi
+\iflibus@nosans
+\else
+ \iflibus@ISO
+ %\DeclareSymbolFontAlphabet{\mathsf} {sans}
+ \iflibus@mathsfit
+ %\DeclareSymbolFontAlphabet{\mathsfit} {sansi}
+ \DeclareMathAlphabet{\mathsfit}{LS1}{libertinust1mathsf}{m}{it} \SetMathAlphabet{\mathsfit}{bold}{LS1}{libertinust1mathsf}{b}{it}
+ \def\mathsans{\mathsfit}
+ \fi
+ \iflibus@reuseMathAlphabets
+ \DeclareMathAlphabet{\mathsf}{LS1}{libertinust1mathsf}{b}{it}
+ \def\mathsfbfit{\mathsf}
+ \fi
+ %\DeclareMathAlphabet{\mathsfbfit}{LS1}{libertinust1mathsf} {b}{it}
+ \def\mathboldsans{\mathsfbfit}
+ \def\mathbold{\mathbfit}
+ \providecommand*{\vectorsym}{\mathbfit}
+ \providecommand*{\matrixsym}{\mathbfit}
+ \providecommand*{\tensorsym}{\mathsfbfit}
+ \else % not ISO
+ \SetMathAlphabet{\mathsf}{bold}{LS1}{libertinust1mathsf}{b}{n}
+ \def\mathboldsans{\mathsfbfit}
+ \iflibus@mathsfit
+ %\DeclareSymbolFontAlphabet{\mathsfit} {sansi}
+ \DeclareMathAlphabet{\mathsfit}{LS1}{libertinust1mathsf}{m}{it} \SetMathAlphabet{\mathsfit}{bold}{LS1}{libertinust1mathsf}{b}{it}
+ \def\mathsans{\mathsfit}
+ \fi
+ \fi
+\fi
\DeclareFontFamily{U}{stixcal}{\skewchar\font127 }
\DeclareFontShape{U}{stixcal}{m}{n} {<-> stix-mathcal}{}
\DeclareFontShape{U}{stixcal}{b}{n} {<-> stix-mathcal-bold}{}
@@ -58,6 +132,9 @@
\DeclareMathAlphabet{\mathbcal} {U}{stixcal}{b}{n}
\DeclareSymbolFontAlphabet{\mathbb} {symbolsbb}
+
+
+
\libus@MathSymbol{\upGamma} {\mathalpha}{operators}{"00}
\libus@MathSymbol{\upDelta} {\mathalpha}{operators}{"01}
\libus@MathSymbol{\upTheta} {\mathalpha}{operators}{"02}
@@ -634,8 +711,8 @@
\libus@MathSymbol{\bracketlu}{\mathord}{letters}{"B6}
\libus@MathSymbol{\bracketru}{\mathord}{letters}{"B7}
\libus@MathSymbol{\bracketex}{\mathord}{symbols}{"89}
-\libus@MathSymbol{\parenex}{\mathord}{symbols}{"90}
-\def\libus@braceglue{\hskip -.10em plus .05em}
+\libus@MathSymbol{\parenex}{\mathord}{symbols}{"8A}
+\def\libus@braceglue{\hskip -.1em plus .05em}
\def\downbracefill{$\m@th%
\braceld\libus@braceglue%
\cleaders\hbox{$\braceex$}\hfill%
@@ -648,7 +725,7 @@
\libus@braceglue\bracemd\libus@braceglue%
\cleaders\hbox{$\braceex$}\hfill%
\libus@braceglue\braceru$}
-\def\libus@parenglue{\hskip -.2em plus .2em}
+\def\libus@parenglue{\hskip -.15em plus .05em}
\def\downparenfill{$\m@th%
\parenld\libus@parenglue%
\cleaders\hbox{$\parenex$}\hfill%
@@ -1271,6 +1348,9 @@
\txf@ntname{letters}
\txf@ntname{bold-operators}
\txf@ntname{bold-letters}
+\txf@ntname{symbolsbb}
+\txf@ntname{sans}
+\txf@ntname{sansi}
\typeout{*** Mathgroups ***}
\count@\z@
\loop\ifnum\count@<16