Forgot password?
 Register account
Author: abababa

tikzjax 能脱离服务器用吗?

[Copy link]

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2022-8-3 04:47
kuing 发表于 2020-6-9 07:01
我在自己电脑上新建一个 html 文件,按网页上的说法,这样写:为啥显示不出来……

到底还缺啥?

PS、我还发现有这样一个可以实时预览的:https://tikzjax-demo.glitch.me/
托管在glitch的这个tikzjax demo生成的SVG用的是系统字体, 没有下载TeX的字体.
比如\circ会显示为±

而在同一作者的Ross program显示的$\circ$是正常的, 因为它使用的是TeX的字体cmsy10(Computer Modern symbol)(Computer Modern is the original family of typefaces used by the typesetting program TeX). 但编码还是±, 所以复制出来, 就成了±.

1.png

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2022-8-3 05:00

在浏览器中编译 LaTeX(整个 texlive)

Last edited by hbghlyj 2024-9-19 04:06github.com/manuels/texlive.js/

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2022-12-26 07:30
latexbase类似于LaTeX.js(JavaScript LaTeX to HTML5 translator) 它的文档写道:

Unlike other online LaTeX editors, we perform typesetting right in the browser! That means that if you’re not connected to the Internet, you can still make changes to, preview, and download your files when using Chrome 46+ or Opera 33+. Just navigate to https://latexbase.com when offline to load the app. The “https” bit is important. Also make sure not to hard refresh! Offline mode is powered by service workers which are discussed in this article.

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2023-8-18 18:24
kuing 发表于 2021-11-16 20:57
回复 60# abababa
color 前面加个逗号估计就可以。
也可以加[attachimg]666[/attachimg]
因为attachimg会被替换掉

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2023-8-18 18:25

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2024-9-19 11:25
hbghlyj 发表于 2022-12-25 23:30
latexbase类似于LaTeX.js(JavaScript LaTeX to HTML5 translator)
它的文档写道:
Unlike other online LaTe ...
latexbase.com/ 现在无法访问。网站关闭了?

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2025-4-21 05:15

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2025-4-30 20:35

kroki.io也支持TikZ 通过 url 参数

kroki.io/#support
在此表中许多行,包含一行TikZ
Screenshot 2024-09-02 103541.png

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2025-4-30 20:35

