|
26 | 26 |
|
27 | 27 | % Fonts
|
28 | 28 | \RequirePackage[T1]{fontenc}
|
29 |
| -\RequirePackage{charter} |
30 |
| -\RequirePackage[varqu,varl]{inconsolata} |
31 |
| -\RequirePackage[type1]{cabin} |
32 |
| -\RequirePackage[xcharter]{newtxmath} |
33 |
| -\RequirePackage{bm} |
| 29 | +\RequirePackage{unicode-math} |
| 30 | +\setmainfont{XCharter} |
| 31 | +\setsansfont{Cabin} |
| 32 | +\setmathfont{XCharter Math} |
| 33 | +\setmonofont{Source Code Pro} |
| 34 | + |
| 35 | +% Colors |
| 36 | +\RequirePackage[dvipsnames,table]{xcolor} |
| 37 | +\definecolor{lightGrey}{rgb}{0.9,0.9,0.9} |
| 38 | +\colorlet{codeColor}{PineGreen!15!white} |
| 39 | +\colorlet{codeBorder}{PineGreen} |
| 40 | +\colorlet{definitionColor}{Aquamarine!30!white} |
| 41 | +\colorlet{definitionBorder}{Aquamarine!75!black} |
| 42 | +\colorlet{definitionCode}{definitionColor!35!white} |
| 43 | +\colorlet{exampleColor}{blue!15!white} |
| 44 | +\colorlet{exampleTitle}{black} |
| 45 | +\colorlet{exampleCode}{exampleColor!35!white} |
| 46 | +\colorlet{noteColor}{red!15!white} |
| 47 | +\colorlet{noteBorder}{red!75!black} |
| 48 | +\colorlet{noteCode}{noteColor!35!white} |
34 | 49 |
|
35 | 50 | % Tables
|
36 | 51 | \RequirePackage{tabularray}
|
37 | 52 | \UseTblrLibrary{booktabs}
|
| 53 | +\UseTblrLibrary{varwidth} |
| 54 | +\SetTblrInner[tblr]{measure=vbox} |
| 55 | +\newcommand{\nl}{\\} |
| 56 | + |
| 57 | +% Code |
| 58 | +\RequirePackage{minted} |
| 59 | + |
| 60 | +\RequirePackage{etoolbox} |
| 61 | +\makeatletter |
| 62 | +% replace \medskip before the box with nothing, i.e., remove it |
| 63 | +\patchcmd{\minted@colorbg}{\medskip}{}{}{} |
| 64 | +\makeatother |
| 65 | + |
| 66 | + |
| 67 | +% Color Boxes |
| 68 | +\RequirePackage{tcolorbox} |
| 69 | +\tcbuselibrary{breakable} |
| 70 | +\RequirePackage{adjustbox} |
| 71 | +\newenvironment{codebox}[2][] |
| 72 | + {\tcolorbox[breakable, colback=codeColor, colframe=codeBorder, fonttitle=\bfseries, title={#2}, center title, parbox=false, center, #1]} |
| 73 | + {\endtcolorbox} |
| 74 | +\newenvironment{definition}[2][] |
| 75 | + {\tcolorbox[breakable, colback=definitionColor, colframe=definitionBorder, fonttitle=\bfseries, title={#2}, center title, parbox=false, center, #1]} |
| 76 | + {\endtcolorbox} |
| 77 | +\newenvironment{example}[1][] |
| 78 | + {\tcolorbox[coltitle=exampleTitle, colback=exampleColor, breakable, detach title, before upper={\tcbtitle\quad}, title=\textbf{Example}, parbox=false, center, #1]} |
| 79 | + {\endtcolorbox} |
| 80 | +\newenvironment{sidenote}[2][] |
| 81 | + {\tcolorbox[breakable, colback=noteColor, colframe=noteBorder, fonttitle=\bfseries, title={#2}, center title, parbox=false, center, #1]} |
| 82 | + {\endtcolorbox} |
| 83 | + |
| 84 | +% Indented Paragraphs |
| 85 | +\RequirePackage{changepage} |
| 86 | +\newenvironment{indentparagraph}{\begin{adjustwidth}{2em}{}}{\end{adjustwidth}} |
38 | 87 |
|
39 | 88 | % Include/Input Subfiles
|
40 | 89 | \RequirePackage{xstring}
|
|
0 commit comments