我想在Quarto中使用HTML表,但我想阻止它使用整个页面宽度.下面是一个可重复使用的例子:
---
title: "HTML tables in Quarto"
format: html
---
| fruit | price |
|--------|--------|
| apple | 2.05 |
| pear | 1.37 |
| orange | 3.09 |
: Table 1
| fruit | price |
|--------|--------|
| apple | 2.05 |
| pear | 1.37 |
| orange | 3.09 |
: Table 2 {tbl-colwidths="[75,25]"}
输出:
正如我们所看到的,表1是正常的,您可以看到它占据了整个页面宽度.表2有tbl-colwdiths
个选项,但这并不会使表的宽度变小,而是整个页面的宽度.所以我想知道是否有人知道如何防止在Quarto
中使用整个页面宽度的超文本标记语言表格?