免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

意外发现 coordinate 后重新定义的同名称并不冲突

定义交点 name intersections 时重复,发现重复后之前的不影响,之后的用新定义

TiKZ
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友

给个 example 呗

TOP

回复 2# kuing


\coordinate [label=below:{A}] (a) at (0,0);
\coordinate [label=below:{B}] (b) at (2,0);
\draw (a)--(b);
\coordinate [label=below:{C}] (b) at (0,2);
\draw (a)--(b);

TOP

回复 3# isee

原来是这个意思……
不过……这其实不难发现吧,也没什么不合理之处……

我顺便说一个,其实这样玩也不会报错:
  1. \begin{tikzpicture}
  2. \coordinate [label=below:{A}] (a) at (0,0);
  3. \coordinate [label=below:{B}] (b) at (2,0);
  4. \draw (a)--(b);
  5. \coordinate [label=below:{C}] (b) at (0,2);
  6. \draw[blue] (a)--(b);
  7. \end{tikzpicture}
  8. \begin{tikzpicture}
  9. \draw[red] (a)--(b);
  10. \end{tikzpicture}
复制代码
效果: QQ截图20210601001825.png
也就是说 coordinate 的点在下一个图其实还可以继续用。

TOP

回复 4# kuing


    晕迷哦,看来作者很有想法~

TOP

TiKZ 相当宽松,基本上顺序无关,基本上随时“添什么东西”都没太问题

TOP

返回列表 回复 发帖