我正在尝试标记一些 3D 图形。以下是 MWE:
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[scale=2.54,tdplot_main_coords]
\def\a{0.5}
\draw[->] (0,0,0) -- (1,0,0) node[anchor=north east]{x};
\draw[->] (0,0,0) -- (0,1,0) node[anchor=north west]{y};
\draw[,->] (0,0,0) -- (0,0,1) node[anchor=south]{z};
\coordinate (E) at (\a,0,0);
\coordinate (A) at (0,0,0);
\coordinate (B) at (0,\a,0);
\coordinate (C) at (0,0,\a);
\tkzMarkAngle[size=0.2cm,draw=red](B,A,C);
% \tkzMarkAngle[size=0.2cm,draw=blue](C,A,E);
\end{tikzpicture}
\end{document}
这正是我希望的效果: 但是,删除注释行会导致图像左侧出现额外的空白。有什么方法可以禁用此功能吗?我有一张更复杂的图像,我想依次标记不同的角度,但我不能每次都改变大小:
答案1
使用 CTAN 上最新版本的 tkz-euclide版本 3.01c
你不需要加载 TikZ,因为tikz-3dplot
加载tkz-euclide
TikZ
\documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\usepackage{tkz-euclide}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[scale=2.54,tdplot_main_coords]
\def\a{0.5}
\draw[->] (0,0,0) -- (1,0,0) node[anchor=north east]{x};
\draw[->] (0,0,0) -- (0,1,0) node[anchor=north west]{y};
\draw[,->] (0,0,0) -- (0,0,1) node[anchor=south]{z};
\coordinate (E) at (\a,0,0);
\coordinate (A) at (0,0,0);
\coordinate (B) at (0,\a,0);
\coordinate (C) at (0,0,\a);
\tkzMarkAngle[size=0.2cm,draw=red](B,A,C);
\tkzMarkAngle[size=0.2cm,draw=blue](C,A,E);
\end{tikzpicture}
\end{document}