notas/arbol/style.tex (7868B)
1 % \documentclass[12pt]{article} 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.75cm, 12 bottom=2.50cm, 13 left=2.25cm, 14 right=2.25cm, 15 bmargin=2.50cm]{geometry} 16 17 \usepackage[spanish]{babel} 18 19 \usepackage{float} 20 \usepackage{titlesec} 21 \usepackage{fontspec} 22 \setmainfont{Helvetica} 23 24 % right pointing hand 25 \usepackage{utfsym} 26 27 % make pictures caption font bold and small 28 % \usepackage[font={footnotesize}]{caption} 29 \usepackage{subcaption} 30 31 % inline code (backticks in md) 32 \linespread{1.10} 33 \definecolor{bgcolor}{HTML}{e0e0e0} 34 \let\oldtexttt\texttt 35 36 \renewcommand{\texttt}[1]{ 37 \colorbox{bgcolor}{\oldtexttt{#1}} 38 } 39 40 % change boldfont bold to extrabold 41 % \setmainfont[ 42 % BoldFont={Inter-ExtraBold} 43 % ]{Inter} 44 45 % change regular font to light font 46 % \setmainfont{Inter light} 47 48 \newfontfamily\titlefont{Inter}[ 49 UprightFont = *-Regular, 50 BoldFont = *-ExtraBold, 51 Scale = 0.90 52 ] 53 54 \newfontfamily\sectionsfont{Inter}[ 55 UprightFont = *-Regular, 56 BoldFont = *-Bold, 57 ] 58 59 \setmathfont[Scale=1.00]{Fira Math} 60 61 \usepackage{xcolor} 62 \definecolor{ugrey}{HTML}{333333} 63 64 \titleformat{\section} 65 {\color{black}\titlefont\Large\bfseries} 66 {\color{black}} 67 {0em} 68 {} 69 70 \titleformat{\subsection} 71 {\color{black}\sectionsfont\large\bfseries} 72 {\color{black}} 73 {0em} 74 {} 75 76 \titleformat{\subsubsection} 77 {\color{black}\sectionsfont\bfseries} 78 {\color{black}} 79 {0em} 80 {} 81 82 \titleformat{\paragraph} 83 {\color{black}\sectionsfont\bfseries} 84 {\color{black}\theparagraph} 85 {0em} 86 {} 87 88 \titleformat{\subparagraph} 89 {\color{black}\normalfont\bfseries} 90 {\color{black}\theparagraph} 91 {0em} 92 {} 93 94 % spacing: how to read {12pt plus 4pt minus 2pt} 95 % 12pt is what we would like the spacing to be 96 % plus 4pt means that TeX can stretch it by at most 4pt 97 % minus 2pt means that TeX can shrink it by at most 2pt 98 % 99 % \titlespacing{command}{left spacing}{before spacing}{after spacing}[right] 100 101 \titlespacing*{\section} 102 {0pt}{1.50ex plus 0.25ex minus 0.10ex}{1.25ex plus 0.00ex} 103 104 \titlespacing*{\subsection} 105 {0pt}{1.25ex plus 0.10ex minus 0.10ex}{0.75ex plus 0.00ex} 106 107 \titlespacing*{\subsubsection} 108 {0pt}{1.25ex plus 0.10ex minus 0.10ex}{0.50ex plus 0.00ex} 109 110 \titlespacing*{\paragraph} 111 {0pt}{1.25ex plus 0.10ex minus 0.10ex}{0.50ex plus 0.00ex} 112 113 \titlespacing*{\subparagraph} 114 {0pt}{1.25ex plus 0.10ex minus 0.10ex}{0.50ex plus 0.00ex} 115 116 % spacing between formulas and text 117 % \usepackage[nodisplayskipstretch]{setspace} 118 % \setstretch{1.20} 119 120 % \setlength{\textfloatsep}{2pt plus 1.0pt minus 2.0pt} 121 % \setlength{\intextsep}{2pt plus 1.0pt minus 2.0pt} 122 123 \setlength{\abovecaptionskip}{1.00em} % above caption 124 \setlength{\belowcaptionskip}{-0.85em} % below caption 125 126 \setlength{\textfloatsep}{0pt} 127 \setlength{\dblfloatsep}{0pt} % twocolumn float sep 128 \setlength{\intextsep}{8pt} 129 130 \setlength{\abovedisplayskip}{0pt} 131 \setlength{\belowdisplayskip}{0pt} 132 133 \setlength{\abovedisplayshortskip}{0pt} 134 \setlength{\belowdisplayshortskip}{0pt} 135 136 \setlength{\belowdisplayshortskip}{\belowdisplayskip} 137 138 \setlength{\baselineskip}{0pt} 139 140 \setlength{\parskip}{0.5em} 141 \linespread{1.00} % 1.25 = 1.5 líneas aprox 142 143 % \usepackage{setspace} 144 % \setstretch{1.25} 145 146 % \captionsetup{font=small, labelfont=bf} 147 \captionsetup{font=small, labelfont=md} 148 \captionsetup[sub]{font=footnotesize,labelfont=md} 149 150 \renewcommand\thesubfigure{\arabic{subfigure}} 151 152 \renewcommand{\figurename}{Figura} 153 \renewcommand{\tablename}{Tabla} 154 155 % \renewcommand{\contentsname}{Índice} 156 \renewcommand\contentsname{\vspace*{-45pt}} 157 158 % TOC dots separation 159 % \renewcommand{\cftdotsep}{10} 160 161 % \setlength{\cftsecindent}{0pt}% Remove indent for \section 162 % \setlength{\cftsubsecindent}{5pt}% Remove indent for \subsection 163 % \setlength{\cftsubsubsecindent}{0pt}% Remove indent for \subsubsec 164 165 \setcounter{tocdepth}{4} 166 167 \usepackage{titling} 168 \renewcommand{\maketitle}{ 169 \begin{flushleft} 170 {\bfseries\Huge\thetitle} 171 % \vspace{1mm} 172 \end{flushleft} 173 % \thispagestyle{empty} 174 } 175 176 % remove the page number from all the pages that the TOC occupies 177 % \addtocontents{toc}{\protect\thispagestyle{empty}} 178 179 % add page break after TOC set it to page number 1 180 \let\oldtableofcontents\tableofcontents % remember the definition 181 \renewcommand\tableofcontents{ 182 \oldtableofcontents % use the standard toc 183 \thispagestyle{empty} 184 \pagebreak 185 \setcounter{page}{1} 186 } 187 188 % Set text color for all document 189 % \color{ugrey} 190 191 \usepackage[titles]{tocloft} 192 \renewcommand{\cftdotsep}{1.5} 193 \renewcommand{\cftsetpnumwidth}{1.5} 194 \renewcommand{\cftsetrmarg}{1.5} 195 196 % \usepackage{float} 197 % \makeatletter 198 % \def\fps@figure{H} 199 % \makeatother 200 201 % nicer chemical figures 202 \usepackage{chemfig} 203 204 % change style of quote, see also https://tex.stackexchange.com/a/436253/114857 205 \usepackage[most]{tcolorbox} 206 207 \definecolor{linequote}{RGB}{224,215,188} 208 \definecolor{bordercolor}{RGB}{221,221,221} 209 % \definecolor{backquote}{RGB}{249,245,233} 210 \definecolor{backquote}{RGB}{245,245,245} 211 212 % change left border: https://tex.stackexchange.com/a/475716/114857 213 % change left margin: https://tex.stackexchange.com/a/457936/114857 214 \newtcolorbox{myquote}[1][]{% 215 enhanced, 216 breakable, 217 size=minimal, 218 left=0pt, 219 top=12pt, 220 bottom=12pt, 221 right=12pt, 222 boxrule=1pt, 223 sharp corners=all, 224 colback=backquote, 225 colframe=black, 226 #1} 227 228 % redefine quote environment to use the myquote environment, see 229 % https://tex.stackexchange.com/a/337587/114857 230 \renewenvironment{quote}{\begin{myquote}}{\end{myquote}} 231 232 % better fractions 233 \usepackage{nicefrac,xfrac} 234 235 % surround footnotes number with square brackets and always use numbers (even 236 % inside quoted text) 237 % https://www.overleaf.com/learn/latex/Footnotes 238 \renewcommand*{\thefootnote}{\ [\arabic{footnote}]\ } 239 \renewcommand*{\thempfootnote}{\ [\arabic{mpfootnote}]\ } 240 241 % space between text and footer 242 \setlength\footskip{36pt} 243 \setlength{\skip\footins}{2pt} 244 245 % align first letter of all the lines in the footnotes 246 \usepackage[bottomfloats, belowfloats, hang, multiple, ragged]{footmisc} 247 \setlength{\footnotemargin}{1em} 248 249 \newcommand{\unit}[2]{\nicefrac{#1}{#2}} 250 251 \usepackage{enumitem} 252 \usepackage{amsfonts} 253 254 \setlist[itemize,1]{label=$\bullet$} 255 \setlist[itemize,2]{label=$\textopenbullet$} 256 257 \usepackage{tabularx} 258 \usepackage{multirow} % Required for multirows 259 \usepackage{colortbl} 260 261 % Reduce space around displayed equations safely 262 \makeatletter 263 \setlength{\jot}{8pt} % valor por defecto es 3pt aproximadamente 264 \makeatother 265 266 \usepackage{multicol} 267 \setlength{\columnsep}{12pt} 268 269 % Delay start of two-column layout 270 \AtBeginDocument{ 271 \renewcommand{\figurename}{Figura} 272 \renewcommand{\tablename}{Tabla} 273 } 274 275 % Begin multicols after title 276 % \usepackage{etoolbox} 277 % \pretocmd{\maketitle}{\clearpage\begin{multicols*}{2}}{}{} 278 % \AtEndDocument{ 279 % \end{multicols*} 280 % } 281 282 \binoppenalty=10000 283 \relpenalty=10000 284 285 \usepackage{listings} 286 \lstset{ 287 breaklines=true, 288 breakatwhitespace=true, 289 basicstyle=\ttfamily\small, 290 columns=fullflexible 291 } 292 293 \usepackage{xcolor} 294 295 % tango style 296 \definecolor{bgcolor}{HTML}{F6F6F6} 297 \definecolor{keywordcolor}{HTML}{204A87} 298 \definecolor{commentcolor}{HTML}{8F5902} 299 \definecolor{stringcolor}{HTML}{4E9A06} 300 \definecolor{numbercolor}{HTML}{0000CF} 301 \definecolor{operatorcolor}{HTML}{CE5C00} 302 \definecolor{identifiercolor}{HTML}{000000} % For general text 303 304 \lstset{ 305 backgroundcolor=\color{bgcolor}, 306 basicstyle=\ttfamily\small, 307 keywordstyle=\color{keywordcolor}\bfseries, 308 commentstyle=\color{commentcolor}\itshape, 309 stringstyle=\color{stringcolor}, 310 identifierstyle=\color{identifiercolor}, 311 numberstyle=\color{numbercolor}, 312 emphstyle=\color{operatorcolor}\bfseries, 313 breaklines=true, 314 breakatwhitespace=true, 315 columns=fullflexible, 316 showstringspaces=true, 317 frame=single, 318 framerule=1pt, 319 xleftmargin=0pt, 320 moredelim=**[is][\color{operatorcolor}\bfseries]{@}{@}, % allow inline operator styling using @...@ 321 }
