nimdoc.tex.cfg 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # This is the config file for the documentation generator that produces TeX
  2. # output.
  3. # (c) 2012 Andreas Rumpf
  4. # Feel free to edit the templates as you need.
  5. split.item.toc = "20"
  6. # too long entries in the table of contents wrap around
  7. # after this number of characters
  8. doc.section = """
  9. \chapter{$sectionTitle}\label{$sectionID}
  10. \begin{description}
  11. $content
  12. \end{description}
  13. """
  14. doc.section.toc = ""
  15. # $sectionID $sectionTitleID $sectionTitle $content
  16. doc.item = """
  17. \item[\texttt{$header}\label{$itemID}]\mbox{~}\\*
  18. $desc
  19. """
  20. doc.item.toc = ""
  21. # \item $name\ref{$itemID}
  22. doc.toc = r"\tableofcontents \newpage"
  23. doc.body_toc = """
  24. $tableofcontents
  25. $moduledesc
  26. $content
  27. """
  28. doc.body_no_toc = """
  29. $moduledesc
  30. $content
  31. """
  32. doc.file = """
  33. % This file was generated by Nim.
  34. % Generated: $date $time UTC
  35. \documentclass[a4paper]{article}
  36. \usepackage[left=2cm,right=3cm,top=3cm,bottom=3cm]{geometry}
  37. \usepackage[utf8]{inputenc}
  38. \usepackage[T1]{fontenc}
  39. \usepackage{graphicx}
  40. \usepackage{lmodern}
  41. \usepackage{fancyvrb, courier}
  42. \usepackage{tabularx}
  43. \usepackage{hyperref}
  44. \begin{document}
  45. \title{$title $version}
  46. \author{$author}
  47. \tolerance 1414
  48. \hbadness 1414
  49. \emergencystretch 1.5em
  50. \hfuzz 0.3pt
  51. \widowpenalty=10000
  52. \vfuzz \hfuzz
  53. \raggedbottom
  54. \maketitle
  55. \newenvironment{rstpre}{\VerbatimEnvironment\begingroup\begin{Verbatim}[fontsize=\footnotesize , commandchars=\\\{\}]}{\end{Verbatim}\endgroup}
  56. % to pack tabularx into a new environment, special syntax is needed :-(
  57. \newenvironment{rsttab}[1]{\tabularx{\linewidth}{#1}}{\endtabularx}
  58. \newcommand{\rstsub}[1]{\raisebox{-0.5ex}{\scriptsize{#1}}}
  59. \newcommand{\rstsup}[1]{\raisebox{0.5ex}{\scriptsize{#1}}}
  60. \newcommand{\rsthA}[1]{\section{#1}}
  61. \newcommand{\rsthB}[1]{\subsection{#1}}
  62. \newcommand{\rsthC}[1]{\subsubsection{#1}}
  63. \newcommand{\rsthD}[1]{\paragraph{#1}}
  64. \newcommand{\rsthE}[1]{\paragraph{#1}}
  65. \newcommand{\rstovA}[1]{\section*{#1}}
  66. \newcommand{\rstovB}[1]{\subsection*{#1}}
  67. \newcommand{\rstovC}[1]{\subsubsection*{#1}}
  68. \newcommand{\rstovD}[1]{\paragraph*{#1}}
  69. \newcommand{\rstovE}[1]{\paragraph*{#1}}
  70. % Syntax highlighting:
  71. \newcommand{\spanDecNumber}[1]{#1}
  72. \newcommand{\spanBinNumber}[1]{#1}
  73. \newcommand{\spanHexNumber}[1]{#1}
  74. \newcommand{\spanOctNumber}[1]{#1}
  75. \newcommand{\spanFloatNumber}[1]{#1}
  76. \newcommand{\spanIdentifier}[1]{#1}
  77. \newcommand{\spanKeyword}[1]{\textbf{#1}}
  78. \newcommand{\spanStringLit}[1]{#1}
  79. \newcommand{\spanLongStringLit}[1]{#1}
  80. \newcommand{\spanCharLit}[1]{#1}
  81. \newcommand{\spanEscapeSequence}[1]{#1}
  82. \newcommand{\spanOperator}[1]{#1}
  83. \newcommand{\spanPunctuation}[1]{#1}
  84. \newcommand{\spanComment}[1]{\emph{#1}}
  85. \newcommand{\spanLongComment}[1]{\emph{#1}}
  86. \newcommand{\spanRegularExpression}[1]{#1}
  87. \newcommand{\spanTagStart}[1]{#1}
  88. \newcommand{\spanTagEnd}[1]{#1}
  89. \newcommand{\spanKey}[1]{#1}
  90. \newcommand{\spanValue}[1]{#1}
  91. \newcommand{\spanRawData}[1]{#1}
  92. \newcommand{\spanAssembler}[1]{#1}
  93. \newcommand{\spanPreprocessor}[1]{#1}
  94. \newcommand{\spanDirective}[1]{#1}
  95. \newcommand{\spanCommand}[1]{#1}
  96. \newcommand{\spanRule}[1]{#1}
  97. \newcommand{\spanHyperlink}[1]{#1}
  98. \newcommand{\spanLabel}[1]{#1}
  99. \newcommand{\spanReference}[1]{#1}
  100. \newcommand{\spanOther}[1]{#1}
  101. \newcommand{\spantok}[1]{\frame{#1}}
  102. $content
  103. \end{document}
  104. """