1 % \documentclass[14pt]{extarticle} 2 3 % page setup 4 \usepackage[a4paper, 5 top=3.00cm, 6 bottom=2.00cm, 7 left=2.5cm, 8 right=2.5cm, 9 bmargin=3.25cm]{geometry} 10 11 \usepackage{titlesec} 12 \usepackage{fontspec} 13 14 % right pointing hand 15 \usepackage{utfsym} 16 17 % make pictures caption font bold and small 18 \usepackage[font={normalsize}]{caption} 19 20 % inline code (backticks in md) 21 \linespread{1.10} 22 % \definecolor{bgcolor}{HTML}{e0e0e0} 23 \definecolor{bgcolor}{HTML}{f5f5f5} 24 \let\oldtexttt\texttt 25 26 \renewcommand{\texttt}[1]{ 27 \setlength\fboxsep{2pt} 28 \kern-0.25em\colorbox{bgcolor}{\oldtexttt{#1}}\kern-0.25pt 29 } 30 31 % change boldfont bold to extrabold 32 % \setmainfont[ 33 % BoldFont={Inter-ExtraBold} 34 % ]{Inter} 35 36 % change regular font to light font 37 % \setmainfont{Inter light} 38 % \setmainfont{Inter} 39 % \setmainfont{Nimbus Sans} 40 \setmainfont{Nimbus Sans L} 41 42 \newfontfamily\titlefont{Inter}[ 43 UprightFont = *-Regular, 44 BoldFont = *-ExtraBold, 45 Scale = 1.0 46 ] 47 48 \newfontfamily\sectionsfont{Inter}[ 49 UprightFont = *-Regular, 50 BoldFont = *-Bold, 51 ] 52 53 \setmathfont{Fira Math} 54 55 \usepackage{xcolor} 56 \definecolor{ugrey}{HTML}{131313} 57 58 \titleformat{\section} 59 {\color{ugrey}\titlefont\LARGE\bfseries\raggedright} 60 {\color{ugrey}} 61 {0em} 62 {} 63 64 \titleformat{\subsection} 65 {\color{ugrey}\sectionsfont\Large\bfseries\raggedright} 66 {\color{ugrey}} 67 {0em} 68 {} 69 70 \titleformat{\subsubsection} 71 {\color{ugrey}\sectionsfont\large\bfseries\raggedright} 72 {\color{ugrey}} 73 {0em} 74 {} 75 76 \titleformat{\paragraph} 77 {\color{ugrey}\sectionsfont\fontsize{11}{13}\selectfont\bfseries\raggedright} 78 {\color{ugrey}\theparagraph} 79 {0em} 80 {} 81 82 \titleformat{\subparagraph} 83 {\color{ugrey}\normalfont\bfseries\raggedright} 84 {\color{ugrey}\theparagraph} 85 {0pt} 86 {} 87 88 % spacing: how to read {12pt plus 4pt minus 2pt} 89 % 12pt is what we would like the spacing to be 90 % plus 4pt means that TeX can stretch it by at most 4pt 91 % minus 2pt means that TeX can shrink it by at most 2pt 92 % 93 % \titlespacing{command}{left spacing}{before spacing}{after spacing}[right] 94 95 \titlespacing*{\section} 96 {0pt}{2ex plus 1ex minus .2ex}{1.75ex plus .2ex} 97 98 \titlespacing*{\subsection} 99 {0pt}{1.75ex plus 1ex minus .2ex}{1.5ex plus .2ex} 100 101 \titlespacing*{\subsubsection} 102 {0pt}{1.5ex plus 1ex minus .2ex}{1.25ex plus .2ex} 103 104 \titlespacing*{\paragraph} 105 {0pt}{1.5ex plus 1ex minus .2ex}{1.0ex plus .2ex} 106 107 \titlespacing*{\subparagraph} 108 {0pt}{1.25ex plus 1ex minus .2ex}{1.0ex plus .2ex} 109 110 % spacing between formulas and text 111 \setlength{\abovedisplayskip}{5pt} 112 \setlength{\belowdisplayskip}{2pt} 113 114 \setlength{\abovedisplayshortskip}{9pt} 115 \setlength{\belowdisplayshortskip}{2pt} 116 117 \setlength{\belowdisplayshortskip}{\belowdisplayskip} 118 119 \setlength{\baselineskip}{10pt} 120 121 % \usepackage{setspace} 122 % \setstretch{1.25} 123 124 \renewcommand{\figurename}{Fig.} 125 \renewcommand{\tablename}{Tabla} 126 127 \usepackage{caption} 128 % \captionsetup{labelformat=empty} 129 130 % \renewcommand{\contentsname}{Índice} 131 \renewcommand\contentsname{\vspace*{-45pt}} 132 133 % TOC dots separation 134 % \renewcommand{\cftdotsep}{10} 135 136 % \setlength{\cftsecindent}{0pt}% Remove indent for \section 137 % \setlength{\cftsubsecindent}{5pt}% Remove indent for \subsection 138 % \setlength{\cftsubsubsecindent}{0pt}% Remove indent for \subsubsec 139 140 \setcounter{tocdepth}{4} 141 142 \usepackage{titling} 143 \renewcommand{\maketitle}{ 144 \begin{flushleft} 145 {\bfseries\Huge\thetitle} 146 \vspace{1mm} 147 \end{flushleft} 148 % \thispagestyle{empty} 149 } 150 151 % remove the page number from all the pages that the TOC occupies 152 \addtocontents{toc}{\protect\thispagestyle{empty}} 153 154 % add page break after TOC set it to page number 1 155 \let\oldtableofcontents\tableofcontents % remember the definition 156 \renewcommand\tableofcontents{ 157 \oldtableofcontents % use the standard toc 158 \thispagestyle{empty} 159 \pagebreak 160 \setcounter{page}{1} 161 } 162 163 % Set text color for all document 164 % \color{ugrey} 165 166 \usepackage[titles]{tocloft} 167 \renewcommand{\cftdotsep}{1.5} 168 \renewcommand{\cftsetpnumwidth}{1.5} 169 \renewcommand{\cftsetrmarg}{1.5} 170 171 \usepackage{float} 172 \makeatletter 173 \def\fps@figure{H} 174 \makeatother 175 176 % nicer chemical figures 177 \usepackage{chemfig} 178 179 % change style of quote, see also https://tex.stackexchange.com/a/436253/114857 180 \usepackage[most]{tcolorbox} 181 182 183 \definecolor{linequote}{RGB}{224,215,188} 184 \definecolor{bordercolor}{RGB}{221,221,221} 185 % \definecolor{backquote}{RGB}{249,245,233} 186 \definecolor{backquote}{RGB}{230,230,230} 187 188 % change left border: https://tex.stackexchange.com/a/475716/114857 189 % change left margin: https://tex.stackexchange.com/a/457936/114857 190 \newtcolorbox{myquote}[1][]{% 191 enhanced jigsaw, 192 % unbreakable, 193 breakable, 194 size=minimal, 195 left=18pt, 196 top=12pt, 197 bottom=12pt, 198 right=12pt, 199 boxrule=1pt, 200 sharp corners=all, 201 colback=bgcolor, 202 colframe=black, 203 segmentation style={ 204 bottomrule first=0pt, 205 toprule middle=0pt, 206 bottomrule middle=0pt, 207 toprule last=0pt, 208 }, 209 #1} 210 211 \usepackage{enumitem} 212 \usepackage{pifont} 213 214 \setlist[itemize,1]{label=\small\ding{72}} 215 \setlist[itemize]{leftmargin=1.0em, itemsep=0pt, topsep=0pt, labelsep=3pt} 216 \setlist[enumerate]{leftmargin=1.5em, itemsep=0pt, topsep=0pt, labelsep=3pt} 217 218 % redefine quote environment to use the myquote environment, see 219 % https://tex.stackexchange.com/a/337587/114857 220 % \renewenvironment{quote}{ 221 % \begin{myquote} 222 % \setlist[1]{leftmargin=11pt}} 223 % {\setlist[1]{leftmargin=!} 224 % \end{myquote}} 225 \renewenvironment{quote}{ 226 \begin{myquote} 227 \setlist[1]{leftmargin=12pt,rightmargin=12pt}} 228 {\setlist[1]{leftmargin=!} 229 \end{myquote}} 230 231 % better fractions 232 \usepackage{nicefrac,xfrac} 233 234 % surround footnotes number with square brackets and always use numbers (even 235 % inside quoted text) 236 % https://www.overleaf.com/learn/latex/Footnotes 237 \renewcommand*{\thefootnote}{\ [\arabic{footnote}]\ } 238 \renewcommand*{\thempfootnote}{\ [\arabic{mpfootnote}]\ } 239 240 % space between text and footer 241 \setlength\footskip{44pt} 242 \setlength{\skip\footins}{12pt} 243 244 % align first letter of all the lines in the footnotes 245 \usepackage[bottomfloats,belowfloats,hang]{footmisc} 246 \setlength{\footnotemargin}{1em} 247 248 \newcommand{\unit}[2]{\nicefrac{#1}{#2}} 249 250 \usepackage{amsfonts} 251 \usepackage{subcaption} 252 \usepackage{float} 253 \usepackage{tabularx} 254 255 \usepackage{bbding} % HandRight (install texlive-fontsextra) 256 257 \setlength{\columnsep}{12pt} 258 \usepackage{makecell} 259 260 \usepackage{tikz} 261 \usetikzlibrary{arrows.meta, positioning, calc} 262 263 \usepackage{array} 264 265 % Contents of listings-setup.tex 266 \usepackage{xcolor} 267 268 \lstset{ 269 basicstyle=\ttfamily, 270 numbers=left, 271 numberstyle=\tiny, 272 stepnumber=0, 273 numbersep=5pt, 274 backgroundcolor=\color{bgcolor}, 275 showspaces=false, 276 showstringspaces=false, 277 showtabs=true, 278 tabsize=2, 279 captionpos=b, 280 breaklines=true, 281 breakatwhitespace=false, 282 breakautoindent=false, 283 breakindent=0pt, 284 columns=fullflexible, 285 linewidth=\columnwidth, 286 frame=single, 287 framesep=2pt, 288 xleftmargin=2pt, 289 xrightmargin=2pt, 290 aboveskip=6pt, 291 belowskip=-2pt, 292 rulecolor=\color{bgcolor} 293 }
