【发布时间】:2022-11-13 13:59:56
【问题描述】:
按照here的建议,我想我可以包含以下代码片段来在 matplotlib 中呈现乳胶字体
plt.rcParams.update({
"text.usetex": True,
"font.family": "Computer Modern Roman"
})
为了确保安装了乳胶,我还运行了!pip install latex。我在 Windows 11 上运行 Google Colab。
然而,这是我收到的错误:
RuntimeError: latex was not able to process the following string:
b'lp'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(/root/.cache/matplotlib/tex.cache/41e3affc34550e765935caf5a875fad6.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
! LaTeX Error: File `type1ec.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.6 \usepackage
{type1ec}^^M
No pages of output.
Transcript written on 41e3affc34550e765935caf5a875fad6.log.
任何帮助将不胜感激。
【问题讨论】:
标签: python matplotlib google-colaboratory