Pandoc 不在自定义环境中转换列表
Pandoc not converting list inside custom environment
我使用自定义环境在 LaTex 文件中生成定理、引理、命题等,如下所示:
\newtheorem{thm}{Theorem}
当我使用 Markdown+pandoc 时,我写:
\thm{A theorem.}
我得到了想要的结果。
但是当我想在其中使用一个列表时:
\thm{A theorem.
1. Item1
2. Item2 }
我得到:
1.定理1.一个定理.
- 项目 1 2.项目 2
我不知道如何解决这个问题。任何建议将不胜感激。
虽然可以通过使用 markdown_in_html_blocks
扩展将 Markdown 包含在 HTML 块中,但对于 LaTeX 则不然。 pandoc 错误跟踪器中有一个 open issue for this。
解决这个问题的方法是非常清楚你的文本的哪一部分是 LaTeX:
`\thm{`{=latex}A theorem.
1. Item1
2. Item2
`}`{=latex}
您也可以使用 Lua filter similar to the ones described and 。
我使用自定义环境在 LaTex 文件中生成定理、引理、命题等,如下所示:
\newtheorem{thm}{Theorem}
当我使用 Markdown+pandoc 时,我写:
\thm{A theorem.}
我得到了想要的结果。 但是当我想在其中使用一个列表时:
\thm{A theorem.
1. Item1
2. Item2 }
我得到:
1.定理1.一个定理.
- 项目 1 2.项目 2
我不知道如何解决这个问题。任何建议将不胜感激。
虽然可以通过使用 markdown_in_html_blocks
扩展将 Markdown 包含在 HTML 块中,但对于 LaTeX 则不然。 pandoc 错误跟踪器中有一个 open issue for this。
解决这个问题的方法是非常清楚你的文本的哪一部分是 LaTeX:
`\thm{`{=latex}A theorem.
1. Item1
2. Item2
`}`{=latex}
您也可以使用 Lua filter similar to the ones described