exegetes.latex 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
  2. $if(fontfamily)$
  3. \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
  4. $else$
  5. \usepackage{lmodern}
  6. $endif$
  7. $if(linestretch)$
  8. \usepackage{setspace}
  9. \setstretch{$linestretch$}
  10. $endif$
  11. \usepackage{amssymb,amsmath}
  12. \usepackage{ifxetex,ifluatex}
  13. \usepackage{fixltx2e} % provides \textsubscript
  14. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  15. \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
  16. \usepackage[utf8]{inputenc}
  17. $if(euro)$
  18. \usepackage{eurosym}
  19. $endif$
  20. \else % if luatex or xelatex
  21. \usepackage{fontspec}
  22. \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
  23. \newcommand{\euro}{€}
  24. $if(mainfont)$
  25. \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
  26. $endif$
  27. $if(sansfont)$
  28. \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
  29. $endif$
  30. $if(monofont)$
  31. \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
  32. $endif$
  33. $if(mathfont)$
  34. \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  35. $endif$
  36. \fi
  37. % use upquote if available, for straight quotes in verbatim environments
  38. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  39. % use microtype if available
  40. \IfFileExists{microtype.sty}{%
  41. \usepackage{microtype}
  42. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  43. }{}
  44. $if(geometry)$
  45. \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
  46. $endif$
  47. $if(varioref)$
  48. \usepackage{varioref}
  49. $endif$
  50. \usepackage[$if(linkborders)$hyperfootnotes=false$endif$]{hyperref}
  51. $if(moderncv)$ $else$
  52. \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
  53. $endif$
  54. \hypersetup{unicode=true,
  55. $if(title-meta)$
  56. pdftitle={$title-meta$},
  57. $endif$
  58. $if(author-meta)$
  59. pdfauthor={$author-meta$},
  60. $endif$
  61. $if(subtitle)$
  62. pdfsubject={$subtitle$},
  63. $endif$
  64. $if(keywords)$
  65. pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
  66. $endif$
  67. $if(colorlinks)$
  68. colorlinks=true,
  69. linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
  70. citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
  71. urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
  72. $else$
  73. pdfborder={0 0 0},
  74. $endif$
  75. breaklinks=true}
  76. \urlstyle{same} % don't use monospace font for urls
  77. $if(lang)$
  78. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  79. \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$$babel-lang$]{babel}
  80. $if(babel-newcommands)$
  81. $babel-newcommands$
  82. $endif$
  83. \else
  84. \usepackage{polyglossia}
  85. \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
  86. $for(polyglossia-otherlangs)$
  87. \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$$otherlang$}
  88. $endfor$
  89. \fi
  90. $endif$
  91. $if(natbib)$
  92. \usepackage{natbib}
  93. \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
  94. $endif$
  95. $if(biblatex)$
  96. \usepackage{biblatex}
  97. $for(bibliography)$
  98. \addbibresource{$bibliography$}
  99. $endfor$
  100. $endif$
  101. $if(listings)$
  102. \usepackage{listings}
  103. $endif$
  104. $if(lhs)$
  105. \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
  106. $endif$
  107. $if(highlighting-macros)$
  108. $highlighting-macros$
  109. $endif$
  110. $if(verbatim-in-note)$
  111. \usepackage{fancyvrb}
  112. \VerbatimFootnotes % allows verbatim text in footnotes
  113. $endif$
  114. $if(tables)$
  115. \usepackage{longtable,booktabs}
  116. $endif$
  117. $if(graphics)$
  118. \usepackage{graphicx,grffile}
  119. \makeatletter
  120. \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
  121. \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
  122. \makeatother
  123. % Scale images if necessary, so that they will not overflow the page
  124. % margins by default, and it is still possible to overwrite the defaults
  125. % using explicit options in \includegraphics[width, height, ...]{}
  126. \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
  127. $endif$
  128. $if(links-as-notes)$
  129. % Make links footnotes instead of hotlinks:
  130. \renewcommand{\href}[2]{#2\footnote{\url{#1}}}
  131. $endif$
  132. $if(strikeout)$
  133. \usepackage[normalem]{ulem}
  134. % avoid problems with \sout in headers with hyperref:
  135. \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
  136. $endif$
  137. $if(parindent)$
  138. \setlength{\parindent}{$parindent$}
  139. $else$
  140. \setlength{\parindent}{16pt}
  141. $endif$
  142. $if(parskip)$
  143. \setlength{\parskip}{$parskip$}
  144. $else$
  145. \setlength{\parskip}{6pt plus 2pt minus 1pt}
  146. $endif$
  147. \setlength{\emergencystretch}{3em} % prevent overfull lines
  148. \providecommand{\tightlist}{%
  149. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  150. $if(numbersections)$
  151. \setcounter{secnumdepth}{5}
  152. $else$
  153. \setcounter{secnumdepth}{0}
  154. $endif$
  155. $if(numberparagraphs)$
  156. %% numerate paragraphs with a label
  157. \newcounter{paranumero}
  158. \newcommand{\para}[1]{%
  159. \noindent\refstepcounter{paranumero}\llap{\small\bfseries\theparanumero\label{#1}.~}}
  160. $endif$
  161. $if(verbatim-in-note)$
  162. \VerbatimFootnotes % allows verbatim text in footnotes
  163. $endif$
  164. $if(dir)$
  165. \ifxetex
  166. % load bidi as late as possible as it modifies e.g. graphicx
  167. $if(latex-dir-rtl)$
  168. \usepackage[RTLdocument]{bidi}
  169. $else$
  170. \usepackage{bidi}
  171. $endif$
  172. \fi
  173. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  174. \TeXXeTstate=1
  175. \newcommand{\RL}[1]{\beginR #1\endR}
  176. \newcommand{\LR}[1]{\beginL #1\endL}
  177. \newenvironment{RTL}{\beginR}{\endR}
  178. \newenvironment{LTR}{\beginL}{\endL}
  179. \fi
  180. $endif$
  181. $if(title)$
  182. \title$if(title-short)$[$title-short$]$endif${$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$}
  183. $endif$
  184. $if(author)$
  185. \author$if(author-short)$[$author-short$]$endif${$for(author)$$author$$sep$ \and $endfor$}
  186. $endif$
  187. $if(date)$
  188. \date{$date$}
  189. $endif$
  190. $for(header-includes)$
  191. $header-includes$
  192. $endfor$
  193. \begin{document}
  194. $if(title)$
  195. \maketitle
  196. $endif$
  197. $if(abstract)$
  198. \begin{abstract}
  199. $abstract$
  200. $if(tags)$
  201. \bigskip
  202. \noindent \textbf{$if(tags-label)$$tags-label$$else$Keywords.$endif$}
  203. $for(tags)$$tags$$sep$~-- $endfor$
  204. $endif$
  205. \end{abstract}
  206. $endif$
  207. $for(include-before)$
  208. $include-before$
  209. $endfor$
  210. $if(toc)$
  211. {
  212. $if(colorlinks)$
  213. \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
  214. $endif$
  215. \setcounter{tocdepth}{$toc-depth$}
  216. $for(toc-options)$
  217. $toc-options$
  218. $endfor$
  219. \tableofcontents
  220. $for(toc-after)$
  221. $toc-after$
  222. $endfor$
  223. }
  224. $endif$
  225. $if(lot)$
  226. \listoftables
  227. $endif$
  228. $if(lof)$
  229. \listoffigures
  230. $endif$
  231. $body$
  232. $if(natbib)$
  233. $if(bibliography)$
  234. $if(biblio-title)$
  235. $if(book-class)$
  236. \renewcommand\bibname{$biblio-title$}
  237. $else$
  238. \renewcommand\refname{$biblio-title$}
  239. $endif$
  240. $endif$
  241. \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
  242. $endif$
  243. $endif$
  244. $if(biblatex)$
  245. \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
  246. $endif$
  247. $for(include-after)$
  248. $include-after$
  249. $endfor$
  250. \end{document}