问题
In this question I explained my goal: creating accompanying slides for a bookdown project. I chose the Beamer
format for the slides and was happy.
However, upgrading to Pandoc 2.7
onwards (>2.6) caused my project to produce undesired slides. Specifically, any previously ignored content is now thrown into an ad-hoc slide! I find this behavior quite odd, as my understanding was that choosing slide_level: 3
meant ###
was needed to create a slide!
After insane amount of hours, I found what caused the issue: https://github.com/jgm/pandoc/issues/4317, leading to this change.
I have tried so many things, impossible to list them all. At the end of the day, no matter what I tried, my content ends up in a slide!! I thought at least
```{=beamer}
\mode<presentation>
{
\title[Lecture1]{\CourseName{} \newline \, Lecture 1}
\date{\DayOne{}}
}
```
would escape from being thrown in a slide: nope.
Here is the actual code attempt in my .rmd
file:
`r if (out_type=="beamer") "##\n"`
```{=beamer}
\mode<presentation>
{
\title[Lecture1]{\CourseName{} \newline \, Lecture 1}
\date{\DayOne{}}
}
```
leads to the following .tex
file:
\hypertarget{section-1}{%
\subsection{}\label{section-1}}
\begin{frame}{}
\mode<presentation>
{
\title[Lecture1]{\CourseName{} \newline \, Lecture 1}
\date{\DayOne{}}
}
\end{frame}
and you can see the \mode<presentation>
is now slapped onto a slide instead of doing its previous job...
Until pandoc 2.7
, with my \mode
command above, i was able to change the title slide for each chapter (syllaybus -> lecture 1 -> lecture 2 -> etc...). Now, I can no longer achieve this, instead, I am getting an undesired, unrequested slide - I guess I am left with rolling back to pandoc 2.6
?
I am sure there is a better way and I sincerely apologize for having failed to find it. Much appreciated any help I can get with this - it's been a few months now :-(
来源:https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand