簡體   English   中英

rmarkdown 文檔中嵌入的 markdown 表中的列寬

[英]column widths in markdown tables embedded in rmarkdown documents

是否可以在 Rmarkdown 中使用 markdown 表設置列寬? 當第 2 列中的文本變長時,表格會在第 1 列和第 2 列之間平分。我查看了似乎類似問題的答案,但似乎沒有什么是完全正確的。

與版本 2 相比,我想要更接近版本 1 的東西。

在此處輸入圖像描述

---
title: "Untitled"
output: 
  bookdown::html_document2:
    toc: true
    toc_float: true
    toc_depth: 1
    code_folding: show
    theme: default
    highlight: tango
---

# Version 1

| Something | Else |
|:--|:--|
| Short | This is longer this is longer this is longer  |
| Short | |

# Version 2

| Something | Else |
|:--|:--|
| Short | This is longer this is longer this is longer this is longer this is longer this is longer |
| Short | |

它應該如何與許多解析器一起工作的一種簡單方法是在表定義中使用不同的相對寬度,例如:

| Something | Else |
|---------------|------------------------------------------------------------------------------------------------------|
| Short | This is longer this is longer this is longer this is longer this is longer this is longer this is longer this is longer this is longer this is longer this is longer this is longer |
| Short | |

暫無
暫無

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

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