diff options
Diffstat (limited to 'fonts/cochineal/tex')
-rw-r--r-- | fonts/cochineal/tex/cochineal.sty | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/fonts/cochineal/tex/cochineal.sty b/fonts/cochineal/tex/cochineal.sty index 7ae4d339a8..110ed57634 100644 --- a/fonts/cochineal/tex/cochineal.sty +++ b/fonts/cochineal/tex/cochineal.sty @@ -1,14 +1,16 @@ %% cochineal.sty %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{1.054} -\def\filedate{2019/06/22} +\def\fileversion{1.062} +\def\filedate{2020/09/14} \ProvidesPackage{cochineal} [\filedate\space v\fileversion.] \RequirePackage[T1]{fontenc} \RequirePackage{textcomp} +\DeclareEncodingSubset{TS1}{Cochineal-*}{0} \IfFileExists{mweights.sty}{\RequirePackage{mweights}}{} +\RequirePackage{xstring,ifthen} % for \textfrac \RequirePackage{etoolbox} \IfFileExists{fontaxes.sty}{ \RequirePackage{fontaxes} @@ -35,8 +37,38 @@ \let\textdenominators\textde }{} -\providecommand*{\textfrac}[2]{% - \textsu{#1}\kern0em\textfractionsolidus\kern0em\textde{#2}} +\newcommand{\textfrac}[3][]{% like \textfrac[1]{7}{8} + \mbox{% + \ifthenelse{\not\equal{#1}{}}%Test for integer portion [optional #1] + {\textlf{#1}\kern.05em}{}% + \textsu{#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-.01em% 3 + \or%\kern-.01em% 4 + \or%\kern.01em% 5 + \or\kern.01em% 6 + \or\kern-.08em% 7 + \fi% + \kern\Cochineal@foresolidus{\fontencoding{TS1}\selectfont\char"2F}% + \kern\Cochineal@aftsolidus% + \StrLeft{#3}{1}[\@digit@]% + % look for 1, 4, 7 + \ifcase\@digit@% 0 + \or%\kern -.02em% 1 + \or% 2 + \or% 3 + \or\kern -.03em% 4 + \or% 5 + \or\kern -.03em% 6 + \or\kern .02em% 7 + \fi% + \textde{#3}% denominator [#3] + }% +} \IfFileExists{xkeyval.sty}{ \newcommand*{\Cochineal@scale}{1} @@ -57,6 +89,8 @@ \def\Cochineal@@swashQ{} \def\Cochineal@@thmtab{} % default is to not change to tabular \def\Cochineal@@thmlin{X} % default is to not change to lining +\def\Cochineal@foresolidus{0em} +\def\Cochineal@aftsolidus{0em} \newif\if@Cochineal@thrm \newif\if@Cochineal@sups \newif\if@Cochineal@scosf @@ -82,6 +116,8 @@ \DeclareOptionX{scosf}{\@Cochineal@scosftrue} \DeclareOptionX{bold}{\edef\bfseries@rm{b}} \DeclareOptionX{regular}{\edef\mdseries@rm{m}} +\DeclareOptionX{foresolidus}{\gdef\Cochineal@foresolidus{#1}} +\DeclareOptionX{aftsolidus}{\gdef\Cochineal@aftsolidus{#1}} \ExecuteOptionsX{lining,tabular} \ProcessOptionsX\relax @@ -136,6 +172,13 @@ OsF}\fontshape{sc}\selectfont #1}% \newcommand{\Qswash}{{\fontencoding{TS1}\fontfamily{Cochineal-LF}\selectfont \char59 }} \newcommand{\Qnoswash}{{\fontencoding{TS1}\fontfamily{Cochineal-LF}\selectfont \char58 }} +\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup + \ooalign{% + \hfil \raise .37ex\hbox {\fontencoding{T1}\fontseries{m}\fontshape{sc}\fontsize{7.2}{7.2}\selectfont \lowercase{#1}}\hfil \crcr + \char 79 %\textbigcircle + }% + \egroup} + \if@Cochineal@sups % \ifdefined\sufigures \def\f@@tn@te{footnote} |