![如果包含来自网站的 markdown 图像,MiKTeX 无法将 jupyter 笔记本转换为 pdf](https://linux22.com/image/430159/%E5%A6%82%E6%9E%9C%E5%8C%85%E5%90%AB%E6%9D%A5%E8%87%AA%E7%BD%91%E7%AB%99%E7%9A%84%20markdown%20%E5%9B%BE%E5%83%8F%EF%BC%8CMiKTeX%20%E6%97%A0%E6%B3%95%E5%B0%86%20jupyter%20%E7%AC%94%E8%AE%B0%E6%9C%AC%E8%BD%AC%E6%8D%A2%E4%B8%BA%20pdf.png)
我遇到这个问题已经很长时间了,我不知道还能做些什么。
在 Jupyter Notebook 上,你可以通过以下简单命令在 markdown 单元格中添加来自网络的图像:
![any text](image url)
它看起来像这样:
每当我尝试将此笔记本导出为 pdf 时,都会出现错误。
这是我通过 Jupyter Lab 尝试时遇到的错误:
nbconvert failed: PDF creating failed, captured latex output:
Failed to run "xelatex notebook.tex -quiet" command:
notebook.tex:408: Unable to load picture or PDF file '
dvipdfmx:fatal: Image inclusion failed for "https://i.imgur.com/MQdEUrY.png".
No output PDF file written.
Sorry, but xelatex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\Caique\AppData\Local\MiKTeX\miktex\log\xelatex.log
这是日志文件中的“FATAL”文本:
2021-03-10 19:22:12,105-0300 FATAL xelatex.core - Invalid argument
2021-03-10 19:22:12,105-0300 FATAL xelatex.core - Function: fwrite
2021-03-10 19:22:12,105-0300 FATAL xelatex.core - Result: 22
2021-03-10 19:22:12,105-0300 FATAL xelatex.core - Data: <no data>
2021-03-10 19:22:12,105-0300 FATAL xelatex.core - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex/C4P/C4P.h:646
2021-03-10 19:22:12,105-0300 FATAL xelatex - Invalid argument
2021-03-10 19:22:12,105-0300 FATAL xelatex - Info:
2021-03-10 19:22:12,105-0300 FATAL xelatex - Source: Libraries\MiKTeX\TeXAndFriends\include\miktex/C4P/C4P.h
2021-03-10 19:22:12,105-0300 FATAL xelatex - Line: 646
2021-03-10 19:22:12,107-0300 INFO xelatex - this process (7532) finishes with exit code 1
最后,当我将其导出为 LaTeX 并尝试使用 MiKTeX(使用“pdfLaTeX+MakeIndex+BibTeX”编译器)进行编译时,出现此错误:
LaTeX Warning: File `https://i.imgur.com/MQdEUrY.png' not found on input line 408.
! Package pdftex.def Error: File `https://i.imgur.com/MQdEUrY.png' not found: using draft setting.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.408 ...raphics{https://i.imgur.com/MQdEUrY.png}
?
请注意,这些错误与另一个笔记本(因此是另一个图像)有关,但是每次笔记本中有来自网站的图像时都会发生这种错误。
有人知道我该如何解决这个问题吗?