在 sharelatex 中编译代码花费的时间太长

在 sharelatex 中编译代码花费的时间太长

我的代码有什么问题?它没有通过 Sharelatex 编译(这将花费很长时间,然后会产生超时错误)

\documentclass{article}[15pt]
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=1.5]
\draw [->, ultra thick, red](0,6)--(0,-6) node[right]{$x$};
\draw [->,ultra thick, red](6,0)--(-6,0) node[above]{$y$};
\draw (6,-2)--(-6,6);
\draw (6,6)--(-6,-2);
\draw[very thick,red]
--(3,1) node {$\tan\theta_2$};
\fill[green!20!white] (3,0)-- ++(4mm,0mm)
arc[start angle=0, end angle=143.130102, radius=4mm]--cycle
\fill[green!20!white] (-3,0)-- ++(3mm,0mm)
arc[start angle=0, end angle=56.3099, radius=4mm]--cycle
\end{tikzpicture}

\end{document}

答案1

这是因为 TiZ 无法读取最后两个\fills,因为您缺少末尾的分号:

\documentclass{article}[15pt]
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[scale=1.5]
\draw [->, ultra thick, red](0,6)--(0,-6) node[right]{$x$};
\draw [->,ultra thick, red](6,0)--(-6,0) node[above]{$y$};
\draw (6,-2)--(-6,6);
\draw (6,6)--(-6,-2);
\draw[very thick,red]
--(3,1) node {$\tan\theta_2$};
\fill[green!20!white] (3,0)-- ++(4mm,0mm)
arc[start angle=0, end angle=143.130102, radius=4mm]--cycle;% <- HERE
\fill[green!20!white] (-3,0)-- ++(3mm,0mm)
arc[start angle=0, end angle=56.3099, radius=4mm]--cycle;% <- AND HERE
\end{tikzpicture}

\end{document}

相关内容