[英]LaTeX in RST processed with Pandoc
我想使用ReStructuredText来记笔记,我有时想用LaTeX将方程式添加到笔记中。 我跟着这两个答案的意见这个问题,但他们都没有为我工作。 我有一个名为foo.rst
的RST文件, foo.rst
包含以下内容:
.. role:: latex(raw)
:format: latex
==============
This is a test
==============
Test with latex role :latex:`\Delta X`
Test with raw role :raw:`\Delta X`
Test with raw role and $ :raw:`$\Delta X$`
Test with raw role and $ :raw:`$\Delta X$`
然后,当我使用pandoc -o foo.pdf foo.rst
将其编译为pdf时,我得到了这个输出。
如果我第一次编译到tex,我得到这个:
\section{This is a test}\label{this-is-a-test}
Test with latex role \textbackslash{}Delta X
Test with raw role \textbackslash{}Delta X
Test with raw role and \$ \$\textbackslash{}Delta X\$
Test with raw role and \$ \$\textbackslash{}Delta X\$
它似乎正在逃避raw
和latex
指令中的文本。 有没有办法使用内联LaTeX与pandoc和RST?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.