繁体   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