I'm using a modified version of the template.tex
provided on the Quarto github page. I do not include toc.tex
but have moved some of its code into the template. I've not needed to modify any of the other partials. These changes were made so that I can use QMDs for the front matter, which are imported in the required index.qmd
. This also allows me to avoid setting \frontmatter
, so I can have roman page numbers throughout, as required by the style guide.
I'm saying that the lines quoted above appear in my output.tex
, but I cannot account for them in the provided template or partials. I've not added them.
Here's the YAML:
project:
title: "Project Title"
type: book
output-dir: manuscript
book:
title: "Book Title"
subtitle: "Book Subtitle"
author: "My Name"
date: today
chapters:
- index.qmd
- 21-intro.qmd
- 22-lit_review.qmd
- 23-prob_statement.qmd
- 24-methods.qmd
- 25-results.qmd
- 26-conclusions.qmd
- 27-references.qmd
appendices:
- 31-firstapp.qmd
bibliography: references.bib
format:
pdf:
toc: true
toc-depth: 3
toc-title: Table of Contents
lof: true
lot: true
# Numbering
number-sections: true
# Fonts
mainfont: Georgia
sansfont: Verdana
monofont: Source Code Pro
fontsize: 12pt
microtypeoptions: ["final"]
# Colors
colorlinks: true
# Layout
documentclass: scrbook
classoption:
- oneside
- open=any
geometry:
- margin=1in
- bindingoffset=0.5in
- heightrounded
- footskip=0.475in
- showframe
pagestyle: plain
# Rendering
template: tex/template.tex
keep-tex: true
And the relevant, annotated portion of my modified template.tex
:
% above here template is mostly unchanged
$title.tex()$
\begin{document}
\mainmatter
% toc.tex() not loaded, setup inlined below, tables made in index.qmd
$if(toc)$
% snip - as in toc.tex, except tableofcontents made in index.qmd
$endif$
$if(linestretch)$
\setstretch{$linestretch$}
$endif$
%%% Include chapters and appendices, starting with index.qmd
$body$
My index.qmd
, which should appear at the start of $body$
in the template:
<!-- Redefine KOMA Chapter styling in prelim material -->
\RedeclareSectionCommand[beforeskip=0pt, afterskip=24pt]{chapter}
\setkomafont{chapter}{\large\sffamily}
\renewcommand\raggedchapter{\centering}
{{< include 11-titlepage.qmd >}}
{{< include 12-abstract.qmd >}}
{{< include 13-acknowledgements.qmd >}}
<!-- Moved here from toc.tex -->
\RedeclareSectionCommand[beforeskip=0pt, afterskip=48pt]{chapter}
\tableofcontents
\addcontentsline{toc}{chapter}{Table of Contents}
\listoftables
\addcontentsline{toc}{chapter}{List of Tables}
\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}
\RedeclareSectionCommand[beforeskip=0pt, afterskip=24pt]{chapter}
And the relevant portion of the resulting output.tex
file, with comments added to explain:
% from my version of the template
\begin{document}
\mainmatter
% from ToC setup in my version of the template
\renewcommand*\contentsname{Table of Contents}
{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{2}
}
% these lines are not from my template or index.qmd
\bookmarksetup{startatroot}
\hypertarget{section}{%
\chapter{}\label{section}}
% the next lines come from index.qmd
\RedeclareSectionCommand[beforeskip=0pt, afterskip=24pt]{chapter}
\setkomafont{chapter}{\large\sffamily}
\renewcommand\raggedchapter{\centering}
Unless I'm missing something (entirely possible - my first real foray into Quarto, LaTeX, and Pandoc), these lines are being added by a part of the build process that I don't have access to.
Hope that makes sense.