这是一个有点愚蠢的例子,无法弄清楚一个问题。我得到了错误
Dimension too large
I can't work with sizes bigger than about 19 feet.
尽管最高值只有 60pt 左右。有什么问题?
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\usetikzlibrary{decorations.markings}
\begin{tikzpicture}
\draw[postaction={decorate,decoration={markings,mark=between positions 0 and \pgfdecoratedpathlength step 10pt with {
\node {\pgfkeysvalueof{/pgf/decoration/mark info/distance from start}};}}}]
(-1.4,-0.9) -- (-1.05,-0.9) arc (-90:0:0.20) -- (-0.85,0.7) arc (180:0:0.10);
\end{tikzpicture}
\end{document}
编辑:经过额外检查,似乎\pgfkeysvalueof{/pgf/decoration/mark info/distance from start}
如果遇到半径非常小的圆弧就会失败。听起来很荒谬,但是……
答案1
薛定谔的猫有想法使用\tikzset
能够在本地安装修改veclen
。我使用进行计算xfp
以避免计算错误(TeX 限制)。此选项是 tkz-base 和 tkz-euclide 的一部分
\documentclass{standalone}
\usepackage{tkz-euclide}
\begin{document}
\usetikzlibrary{decorations.markings}
\begin{tikzpicture}[xfp]
\draw[postaction={decorate,decoration={markings,mark=between positions 0 and \pgfdecoratedpathlength step 10pt with {
\node {\pgfkeysvalueof{/pgf/decoration/mark info/distance from start}};}}}]
(-1.4,-0.9) -- (-1.05,-0.9) arc (-90:0:0.20) -- (-0.85,0.7) arc (180:0:0.10);
\end{tikzpicture}
\end{document}