summaryrefslogtreecommitdiff
path: root/fonts/scholax/tex/scholax.sty
diff options
context:
space:
mode:
Diffstat (limited to 'fonts/scholax/tex/scholax.sty')
-rw-r--r--fonts/scholax/tex/scholax.sty190
1 files changed, 190 insertions, 0 deletions
diff --git a/fonts/scholax/tex/scholax.sty b/fonts/scholax/tex/scholax.sty
new file mode 100644
index 0000000000..98c2043a5f
--- /dev/null
+++ b/fonts/scholax/tex/scholax.sty
@@ -0,0 +1,190 @@
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\fileversion{1.00}
+\def\filedate{2019/12/30}
+\ProvidesPackage{scholax}
+ [\filedate\space v\fileversion]
+
+\message{'scholax' v\fileversion, \filedate\space (msharpe) Style file for TeXGyreScholaX.}
+
+\RequirePackage[LY1,T1]{fontenc}
+\RequirePackage{textcomp}
+\RequirePackage{etoolbox}
+\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
+\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}{{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]{%
+ \raise \zcs@raisefrac \hbox{\textsu{##1}\kern \zcs@foresolidus \textfractionsolidus\kern \zcs@aftsolidus \textin{##2}}}
+}{}
+
+
+\IfFileExists{xkeyval.sty}{
+ \newcommand*{\zcs@scale}{s*[1]}
+ \RequirePackage{xkeyval}
+ \DeclareOptionX{scale}{\renewcommand*{\zcs@scale}{s*[##1]}}
+ \DeclareOptionX{scaled}{\renewcommand*{\zcs@scale}{s*[##1]}}
+}{
+ \let\DeclareOptionX\DeclareOption
+ \let\ExecuteOptionsX\ExecuteOptions
+ \let\ProcessOptionsX\ProcessOptions
+}
+\let\orig@footnote=\thefootnote
+\let\orig@makefnmark=\@makefnmark
+\newif\ifzcs@KOMA
+\@ifundefined{KOMAClassName}{}{\zcs@KOMAtrue}
+\@ifundefined{ver@scrextend.sty}{}{\zcs@KOMAtrue}
+\newif\if@zcs@sups
+
+
+\newif\if@zcs@scosf
+\def\useosf{\edef\TeXGyreScholaX@figurestyle{OsF}}
+\@onlypreamble\useosf
+\def\useproportional{\edef\TeXGyreScholaX@figurealign{}}
+\@onlypreamble\useproportional
+\newif\ifzcs@thrm
+
+\def\zcs@foresolidus{.06em}
+\def\zcs@aftsolidus{-.06em}
+\def\zcs@raisefrac{.111em}
+\edef\bfseries@rm{b}
+\edef\mdseries@rm{m}
+\def\zcs@spc{.278em}
+\def\zcs@stretch{.139em}
+\def\zcs@shrink{.093em}
+\DeclareOptionX{spacing}{\gdef\zcs@spc{#1}}
+\DeclareOptionX{stretch}{\gdef\zcs@stretch{#1}}
+\DeclareOptionX{shrink}{\gdef\zcs@shrink{#1}}
+\DeclareOptionX{foresolidus}{\gdef\zcs@foresolidus{#1}}
+\DeclareOptionX{aftsolidus}{\gdef\zcs@aftsolidus{#1}}
+\DeclareOptionX{raisefrac}{\gdef\zcs@raisefrac{#1}}
+
+\DeclareOptionX{theoremfont}{\zcs@thrmtrue}
+\DeclareOptionX{scosf}{\@zcs@scosftrue}
+\DeclareOptionX{sups}{\@zcs@supstrue}
+\DeclareOptionX{lining}{\edef\TeXGyreScholaX@figurestyle{LF}}
+\DeclareOptionX{lf}{\edef\TeXGyreScholaX@figurestyle{LF}}
+\DeclareOptionX{oldstyle}{\useosf}
+\DeclareOptionX{osf}{\useosf}
+\DeclareOptionX{tabular}{\edef\TeXGyreScholaX@figurealign{T}}
+\DeclareOptionX{p}{\useproportional}
+\DeclareOptionX{proportional}{\useproportional}
+\DeclareOptionX{mainfont}{
+ \renewcommand{\familydefault}{\rmdefault}}
+%\DeclareOption{tighter}{%
+%\gdef\zpl@spc{.25em}\gdef\zpl@stretch{.125em}\gdef\zpl@shrink{.1em}}
+\DeclareOptionX{looser}{%
+\gdef\zcs@spc{.3em}\gdef\zcs@stretch{.2em}\gdef\zcs@shrink{.1em}}
+\DeclareOptionX{loosest}{%
+\gdef\zcs@spc{.333em}\gdef\zcs@stretch{.222em}\gdef\zcs@shrink{.111em}}
+
+\ExecuteOptionsX{tabular,lining,mainfont}
+\ProcessOptionsX\relax
+\def\zcs@spacing{%
+ \fontdimen2\font=\zcs@spc
+ \fontdimen3\font=\zcs@stretch
+ \fontdimen4\font=\zcs@shrink
+}
+
+\DeclareRobustCommand{\lfstyle}{%
+ \not@math@alphabet\lfstyle\relax
+ \fontfamily{TeXGyreScholaX-LF}\selectfont %
+}% to get lf
+\DeclareRobustCommand{\tlfstyle}{%
+ \not@math@alphabet\tlfstyle\relax
+ \fontfamily{TeXGyreScholaX-TLF}\selectfont %
+}% to get tlf
+\DeclareRobustCommand{\osfstyle}{%
+ \not@math@alphabet\osfstyle\relax
+ \fontfamily{TeXGyreScholaX-OsF}\selectfont %
+}% to get osf
+\DeclareRobustCommand{\tosfstyle}{%
+ \not@math@alphabet\tosfstyle\relax
+ \fontfamily{TeXGyreScholaX-TOsF}\selectfont %
+}% to get tosf
+\DeclareRobustCommand{\textlf}[1]{%
+ {\lfstyle #1}%
+}% to get lf
+\DeclareRobustCommand{\texttlf}[1]{%
+ {\tlfstyle #1}%
+}% to get tlf
+\DeclareRobustCommand{\textosf}[1]{%
+ {\osfstyle #1}%
+}% to get osf
+\DeclareRobustCommand{\texttosf}[1]{%
+ {\tosfstyle #1}%
+}% to get tosf
+\if@zcs@scosf %
+\DeclareRobustCommand{\textsc}[1]{%
+{\fontfamily{TeXGyreScholaX-\TeXGyreScholaX@figurealign%
+OsF}\fontshape{sc}\selectfont #1}%
+}\fi% use OsF in small caps
+
+\renewcommand*{\rmdefault}{TeXGyreScholaX-TLF} % always TLF in math
+\renewcommand*{\familydefault}{\rmdefault}
+
+\if@zcs@sups %
+ \ifzcs@KOMA \else % not using a KOMA class
+ \ifdefined\sufigures
+ \def\f@@tn@te{footnote}
+ \def\@makefnmark{%
+ \ifx\@mpfn\f@@tn@te%not in a minipage
+ \ifx\thefootnote\orig@footnote%
+ \hbox{\sufigures\hspace*{.04em}\@thefnmark\hspace*{.04em}}%
+ \else%
+ \orig@makefnmark%
+ \fi%
+ \else%
+ \orig@makefnmark%
+ \fi}%
+ \fi\fi%
+\fi
+
+\DeclareRobustCommand\thfamily
+ {\not@math@alphabet\thfamily\relax
+ \fontfamily\thdefault\selectfont}
+
+\ifzcs@thrm
+ \ifdefined\newtheoremstyle %amsthm and ntheorem, not theorem.sty
+ \@ifpackageloaded{ntheorem}\relax{%
+ \newtheoremstyle{plain}
+ {\medskipamount} % ABOVESPACE, was \topsep
+ {\medskipamount} % BELOWSPACE, was \topsep
+ {\thfamily} % BODYFONT--\thfamily is defined to be \itshape with upright figures and punctuation
+ {} % INDENT (empty value is the same as 0pt)
+ {\bfseries} % HEADFONT--you may want to add \tlfstyle so the number is tab lining, regardless of text figure selection
+ {.} % HEADPUNCT
+ {5pt plus 1pt minus 1pt} % HEADSPACE
+ % CUSTOM-HEAD-SPEC\newtheorem{thm}{Theorem}[section]
+ } % end @ifpackageloaded
+ \fi%
+\fi
+
+
+\AtEndPreamble{%
+\renewcommand*{\rmdefault}%
+ {TeXGyreScholaX-\TeXGyreScholaX@figurealign\TeXGyreScholaX@figurestyle}
+\newcommand*{\thdefault}{zcsth-\TeXGyreScholaX@figurestyle}
+\normalfont}
+
+\endinput