乳胶中的 plantUML?
是否可以在乳胶文档中使用 plantUML?
一种解决方法是将 plantUML 转换为 tikzpicture 并将其集成到 Latex 文档中。对我来说这似乎有点太多了,尤其是更新。
我正在使用 overleaf 和 TeXiFy,文档生成应该可以在两个乳胶编辑器上工作。
如果可以直接集成,我想看一个例子。
谢谢
Is it possible to use plantUML inside a latex document?
One workaround would be to convert plantUML into tikzpicture and integrate it in the latex document. That seems a bit too much effort to me, especially with updates.
I am using overleaf and TeXiFy, the document generation should work on both latex editors.
If a direct integration is possible, I would like to see an example.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我首先回答你的第一个问题:
是如果您使用 plantuml 包,您可以使用直接在 tex 文件中内联定义的 PlantUML 图。
考虑以下示例
test.tex
文件:使用带有 -shell-escape 选项的 lualatex 生成
test.pdf
,如下所示:现在你提到你使用texify 和 overleaf:
对于 texify,您需要像这样编辑命令:
overleaf 显然通过运行 plantuml 服务器来生成图表来支持 plantuml,这意味着您只需要在项目设置中将其设置为使用 lualatex 引擎。
-shell-escape 选项赋予 Latex 调用外部程序的权限,在我们的例子中,调用 java 来执行 plantuml 来生成我们想要的 plantuml 图。
请注意仅将 -shell-escape 与可靠的乳胶文件一起使用,以避免造成有害后果。
I will begin by answering your first question:
Yes you can use PlantUML diagrams directly defined inline in your tex file, if you use the plantuml package.
consider following example
test.tex
file:use lualatex with the -shell-escape option to generate
test.pdf
which will look like this:now you mentioned you use texify and overleaf:
for texify you would need to edit your command like so:
overleaf apparently supports plantuml by running a plantuml server for diagram generation, meaning you only need to set it to use the lualatex engine in the project settings.
The -shell-escape option gives latex permission to call foreign programs, in our case java is called to execute plantuml to produce the plantuml diagrams we want.
Be mindful to only use -shell-escape with trutworthy latex files to avoid harmful consequences.