Pandoc tex to html: how to handle custom environments?
Asked Answered
G

1

6

I am trying to convert a large body of tex code into html using Pandoc. I have multiple custom-defined environments and commands in the LaTeX source that I would like to tag with classes in the resulting HTML.

How can I make sure that the following LaTeX code:

\begin{myspecialenvironment}
 hello
\end{myspecialenvironment}

is converted to the following HTML

<div class="myspecialenvironment">
 hello
</div>

and the following LaTeX

\myspecialcommand{hola}

converted to HTML as follows?

<span class="myspecialcommand">hola</span>
Grivet answered 25/9, 2019 at 18:26 Comment(0)
U
0

I had the same question and looked in vain for relevant documentation, but then I noticed that Pandoc is already doing what you propose, at least for block environments. :-) I don't know about inline commands.

Urata answered 6/2, 2021 at 3:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.