I have asked this question on SO, but it didn't get any response, so I am tryin here as well, I hope it's not out of scope.
If I use this minimal example of a Markdown slide
### Slide
- A
- bulleted
- list
~~~{.cpp}
template<typename A>
class B {};
~~~
and convert it to LaTex Beamer with pandoc using pandoc -t beamer mwe.pd -o mwe.latex
, I get this unreadable LaTex file
\begin{frame}[fragile]{Slide}
\protect\hypertarget{slide}{}
\begin{itemize}
\tightlist
\item
A
\item
bulleted
\item
list
\end{itemize}
\begin{Shaded}
\begin{Highlighting}[]
\KeywordTok{template}\OperatorTok{\textless{}}\KeywordTok{typename}\NormalTok{ A}\OperatorTok{\textgreater{}}
\KeywordTok{class}\NormalTok{ B }\OperatorTok{\{\};}
\end{Highlighting}
\end{Shaded}
\end{frame}
What do I have to do to inform pandoc that I would like to use minted
for code highlighting (Highlighting
is a placeholder)?
Can \protect
be removed? What about the weird formatting of \item
s?
What I expected to get from this minimal example was
\begin{frame}[fragile]{Slide}
\begin{itemize}
\item A
\item bulleted
\item list
\end{itemize}
\begin{verbatim}
template<typename A>
class B {};
\end{verbatim}
\end{frame}
or something similar to that. Even if Highlighting
is a placeholder, this is practically a MWE for .md to .latex conversion, and the code in .latex is rendered unreadable by *Tok
...