I have a bookdown project with a custom template.tex and custom my-format.cls. I can do things like the following in my template.tex:
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
\tableofcontents
\begin{body}
...
and get the abstract to take my custom formatting. This works in part because the content of the abstract is just one paragraph of text, which can be placed in the YAML front matter.
However, is it possible to include an executive summary before the table of contents?
I know I can use (in my index.Rmd)
# Executive Summary {-}
a summary here
# Introduction
this is the first numbered section
But in that case even though the "Executive Summary" section header is not numbered, it appears after the TOC. Is it possible to modify the template.tex such that using something like:
$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$
$if(executive_summary)$
\begin{executivesummary}
% insert summary content here
\end{executivesummary}
$endif$
\tableofcontents
\begin{body}
...
I can peal off the content (including figures/tables/etc.) from an unnumbered executive summary section (even if it has to come from a different .Rmd file) and assign it to some (pandoc) variable that could reference in place of % If I insert summary content here above? I would also need this same content removed from the default assigned (pandoc) $body$ variable.