Quarto:图像未渲染

问题描述 投票:0回答:1

我正在使用 Quarto 编写 Beamer 演示文稿,因此我可以在各处添加一些 Python 输出,但是当我通过 Quarto 生成 PDF 时,我的外部图像不会被渲染。 这是我的序言:

title: "domba2023"
format: 
  beamer:
    pdf-engine: pdflatex
    include-in-header:
      - text: |
          \usepackage[T1]{fontenc}
          \usepackage[utf8]{inputenc} 
lang: pt
editor: visual
jupyter: python3

这是我在控制台运行 quarto check 时得到的结果:

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.361
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.11.3
      Path: C:/Users/Asus/AppData/Local/Programs/Python/Python311/python.exe
      Jupyter: 5.3.0
      Kernels: python3

(\) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.1.3
      Path: C:/R/R-4.1.3
      LibPaths:
        - C:/R/R-4.1.3/library
      knitr: 1.42
      rmarkdown: 2.21

[>] Checking Knitr engine render......OK
pandoc quarto
1个回答
0
投票

我在 HTML 输出中渲染数字时遇到了类似的问题,并通过显式调用

.draw()
方法解决了该问题。这是一个例子:

from plotnine import ggplot, geom_point, aes, stat_smooth, facet_wrap
from plotnine.data import mtcars

figure = (ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
 + geom_point()
 + stat_smooth(method="lm")
 + facet_wrap("~gear"))
figure.draw()
© www.soinside.com 2019 - 2024. All rights reserved.