I have LaTeX code which looks like this:
\begin{answer}
Lorem ipsum
\end{answer}
I'd like Pandoc to convert it to Markdown with inline HTML, like this:
<span style='color:red'>
Lorem ipsum
</span>
or something similar. Is there any way to do that? At the least, to include some indicator in the Markdown, even if just text ANSWER:
.
Does this require a Lua filter? How would that work?
Note: I originally asked this question on tex.stackexchange, but was advised to move it here, since it's not about LaTeX primarily.
I have LaTeX code which looks like this:
\begin{answer}
Lorem ipsum
\end{answer}
I'd like Pandoc to convert it to Markdown with inline HTML, like this:
<span style='color:red'>
Lorem ipsum
</span>
or something similar. Is there any way to do that? At the least, to include some indicator in the Markdown, even if just text ANSWER:
.
Does this require a Lua filter? How would that work?
Note: I originally asked this question on tex.stackexchange.com, but was advised to move it here, since it's not about LaTeX primarily.
Your input converts to
<div class="answer">
<p>Lorem ipsum</p>
</div>
in pandoc 3.5, which you can style with CSS, like:
.answer::before {
content: 'Answer ';
}