英文:
Change size HTML table in Quarto presentation
问题
我想在Quarto
演示中使用HTML表格。问题在于它们在幻灯片上相当大。以下是一些可重现的代码:
title: "Change size of HTML table in Quarto"
format: revealjs
示例幻灯片
默认 | 左对齐 | 右对齐 | 居中 |
---|---|---|---|
12 | 12 | 12 | 12 |
123 | 123 | 123 | 123 |
1 | 1 | 1 | 1 |
输出:
正如您所看到的,表格相当大。所以我想知道是否有一种选项可以控制表格的输出大小,以便相应的间距保持不变?
英文:
I would like to use HTML tables in a Quarto
presentation. The problem is that they are pretty big on the slides. Here is some reproducible code:
---
title: "Change size of HTML table in Quarto"
format: revealjs
---
## Example slide
| Default | Left | Right | Center |
|---------|------|-------|--------|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
Output:
As you can see the table is pretty big. So I was wondering if there is an option by controlling the output size of the table, so the respective distance stay the same?
答案1
得分: 1
可以通过减小表格的字体大小来实现,例如:
#| echo: false
.reveal table {
font-size: smaller;
}
英文:
May be by reducing the font size of the table,
---
title: "Change size of HTML table in Quarto"
format: revealjs
engine: knitr
---
## Example slide
```{css}
#| echo: false
.reveal table {
font-size: smaller;
}
```
| Default | Left | Right | Center |
|---------|------|-------|--------|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论