[英]How do I figure out the font family and the font size of the words in a pdf document?
[英]Quarto: PDF Document - Figure Caption size
如何在四开 pdf 文档中自定义图题的字体大小? 我已经检查了mainfont
和fontfamily
选项,但文档没有提供如何使用更改 pdf 文档中单个元素的字体大小的示例。
Since for pdf output, ultimately latex is used, you just need to find the corresponding latex solution to do what you want to do and incorporate those latex codes using LaTex Includes
.
因此,要更改图形标题大小,我们可以使用caption
package。 从caption
package 手册的第 2.3 节,
有三种字体选项会影响标题的不同部分:一种影响整个标题(
font
),一种只影响标题 label 和分隔符(labelfont
),至少一种只影响标题文本(textfont
)。
您可以使用选项
font={⟨font options⟩}
、labelfont={⟨font options⟩}
和textfont={⟨font options⟩}
,其中 ⟨font options⟩ 是逗号分隔的字体选项列表。
这些是可用的字体选项:
scriptsize
=> 非常小的尺寸footnotesize
=> 通常用于脚注的大小small
=> 小号normalsize
大小 => 正常大小large
=> 大尺寸Large
=> 更大的尺寸阅读手册(第 2.3 节)以了解详细信息和更多选项。
---
title: "Figure Caption Size"
format:
pdf:
include-in-header:
text: |
\usepackage[font=Large,labelfont={bf,Large}]{caption}
---
## Quarto
```{r}
#| fig-cap: "Just a scatterplot"
plot(rnorm(1:10), rnorm(1:10))
```
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.