notas/complejidad_algoritmica/style.tex (6404B)
1 % \documentclass[14pt]{extarticle} 2 3 % page setup 4 % \usepackage[a4paper, 5 % top=2.5cm, 6 % bottom=2.5cm, 7 % left=2.00cm, 8 % right=2.00cm, 9 % bmargin=2.50cm]{geometry} 10 \usepackage[a4paper, 11 top=2.00cm, 12 left=1.75cm, 13 right=1.75cm, 14 bottom=2.00cm, 15 bmargin=2.00cm]{geometry} 16 17 \setlength{\columnsep}{16pt} % Default is usually 10pt 18 19 \usepackage{titlesec} 20 \usepackage{fontspec} 21 \setmainfont{Helvetica} 22 23 % right pointing hand 24 \usepackage{utfsym} 25 26 % make pictures caption font bold and small 27 \usepackage[font={footnotesize,bf}]{caption} 28 \usepackage{subcaption} 29 30 % inline code (backticks in md) 31 \linespread{1.10} 32 \definecolor{bgcolor}{HTML}{e0e0e0} 33 \let\oldtexttt\texttt 34 35 % \renewcommand{\texttt}[1]{ 36 % \colorbox{bgcolor}{\oldtexttt{#1}} 37 % } 38 39 % change boldfont bold to extrabold 40 % \setmainfont[ 41 % BoldFont={Inter-ExtraBold} 42 % ]{Inter} 43 44 % change regular font to light font 45 % \setmainfont{Inter light} 46 47 \newfontfamily\titlefont{Inter}[ 48 UprightFont = *-Regular, 49 BoldFont = *-ExtraBold, 50 Scale = 0.90 51 ] 52 53 \newfontfamily\sectionsfont{Inter}[ 54 UprightFont = *-Regular, 55 BoldFont = *-Bold, 56 ] 57 58 \setmathfont[Scale=1.05]{Fira Math} 59 60 \usepackage{xcolor} 61 \definecolor{ugrey}{HTML}{333333} 62 63 \titleformat{\section} 64 {\color{ugrey}\titlefont\Large\bfseries} 65 {\color{ugrey}} 66 {0em} 67 {} 68 69 \titleformat{\subsection} 70 {\color{ugrey}\sectionsfont\large\bfseries} 71 {\color{ugrey}} 72 {0em} 73 {} 74 75 \titleformat{\subsubsection} 76 {\color{ugrey}\sectionsfont\bfseries} 77 {\color{ugrey}} 78 {0em} 79 {} 80 81 \titleformat{\paragraph} 82 {\color{ugrey}\sectionsfont\bfseries} 83 {\color{ugrey}\theparagraph} 84 {0em} 85 {} 86 87 \titleformat{\subparagraph} 88 {\color{ugrey}\normalfont\bfseries} 89 {\color{ugrey}\theparagraph} 90 {0em} 91 {} 92 93 % spacing: how to read {12pt plus 4pt minus 2pt} 94 % 12pt is what we would like the spacing to be 95 % plus 4pt means that TeX can stretch it by at most 4pt 96 % minus 2pt means that TeX can shrink it by at most 2pt 97 % 98 % \titlespacing{command}{left spacing}{before spacing}{after spacing}[right] 99 100 \titlespacing*{\section} 101 {0pt}{1.5ex plus 0.25ex minus .2ex}{1.25ex plus .2ex} 102 103 \titlespacing*{\subsection} 104 {0pt}{1.5ex plus 0.25ex minus .2ex}{1.25ex plus .2ex} 105 106 \titlespacing*{\subsubsection} 107 {0pt}{1.25ex plus 0.25ex minus .2ex}{1.25ex plus .2ex} 108 109 \titlespacing*{\paragraph} 110 {0pt}{1.25ex plus 0.25ex minus .2ex}{1.0ex plus .2ex} 111 112 \titlespacing*{\subparagraph} 113 {0pt}{1.00ex plus 0.25ex minus .2ex}{1.0ex plus .2ex} 114 115 % spacing between formulas and text 116 % \usepackage[nodisplayskipstretch]{setspace} 117 % \setstretch{1.20} 118 119 \setlength{\abovedisplayskip}{0pt} 120 \setlength{\belowdisplayskip}{0pt} 121 122 \setlength{\abovedisplayshortskip}{0pt} 123 \setlength{\belowdisplayshortskip}{0pt} 124 125 \setlength{\belowdisplayshortskip}{\belowdisplayskip} 126 127 \setlength{\baselineskip}{0pt} 128 129 % \usepackage{setspace} 130 % \setstretch{1.25} 131 132 % \renewcommand{\figurename}{Fig.} 133 134 \usepackage{caption} 135 \captionsetup{font=normalsize, font=bf, labelfont=bf} 136 \captionsetup[sub]{font=small,labelfont=md} 137 138 \renewcommand\thesubfigure{\arabic{subfigure}} 139 140 \renewcommand{\figurename}{Figura} 141 \renewcommand{\tablename}{Tabla} 142 143 % \renewcommand{\contentsname}{Índice} 144 \renewcommand\contentsname{\vspace*{-45pt}} 145 146 % TOC dots separation 147 % \renewcommand{\cftdotsep}{10} 148 149 % \setlength{\cftsecindent}{0pt}% Remove indent for \section 150 % \setlength{\cftsubsecindent}{5pt}% Remove indent for \subsection 151 % \setlength{\cftsubsubsecindent}{0pt}% Remove indent for \subsubsec 152 153 \setcounter{tocdepth}{4} 154 155 \usepackage{titling} 156 \renewcommand{\maketitle}{ 157 \begin{flushleft} 158 {\bfseries\Huge\thetitle} 159 \vspace{1mm} 160 \end{flushleft} 161 % \thispagestyle{empty} 162 } 163 164 % remove the page number from all the pages that the TOC occupies 165 % \addtocontents{toc}{\protect\thispagestyle{empty}} 166 167 % add page break after TOC set it to page number 1 168 \let\oldtableofcontents\tableofcontents % remember the definition 169 \renewcommand\tableofcontents{ 170 \oldtableofcontents % use the standard toc 171 \thispagestyle{empty} 172 \pagebreak 173 \setcounter{page}{1} 174 } 175 176 % Set text color for all document 177 % \color{ugrey} 178 179 \usepackage[titles]{tocloft} 180 \renewcommand{\cftdotsep}{1.5} 181 \renewcommand{\cftsetpnumwidth}{1.5} 182 \renewcommand{\cftsetrmarg}{1.5} 183 184 \usepackage{float} 185 \makeatletter 186 \def\fps@figure{H} 187 \makeatother 188 189 % nicer chemical figures 190 \usepackage{chemfig} 191 192 % change style of quote, see also https://tex.stackexchange.com/a/436253/114857 193 \usepackage[most]{tcolorbox} 194 195 196 \definecolor{linequote}{RGB}{224,215,188} 197 \definecolor{bordercolor}{RGB}{221,221,221} 198 % \definecolor{backquote}{RGB}{249,245,233} 199 \definecolor{backquote}{RGB}{245,245,245} 200 201 % change left border: https://tex.stackexchange.com/a/475716/114857 202 % change left margin: https://tex.stackexchange.com/a/457936/114857 203 \newtcolorbox{myquote}[1][]{% 204 enhanced, 205 breakable, 206 size=minimal, 207 left=8pt, 208 top=8pt, 209 bottom=8pt, 210 right=8pt, 211 boxrule=1pt, 212 sharp corners=all, 213 colback=backquote, 214 colframe=black, 215 #1} 216 217 % redefine quote environment to use the myquote environment, see 218 % https://tex.stackexchange.com/a/337587/114857 219 \renewenvironment{quote}{\begin{myquote}}{\end{myquote}} 220 221 % better fractions 222 \usepackage{nicefrac,xfrac} 223 224 % surround footnotes number with square brackets and always use numbers (even 225 % inside quoted text) 226 % https://www.overleaf.com/learn/latex/Footnotes 227 \renewcommand*{\thefootnote}{\ [\arabic{footnote}]\ } 228 \renewcommand*{\thempfootnote}{\ [\arabic{mpfootnote}]\ } 229 230 % space between text and footer 231 \setlength\footskip{32pt} 232 \setlength{\skip\footins}{12pt} 233 234 % align first letter of all the lines in the footnotes 235 \usepackage[bottomfloats,belowfloats,hang]{footmisc} 236 \setlength{\footnotemargin}{1em} 237 238 \newcommand{\unit}[2]{\nicefrac{#1}{#2}} 239 240 \usepackage{enumitem} 241 \usepackage{amsfonts} 242 243 \setlist[itemize,1]{label=$\bullet$} 244 \setlist[itemize,2]{label=$\textopenbullet$} 245 246 \usepackage{tabularx} 247 \usepackage{multirow} % Required for multirows 248 \usepackage{colortbl} 249 250 % Reduce space around displayed equations safely 251 \makeatletter 252 \setlength{\jot}{8pt} % valor por defecto es 3pt aproximadamente 253 \makeatother 254 255 \usepackage{enumitem} 256 257 \setlist[enumerate]{ 258 leftmargin=0pt, % no global indentation 259 labelindent=0pt, % label aligned with margin 260 itemindent=5pt, % no extra indent 261 labelwidth=0pt, % label takes no reserved space 262 align=left % make wrapped lines align with the left edge, not number 263 } 264 265 \usepackage[spanish]{babel} 266 \binoppenalty=10000 267 \relpenalty=10000
