Forgot password?
 Create new account
View 656|Reply 13

tikz + asy 草稿本 test

[Copy link]

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2022-2-22 16:27:17 |Read mode
Last edited by kuing at 2024-3-25 18:16:00TikZ:

asy:


大家可以修改左边的代码,再点“点我”,右边就会预览相应的图。
或者按快捷键:tikz 的按 F8 ,asy 的按 F9。

注:
“加 tikz BBcode”按钮以及“加 asy BBcode”按钮的作用是便于将代码发布到本论坛上
——本论坛已设置 [tikz]...[/tikz] 以及 [asy]...[/asy] 用来显示 tikz 图以及 asy 图。

这次不是实时预览的,得点按钮或按快捷键才运行,事关这个生成需要一点时间,不像 mathjax 这么快,而且代码未写好时往往无法生成正确的图,实时就太浪费资源了。

有空再慢慢添加一些插入常用命令的按钮。(asy 其实我还没开始学)

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

 Author| kuing Posted at 2022-2-22 16:35:15
Last edited by kuing at 2024-3-25 17:43:00留空

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2022-2-23 02:04:40

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2022-2-28 12:44:51
刚刚在公众号上看到一个
TkzGeom
TikZ 图形制作的 GUI 工具
LaTeX工作室 2022-02-27 21:22
mp.weixin.qq.com/s?__biz=Mzg4MzEwNjc1Ng==& … e74926dc5fb65f31e9cb

17

Threads

126

Posts

1822

Credits

Credits
1822

Show all posts

uk702 Posted at 2022-12-24 08:09:39
抄了一段网上的代码(zhuanlan.zhihu.com/p/362281523),测试没通过

  1. \begin{tikzpicture}
  2. \tkzDefPoints{1/3/A,-2/0/B,2/0/C}
  3. \tkzDrawPoints(A,B)
  4. \tkzDrawPoint[cyan](C)
  5. \tkzLabelPoint[above](A){$A$}
  6. \tkzLabelPoint[below left](B){$B$}
  7. \tkzLabelPoint[cyan,below right](C){$Shuangxia\star kawaii$}
  8. \tkzDrawSegments(A,B B,C)
  9. \tkzDrawLine(A,C)
  10. \tkzDrawCircle[circum](A,B,C)
  11. \tkzDrawCircle[in](A,B,C)
  12. \tkzDrawCircle(C,A)
  13. \tkzDrawCircle[red,dashed,thick,R](C, 2cm)
  14. \end{tikzpicture}
Copy the Code

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2022-12-24 09:32:23
uk702 发表于 2022-12-24 01:09
抄了一段网上的代码(https://zhuanlan.zhihu.com/p/362281523),测试没通过
tkz-euclide – Tools for drawing Euclidean geometry

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-2-17 06:56:16

i.upmath.me与TikZ生成的PDF的颜色不同

i.upmath.me的颜色cyan为 #0ff

TikZ生成的PDF的颜色cyan为 #00b9f2

问题来自这帖由i.upmath.me生成的图 与香蕉空间的图颜色不同

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

 Author| kuing Posted at 2023-3-18 18:27:06
添加了 asy 的预览。

话说,asy 使用得越来越多了,我得考虑要不要加个板块🤔

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-3-18 19:15:59
kuing 发表于 2023-3-18 11:27
添加了 asy 的预览。

在Asymptote官网workspace可以预览: asymptote.ualberta.ca/
在AOPS的TeXer可以预览
例如: 输入 [asy]draw((0,60)--(0,0)--(50,5)--(0,50));[/asy] 点击Render with BBcode
Pole-object-A1-A2.png

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-3-18 19:25:15
1#用的SVG 如果代码错了,无法查看查看错误发生的位置和信息
例如 real r=1/0;
在HTML version  可以查看错误发生的位置和信息: kuing.cjhb.site/asy/?format=html&code=real%20r%3D1%2F0%3B
信息为 1.1: Divide by zero (第1行除以零的错误)
kuing.cjhb.site/asy/?format=html&code=import%20ven%3B
信息为 error: could not load module 'ven' (没有名叫ven的模块)
在Asymptote官网workspace如果代码错了也可以查看错误发生的位置和信息

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

 Author| kuing Posted at 2023-3-18 22:08:40
hbghlyj 发表于 2023-3-18 19:25
1#用的SVG 如果代码错了,无法查看查看错误发生的位置和信息
例如
在HTML version  可以查看错误发生的位置 ...
自己弄预览好处是可以自己加各种按钮。
然而相比之下,错误位置和信息重要得多。

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-3-18 22:11:08
kuing 发表于 2023-3-18 15:08
自己弄预览好处是可以自己加各种按钮。
然而相比之下,错误位置和信息重要得多。
...
能否用Javascript写一个show_msg函数, 呈现错误位置和信息
<img onerror="show_msg()" src="/asy...">

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-4-30 05:12:12
为避免被Discuz替换, 每次遇到
\begin{tikzpicture}[font=\small]
可以改为
\begin{tikzpicture}\tikzset{font=\small}

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2024-6-25 20:07:20
kuing 发表于 2023-3-18 14:08
然而相比之下,错误位置和信息重要得多。
可以让 i.upmath.me 打印 .log 文件,需要在后面加一段代碼,见:kuing.cjhb.site/forum.php?mod=viewthread&tid=12496#lastpost

手机版Mobile version|Leisure Math Forum

2025-4-20 22:18 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list