blob: 4fb1aec908af361a44d6f054708f209308bbaf2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# This is the config file for the documentation generator that produces TeX
# output.
# (c) 2012 Andreas Rumpf
# Feel free to edit the templates as you need.
split.item.toc = "20"
# too long entries in the table of contents wrap around
# after this number of characters
doc.section = """
\rsthA[$sectionTitle]{$sectionTitle}\label{$sectionID}
$content
"""
doc.section.toc = ""
# $sectionID $sectionTitleID $sectionTitle $content
doc.item = """
\vspace{1em}
\phantomsection\addcontentsline{toc}{subsubsection}{$uniqueName}
\label{$itemSymOrID}\hypertarget{$itemSymOrID}{}
\begin{rstdocitem}
$header
\end{rstdocitem}
\begin{addmargin}[0.05\linewidth]{0pt}
$desc
\end{addmargin}
"""
doc.item2 = """
\phantomsection\addcontentsline{toc}{subsection}{$header_plain}
\label{$overloadGroupName}\hypertarget{$overloadGroupName}{}
$content
"""
doc.item.toc = ""
doc.toc = r"\tableofcontents \newpage"
doc.body_toc = """
$tableofcontents
$moduledesc
$content
"""
doc.body_no_toc = """
$moduledesc
$content
"""
# $1 - number of listing in document, $2 - language (e.g. langNim), $3 - anchor
doc.listing_start = "\\begin{rstpre}\n"
doc.listing_end = "\n\\end{rstpre}\n\n"
doc.file = """
% This file was generated by Nim.
% Generated: $date $time UTC
%
% Compile it by: xelatex (up to 3 times to get labels generated)
% -------
% For example:
% xelatex file.tex
% xelatex file.tex
% makeindex file
% xelatex file.tex
%
\documentclass{nimdoc}
\begin{document}
\title{$title $version $subtitle}
\author{$author}
\maketitle
$content
\printindex
\end{document}
"""
|