diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/stickstoo')
-rw-r--r-- | Master/texmf-dist/tex/latex/stickstoo/stickstootext.sty | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/stickstoo/stickstootext.sty b/Master/texmf-dist/tex/latex/stickstoo/stickstootext.sty index 57f90a37a4c..f9d1351ede9 100644 --- a/Master/texmf-dist/tex/latex/stickstoo/stickstootext.sty +++ b/Master/texmf-dist/tex/latex/stickstoo/stickstootext.sty @@ -1,14 +1,14 @@ %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{1.02} -\def\filedate{2018/05/21} +\def\fileversion{1.035} +\def\filedate{2021/10/17} \ProvidesPackage{stickstootext} [\filedate\space v\fileversion] -\message{`SticksToo' v\fileversion, \filedate\space Text macros taking advantage of the STIXTwoText fonts (msharpe)} +\message{`SticksTooText' v\fileversion, \filedate\space Text macros taking advantage of the STIXTwoText fonts (msharpe)} \RequirePackage[T1]{fontenc} \RequirePackage{textcomp} \IfFileExists{mweights.sty}{\RequirePackage{mweights}}{} -\RequirePackage{etoolbox} +\RequirePackage{etoolbox,xstring} \IfFileExists{fontaxes.sty}{ \RequirePackage{fontaxes} \fa@naming@exception{figures}{{superior}{proportional}}{Sup} @@ -22,8 +22,8 @@ \fa@naming@exception{figures}{{inferior}{tabular}}{Inf} \def\infigures{\@nomath\infigures \fontfigurestyle{inferior}\selectfont} - \DeclareTextFontCommand{\textin}{\infigures} - \let\textinferior\textin + \DeclareTextFontCommand{\textinf}{\infigures} + \let\textinferior\textinf \fa@naming@exception{figures}{{numerators}{proportional}}{Numr} \fa@naming@exception{figures}{{numerators}{tabular}}{Numr} @@ -39,8 +39,8 @@ \fontfigurestyle{numerators}\selectfont} \DeclareTextFontCommand{\textnu}{\nufigures} \let\textnumerators\textnu - \providecommand*{\textfrac}[2]{% - \textnu{##1}\kern0em\textfractionsolidus\kern0em\textde{##2}} + %\providecommand*{\textfrac}[2]{% + %\textnu{##1}\kern0em\textfractionsolidus\kern0em\textde{##2}} }{} \IfFileExists{xkeyval.sty}{ @@ -69,7 +69,8 @@ \@onlypreamble\useosf \def\useproportional{\edef\SticksToo@figurealign{}} \@onlypreamble\useproportional - +\def\@SticksToo@foresolidus{0em} +\def\@SticksToo@aftsolidus{0em} \DeclareOptionX{lining}{\edef\SticksToo@figurestyle{LF}} \DeclareOptionX{lf}{\edef\SticksToo@figurestyle{LF}} \DeclareOptionX{oldstyle}{\edef\SticksToo@figurestyle{OsF}} @@ -81,9 +82,46 @@ \DeclareOptionX{theoremfont}{\@SticksToo@thrmtrue} \DeclareOptionX{sups}{\@SticksToo@supstrue} \DeclareOptionX{scosf}{\@SticksToo@scosftrue} +\DeclareOptionX{foresolidus}{\gdef\@SticksToo@foresolidus{#1}} +\DeclareOptionX{aftsolidus}{\gdef\@SticksToo@aftsolidus{#1}} \ExecuteOptionsX{lining,tabular} \ProcessOptionsX\relax +\newcommand{\textfrac}[3][]{% e.g., \textfrac[1]{7}{8} + \mbox{% + \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] + {\textlf{#1}\kern.05em}{}% + \textnu{#2}% numerator + \StrRight{#2}{1}[\@digit@]% + % look for 1, 2, 6, 7 + \ifcase\@digit@% 0 + \or%\kern.03em% 1 + \or%\kern.02em% 2 + \or\kern-.02em% 3 + \or%\kern-.01em% 4 + \or\kern-.01em% 5 + \or%\kern-.01em% 6 + \or\kern-.08em% 7 + \or%\kern-.08em% 8 + \or\kern-.04em% 9 + \fi% + \kern\@SticksToo@foresolidus{\fontencoding{TS1}\selectfont\char"2F}% + \kern\@SticksToo@aftsolidus% + \StrLeft{#3}{1}[\@digit@]% + % look for 1, 4, 7 + \ifcase\@digit@% 0 + \or%\kern -.02em% 1 + \or\kern .01em% 2 + \or% 3 + \or\kern -.08em% 4 + \or\kern -.03em% 5 + \or\kern -.05em% 6 + \or%\kern .02em% 7 + \fi% + \textde{#3}% denominator [#3] + }% +} + \if@SticksToo@thrm \patchcmd{\th@plain}{\itshape}{\slshape}{\message{Replaced itshape by slshape in theorem style plain.}}{\message{Unable to replace itshape by slshape in theorem style plain.}} \fi |