2
的pandoc User's Guide国家(重点):如何在pandoc中使用latex宏?
对于比乳胶等输出格式,pandoc将解析乳胶\ newcommand和\ renewcommand定义和应用所产生的宏所有LaTeX的数学。因此,举例来说,下面将在所有输出格式,而不仅仅是乳胶工作:
\newcommand{\tuple}[1]{\langle #1 \rangle}
$\tuple{a, b, c}$
胶乳产量,\ newcommand定义将被简单地原样传递到输出。
例如,使用该试验的文件:
\renewcommand{\vec}[1]{\mathbf{#1}}
The gravitational force
$$\vec{g}$$
The gravitational force
$$\mathbf{g}$$
And with some code:
~~~{.cpp .numberLines startFrom="1"}
class A {};
~~~
和
<p>[1]{}</p>
<p>The gravitational force</p>
<p><br /><span class="math display">$$\vec{g}$$</span><br /></p>
<p>The gravitational force</p>
<p><br /><span class="math display"><strong>g</strong></span><br /></p>
<p>And with some code:</p>
<div class="sourceCode" startFrom="1"><table class="sourceCode cpp numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
</pre></td><td class="sourceCode"><pre><code class="sourceCode cpp"><span class="kw">class</span> A {}; </code></pre></td></tr></table></div>
与pandoc test.md -o test.html
结果转换它如果pandoc真的解析newcommand
和renewcommand
,为什么是胶乳源代码留在第一个HTML文件中g vector:
<p><br /><span class="math display">$$\vec{g}$$</span><br /></p>
而另一胶乳方程限定克载体成功转化成粗体克信?
这是不一致吗?通过调用pandoc test.md --from markdown+latex_macros -o test.html
启用latex_macros
扩展时,结果相同。
应该它不是'\ renewcommand {\ VEC} '而不是'\ renewcommand {vec}' – scoa