template.tex 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. % -----------------------------------------------
  2. % Pandoc LaTeX Template for TLDR Pages
  3. % -----------------------------------------------
  4. % Partly from The Little MongoDB Book
  5. % github.com/karlseguin/the-little-mongodb-book
  6. % -----------------------------------------------
  7. \documentclass[
  8. 12pt, % font size
  9. DIV12, % space / margins
  10. a4paper, % paper format
  11. oneside, % one-sided document
  12. ]{scrreprt}
  13. % Typography
  14. \usepackage[no-math]{fontspec}
  15. \defaultfontfeatures{Scale = MatchLowercase}
  16. % Fonts
  17. \setmainfont[Ligatures = TeX]{Verdana}
  18. \setsansfont[Ligatures = TeX]{Verdana}
  19. \setmonofont{Consolas}
  20. % Set Sans font in headings
  21. \usepackage{sectsty}
  22. \allsectionsfont{\sffamily}
  23. % Set polyglossia language
  24. \usepackage{polyglossia}
  25. \setdefaultlanguage{english}
  26. % -----------------------------------------------
  27. % Project specific changes
  28. % -----------------------------------------------
  29. % fix for pandoc 1.14 (from https://github.com/mpastell/Pweave/pull/29/)
  30. \providecommand{\tightlist}{
  31. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  32. % Disable section numbers
  33. \setcounter{secnumdepth}{0}
  34. % Print program synopsis as normal but a bit bigger text
  35. \def\quote{\large}
  36. % Set en dash as list item
  37. \renewcommand{\labelitemi}{--}
  38. % Decrease indentation of list items
  39. \usepackage{enumitem}
  40. \setlist[itemize,1]{
  41. leftmargin = 11pt,
  42. itemindent = 0pt,
  43. }
  44. % Align commands with list items
  45. \setlength{\parindent}{11pt}
  46. % -----------------------------------------------
  47. % Colors, Listings and Links
  48. % -----------------------------------------------
  49. \usepackage{xcolor}
  50. \usepackage{listings}
  51. \definecolor{tldrBlue}{HTML}{0074d9}
  52. \lstset{
  53. moredelim = *[is][\color{tldrBlue}]{\{\{}{\}\}}, % the magic for the blue
  54. basicstyle = \ttfamily, % monospace font for code
  55. backgroundcolor = \color{white}, % for multiline code samples (there are none atm)
  56. extendedchars = true,
  57. breaklines = true,
  58. keepspaces = true, % if not set to true, the space between two following variables is removed when setting `basicstyle` (why? WHY?)
  59. }
  60. \usepackage[
  61. linktoc = all % link the text and the page number in the TOC
  62. ]{hyperref}
  63. % -----------------------------------------------
  64. % The Document
  65. % -----------------------------------------------
  66. \begin{document}
  67. \thispagestyle{plain}
  68. \begin{titlepage}
  69. \begin{center}
  70. \vspace*{11em}
  71. \huge{\textbf{TLDR Pages}}\\[1em]
  72. \LARGE{The Book}\\[3em]
  73. \large{Simplified and community-driven man pages}\\[1em]
  74. \ttfamily{\href{https://tldr-pages.github.io}{tldr-pages.github.io}}
  75. \end{center}
  76. \end{titlepage}
  77. \tableofcontents % Table of Contents #usefulcomments
  78. $body$ % this is were pandoc hooks in
  79. \end{document}