Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

357 lines
9.5KB

  1. \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
  2. \PassOptionsToPackage{hyphens}{url}
  3. $if(colorlinks)$
  4. \PassOptionsToPackage{usenames,dvipsnames,table}{color}
  5. $endif$
  6. %
  7. \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
  8. $if(beamerarticle)$
  9. \usepackage{beamerarticle} % needs to be loaded first
  10. $endif$
  11. $if(fontfamily)$
  12. \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
  13. $else$
  14. \usepackage{lmodern}
  15. $endif$
  16. $if(linestretch)$
  17. \usepackage{setspace}
  18. \setstretch{$linestretch$}
  19. $endif$
  20. \usepackage{amssymb,amsmath}
  21. \usepackage{ifxetex,ifluatex}
  22. \usepackage{fixltx2e} % provides \textsubscript
  23. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  24. \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
  25. \usepackage[utf8]{inputenc}
  26. $if(euro)$
  27. \usepackage{eurosym}
  28. $endif$
  29. \else % if luatex or xelatex
  30. $if(mathspec)$
  31. \ifxetex
  32. \usepackage{mathspec}
  33. \else
  34. \usepackage{unicode-math}
  35. \fi
  36. $else$
  37. \usepackage{unicode-math}
  38. $endif$
  39. \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
  40. $for(fontfamilies)$
  41. \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
  42. $endfor$
  43. $if(euro)$
  44. \newcommand{\euro}{€}
  45. $endif$
  46. $if(mainfont)$
  47. \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
  48. $else$
  49. \setmainfont{LinLibertineO}
  50. $endif$
  51. $if(sansfont)$
  52. \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
  53. $else$
  54. \setsansfont{Carlito}
  55. $endif$
  56. $if(monofont)$
  57. \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
  58. $else$
  59. \setmonofont[Mapping=tex-ansi]{DejaVuSansMono}
  60. $endif$
  61. $if(mathfont)$
  62. $if(mathspec)$
  63. \ifxetex
  64. \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  65. \else
  66. \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  67. \fi
  68. $else$
  69. \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  70. $endif$
  71. $endif$
  72. $if(CJKmainfont)$
  73. \ifxetex
  74. \usepackage{xeCJK}
  75. \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
  76. \fi
  77. $endif$
  78. $if(luatexjapresetoptions)$
  79. \ifluatex
  80. \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
  81. \fi
  82. $endif$
  83. $if(CJKmainfont)$
  84. \ifluatex
  85. \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
  86. \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
  87. \fi
  88. $endif$
  89. \fi
  90. % use upquote if available, for straight quotes in verbatim environments
  91. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  92. % use microtype if available
  93. \IfFileExists{microtype.sty}{%
  94. \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
  95. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  96. }{}
  97. $if(indent)$
  98. $else$
  99. % \IfFileExists{parskip.sty}{%
  100. % \usepackage{parskip}
  101. % }{% else
  102. % \setlength{\parindent}{0pt}
  103. % \setlength{\parskip}{6pt plus 2pt minus 1pt}
  104. % }
  105. $endif$
  106. $if(verbatim-in-note)$
  107. \usepackage{fancyvrb}
  108. $endif$
  109. \usepackage{hyperref}
  110. \hypersetup{
  111. $if(title-meta)$
  112. pdftitle={$title-meta$},
  113. $endif$
  114. $if(author-meta)$
  115. pdfauthor={$author-meta$},
  116. $endif$
  117. $if(keywords)$
  118. pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
  119. $endif$
  120. $if(colorlinks)$
  121. colorlinks=true,
  122. linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
  123. citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
  124. urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
  125. $else$
  126. pdfborder={0 0 0},
  127. $endif$
  128. breaklinks=true}
  129. \urlstyle{tt}
  130. $if(verbatim-in-note)$
  131. \VerbatimFootnotes % allows verbatim text in footnotes
  132. $endif$
  133. $if(geometry)$
  134. \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
  135. $else$
  136. \usepackage{geometry}
  137. \geometry{paper=a4paper, left=2.5cm, right=2cm, bottom=3.5cm, foot=2cm, top=3.5cm, head=2cm}
  138. $endif$
  139. $if(lang)$
  140. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  141. \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
  142. $if(babel-newcommands)$
  143. $babel-newcommands$
  144. $endif$
  145. \else
  146. % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
  147. \usepackage{polyglossia}
  148. \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
  149. $for(polyglossia-otherlangs)$
  150. \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
  151. $endfor$
  152. \fi
  153. $endif$
  154. $if(natbib)$
  155. \usepackage[$natbiboptions$]{natbib}
  156. \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
  157. $endif$
  158. $if(biblatex)$
  159. \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
  160. $for(bibliography)$
  161. \addbibresource{$bibliography$}
  162. $endfor$
  163. $endif$
  164. $if(listings)$
  165. \usepackage{listings}
  166. \usepackage[dvipsnames,table]{xcolor}
  167. \input{syntax.tex}
  168. \newcommand{\passthrough}[1]{\texttt{#1}}
  169. $endif$
  170. $if(lhs)$
  171. \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
  172. $endif$
  173. $if(highlighting-macros)$
  174. $highlighting-macros$
  175. $endif$
  176. $if(tables)$
  177. \usepackage{longtable,booktabs}
  178. % Fix footnotes in tables (requires footnote package)
  179. \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{}
  180. $endif$
  181. \usepackage{graphicx,grffile}
  182. \makeatletter
  183. \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
  184. \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
  185. \makeatother
  186. % Scale images if necessary, so that they will not overflow the page
  187. % margins by default, and it is still possible to overwrite the defaults
  188. % using explicit options in \includegraphics[width, height, ...]{}
  189. \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
  190. % headers y footers a medida
  191. \usepackage{lastpage}
  192. \usepackage{fancyhdr}
  193. \pagestyle{fancy}
  194. \fancyhf{} % clear all header and footer fields
  195. $if(docnumber)$
  196. \lhead{$docnumber$}
  197. $endif$
  198. \lfoot{\scriptsize{$if(date)$ $date$ $endif$ / $if(hash)$ \texttt{$hash$} $endif$}}
  199. \rfoot{\thepage/\pageref{LastPage}}
  200. \rhead{\includegraphics[height=10pt]{logo}}
  201. \renewcommand{\headrulewidth}{0.0pt}
  202. \renewcommand{\footrulewidth}{0.4pt}
  203. \fancypagestyle{plain}{%
  204. \fancyhf{} % clear all header and footer fields
  205. $if(hash)$
  206. % \lhead{\scriptsize{\texttt{$hash$}}}
  207. \rfoot{\scriptsize{\texttt{$hash$}}}
  208. $endif$
  209. \renewcommand{\headrulewidth}{0pt}
  210. \renewcommand{\footrulewidth}{0pt}}
  211. $if(links-as-notes)$
  212. % Make links footnotes instead of hotlinks:
  213. \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
  214. $endif$
  215. $if(strikeout)$
  216. \usepackage[normalem]{ulem}
  217. % avoid problems with \sout in headers with hyperref:
  218. \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
  219. $endif$
  220. \setlength{\emergencystretch}{3em} % prevent overfull lines
  221. \providecommand{\tightlist}{%
  222. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  223. $if(numbersections)$
  224. \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
  225. $else$
  226. \setcounter{secnumdepth}{0}
  227. $endif$
  228. $if(subparagraph)$
  229. $else$
  230. % Redefines (sub)paragraphs to behave more like sections
  231. \ifx\paragraph\undefined\else
  232. \let\oldparagraph\paragraph
  233. \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
  234. \fi
  235. \ifx\subparagraph\undefined\else
  236. \let\oldsubparagraph\subparagraph
  237. \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
  238. \fi
  239. $endif$
  240. $if(dir)$
  241. \ifxetex
  242. % load bidi as late as possible as it modifies e.g. graphicx
  243. $if(latex-dir-rtl)$
  244. \usepackage[RTLdocument]{bidi}
  245. $else$
  246. \usepackage{bidi}
  247. $endif$
  248. \fi
  249. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  250. \TeXXeTstate=1
  251. \newcommand{\RL}[1]{\beginR #1\endR}
  252. \newcommand{\LR}[1]{\beginL #1\endL}
  253. \newenvironment{RTL}{\beginR}{\endR}
  254. \newenvironment{LTR}{\beginL}{\endL}
  255. \fi
  256. $endif$
  257. \usepackage{subfig}
  258. % SIunits
  259. \usepackage{siunitx}
  260. % set default figure placement to htbp
  261. \makeatletter
  262. \def\fps@figure{htbp}
  263. \pretocmd\env@cases{\def\@rowc@lors{}}{}{}
  264. \pretocmd\start@align{\def\@rowc@lors{}}{}{}
  265. \makeatother
  266. % fuente para los captions de figuras
  267. \usepackage{caption}
  268. \renewcommand{\captionfont}{\sf\small}
  269. % \renewcommand{\captionlabelfont}{\bf\sf}
  270. $for(header-includes)$
  271. $header-includes$
  272. $endfor$
  273. $if(title)$
  274. \title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
  275. $endif$
  276. $if(subtitle)$
  277. \providecommand{\subtitle}[1]{}
  278. \subtitle{$subtitle$}
  279. $endif$
  280. $if(author)$
  281. \author{$for(author)$$author$$sep$ \and $endfor$}
  282. $endif$
  283. $if(institute)$
  284. \providecommand{\institute}[1]{}
  285. \institute{$for(institute)$$institute$$sep$ \and $endfor$}
  286. $endif$
  287. \date{$date$}
  288. \begin{document}
  289. % \thispagestyle{empty}
  290. % \thispagestyle{plain}
  291. $if(title)$
  292. \maketitle
  293. $endif$
  294. $for(include-before)$
  295. $include-before$
  296. $endfor$
  297. $if(toc)$
  298. {
  299. $if(colorlinks)$
  300. \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
  301. $endif$
  302. \setcounter{tocdepth}{$toc-depth$}
  303. \tableofcontents
  304. \pagebreak
  305. }
  306. $endif$
  307. $if(lot)$
  308. \listoftables
  309. \pagebreak
  310. $endif$
  311. $if(lof)$
  312. \listoffigures
  313. \pagebreak
  314. $endif$
  315. % vectors done right
  316. \renewcommand{\vec}[1]{\ensuremath\mathbf{#1}}
  317. $body$
  318. $if(natbib)$
  319. $if(bibliography)$
  320. $if(biblio-title)$
  321. $if(book-class)$
  322. \renewcommand\bibname{$biblio-title$}
  323. $else$
  324. \renewcommand\refname{$biblio-title$}
  325. $endif$
  326. $endif$
  327. \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
  328. $endif$
  329. $endif$
  330. $if(biblatex)$
  331. \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
  332. $endif$
  333. $for(include-after)$
  334. $include-after$
  335. $endfor$
  336. \end{document}