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