【发布时间】:2015-02-20 20:48:30
【问题描述】:
我有一个包含大量方程式(我认为是数学)的降价文档,可以使用 Marked 2 应用程序很好地呈现。当我尝试使用 pandoc 将其转换为 pdf 以创建参考书目时,出现错误。
例如,用
\\[ \mu_{s,h,d,y} = \left\{
\begin{array}{1 1}
\omega_{s,h,d,y} + \delta_{s}(t_{s,h,d-1,y} - \omega_{s,h,d-1,y}) & \quad \text{for $t_{s,h,d-1,y}$ is real} \\
\omega_{s,h,d,y} & \quad \text{for $t_{s,h,d-1,y}$ is not real}
\end{array} \right.
\\]
看起来像
但是,当我运行时
pandoc -H format.sty -V fontsize=12pt --bibliography northeast_temperature_refs.bib --csl=american-geophysical-union.csl northeast_temperature_ms2.md -o northeast_temperature_ms.pdf --mathjax
有或没有--mathjax 我得到以下错误
! Missing $ inserted.
<inserted text>
$
l.268 \textbackslash{}{[} \mu
pandoc: Error producing PDF from TeX source
如果我尝试使用$$ 而不是\\[,例如:
$$
\mu_{s,h,d,y} = \left\{
\begin{array}
\omega_{s,h,d,y} + \delta_{s}(t_{s,h,d-1,y} - \omega_{s,h,d-1,y}) & \quad \text{for $$t_{s,h,d-1,y}$$ is real} \\
\omega_{s,h,d,y} & \quad \text{for $$t_{s,h,d-1,y}$$ is not real}
\end{array} \right.
$$
我收到以下错误:
! LaTeX Error: Illegal character in array arg.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.278 \begin{array}{1 1}
pandoc: Error producing PDF from TeX source
这是我第一次尝试在固定程序之外编写方程式,因此将不胜感激。当我对 Marked 进行快速检查时,我认为我做得很好,但显然它不像我拥有的那样与 pandoc 一起工作。
我在装有 Yosemite 的 Mac 上安装了 MacTex。
【问题讨论】: