【问题标题】:Latex rendering not working in Inkscape 0.92.2?乳胶渲染在 Inkscape 0.92.2 中不起作用?
【发布时间】:2018-06-06 16:38:15
【问题描述】:

我以前广泛使用过 Inkscape 和 Latex。但是我最近不得不在我的电脑上重新安装操作系统和我需要的所有软件。现在是 Linux Mint 18.3 Cinnamon。 我无法在 Inkscape 0.92.2 中呈现简单的乳胶公式。我的 Ghostscript 版本是 9.18,和 Texlive 2017 完整安装。我得到的错误链接如下。我将不胜感激这方面的任何帮助。谢谢! Inkscape_Latex_Error

" Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 285, in affect
    self.output()
  File "/usr/share/inkscape/extensions/inkex.py", line 272, in output
    self.document.write(sys.stdout)
  File "src/lxml/etree.pyx", line 2050, in lxml.etree._ElementTree.write 
  (src/lxml/etree.c:67059)
  File "src/lxml/serializer.pxi", line 731, in lxml.etree._tofilelike 
  (src/lxml/etree.c:141721)
  File "src/lxml/etree.pyx", line 326, in 
  lxml.etree._ExceptionContext._raise_if_stored (src/lxml/etree.c:13244)
  File "src/lxml/serializer.pxi", line 648, in 
  lxml.etree._FilelikeWriter.write (src/lxml/etree.c:140348)
  TypeError: write() argument must be str, not bytes"

【问题讨论】:

  • 我在标签组合中添加了 python....请将错误复制并粘贴为 TEXT 并用它编辑您的问题

标签: python latex linux-mint inkscape


【解决方案1】:

让我先给你一个对我有用的解决方案。我在使用 Inkscape 0.92.2 时遇到了同样的问题。如果您对使用最新版本的 Inkscape 不是很具体,那么只需卸载 0.92.2 并安装 0.91.7 版本。它会解决你的问题。我正在使用 Ubuntu 16.04。在软件中心,这两个版本都可用。但最初,我也选择了 0.92.2 并开始遇到同样的问题。然后我卸载了它并安装了旧版本。乳胶渲染现在可以正常工作。只是一件事,在做任何其他事情之前,请检查您是否安装了“pstoedit”。如果没有,请先做。

我明白为什么 0.92.2 不能在 Ubuntu 16.04 或您的系统上运行。 Inskscape 使用 python 脚本“eqtexsvg.py”将 tex 方程转换为 svg 格式。这个过程显然需要python脚本找到latex命令的路径。当您安装 0.91.7 时,您会看到 Inkscape 安装在 /usr/share 目录中。但是 0.92.2 使用 /home/user/snap 目录。因此,扩展名的 .inx 部分既找不到 latex 也找不到 dvips。我认为 0.92.2 的问题也可以通过在 .inx 文件中提及 latex 和 dvips 的完整路径来解决。我太懒了。无论如何,0.91.7 目前对我来说已经足够好了。稍后我可能会尝试其他解决方案。

【讨论】:

    猜你喜欢
    • 2014-11-28
    • 2014-10-08
    • 2021-04-28
    • 1970-01-01
    • 2017-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多