convert titled environments with Pandoc from latex to markdown

33 Views Asked by At

I want to convert my latex documents to markdown which I can use in obsidian. However, when I use pandoc, it transforms a latex environment such as

\begin{thm}[Theorem name]
 This is a theorem
\end{thm}

into

::: thm
** 1** (Theorem name). *This is a theorem*
:::

Instead, I would like it to turn into a callout

> [!thm] **1** Theorem name 
> *This is a theorem*

I hoped I could just find the corresponding readers and writers in pandoc and change them a little bit, but it seems to be written in Haskell and I can barely understand what happens there. Also, I tried to look for some examples of how to customize the reader or writer, and found very few sources, which were not too helpful at the end.

I would appreciate any help with this, either if there is already such a way to do it, or a good place to learn enough about pandoc in order to do it myself (which might be extra helpful, since I might have more such conversion problems in the future).

0

There are 0 best solutions below