nimdoc.tex.cfg 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. \rsthA[$sectionTitle]{$sectionTitle}\label{$sectionID}
  10. $content
  11. """
  12. doc.section.toc = ""
  13. # $sectionID $sectionTitleID $sectionTitle $content
  14. doc.item = """
  15. \vspace{1em}
  16. \phantomsection\addcontentsline{toc}{subsubsection}{$uniqueName}
  17. \label{$itemSymOrID}\hypertarget{$itemSymOrID}{}
  18. \begin{rstdocitem}
  19. $header
  20. \end{rstdocitem}
  21. \begin{addmargin}[0.05\linewidth]{0pt}
  22. $desc
  23. \end{addmargin}
  24. """
  25. doc.item2 = """
  26. \phantomsection\addcontentsline{toc}{subsection}{$header_plain}
  27. \label{$overloadGroupName}\hypertarget{$overloadGroupName}{}
  28. $content
  29. """
  30. doc.item.toc = ""
  31. doc.toc = r"\tableofcontents \newpage"
  32. doc.body_toc = """
  33. $tableofcontents
  34. $moduledesc
  35. $content
  36. """
  37. doc.body_no_toc = """
  38. $moduledesc
  39. $content
  40. """
  41. # $1 - number of listing in document, $2 - language (e.g. langNim), $3 - anchor
  42. doc.listing_start = "\\begin{rstpre}\n"
  43. doc.listing_end = "\n\\end{rstpre}\n\n"
  44. doc.file = """
  45. % This file was generated by Nim.
  46. % Generated: $date $time UTC
  47. %
  48. % Compile it by: xelatex (up to 3 times to get labels generated)
  49. % -------
  50. % For example:
  51. % xelatex file.tex
  52. % xelatex file.tex
  53. % makeindex file
  54. % xelatex file.tex
  55. %
  56. \documentclass{nimdoc}
  57. \begin{document}
  58. \title{$title $version $subtitle}
  59. \author{$author}
  60. \maketitle
  61. $content
  62. \printindex
  63. \end{document}
  64. """