[英]How to resize figures in Quarto (PDF output)?
我沒有得到在 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
,如此處所述。
---
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
不起作用?
如您引用的文檔中所述, fig-height
和fig-width
是R 或 Matplotlib graphics 生成的圖形的默認大小設置。
由於您的圖像不是由 R 或 Matplotlib 生成的,因此您應該使用pandoc
的屬性,如此處所述。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.