Inserting a page before the table of content in a Quarto book (.pdf
format)
#11386
-
DescriptionI've a Quarto book project. I'd like to add a page before the table of content. Tweaking template partials seems to be the solution (#7389). Instead of copying the content of the For example, considering the following # First page {.unnumbered .unlisted}
Qui cupidatat minim tempor occaecat labore esse magna minim. Amet labore cupidatat eiusmod sunt. Labore aute proident cupidatat esse laborum tempor officia elit cupidatat. Aute nisi reprehenderit cillum ex laborum duis reprehenderit occaecat laborum eiusmod sunt ea et.
Veniam consequat elit dolore aliqua. Culpa mollit exercitation nulla aute in culpa. Occaecat anim Lorem nisi laboris elit velit aliqua deserunt nisi consequat.
- **a:** Velit voluptate elit ad anim cillum.
- **b:** Nisi magna fugiat veniam enim quis enim. Is it possible to do it without rewriting everything in the
$if(has-frontmatter)$
\frontmatter
$endif$
$if(title)$
$if(beamer)$
\frame{\titlepage}
$else$
\maketitle
$endif$
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$endif$
% add a command/hook to render firstpage.qmd here I've uploaded a dummy repo here if need be. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
No, you can't have markdown inside LaTeX. LaTeX does not know how to read it. It needs to be parsed first. So, write LaTeX into a file, include that file using Pandoc templating system inside the partial of your choice. |
Beta Was this translation helpful? Give feedback.
-
FWIW someone in the past manage to change placement for pdf output by suppressing toc handling by Quarto / pandoc with Anything written in the .qmd will be in |
Beta Was this translation helpful? Give feedback.
FWIW someone in the past manage to change placement for pdf output by suppressing toc handling by Quarto / pandoc with
toc: false
and inserting raw latex directly in body where to put itAnything written in the .qmd will be in
$body$
so that is one way to achieve it. Otherwise, playing with metadata variable and pandoc's template is the way for this. But the first part before toc will need to be passed a pandoc variable (directly from YAML), or using similar tricks as pandoc-ext/abstract-section indeed.