tikz-3dplot 测试


  1. \documentclass{article}
  2. \usepackage{tikz}
  3. \usepackage{tikz-3dplot}
  4. \usetikzlibrary{math}
  5. \usepackage[active,tightpage]{preview}
  6. \PreviewEnvironment{tikzpicture}
  7. \setlength\PreviewBorder{0.125pt}
  8. \begin{document}
  9.   \tdplotsetmaincoords{80}{120}
  10.   %
  11.   \begin{tikzpicture}[tdplot_main_coords,scale=0.75]
  12.     % Indicate the components of the vector in rectangular coordinates
  13.     \pgfmathsetmacro{\ux}{4}
  14.     \pgfmathsetmacro{\uy}{4}
  15.     \pgfmathsetmacro{\uz}{3}
  16.     % Length of each axis
  17.     \pgfmathsetmacro{\ejex}{\ux+0.5}
  18.     \pgfmathsetmacro{\ejey}{\uy+0.5}
  19.     \pgfmathsetmacro{\ejez}{\uz+0.5}
  20.     \pgfmathsetmacro{\umag}{sqrt(\ux*\ux+\uy*\uy+\uz*\uz)} % Magnitude of vector $\vec{u}$
  21.     % Compute the angle $\theta$
  22.     \pgfmathsetmacro{\angthetax}{pi*atan(\uy/\ux)/180}
  23.     \pgfmathsetmacro{\angthetay}{pi*atan(\ux/\uz)/180}
  24.     \pgfmathsetmacro{\angthetaz}{pi*atan(\uz/\uy)/180}
  25.     % Compute the angle $\phi$
  26.     \pgfmathsetmacro{\angphix}{pi*acos(\ux/\umag)/180}
  27.     \pgfmathsetmacro{\angphiy}{pi*acos(\uy/\umag)/180}
  28.     \pgfmathsetmacro{\angphiz}{pi*acos(\uz/\umag)/180}
  29.     % Compute rho sin(phi) to simplify computations
  30.     \pgfmathsetmacro{\costz}{cos(\angthetax r)}
  31.     \pgfmathsetmacro{\sintz}{sin(\angthetax r)}
  32.     \pgfmathsetmacro{\costy}{cos(\angthetay r)}
  33.     \pgfmathsetmacro{\sinty}{sin(\angthetay r)}
  34.     \pgfmathsetmacro{\costx}{cos(\angthetaz r)}
  35.     \pgfmathsetmacro{\sintx}{sin(\angthetaz r)}
  36.     % Coordinate axis
  37.     \draw[thick,->] (0,0,0) -- (\ejex,0,0) node[below left] {$x$};
  38.     \draw[thick,->] (0,0,0) -- (0,\ejey,0) node[right] {$y$};
  39.     \draw[thick,->] (0,0,0) -- (0,0,\ejez) node[above] {$z$};
  40.     % Projections of the components in the axis
  41.     \draw[gray,very thin,opacity=0.5] (0,0,0) -- (\ux,0,0) -- (\ux,\uy,0) -- (0,\uy,0) -- (0,0,0);        % face on the plane z = 0
  42.     \draw[gray,very thin,opacity=0.5] (0,0,\uz) -- (\ux,0,\uz) -- (\ux,\uy,\uz) -- (0,\uy,\uz) -- (0,0,\uz);        % face on the plane z = \uz
  43.     \draw[gray,very thin,opacity=0.5] (0,0,0) -- (0,0,\uz) -- (\ux,0,\uz) -- (\ux,0,0) -- (0,0,0);        % face on the plane y = 0
  44.     \draw[gray,very thin,opacity=0.5] (0,\uy,0) -- (0,\uy,\uz) -- (\ux,\uy,\uz) -- (\ux,\uy,0) -- (0,\uy,0);        % face on the plane y = \uy
  45.     \draw[gray,very thin,opacity=0.5] (0,0,0) -- (0,\uy,0) -- (0,\uy,\uz) -- (0,0,\uz) -- (0,0,0); % face on the plane x = 0
  46.     \draw[gray,very thin,opacity=0.5] (\ux,0,0) -- (\ux,\uy,0) -- (\ux,\uy,\uz) -- (\ux,0,\uz) -- (\ux,0,0); % face on the plane x = \ux
  47.     % Arc indicating the angle $\alpha$
  48.     % (angle formed by the vector $\vec{v}$ and the $x$ axis)
  49.     \draw[red,thick] plot[domain=0:\angphix,smooth,variable=\t] ({cos(\t r)},{sin(\t r)*\costx},{sin(\t r)*\sintx});
  50.     % Arc indicating the angle $\beta$
  51.     % (angle formed by the vector $\vec{v}$ and the $y$ axis)
  52.     \draw[red,thick] plot[domain=0:\angphiy,smooth,variable=\t] ({sin(\t r)*\sinty},{cos(\t r)},{sin(\t r)*\costy});
  53.     % Arc indicating the angle $\gamma$
  54.     % (angle formed by the vector $\vec{v}$ and the $z$ axis)
  55.     \draw[red,thick] plot[domain=0:\angphiz,smooth,variable=\t] ({sin(\t r)*\costz},{sin(\t r)*\sintz},{cos(\t r)});
  56.     % Vector $\vec{u}$
  57.     \draw[blue,thick,->] (0,0,0) -- (\ux,\uy,\uz) node [below right] {$\vec{u}$};
  58.     % Nodes indicating the direction angles
  59.     \pgfmathsetmacro{\xa}{1.85*cos(0.5*\angphix r)}
  60.     \pgfmathsetmacro{\ya}{1.85*sin(0.5*\angphix r)*\costx}
  61.     \pgfmathsetmacro{\za}{1.85*sin(0.5*\angphiz r)*\sintx}
  62.     \node[red] at (\xa,\ya,\za) {\footnotesize$\alpha$};
  63.     %
  64.     \pgfmathsetmacro{\xb}{1.5*sin(0.5*\angphiy r)*\sinty}
  65.     \pgfmathsetmacro{\yb}{1.5*cos(0.5*\angphiy r)}
  66.     \pgfmathsetmacro{\zb}{1.5*sin(0.5*\angphiy r)*\costy}
  67.     \node[red] at (\xb,\yb,\zb) {\footnotesize$\beta$};
  68.     %
  69.     \pgfmathsetmacro{\xc}{1.5*sin(0.5*\angphiz r)*\costz}
  70.     \pgfmathsetmacro{\yc}{1.5*sin(0.5*\angphiz r)*\sintz}
  71.     \pgfmathsetmacro{\zc}{1.5*cos(0.5*\angphiz r)}
  72.     \node[red] at (\xc,\yc,\zc) {\footnotesize$\gamma$};
  73.     %
  74.   \end{tikzpicture}
  75.   %
  76. \end{document}
Copy the Code

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2025-4-30 20:35
@kuing 建议添加 BBcode 支持调用 kroki.io,以便从各种文本描述(包括 tikz、PlantUML、GraphViz 等)生成图表。应该与调用 i.upmath.me 相同,但 kroki.io 支持更多类型。


官方主页有一个实时编辑器,可以选择多种图表类型。
Screenshot 2024-09-16 221813.png

Mobile version|Discuz Math Forum

2025-6-5 01:55 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit