# 是否可以包含TikZ包？

**URL:** <https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645>\
**Category:** Support\
**Tags:** math\
**Created:** [2023年一月17日 12:51 UTC](https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645 "2023-01-17T12:51:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdussamed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abdussamed/32/289503_2.png) [@Abdussamed](https://meta.discourse.org/u/Abdussamed)\
**Post date:** [2023年一月17日 12:51 UTC](https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645/1 "2023-01-17T12:51:00Z")

</div>

您好，

非常感谢，这个 Discourse 扩展非常棒。我有一个小问题（但对我来说是个大麻烦）。是否可以包含 TikZ 宏包？当我将以下代码输入到我的消息中时，它无法运行……

\begin{tikzpicture} \draw (0,0)- -(1,1); \end{tikzpicture}

---

<div class="post-metadata">

**Author:** ![mcmcclur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcmcclur/32/115456_2.png) [@mcmcclur](https://meta.discourse.org/u/mcmcclur)\
**Post date:** [2023年一月17日 14:10 UTC](https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645/2 "2023-01-17T14:10:57Z")

</div>

> [@Abdussamed](#):
>
> 是否可以包含 TikZ 包？

不，我认为使用 Discourse Math 插件是不可能的。MathJax 和 KaTeX 都不支持 Tikz，尽管两者都有长期存在的 GitHub 问题请求此类支持。最近，一个[基于 WebAssembly 的项目](https://github.com/kisonecat/tikzjax)出现了，声称可以在浏览器中提供 Tikz，尽管我从未尝试过。也许，这可以被整合到这个插件或一个新的插件中。考虑到将图形导入 Discourse 的各种选项，我认为这并非优先事项。

---

<div class="post-metadata">

**Author:** ![Abdussamed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abdussamed/32/289503_2.png) [@Abdussamed](https://meta.discourse.org/u/Abdussamed)\
**Post date:** [2023年一月17日 15:08 UTC](https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645/3 "2023-01-17T15:08:10Z")

</div>

嗯，我明白了，感谢您精确的回答！

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2023年二月16日 15:08 UTC](https://meta.discourse.org/t/is-it-possible-to-include-tikz-package/253645/4 "2023-02-16T15:08:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
