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

Open Beginner friendly
#1,324 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
documentation

Research direction

Start with the Tables guide, which the issue says is still TBD, and the Q-2-35 page, which says every row needs the same number of cells. Add the cell attributes colspan, rowspan and align beside the existing list-table attributes header-rows, aligns and widths, using the merged-cell examples in the issue. Reword the Q-2-35 advice to allow merged cells. Done when both pages describe merged cells and the Q-2-35 wording no longer conflicts with them.

Written by the indexing model from the issue text.

Description

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
Dominant language
Rust
Stars
316
Forks
23
Avg merge
8h 19m
Merged PRs (30d)
244

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/q2

All issues in quarto-dev/q2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.