Forgot password
 Register account
View 3970|Reply 9

TikZ 加入的 pic 命令 标角方便多了

[Copy link]

764

Threads

4672

Posts

27

Reputation

Show all posts

isee posted 2015-10-19 20:54 |Read mode
pgfmanual(Manual for Version 3.0.1a),在“A Picture for Karl’s Students”这一节结尾,用pic画角,哦哦,不错哦。

代码如下:
  1. \begin{tikzpicture}[scale=3]
  2. \coordinate (A) at (1,0);
  3. \coordinate (B) at (0,0);
  4. \coordinate (C) at (30:1cm);
  5. \draw (A) -- (B) -- (C)
  6. pic [draw=green!50!black, fill=green!20, angle radius=9mm,
  7. "$\alpha$"] {angle = A--B--C};
  8. \end{tikzpicture}
Copy the Code

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2015-10-19 20:56
需要加载 "angle library and the quotes",即加载(TikZ)库
  1. \usetikzlibrary{angles,quotes}
Copy the Code

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2015-10-19 21:09
Last edited by hbghlyj 2025-3-10 02:16简化,适当修改顶楼代码即:
  1. \begin{tikzpicture}
  2. \coordinate (A) at (1,0);
  3. \coordinate (B) at (0,0);
  4. \coordinate (C) at (30:1cm);
  5. \draw (A) -- (B) -- (C) pic [draw,"1",angle eccentricity=1.5] {angle};
  6. \end{tikzpicture}
Copy the Code
效果为

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2015-10-19 21:11
回复 3# isee


    所有的$\alpha$是代码\$\alpha\$

764

Threads

4672

Posts

27

Reputation

Show all posts

original poster isee posted 2015-10-19 21:18
阿尔法的位置,可加参数 “angle eccentricity=1.5”之类 ,具体参阅(TeX Live 2015 自带的) pgfmanual(Version 3.0.1a),511页。

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2015-11-1 16:30
今天发现了一个和tikz有关的包,叫tkz-euclide,非常像我以前想找的和geogebra命令类似的包,觉得特别好用,画角也有专门的\tkzMarkAngle(A,C,B),觉得它就是专门画平面几何图用的。
我对latex和tikz了解得还很少,但是这两个,加上tkz-euclide包,目前觉得已经足够我用了。

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2015-11-1 19:14
回复 6# abababa

tkz 系列包我倒是早有所闻,不过一直没用过,我记得当年还要自己装,可是文档是法文……

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2015-11-1 22:18
回复 7# kuing

我也不知道这是自带的,还是我安装其它什么的时候装上的。文档是英文的,但是我英文也不好,全靠大家帮助写出现成的例子加实际实验来学习,目前觉得对我自己来说够用。

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2015-11-1 23:52
回复 8# abababa

刚才 texdoc tkz-euclide 看了下,现在已经自带了,我刚才说的是几年前的事,那时还在用 miktex。
不过弹出来的文档还是法文啊

414

Threads

1641

Posts

15

Reputation

Show all posts

abababa posted 2015-11-2 06:28
回复 9# kuing

是的,还是法文。有几个单词和英文差不多,我就以为是英文呢。

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-20 05:49 GMT+8

Powered by Discuz!

Processed in 0.019352 seconds, 44 queries