簡體   English   中英

如何調整 Quarto 中的數字(PDF 輸出)?

[英]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%}

https://quarto.org/docs/reference/formats/pdf.html#figures

https://quarto.org/docs/authoring/figures.html

您可以使用widthheight ,如此處所述

---
title: "resize image"
format: pdf
---

![Elephant with small width](elephant.png){width=10%}

![Elephant with larger height](elephant.png){height=50%}

您還可以使用pxin作為單位,或在引號之間指定:

![Elephant with height=100px](elephant.png){height=100px}

![Elephant](elephant.png){height=2in}

![Elephant](elephant.png){height="100"}

為什么fig-heightfig-width不起作用?

如您引用的文檔中所述, fig-heightfig-widthR 或 Matplotlib graphics 生成的圖形的默認大小設置。

由於您的圖像不是由 R 或 Matplotlib 生成的,因此您應該使用pandoc的屬性,如此所述。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM