diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/etbb/ETbb.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/etbb/ETbb.sty | 80 |
1 files changed, 73 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/etbb/ETbb.sty b/Master/texmf-dist/tex/latex/etbb/ETbb.sty index d08e27032bd..2a07a8e05ec 100644 --- a/Master/texmf-dist/tex/latex/etbb/ETbb.sty +++ b/Master/texmf-dist/tex/latex/etbb/ETbb.sty @@ -1,7 +1,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{1.01} -\def\filedate{2020/05/03} +\def\fileversion{1.02} +\def\filedate{2020/05/15} \ProvidesPackage{ETbb} [\filedate\space v\fileversion. Style file for ETbb.] @@ -25,8 +25,18 @@ \fontfigurestyle{inferior}\selectfont} \DeclareTextFontCommand{\textin}{\infigures} \let\textinferior\textin - \providecommand*{\textfrac}[3][\ETbb@raisefrac]{% - \raise ##1 \hbox{\textsu{##2}\kern \ETbb@foresolidus \textfractionsolidus\kern \ETbb@aftsolidus \textin{##3}}} + \fa@naming@exception{figures}{{denominators}{proportional}}{Dnom} + \fa@naming@exception{figures}{{denominators}{tabular}}{Dnom} + \def\defigures{\@nomath\defigures + \fontfigurestyle{denominators}\selectfont} + \DeclareTextFontCommand{\textde}{\defigures} + \let\denomfigures=\defigures + \let\textdenom\textde + +\providecommand*{\textfrac}[3][\ETbb@raisefrac]{% +\tx@getL{##2}\tx@getF{##3}\leavevmode\raise ##1\hbox{\textsu{##2}\tx@Nk% +\kern\ETbb@foresolidus% +\textfractionsolidus\tx@Dk\kern\ETbb@aftsolidus\textde{##3}}} }{} @@ -51,9 +61,65 @@ \newif\if@ETbb@sharpS \newif\if@ETbb@sups \newif\if@ETbb@scosf -\def\ETbb@foresolidus{-.03em} -\def\ETbb@aftsolidus{.02em} -\def\ETbb@raisefrac{.111em} +% fraction macros +\def\ETbb@foresolidus{-.05em} +\def\ETbb@aftsolidus{-.08em} +\def\ETbb@raisefrac{0em} %{.111em} +% +\def\tx@getF#1{% get first item in argument string +\expandafter\ifblank\expandafter{#1}{\relax}{\expandafter\tx@@getF #1\@nil}} +\def\tx@@getF#1#2\@nil{% get first item in argument string +\tx@addDkern{#1}} +% +\def\tx@getL#1{% +\expandafter\ifblank\expandafter{#1}{\relax}{\expandafter\tx@@getL #1\@nil}} + +\def\tx@@getL#1#2\@nil{% +\ifblank{#2}{\tx@addNkern{#1}}{\tx@@getL #2\@nil}} +% +\newcommand*{\tx@addNkern}[1]{% # 1 should be a single digit +\def\tx@Nk{}% +\ifcase#1\relax% +\or %1 +\def\tx@Nk{\kern-.01em}% +\or % 2 +\def\tx@Nk{\kern.02em}% 2 +\or % 3 +\or % 4 +\def\tx@Nk{\kern-.01em}% +\or % 5 +\or % 6 +\or % 7 +\def\tx@Nk{\kern-.08em}% +\or % 8 +\or % 9 +\def\tx@Nk{\kern-.03em}% +\fi% +} +\newcommand*{\tx@addDkern}[1]{% # 1 should be a single digit +\def\tx@Dk{}% +\ifcase#1\relax% +\or% +\def\tx@Dk{\kern.01em}% 1 +\or% +\def\tx@Dk{\kern.02em}% 2 +\or % 3 +\or % 4 +\def\tx@Dk{\kern-.03em}% +\or % 5 +\def\tx@Dk{\kern.03em}% +\or % 6 +\or % 7 +\def\tx@Dk{\kern.05em}% +\or % 8 +\or % 9 +\def\tx@Dk{\kern.04em}% +\fi% +} + +%\def\ETbb@foresolidus{-.03em} +%\def\ETbb@aftsolidus{.02em} +%\def\ETbb@raisefrac{.111em} \DeclareOptionX{foresolidus}{\gdef\ETbb@foresolidus{#1}} \DeclareOptionX{aftsolidus}{\gdef\ETbb@aftsolidus{#1}} \DeclareOptionX{raisefrac}{\gdef\ETbb@raisefrac{#1}} |