Thank you so much, this is actually feasible for my use case.
Please
Bernardo Giordano writes:
> Hello. I'm facing the following issue:
>
> I have a markdown document that occasionally contains latex blocks, e.g.:
>
> # My Title
>
> \epigraph{
> \begin{center}
> Markdown text inside,
> occasionally *italic*
> \end{center}
> }{some epigraph author}
>
> Normal markdown text
> ...
>
> When converting from markdown to latex, italic text keeps the * rather than
> being transformed to \emph{}. Is there a workaround? Thank you
Telling LaTeX and Markdown apart is difficult, see also
https://github.com/jgm/pandoc/issues/2453
The best workaround (IMHO) is to mark the LaTeX explicitly,
ensuring that the rest will be interpreted as Markdown:
# My Title
`\epigraph{
\begin{center}`{=latex}
Markdown text inside,
occasionally *italic*
`\end{center}
}{some epigraph author}`{=latex}
Normal markdown text
--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124