\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ebgaramond} [2012/12/20 (Bob Tennent and autoinst) Style file for EB Garamond fonts.] \RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} \newif\ifebgaramond@otf \ifxetex \ebgaramond@otftrue \else\ifluatex \ebgaramond@otftrue \else % [pdf]LaTeX \ebgaramond@otffalse \fi\fi \newif\ifebgaramond@lining \ebgaramond@liningfalse \newif\ifebgaramond@tabular \ebgaramond@tabularfalse \newcommand*{\EBGaramond@scale}{1} \RequirePackage{xkeyval} \DeclareOptionX{scaled}{\renewcommand*{\EBGaramond@scale}{#1}} \DeclareOptionX{scale}{\renewcommand*{\EBGaramond@scale}{#1}} \DeclareOptionX{type1}{\ebgaramond@otffalse} \DeclareOptionX{lining}{\ebgaramond@liningtrue} \DeclareOptionX{nf}{\ebgaramond@liningtrue} \DeclareOptionX{lf}{\ebgaramond@liningtrue} \DeclareOptionX{oldstyle}{\ebgaramond@liningfalse} \DeclareOptionX{osf}{\ebgaramond@liningfalse} \DeclareOptionX{tabular}{\ebgaramond@tabulartrue} \DeclareOptionX{t}{\ebgaramond@tabulartrue} \DeclareOptionX{proportional}{\ebgaramond@tabularfalse} \DeclareOptionX{p}{\ebgaramond@tabularfalse} \ExecuteOptionsX{oldstyle,proportional} \ProcessOptionsX\relax \ifebgaramond@otf \ifebgaramond@lining \def\ebgaramond@figurestyle{Lining} \else \def\ebgaramond@figurestyle{OldStyle} \fi \ifebgaramond@tabular \def\ebgaramond@figurealign{Monospaced} \else \def\ebgaramond@figurealign{Proportional} \fi \else % type1 \ifebgaramond@lining \def\ebgaramond@figurestyle{LF} \else \def\ebgaramond@figurestyle{OsF} \fi \ifebgaramond@tabular \def\ebgaramond@figurealign{T} \else \def\ebgaramond@figurealign{} \fi \fi \ifebgaramond@otf \RequirePackage{fontspec} \else \RequirePackage{fontenc,fontaxes} \fi \ifebgaramond@otf \ifxetex\XeTeXtracingfonts=1\fi \defaultfontfeatures{ Ligatures = TeX , Scale = \EBGaramond@scale , Extension = .otf } \setmainfont [ Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \newfontfamily\ebgaramond [ Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \providecommand\sufigures{\addfontfeatures{VerticalPosition=Superior}} \newfontfamily\swshape [ Style={Swash}, Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle}, UprightFont = *-Italic , ItalicFont = *-Italic , ] {EBGaramond12} \newfontfamily\ebgaramondOsF [ Numbers = {\ebgaramond@figurealign,OldStyle}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \newfontfamily\ebgaramondLF [ Numbers = {\ebgaramond@figurealign,Lining}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \DeclareTextFontCommand{\oldstylenums}{\ebgaramondOsF} \DeclareTextFontCommand{\liningnums}{\ebgaramondLF} \else % type1 \def\ebgaramond@family{EBGaramond-\ebgaramond@figurealign\ebgaramond@figurestyle} \renewcommand*\rmdefault{\ebgaramond@family} \renewcommand*\bfdefault{m} \newcommand*\ebgaramond{\fontfamily{\ebgaramond@family}\selectfont} \DeclareRobustCommand\swshape{\not@math@alphabet\swshape\relax \fontprimaryshape\itdefault\fontsecondaryshape\swdefault\selectfont} \fa@naming@exception{shape}{{n}{sw}}{nw} \fa@naming@exception{shape}{{it}{sw}}{sw} \fa@naming@exception{figures}{{superior}{proportional}}{Sup} \fa@naming@exception{figures}{{superior}{tabular}}{Sup} \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont} \DeclareTextFontCommand{\oldstylenums}{\fontfamily{EBGaramond-\ebgaramond@figurealign OsF}\selectfont} \DeclareTextFontCommand{\liningnums}{\fontfamily{EBGaramond-\ebgaramond@figurealign LF}\selectfont} \fi \DeclareTextFontCommand{\textsu}{\sufigures} \DeclareTextFontCommand{\textsw}{\swshape} \ifebgaramond@otf \newfontfamily\ebgaramondtabular [ Numbers = {Monospaced,\ebgaramond@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \newfontfamily\ebgaramondproportional [ Numbers = {Proportional,\ebgaramond@figurestyle}, UprightFont = *-Regular , ItalicFont = *-Italic , ] {EBGaramond12} \DeclareTextFontCommand{\tabularnums}{\ebgaramondtabular} \DeclareTextFontCommand{\proportionalnums}{\ebgaramondproportional} \else % type1 \DeclareTextFontCommand{\tabularnums}{\fontfamily{EBGaramond-T\ebgaramond@figurestyle}\selectfont} \DeclareTextFontCommand{\proportionalnums}{\fontfamily{EBGaramond-\ebgaramond@figurestyle}\selectfont} \fi \renewcommand{\bfdefault}{m} \ifebgaramond@otf \defaultfontfeatures{} \fi \endinput