我尝试了以下示例pgfmanual
,但它产生了错误。
梅威瑟:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles}
\usetikzlibrary{calc}
\pagestyle{empty}
\begin{document}
\tikz
\draw (2,0) coordinate (A) --
(0,0) coordinate (B) --
(1,1) coordinate (C)
pic ["$\alpha$", draw, ->] {angle};
\end{document}
错误:
! Missing \endcsname inserted.
<to be read again>
\alpha
l.10 pic ["$\alpha$", draw, ->]
{angle};
?
答案1
此示例需要两个 TikZ 库:angles
和quotes
。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\begin{document}
\tikz
\draw (2,0) coordinate (A) --
(0,0) coordinate (B) --
(1,1) coordinate (C)
pic ["$\alpha$", draw, ->] {angle};
\end{document}