我不知道在 Quarto 中调整图形大小的语法,请你给我一个提示。以下无效。
---
title: "resize image"
format: pdf
---
![World](images/World.pdf){fig-width=5}
![World](images/World.pdf){fig-width=10}
![World](images/World.pdf){fig-width=50%}
![World](images/World.pdf){fig-height=50%}
最佳答案
您可以使用 width
和 height
,如记录 here .
---
title: "resize image"
format: pdf
---
![Elephant with small width](elephant.png){width=10%}
![Elephant with larger height](elephant.png){height=50%}
也可以使用px
和in
作为单位,或者在引号之间指定:
![Elephant with height=100px](elephant.png){height=100px}
![Elephant](elephant.png){height=2in}
![Elephant](elephant.png){height="100"}
为什么 fig-height
和 fig-width
不起作用?
如 document 中所述你引用,fig-height
和 fig-width
是 R 或 Matplotlib 图形生成的默认图形大小的设置。
由于您的图像不是由 R 或 Matplotlib 生成的,因此您应该使用 pandoc
的属性,如记录 here .
关于pdf - 如何调整四开本(PDF 输出)中的图形大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73844454/