-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbook-pdf.tex
432 lines (379 loc) · 12.9 KB
/
book-pdf.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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
\documentclass{book}
% Deben cargarse temprano para parches de macros
\usepackage{etoolbox}
\usepackage{ifthen}
% Configuración geométrica detallada
\usepackage[paperwidth=155mm,
paperheight=230mm,
textwidth=110mm,
textheight=540pt,
centering,
includehead,
includefoot,
headsep=14pt,
top=35pt,
footskip=0mm,
footnotesep=14pt plus 0.1pt minus 0.1pt]{geometry}
%% Configuración de idioma
\usepackage[french,portuguese,italian,english,german,spanish,es-ucroman,es-noshorthands]{babel}
\usepackage[autostyle=true]{csquotes}% Citas automáticas con estilo idiomático correcto
\frenchspacing% Espaciado uniforme después de puntos
\renewcommand{\spanishcontentsname}{Sumario}% Personalización del nombre del índice
\usepackage{fontspec}% Soporte para fuentes OpenType
\usepackage[final]{microtype}% Mejoras tipográficas micro
\microtypecontext{spacing=nonfrench}% Mejora espaciado sin modificar el interletrado
%% solo trabajamos con protusion y sin expansion para Libertinus
\SetProtrusion
[ name=libertinus ]
{ encoding = * }
{ . = {50,50}, , = {40,40}, - = {30,30}, " = {50,50}, ( = {40,50}, ) = {50,40} }
\linespread{1.167}% Ajuste de interlineado para obtener 10/13
%% Fuente principal Libertinus con características tipográficas
\setmainfont{Libertinus Serif}
[Numbers={OldStyle,Proportional},
Ligatures={TeX,Common,Discretionary},
RawFeature={+cv01,+cv02}, % Variantes de caracteres opcionales
Scale=1.18]
% Matemáticas con Libertinus Math
\usepackage{unicode-math}
\setmathfont{Libertinus Math}[Scale=MatchLowercase]
%% Configuración de fuentes para chino
% \usepackage{luatexja-fontspec}
% \setmainjfont{FandolSong}
\setsansfont[Scale=MatchLowercase,
Ligatures=TeX,
Extension=.otf,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-SemiBold,
BoldItalicFont=*-SemiBoldItalic]{IBMPlexSansCondensed}
\setmonofont[Scale=0.91,
Extension=.otf,
UprightFont=*-Regular,
ItalicFont = IBMPlexMono-Italic.otf,
BoldFont = IBMPlexMono-Bold.otf,
BoldItalicFont = IBMPlexMono-BoldItalic.otf]{IBMPlexMono.otf}
% control de ruptura de linea
\usepackage{linebreaker}
\linebreakersetup{
maxtolerance=90,
maxemergencystretch=1em,
maxcycles=4
}
% paquetes varios
\usepackage{zref-totpages}% contar el total de páginas
\usepackage{pageslts}
\usepackage{calc}
\usepackage{qrcode}% generamos el QR
\usepackage{froufrou}
\usepackage{nccfoots}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{svg}
\usepackage[final]{pdfpages}
\usepackage[labelfont=bf,font=small,labelsep=period,format=plain]{caption}
\usepackage{ragged2e}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{bchart}
\usepackage[most]{tcolorbox}
% control sobre parrafos de una linea a final de página
\usepackage{needspace}% usar donde se desea el corte \Needspace*{4\baselineskip}
% diseño de listas (opcion 1) con paralist
\usepackage{paralist}
\setdefaultenum{1)}{a)}{i)}{}
\pltopsep=0.5mm
\plitemsep=0mm
% diseño de listas (opcion 2) con enumitem
\usepackage{enumitem}
\setlist{nosep,topsep=4pt}
% rediseñamos la raya de las notas a pie aumentamos la distancia de la raya
\renewcommand{\footnoterule}{%
\kern -3pt%
\hrule height 0.5pt width 0.4\columnwidth%
\kern 6pt%
}
%% rediseño del epígrafe
%% la columna superior es tratada como párrafo y
%% la inferior marginada a la derecha
\newcommand{\epigraph}[2]{%
\par\nobreak\noindent\par\nobreak\vspace{.5\baselineskip}
\hfill{\small\begin{tabular}{@{}>{\raggedright\arraybackslash}m{.65\textwidth}@{}}
#1 \\[1ex]
\midrule
\hfill #2
\end{tabular}}
\vspace{.5\baselineskip}
}
% niveles para los contadores
\setcounter{tocdepth}{0}
\setcounter{secnumdepth}{4}
% dibujo de caja contenedora, solo para desarrollo
%\usepackage{showframe}
%\renewcommand\ShowFrameLinethickness{0.1pt}
%\renewcommand\ShowFrameColor{\color{blue}}
% diseño del pie de página
\usepackage[bottom,stable,hang]{footmisc}
\setlength{\footnotesep}{10pt}% cambia el valor deseado en puntos (pt)
\makeatletter
\patchcmd\@footnotetext{\@MM}{100}{}{\fail}
\makeatother
\makeatletter
\patchcmd{\@footnotetext}{\footnotesize}{\small}{}{}% tamaño del cuerpo del texto del footnote
\makeatother
\renewcommand*{\thefootnote}{\scriptsize\sf{[\arabic{footnote}]}}% tamaño del cuerpo de puntero del footnote
% KOMA script
\usepackage{scrextend}
% \KOMAoptions{footnotes=multiple}% maybe you want to use this option?
\newcommand*\footnotemarkspace{0em} % set distance of the footnote text from the margin
\deffootnote{\footnotemarkspace}% use distance from above
{\parindent}% paragraph indent in footnotes (footnotes should never have paragraphs!)
{\makebox[\footnotemarkspace][r]{\llap{\thefootnotemark\quad}}} % footfont with period for footnote marks in footnote
% {\makebox[\footnotemarkspace][l]{\footfont\phantom{99}\llap{\thefootnotemark.}}} % footfont with period for footnote marks in footnote
% cambiar la font specification for the name "PART"
\renewcommand\thepart{\arabic{part}}
% AJUSTE PARA UTILIZAR SUBTITULOS, CHAPTER CON ce MAYÚSCULA \Chapter{}{}
% \usepackage{relsize} %Package to set relative font size (\smaller, \larger)
\newcommand\Chapter[2]{
\chapter[#1]{#1\\ {\fontsize{12pt}{14.4pt}\selectfont#2}}
}
\usepackage{titletoc}
% partes
\titlecontents{part}[0em]
{\addvspace{5pt}\sf\bfseries\normalsize\selectfont\filright}
{\contentslabel[\thecontentslabel]{2.5pc}}{}{}
% capitulo
\titlecontents{chapter}[1.5pc]
{\addvspace{.4em}\sf\selectfont\filright}
{\contentslabel{1.5pc}}
{\hspace*{-1.5pc}}%
{\titlerule*[1pc]{.}\contentspage[\hspace*{-4pc} {\rm\small\thecontentspage}]}%
[]
\titlecontents{section}[4.5pc]
{\small\filright}
{\contentslabel{2.5pc}}
{\hspace*{-2.5pc}}
{\titlerule*[1pc]{.}\contentspage}
% %% diseño de sección
% \titlecontents*{section}[2.5pc]
% {\small\selectfont\filright}
% {{\sffamily{\thecontentslabel}} \ }{}
% { [\textbf{\thecontentspage}]}[][\ \textbullet\ ][]
% \titlecontents*{section}[2.5pc]
% {\footnotesize\selectfont\raggedright}
% {\textbf{\thecontentslabel\adddot}\addspace}
% % {\thecontentslabel.\addspace}% despues de terminar con Tucumán usar este
% {}
% {~[\thecontentspage].\addspace}[]
% % {\addspace[\thecontentspage].\addspace}[]
% CORRIJE LA POSICIÓN DE LOS NUMEROS EN EL ÍNDICE DE FIGURAS Y CUADROS
\makeatletter
\renewcommand{\l@figure}{\@dottedtocline {1}{0}{2.5pc}}
\renewcommand{\l@table}{\@dottedtocline {1}{0}{2.5pc}}
\makeatother
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles,clearempty,newlinetospace]{titlesec}
%diseño de parte
\makeatletter
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{Parte \thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\ifnum \c@secnumdepth >-2\relax
\sf\LARGE\selectfont \partname~\thepart
\par\vskip 20\p@%
\fi
\sf\Large\selectfont
#2\par}%
\@endpart}
\def\@spart#1{%
\markboth{}{}%
{\centering
\interlinepenalty \@M
\sf\LARGE\selectfont
#1\par}%
\@endpart}
\makeatother
%diseño de capitulo
\titleformat{\chapter}[display]
% {\sf \LARGE}
% {\filleft {\chaptertitlename} \thechapter}
% {2ex}{\filright}[]
{\Large}
{\vspace{-2.5cm}\centering{\textsc{\MakeLowercase\chaptertitlename}}~\thechapter}
{1.5cm}
{\filright\sf\LARGE}
[]
% \titlespacing{\chapter}{0pt}{-9ex}{0pt}
%diseño de seccion
\titleformat{\section}[hang]
{\sf\bfseries\large\raggedright}
{\thesection}{.5em}{}[]
\titlespacing{\section}
{\parindent}{18pt plus 0.5pt minus 0.5pt}{6.75pt}
%diseño de subseccion
\titleformat{\subsection}[hang]
{\sf\large\raggedright}
{\thesubsection}{.5em}{}[]
\titlespacing{\subsection}
{\parindent}{18pt plus 0.5pt minus 0.5pt}{6.75pt}
%diseño de subsubseccion
\titleformat{\subsubsection}[hang]
{\rm\bfseries\normalsize\raggedright}
{\thesubsubsection}{.5em}{}[]
\titlespacing{\subsubsection}
{\parindent}{18pt plus 0.5pt minus 0.5pt}{6.75pt}
%diseño de parrafo para usar con los autores de compilaciones
\titleformat{\paragraph}[runin]
{\bfseries}
{}{0em}{}
[\mbox{ --- }]
\titlespacing{\paragraph}
{0pt}% antes de la raya
{6.75pt plus 0.5pt minus 0.5pt}% antes del párrafo
{0pt}% después de la raya
%diseño de subparrafo
\titleformat{\subparagraph}[hang]
{\sf\bfseries\large\centering}
{\thesubparagraph}{.5em}{}[]
\titlespacing{\subparagraph}
{\parindent}{18pt plus 0.5pt minus 0.5pt}{6.75pt}
% DISEÑO DE CABEZALES
\renewpagestyle{plain}[]{% \footrule
\setfoot{}{}{}}
\newpagestyle{myps}[]{%
\setfoot[][][]{}{}{}
\sethead[\sf \textbf{\usepage}][][\sf \TheAuthor]
{\sf \chaptertitle}{}{\sf \textbf{\usepage}}
}
\pagestyle{myps}
\newcommand{\TheAuthor}{}
\newcommand{\Author}[1]{\renewcommand{\TheAuthor}{#1}}
% Ajustes de viudas y huérfanas
\raggedbottom
\clubpenalty=10000
\widowpenalty=10000
% \finalhyphendemerits% evitamos el corte en la última línea del párrafo
%% CON ESTAS 2 INSTRUCCIONES NUNCA VA A GUIONIZAR PALABRAS MENORES A 7 CARACTERES
% \lefthyphenmin3 %% determina el minimo de caracteres de final de linea a la izquierda
% \righthyphenmin3 %% determina el minimo de caracteres de final de linea a la derecha
% NUEVO TIPO DE ENTORNO FLOTANTE PARA FOTOGRAFIAS (\listofimagen)
\usepackage{newfloat}
\DeclareFloatingEnvironment[
fileext=lop,
listname={Índice de imágenes},
name=Imagen,
placement=ht,
%within=section,% activate it if you want
%chapterlistsgaps=on,% meaningful only if chapters exist
]{imagen}
% DISEÑO DE RAYA DEL MEDIO
\makeatletter
\def\thinskip{\hskip 0.16667em\relax}
\def\endash{--}
\def\emdash{\endash-}
\def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
\def\dash{\d@sh\nobreak\endash}
\def\Dash{\d@sh\nobreak\emdash}
\def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
\def\rdash{\d@sh\nobreak\endash}
\def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
\def\Rdash{\d@sh\nobreak\emdash}
\def\hyph{-\penalty\z@\hskip\z@skip}
\def\slash{/\penalty\z@\hskip\z@skip}
\makeatother
% CENTRADO DEL AUTOR DE LOS CAPITULOS
\newcommand\nombreautor[1]{\textsc{\MakeLowercase{#1}}}
% CITA CON CAMBIO DE TAMAÑO TIPOGRAFICO
\renewenvironment{quote}
{\normalsize\list{}{\sf\leftmargin=14pt \rightmargin=0pt}%
\item\relax}
{\endlist}
% elegimos el estandar para las referencias
\def\estandar{veronaAY}
%\def\estandar{veronaFN}
%\def\estandar{apa}
%\def\estandar{chicago}
\input{./files/biblatex-\estandar-config.tex}
% generamos los índices
\usepackage[xindy]{imakeidx}
\makeindex
\makeindex[name=names]
\makeindex[name=concepto,title={Índice de conceptos}]
\makeindex[name=onomastico,title={Índice onomástico}]
\usepackage{esindex}
\DeclareIndexNameFormat{default}{%
\usebibmacro{index:name}{\esindex[names]}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}
\renewbibmacro*{citeindex}{%
\ifciteindex
{\indexnames{labelname}}
{}}
% Esto inserta la entrada relacionada con el contenido como parte de las últimas cosas antes de que el índice se imprima realmente.
\makeatletter
\g@addto@macro{\theindex}{\addcontentsline{toc}{chapter}{\hspace{1.5pc}Índice de autoras y autores del aparato bibliográfico}}
\makeatother
\renewcommand{\spanishindexname}{Índice de autoras y autores del aparato bibliográfico}
%% generamos los glosarios
\usepackage[acronym,sanitizesort,toc=true,nonumberlist]{glossaries}
\preto\chapter{\glsresetall}
\makenoidxglossaries
\renewcommand{\glsnamefont}[1]{\sf\textbf{\textup{#1}}}
%% Diseño y estilo a glosario y acrónimo
\newglossarystyle{crossreflist}%
{% base it on list (adapt as required)
\renewcommand*{\glossentry}[2]{%
\item[\glsentryitem{##1}%
\glstarget{##1}{\glossentryname{##1}}]
\glossentrydesc{##1}\glspostdescription\space ##2%
% check if the user1 key has been supplied:
\ifglshasfield{useri}{##1}%
{% do cross-reference
\newline
\glsletentryfield{\crossrefs}{##1}{useri}%
\glsseeformat[\emph{Véase:}]{\crossrefs}{}%
}%
{}%
}%
}
\setglossarystyle{crossreflist}
%% deshabilitamos mostrar el número de página
%\renewcommand{\glossaryentrynumbers}[1]{Véase página #1.}
\renewcommand{\delimN}{, }
\renewcommand{\delimR}{--}
%% Instrucciones de salida
%\printnoidxglossary[type=\acronymtype,title={Índice de siglas}]
%\printnoidxglossary[title={Glosario de términos}]
\usepackage{url}%[allowmove]
\Urlmuskip = 0mu plus 1mu
\def\UrlBreaks{\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do.\do:\do\%\do?\do_\do-\do+\do/\do\#\do~}
\def\UrlFont{\rm}
% configuración de los valores decimales de los cuadros
\usepackage{siunitx}
\sisetup{output-decimal-marker={.},
group-separator={\hspace{0.15em}},
group-minimum-digits=3,
table-text-alignment=center,
detect-all,
per-mode=fraction}
% Comando para insertar una página en blanco
\newcommand{\PaginaEnBlanco}{
\newpage
\thispagestyle{empty}
{\textcolor{white}{.}} % Punto invisible para forzar la página
}
% declaramos los condicionales
\newif\ifPDF
\newif\ifBNPDF
\newif\ifPNGEPUB
\newif\ifHTMLEPUB
\newif\ifHTML