summaryrefslogtreecommitdiff
path: root/fonts/heuristica/tex/heuristica.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /fonts/heuristica/tex/heuristica.sty
Initial commit
Diffstat (limited to 'fonts/heuristica/tex/heuristica.sty')
-rw-r--r--fonts/heuristica/tex/heuristica.sty116
1 files changed, 116 insertions, 0 deletions
diff --git a/fonts/heuristica/tex/heuristica.sty b/fonts/heuristica/tex/heuristica.sty
new file mode 100644
index 0000000000..6a1575c47e
--- /dev/null
+++ b/fonts/heuristica/tex/heuristica.sty
@@ -0,0 +1,116 @@
+%% heuristica.sty
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\fileversion{1.09}
+\def\filedate{2017/03/14}
+\ProvidesPackage{heuristica}
+ [\filedate\space v\fileversion]
+
+\message{`heuristica' v\fileversion, \filedate\space Style file (m_sharpe) for Heuristica (a_panov, m_sharpe), an extension of Utopia.}
+
+\RequirePackage[T2A,T2B,T2C,LY1,T1]{fontenc}
+\RequirePackage{textcomp}
+\RequirePackage{ifthen}
+\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
+\RequirePackage{etoolbox}
+
+\RequirePackage{fontaxes}
+\fa@naming@exception{figures}{{superior}{proportional}}{Sup}
+\fa@naming@exception{figures}{{superior}{tabular}}{Sup}
+\def\sufigures{\@nomath\sufigures
+ \fontfigurestyle{superior}\selectfont}
+\DeclareTextFontCommand{\textsu}{\sufigures}
+\let\textsuperior\textsu
+
+\fa@naming@exception{figures}{{inferior}{proportional}}{Inf}
+\fa@naming@exception{figures}{{inferior}{tabular}}{Inf}
+\def\infigures{\@nomath\infigures
+ \fontfigurestyle{inferior}\selectfont}
+\DeclareTextFontCommand{\textin}{\infigures}
+\let\textinferior\textin
+
+\providecommand*{\textfrac}[2]{%
+ \textsu{#1}\kern.01em\textfractionsolidus\kern-.03em\textin{#2}}
+
+\def\Heuristica@spc{.211em}
+\def\Heuristica@stretch{.1055em}
+\def\Heuristica@shrink{.0703em}
+\def\Heuristica@spcf{} % a factor to multiply \fontdimen2
+
+\newcommand*{\Heuristica@scale}{1}
+\RequirePackage{xkeyval}
+\DeclareOptionX{scale}{\renewcommand*{\Heuristica@scale}{#1}}
+\DeclareOptionX{scaled}{\renewcommand*{\Heuristica@scale}{#1}}
+\DeclareOptionX{spacing}[.25em]{\gdef\Heuristica@spc{#1}}
+\DeclareOptionX{stretch}[.125em]{\gdef\Heuristica@stretch{#1}}
+\DeclareOptionX{shrink}[.1em]{\gdef\Heuristica@shrink{#1}}
+\DeclareOptionX{space}[1.23]{\gdef\Heuristica@spcf{#1}}
+
+\let\orig@footnote=\thefootnote
+\let\orig@makefnmark=\@makefnmark
+\def\bfseries@rm{b}
+\def\mdseries@rm{m}
+
+\newif\if@Heuristica@sups
+
+\DeclareOptionX{lining}{\edef\Heuristica@figurestyle{LF}}
+\DeclareOptionX{lf}{\edef\Heuristica@figurestyle{LF}}
+\DeclareOptionX{oldstyle}{\edef\Heuristica@figurestyle{OsF}}
+\DeclareOptionX{osf}{\edef\Heuristica@figurestyle{OsF}}
+\DeclareOptionX{tabular}{\edef\Heuristica@figurealign{T}}
+\DeclareOptionX{sups}{\@Heuristica@supstrue}
+\DeclareOptionX{looser}{%
+\gdef\Heuristica@spc{.25em}\gdef\Heuristica@stretch{.125em}\Heuristica@shrink{.1em}}
+\DeclareOptionX{loosest}{%
+\gdef\Heuristica@spc{.28em}\gdef\Heuristica@stretch{.125em}\gdef\Heuristica@shrink{.13em}}
+\ExecuteOptionsX{lining,tabular}
+\ProcessOptionsX\relax
+
+\def\useosf{\edef\Heuristica@figurestyle{OsF}}
+\@onlypreamble\useosf
+
+\ifthenelse{\equal{\Heuristica@spcf}{}}{%
+\DeclareRobustCommand{\Heuristica@sf}{%
+ \fontdimen2\font=\Heuristica@spc
+ \fontdimen3\font=\Heuristica@stretch
+ \fontdimen4\font=\Heuristica@shrink}}{%
+\DeclareRobustCommand{\Heuristica@sf}{%
+ \fontdimen2\font=\Heuristica@spcf\fontdimen2\font}}
+
+\DeclareRobustCommand{\textlf}[1]{%
+ {\fontfamily{Heuristica-TLF}\selectfont #1}%
+}% to get lf
+\DeclareRobustCommand{\texttlf}[1]{%
+ {\fontfamily{Heuristica-TLF}\selectfont #1}%
+}% to get tlf
+\DeclareRobustCommand{\textosf}[1]{%
+ {\fontfamily{Heuristica-TOsF}\selectfont #1}%
+}% to get osf
+\DeclareRobustCommand{\texttosf}[1]{%
+ {\fontfamily{Heuristica-TOsF}\selectfont #1}%
+}% to get tosf
+
+\renewcommand*{\rmdefault}{Heuristica-TLF} % always TLF in math
+\renewcommand*{\familydefault}{\rmdefault}
+
+\if@Heuristica@sups %
+ \ifdefined\sufigures
+ \def\f@@tn@te{footnote}
+ \def\@makefnmark{%
+ \ifx\@mpfn\f@@tn@te%
+ \ifx\thefootnote\orig@footnote%
+ \hbox{\sufigures\hspace*{.04em}\@thefnmark\hspace*{.04em}}%
+ \else%
+ \orig@makefnmark%
+ \fi
+ \else%
+ \orig@makefnmark%
+ \fi}%
+ \fi%
+\fi
+
+\AtEndPreamble{%
+\renewcommand*{\rmdefault}{Heuristica-T\Heuristica@figurestyle}
+\normalfont}
+
+\endinput