| 1 |
% From mitthesis package |
| 2 |
% Documentation: https://ctan.org/pkg/mitthesis |
| 3 |
|
| 4 |
\ProvidesFile{mitthesis-fira-newtxsf.tex}[2026/01/31 v1.07 Load Fira Sans text font with newtx sans serif math font and Inconsolata typewriter font] |
| 5 |
|
| 6 |
%% Adjusted sizes of text, math, and typewriter fonts, 2024/10/11 |
| 7 |
%% Fira Sans text font with newtx sans serif math font and Inconsolata typewriter font |
| 8 |
% |
| 9 |
\ifpdftex |
| 10 |
\ClassNoteNoLine{\ClassName}{Loading Fira sans text font with newtx sans serif math font and Inconsolata typewriter} |
| 11 |
\RequirePackage[U,T1]{fontenc} |
| 12 |
\RequirePackage[varqu,varl]{zi4} % inconsolata font for typewriter |
| 13 |
\RequirePackage[sfdefault,tabular,lf]{FiraSans} % sans serif text package |
| 14 |
% Use option lf to get lining figures rather than default, old style figures. Use tabular to get tabular figures, not proportional figures. |
| 15 |
% Best choice will vary, depending on what type of content you have. With some effort, these settings can be changed according to content, |
| 16 |
% See, e.g.: https://tex.stackexchange.com/q/114331/119566 |
| 17 |
\renewcommand\rmdefault{\fira@family} % roman font for math (e.g., for operators) and for \textrm{..} |
| 18 |
\RequirePackage[scaled=1.1]{newtxsf} % sans serif math; [noSTIXops] option suppresses STIX figures in favor of text font figures, |
| 19 |
% in the most recent versions of newtxsf, but using the following for backward compatibility. NB: 'figures' means numbers: 0123456789. |
| 20 |
% This matters, for example, in tables that mix text and math figures. |
| 21 |
\DeclareSymbolFont{mynumbers}{T1}{FiraSans-TLF}{m}{n} |
| 22 |
\DeclareMathSymbol{0}{\mathord}{mynumbers}{`0} |
| 23 |
\DeclareMathSymbol{1}{\mathord}{mynumbers}{`1} |
| 24 |
\DeclareMathSymbol{2}{\mathord}{mynumbers}{`2} |
| 25 |
\DeclareMathSymbol{3}{\mathord}{mynumbers}{`3} |
| 26 |
\DeclareMathSymbol{4}{\mathord}{mynumbers}{`4} |
| 27 |
\DeclareMathSymbol{5}{\mathord}{mynumbers}{`5} |
| 28 |
\DeclareMathSymbol{6}{\mathord}{mynumbers}{`6} |
| 29 |
\DeclareMathSymbol{7}{\mathord}{mynumbers}{`7} |
| 30 |
\DeclareMathSymbol{8}{\mathord}{mynumbers}{`8} |
| 31 |
\DeclareMathSymbol{9}{\mathord}{mynumbers}{`9} |
| 32 |
\RequirePackage{bm} |
| 33 |
% |
| 34 |
\RequirePackage{etoolbox} % may already be loaded by the .cls file |
| 35 |
% Patch headings to automatically use \mathversion{bold}. Compare to report.cls. |
| 36 |
\patchcmd{\section}{\normalfont}{\mathversion{bold}\normalfont}{}{} |
| 37 |
\patchcmd{\subsection}{\normalfont}{\mathversion{bold}\normalfont}{}{} |
| 38 |
\patchcmd{\subsubsection}{\normalfont}{\mathversion{bold}\normalfont}{}{} |
| 39 |
\patchcmd{\paragraph}{\normalfont}{\mathversion{bold}\normalfont}{}{} |
| 40 |
\patchcmd{\subparagraph}{\normalfont}{\mathversion{bold}\normalfont}{}{} |
| 41 |
\else |
| 42 |
\ClassWarning{\ClassName}{The fira-newtxsf font set requires pdflatex. Defaulting to LMR fonts} |
| 43 |
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} |
| 44 |
% suppress warnings about lack of integration between mathtools and unicode-math. |
| 45 |
% Unicode-math loads the fontspec package, but the default fonts are not selected by fontspec in this case. |
| 46 |
\fi |