summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/erewhon/erewhon.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-30 00:08:26 +0000
committerKarl Berry <karl@freefriends.org>2014-09-30 00:08:26 +0000
commit0e6868aeabc5877317ce3d565eb3b963ab33351a (patch)
tree373728f6476127d1a71a3b5b122764abf6dfa251 /Master/texmf-dist/tex/latex/erewhon/erewhon.sty
parenta458db6297c00b012e16fa3b4391c158ef4f4b92 (diff)
erewhon (29sep14)
git-svn-id: svn://tug.org/texlive/trunk@35285 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/erewhon/erewhon.sty')
-rw-r--r--Master/texmf-dist/tex/latex/erewhon/erewhon.sty123
1 files changed, 123 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/erewhon/erewhon.sty b/Master/texmf-dist/tex/latex/erewhon/erewhon.sty
new file mode 100644
index 00000000000..861ed2e883b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/erewhon/erewhon.sty
@@ -0,0 +1,123 @@
+%% erewhon.sty
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\fileversion{1.0}
+\def\filedate{2014/09/08}
+\ProvidesPackage{erewhon}
+ [\filedate\space v\fileversion]
+
+\message{`erewhon' v\fileversion, \filedate\space Style file for Erewhon (m_sharpe), based on Heuristica (a_panov) and, ultimately, Utopia.}
+
+\RequirePackage[T2A,T2B,T2C,LY1,T1]{fontenc}
+\RequirePackage{textcomp}
+\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
+\RequirePackage{etoolbox}
+\IfFileExists{fontaxes.sty}{
+ \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
+ \fa@naming@exception{figures}{{numerators}{proportional}}{Numr}
+ \fa@naming@exception{figures}{{numerators}{tabular}}{Numr}
+ \def\nufigures{\@nomath\nufigures%
+ \fontfigurestyle{numerators}\selectfont}
+ \DeclareTextFontCommand{\textnu}{\nufigures}
+ \let\textnumerator\textnu
+
+ \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\textdenominator\textde
+}{}
+\providecommand*{\textfrac}[2]{%
+ \textnu{#1}\kern0em\textfractionsolidus\kern0em\textde{#2}}
+
+\IfFileExists{xkeyval.sty}{
+ \newcommand*{\Erewhon@scale}{1}
+ \RequirePackage{xkeyval}
+ \DeclareOptionX{scale}{\renewcommand*{\Erewhon@scale}{##1}}
+ \DeclareOptionX{scaled}{\renewcommand*{\Erewhon@scale}{##1}}
+ \DeclareOptionX{space}[1.2]{\DeclareRobustCommand{\erewhon@sf}{%
+ \fontdimen2\font=##1\fontdimen2\font}}
+}{
+ \let\DeclareOptionX\DeclareOption
+ \let\ExecuteOptionsX\ExecuteOptions
+ \let\ProcessOptionsX\ProcessOptions
+}
+\let\orig@footnote=\thefootnote
+\let\orig@makefnmark=\@makefnmark
+
+\newif\if@Erewhon@sups
+\newif\if@Erewhon@scosf
+
+\DeclareOptionX{lining}{\edef\Erewhon@figurestyle{LF}}
+\DeclareOptionX{lf}{\edef\Erewhon@figurestyle{LF}}
+\DeclareOptionX{oldstyle}{\edef\Erewhon@figurestyle{OsF}}
+\DeclareOptionX{osf}{\edef\Erewhon@figurestyle{OsF}}
+\DeclareOptionX{tabular}{\edef\Erewhon@figurealign{T}}
+\DeclareOptionX{p}{\edef\Erewhon@figurealign{}}
+\DeclareOptionX{proportional}{\edef\Erewhon@figurealign{}}
+\DeclareOptionX{bold}{\edef\bfseries@rm{b}}
+\DeclareOptionX{regular}{\edef\mdseries@rm{m}}
+\DeclareOptionX{sups}{\@Erewhon@supstrue}
+\DeclareOptionX{scosf}{\@Erewhon@scosftrue}
+\ExecuteOptionsX{lining,tabular,bold,regular}
+\ProcessOptionsX\relax
+
+\def\useosf{\edef\Erewhon@figurestyle{OsF}}
+\@onlypreamble\useosf
+
+\DeclareRobustCommand{\textlf}[1]{%
+ {\fontfamily{erewhon-LF}\selectfont #1}%
+}% to get lf
+\DeclareRobustCommand{\texttlf}[1]{%
+ {\fontfamily{erewhon-TLF}\selectfont #1}%
+}% to get tlf
+\DeclareRobustCommand{\textosf}[1]{%
+ {\fontfamily{erewhon-OsF}\selectfont #1}%
+}% to get osf
+\DeclareRobustCommand{\texttosf}[1]{%
+ {\fontfamily{erewhon-TOsF}\selectfont #1}%
+}% to get tosf
+\if@Erewhon@scosf %
+\DeclareRobustCommand{\textsc}[1]{%
+{\fontfamily{erewhon-\Erewhon@figurealign%
+OsF}\scshape\selectfont #1}%
+}\fi% use OsF in small caps
+\renewcommand*{\rmdefault}{erewhon-TLF} % always TLF in math
+\renewcommand*{\familydefault}{\rmdefault}
+
+\if@Erewhon@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}{erewhon-\Erewhon@figurealign%
+\Erewhon@figurestyle}
+\normalfont}
+
+\endinput