aboutsummaryrefslogtreecommitdiff
path: root/tools/template.latex
blob: 66fb9970142c8e5a5bec471afc2d0ea6b097e646 (plain)
  1. \documentclass[10pt,letterpaper,twosides]{report}
  2. \usepackage{lmodern}
  3. \usepackage{amssymb,amsmath}
  4. \usepackage{ifxetex,ifluatex}
  5. \usepackage{fixltx2e} % provides \textsubscript
  6. \usepackage[margin=1in]{geometry}
  7. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  8. \usepackage[T1]{fontenc}
  9. \usepackage[utf8]{inputenc}
  10. \else % if luatex or xelatex
  11. \ifxetex
  12. \usepackage{mathspec}
  13. \usepackage{xltxtra,xunicode}
  14. \else
  15. \usepackage{fontspec}
  16. \fi
  17. \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
  18. \newcommand{\euro}{€}
  19. \fi
  20. % use upquote if available, for straight quotes in verbatim environments
  21. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  22. % use microtype if available
  23. \IfFileExists{microtype.sty}{%
  24. \usepackage{microtype}
  25. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  26. }{}
  27. \usepackage{framed} % code examples
  28. \usepackage{color}
  29. $if(geometry)$
  30. \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
  31. $endif$
  32. \usepackage{hyperref}
  33. $if(colorlinks)$
  34. \PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
  35. $endif$
  36. \hypersetup{unicode=true,
  37. $if(title-meta)$
  38. pdftitle={$title-meta$},
  39. $endif$
  40. $if(author-meta)$
  41. pdfauthor={$author-meta$},
  42. $endif$
  43. $if(keywords)$
  44. pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
  45. $endif$
  46. $if(colorlinks)$
  47. colorlinks=true,
  48. linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
  49. citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
  50. urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
  51. $else$
  52. pdfborder={0 0 0},
  53. $endif$
  54. breaklinks=true}
  55. \urlstyle{same} % don't use monospace font for urls
  56. \usepackage{fancyvrb}
  57. \VerbatimFootnotes % allows verbatim text in footnotes
  58. $if(links-as-notes)$
  59. % Make links footnotes instead of hotlinks:
  60. \renewcommand{\href}[2]{#2\footnote{\url{#1}}}
  61. $endif$
  62. $if(indent)$
  63. $else$
  64. \IfFileExists{parskip.sty}{%
  65. \usepackage{parskip}
  66. }{% else
  67. \setlength{\parindent}{0pt}
  68. \setlength{\parskip}{6pt plus 2pt minus 1pt}
  69. }
  70. $endif$
  71. \setlength{\emergencystretch}{3em} % prevent overfull lines
  72. \providecommand{\tightlist}{%
  73. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  74. $if(numbersections)$
  75. \setcounter{secnumdepth}{5}
  76. $else$
  77. \setcounter{secnumdepth}{0}
  78. $endif$
  79. \title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
  80. \author{$for(author)$$author$$sep$ \and $endfor$}
  81. \date{$date$}
  82. \begin{document}
  83. \maketitle
  84. {
  85. \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
  86. \setcounter{tocdepth}{2}
  87. \tableofcontents
  88. }
  89. $body$
  90. \end{document}