From b99ba38c80c926d578182df30b7c06421022cc3f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 15 Sep 2020 21:04:14 +0000 Subject: cochineal (15sep20) git-svn-id: svn://tug.org/texlive/trunk@56349 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/cochineal/cochineal.sty | 51 ++++++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/tex/latex/cochineal/cochineal.sty') diff --git a/Master/texmf-dist/tex/latex/cochineal/cochineal.sty b/Master/texmf-dist/tex/latex/cochineal/cochineal.sty index 7ae4d339a8a..110ed576348 100644 --- a/Master/texmf-dist/tex/latex/cochineal/cochineal.sty +++ b/Master/texmf-dist/tex/latex/cochineal/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} -- cgit v1.2.3