logo
Loading...

在CODE CELL執行latex失敗 - Cupoy

執行:%%latex\begin{align}f(x)=\tanh(x)=\frac{(e^x-e^...

cvdl-2,cvdl-2-d02

在CODE CELL執行latex失敗

2020/04/03 04:54 AM
Julia程式語言論壇
Yalan Chang
觀看數:0
回答數:2
收藏數:1
cvdl-2
cvdl-2-d02

執行:

%%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.