
運行以下程式碼時,我遇到一個相當奇怪的typesetting
錯誤:Tikz
\documentclass[]{amsart}
\usepackage{tikz,pgfplots}
\usetikzlibrary{patterns,calc,fadings,decorations}
\begin{document}
\[\begin{tikzpicture}[thick,x=2em,y=2em]
\draw [->] (0,0) -- (0:{sin(90)});
\end{tikzpicture}\]
\end{document}
上面的程式碼在 (Windows) 上運作良好,但在orMikTex
中執行時會出現此錯誤:TexLive (Ubuntu)
MacTex
Package `tikz` Error: Giving up on this path. Did you forget a `semicolon`? \draw [->] (0,0) -- (0:{sin(90)})
如果我將 (0:{sin(90)}) 改為 (0,{sin(90)}) 或 (0:{1}) 那麼它就可以正常運作。知道為什麼嗎?