# 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}
"""
