在CODE CELL執行latex失敗
執行:
%%latex
\begin{align}
f(x)=\tanh(x)=\frac{(e^x-e^{-x})}{(e^x+e^{-x})}
\end{align}
會出現EXCEPTION
The analogue of IPython's `%%latex` is
```
display("text/latex", """
...latex text...
""")
```
in Julia. Note, however, that `$` and `\` in the LaTeX text
needs to be escaped as `\$` and `\\` so that they aren't
interpreted by Julia. See, however, the
[LaTeXStrings package](https://github.com/stevengj/LaTeXStrings.jl
)
for easier input of LaTeX text as
L"""
...latex text...
"""
without requiring any extra backslashes.
回答列表
-
2020/04/03 下午 10:47James Huang贊同數:0不贊同數:0留言數:0
謝謝您的提問,這個問題是在投影片中未說清楚的,在 IJulia 中無法使用在 Code Cell 中用上面語法寫 LaTeX,但是此語法在 Python Kernel 是被支援的。
作業的部分請採用 Markdown Cell 以 inline 或是 block 模式撰寫即可。
抱歉造成困擾,投影片內容會再進行更新。
-
2020/04/07 上午 11:56CUPOY贊同數:0不贊同數:0留言數:0
Yalan Chang 您好:投影片內容已更新,感謝您的回饋!