Thank you so much, this is actually feasible for my use case.

I was already looking at the solution presented in https://github.com/jgm/pandoc/issues/2453#issuecomment-219233316

but this actually makes things easier for me. Thank you.

Il giorno mercoledì 11 novembre 2020 alle 09:10:04 UTC+1 Albert Krewinkel ha scritto:
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

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8c42cf82-8531-4a70-bbb1-f56de736235fn%40googlegroups.com.