Docs: list-table cell attributes (`colspan`, `rowspan`, `align`) are undocumented, and the Q-2-35 page contradicts them

未关闭 适合新手
#1,324 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
66/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
documentation

调研方向

从 issue 中仍标注为 TBD 的 Tables 指南,以及写明每行单元格数必须相同的 Q-2-35 页面开始。参照 issue 中的合并单元格示例,在现有 list-table 属性 header-rows、aligns 和 widths 旁边添加单元格属性 colspan、rowspan 和 align。修改 Q-2-35 的说明,使其允许合并单元格。两个页面都描述了合并单元格,且 Q-2-35 的措辞不再与之冲突时即为完成。

由索引模型根据 Issue 内容生成。

描述

Tested with q2 0.47.0 on Windows 11.

Merged cells in list tables work, following pandoc-ext/list-table: a cell that starts with an empty span takes that span's attributes.

::: {.list-table header-rows=1}
- - []{colspan=2} 2020
- - Number
  - Share
:::

This gives <th colspan="2"> in HTML and a Word merge (gridSpan) in docx. []{rowspan=2} (vMerge in docx) and []{align=r} work too. Since q2 rejects grid tables (Q-2-39), this is the only way to write a merged cell in qmd. The docs don't mention it:

  • The Tables guide is still "TBD".
  • The Q-2-35 page says "Use exactly the same number of cells in every row", which isn't true for rows with merged cells.

Request: document the cell attributes (colspan, rowspan, align) next to the list-table attributes (header-rows, aligns, widths), and reword the Q-2-35 advice to allow for merged cells.


The other items from earlier versions of this issue are split out:

  • #1333 Parse error: pipe table ending a list item inside a div, directly before the closing :::
  • #1334 List tables: multiple table bodies are rejected
  • #1335 List tables: header-cols is ignored
  • #1336 List tables: row attributes are rejected with Q-2-35
  • #1337 HTML: short table rows are not padded with empty cells
  • #1338 List tables: warn when a cell starts with a non-empty span carrying colspan/rowspan
  • #1339 Bare "Parse error" for unquoted attribute values containing a comma
  • #1327 and #879: HTML loses column alignment and widths
主要语言
Rust
星标
316
派生
23
平均合并
8 小时 19 分钟
30 天内合并 PR
244

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quarto-dev/q2 的其他 Issue

查看 quarto-dev/q2 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。