Forgot password
 Register account
View 629|Reply 5

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

[Copy link]

764

Threads

4672

Posts

27

Reputation

Show all posts

isee posted 2021-5-31 21:10 |Read mode
定义交点 name intersections 时重复,发现重复后之前的不影响,之后的用新定义

TiKZ

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2021-5-31 23:53
给个 example 呗

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2021-6-1 00:01
回复 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);

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2021-6-1 00:15
回复 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}
Copy the Code
效果: QQ截图20210601001825.png
也就是说 coordinate 的点在下一个图其实还可以继续用。

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2021-6-1 00:18
回复 4# kuing


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

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2021-6-1 00:19
TiKZ 相当宽松,基本上顺序无关,基本上随时“添什么东西”都没太问题

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-15 15:23 GMT+8

Powered by Discuz!

Processed in 0.012966 seconds, 25 queries