forked from foxtroters/latex-template-ORT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.tex
348 lines (264 loc) · 10.2 KB
/
config.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
%https://en.wikibooks.org/wiki/LaTeX/Internationalization
\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel}
\def\spanishdeactivate{<>."}
%https://www.sharelatex.com/learn/Aligning_equations_with_amsmath
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{listingsutf8}%codigo con caracteres especiales
%%ORT
%metadata para la ORT
\usepackage[unicode,
pdftex]{hyperref}
\hypersetup{
pdfauthor={AUTORES},%TODO
pdftitle={TITULO},%TODO
pdfsubject={SUBJECT},%TODO
pdfkeywords={tag1; tag2; tag3}%TODO
}
%%%%%%%%%%%%%%%%%%% http://tex.stackexchange.com/a/103290
%cambio de formato de titulos
\usepackage{titlesec}
%\titleformat{\paragraph}
% {\normalfont\fontsize{12}{15}\bfseries}{\theparagraph.}{1em}{}
%\titleformat*{\paragraph}
%{\normalfont\fontsize{12}\bfseries}{\theparagraph.}{1em}{}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\normalfont\fontsize{20}{0}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontsize{18}{0}\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\fontsize{15}{0}\bfseries}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}
{\normalfont\fontsize{13}{0}\bfseries}{}{1em}{}%no se muestra el numero, para agregarlo incluir \theparagraph
\titleformat{\subparagraph}
{\normalfont\fontsize{11}{0}\bfseries}{}{1em}{}%no se muestra el numero, para agregarlo incluir \thesubparagraph
%espacios despues de titulos
%defaults en http://ctan.dcc.uchile.cl/macros/latex/contrib/titlesec/titlesec.pdf dentro de Standard Classes
\titlespacing*{\chapter} {0pt}{50pt}{40pt}
\titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex} {2.3ex plus .2ex}
\titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsubsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\paragraph} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subparagraph} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%posición de la numeración
\usepackage{fancyhdr}
\fancypagestyle{plain}{% Redefining plain page style
\fancyhf{} %clear all header and footer fields
\fancyfoot[RO]{\thepage}
}%
\fancyhf{} %clear all header and footer fields
\fancyfoot[RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
%%Nombre del índice tabla de contenido
\renewcommand\contentsname{Índice}
%%para incluir imagenes
\usepackage{graphicx}
%%para la bibliografía
%%cambia el nombre
\renewcommand\bibname{Referencias Bibliográficas}
%%la agrega al indice
\usepackage[nottoc,numbib]{tocbibind}
%%para los capítulos
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\huge\bfseries \space \thechapter\space
% \par\nobreak
% \vskip 20\p@
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\makeatother
%%para poner letras no ascii en el código fuente
\lstset{
literate=
{á}{{\'a}}1
{é}{{\'e}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{ú}{{\'u}}1
{ñ}{{\~n}}1
{Á}{{\'A}}1
{É}{{\'E}}1
{Í}{{\'I}}1
{Ó}{{\'O}}1
{Ú}{{\'U}}1
{Ñ}{{\~N}}1
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{5}
\usepackage[table,xcdraw]{xcolor}
%%%%%%%%%%%%%%%%%% ecuaciones mas grandes
% http://tex.stackexchange.com/a/160440
%uso
%\begin{equationBig}
% {\frac {1}{2}}
%\end{equationBig}
\usepackage{graphicx}
\usepackage{environ}
\NewEnviron{equationBig}{%
\begin{equation*}
\scalebox{1.8}{$\BODY$}
\end{equation*}
}
%%%%%%%%%%%%%%%%%%%%%%Inclusion de codigo
\usepackage{listings}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{string}{rgb}{0.47,0.43,0.32}
%\lstset{ %
% backgroundcolor=\color{white}, % choose the background color
% basicstyle=\ttfamily, % size of fonts used for the code
% breaklines=true, % automatic line breaking only at whitespace
% captionpos=b, % sets the caption-position to bottom
% commentstyle=\color{mygreen}, % comment style
% escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
% keywordstyle=\color{blue}, % keyword style
% stringstyle=\color{string}, % string literal style
% morecomment=[l]//,
% otherkeywords={ static, finish , async , for , while , here , at , var , val, public, private, protected, def},
%}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\lstdefinelanguage{x10}{
keywords={static, new, true, false, catch, def, return, null, switch, var, val, if, in, while, for, do, else, case, break, class, throw, this, private, protected, public},
keywordstyle=\color{blue}\bfseries,
ndkeywords={finish, async, at, here},
ndkeywordstyle=\color{mymauve}\bfseries,
identifierstyle=\color{black},
sensitive=false,
comment=[l]{//},
morecomment=[s]{/*}{*/},
commentstyle=\color{mygreen}\ttfamily,
stringstyle=\color{string}\ttfamily,
morestring=[b]',
morestring=[b]"
}
\lstset{
language=x10,
%backgroundcolor=\color{},
extendedchars=true,
basicstyle=\footnotesize\ttfamily,
showstringspaces=false,
showspaces=false,
numbers=left,
numberstyle=\footnotesize,
numbersep=9pt,
tabsize=2,
breaklines=true,
showtabs=false,
captionpos=b,
columns=flexible,
keepspaces=true
}
\makeatletter
\def\lst@outputspace{{\ifx\lst@bkgcolor\empty\color{white}\else\lst@bkgcolor\fi\lst@visiblespace}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%% graficos
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{pgf-pie}
\usepackage{pgfplotstable}
\pgfplotsset{width=10cm,compat=1.9}
\usepackage{booktabs}
%\usepackage{graphicx}%se incluye antes
%%%%%%%%%%%%%%%%%%%%%%%% cambiar idioma cosas
%\renewcommand{\figurename}{Fig.}
\renewcommand\spanishfigurename{Figura}
\renewcommand\spanishtablename{Tabla}
\addto\captionsspanish{%http://stackoverflow.com/a/9106469/4671917
\renewcommand{\lstlistingname}%
{Código}%
}
%%%%%%%%%%%%%%%%%%%%%%%% listas con mas elementos
\usepackage{enumitem}
\setlistdepth{9}
\newlist{noLabel}{enumerate}{9}
\setlist[noLabel,1]{label={}}
\setlist[noLabel,2]{label={}}
\setlist[noLabel,3]{label={}}
\setlist[noLabel,4]{label={}}
\setlist[noLabel,5]{label={}}
\setlist[noLabel,6]{label={}}
\setlist[noLabel,7]{label={}}
\setlist[noLabel,8]{label={}}
\setlist[noLabel,9]{label={}}
%%%%%%%%%%%%%%%%%%%%%%%%%% para que las figuras no se pusheen al final
\usepackage[section]{placeins} %http://tex.stackexchange.com/a/98992
%permite inpedir que queden figuras float pendientes depues de un punto, uso:
%\FloatBarrier
%%%%%%%%%%%%%%%%%%%%%%%%%% para evitar problemas con babel y comillas en los nombres de archivos
\usepackage{grffile} %http://tex.stackexchange.com/a/4132
%%%%%%%%%%%%%%%%%%%%%%%%%% para poner un recuadro al rededor del texto
\usepackage{framed} % http://tex.stackexchange.com/a/53843
%%%%%%%%%%%%%%%%%%%%%%%%%% para poder hacer captions de mas de una linea
\usepackage{caption} % http://tex.stackexchange.com/a/112660
%%%%%%%%%%%%%%%%%%%%%%%%%% para que el espacio entre parrafos se mas grande
%\usepackage[parfill]{parskip}
%\setlength{\parskip}{0.8em}%se usa eso, pero se hace el cambio en el Main despues de la tabla de contenido. %https://www.sharelatex.com/learn/Paragraph_formatting
%\setlength{\parskip}{\baselineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%% para que las figuras queden centradas
%http://www.ctan.org/pkg/floatrow
\usepackage{floatrow}%http://tex.stackexchange.com/a/2652
%%%%%%%%%%%%%%%%%%%%%%%%%% para importar archivos (no usarlo daba problemas en sharelatex)
%https://www.sharelatex.com/learn/Management_in_a_large_project
\usepackage{import}
%%%%%%%%%%%%%%%%%%%%%%%%% para crear tablas complejas
%http://www.tablesgenerator.com/ para crear tablas complejas
\usepackage{multirow}
%%%%%%%%%%%%%%%%%%%%%%%%% para tener ecuaciones de mas de una linea
%http://tex.stackexchange.com/a/3793
\usepackage{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%% linea de timepo http://tex.stackexchange.com/a/198372
\newcommand\ytl[2]{%con texto del lado izquierdo de la linea
\parbox[b]{8em}{\hfill{\color{black}\bfseries\sffamily #1}~$\cdots\cdots$~}\makebox[0pt][c]{$\bullet$}\vrule\quad \parbox[c]{6cm}{\vspace{7pt}\color{red!40!black!80}\raggedright\sffamily #2\\[7pt]}\\[-3pt]}
\newcommand\ytll[1]{%sin texto del lado izquierdo de la linea
\parbox[b]{8em}{\hfill{}}\makebox[0pt][c]{$\bullet$}\vrule\quad \parbox[c]{6cm}{\vspace{7pt}\color{red!40!black!80}\raggedright\sffamily #1\\[7pt]}\\[-3pt]}
%%%%%%%%%%%%%%%%%%%%%%%% Para incluir pdfs de multiples paginas (de a una pagina a la vez)
\usepackage{pdfpages}
%%%%%%%%%%%%%%%%%%%%%% ancho columnas
%http://tex.stackexchange.com/a/41761
\makeatletter
\newcolumntype{1}{@{\hskip\tabcolsep\vrule width 1pt\hsize=0\tabcolsep}}
\makeatother
%%%%%%%%%%%%%%%%%%%%% Define un nuevo comando, que permite crear subseciones que no son mostradas en la tabla de contenido, ideal para los anexos
%http://stackoverflow.com/a/3805470
\newcommand{\hiddensubsection}[1]{
\stepcounter{subsection}
\subsection*{\arabic{chapter}.\arabic{section}.\arabic{subsection}\hspace{1em}{#1}}
}
%%%%%%%%%%%%%%%%%% separacion entre numero y texto en el indice
%http://tex.stackexchange.com/a/16293
\usepackage{tocstyle}
\usetocstyle{standard}
%%%%%%%%%%%%%%%%%% impide que se separe un parrafo en dos paginas si es menor a 3 lineas
%http://tex.stackexchange.com/a/21985
\widowpenalties 4 10000 10000 5000 0
\raggedbottom
%%%%%%%%%%%%%%%%%% permite usar ifthenelse
%http://tex.stackexchange.com/a/58629
\usepackage{xifthen}
%%%%%%%%%%%%%%%%% referencias con nombre y numero
%http://tex.stackexchange.com/a/121871
\newcommand*{\fullref}[2][]{
\ifthenelse{\equal{#1}{}}
{\hyperref[{#2}]{\ref*{#2} \nameref*{#2}}}
{\hyperref[{#2}]{\ref*{#2} {#1}}}
}
%%%%%%%%%%%%%%%% proxima linea en \item y otros casos
\newcommand*{\nextLine}[0]{\mbox{}\\}