docx: `number-sections` has no effect, and `@sec-` references lose their first number
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- markdown, rust, yaml
調査の方向性
The docx writer is where heading numbering and the @sec- reference text get produced, so that is the place to start, and the HTML path that already gets it right is the reference for expected output. Render the repro with q2 render secnum.qmd --to docx, then inspect the document XML to see whether heading numbers are emitted at all. Done means headings read "1. One" and "2.1.1 Deep" and the references read "Section 2.1.1", matching the HTML output.
索引モデルが issue の本文から書いたものです。
説明
Tested with q2 0.47.0 and pandoc 3.14 (via QUARTO_PANDOC) on Windows 11, compared with Quarto 1.11.9 and plain pandoc 3.14.
With number-sections: true, docx headings are not numbered. Section cross-references do get a number, but its first component is missing: section 2 becomes "Section " (no number), 2.1 becomes "Section 1" and 2.1.1 becomes "Section 1.1". The same document renders correctly to HTML. Quarto 1 and pandoc -N both number the docx headings.
Repro
---
number-sections: true
---
# One {#sec-one}
See @sec-two and @sec-two-a.
# Two {#sec-two}
## Two A {#sec-two-a}
### Deep {#sec-deep}
See @sec-deep.
q2 render secnum.qmd --to docx
Actual: headings "One", "Two", "Two A", "Deep" without numbers; references "Section ", "Section 1", "Section 1.1".
Expected (Quarto 1): headings "1. One", "2. Two", "2.1 Two A", "2.1.1 Deep"; references "Section 2", "Section 2.1", "Section 2.1.1". HTML output from q2 already gives this.
The dropped first component looks like docx treats level-1 headings as chapters. Possibly related to #1304.
- 主要言語
- Rust
- スター
- 316
- フォーク
- 23
- 平均マージ
- 11時間 49分
- マージ済み PR(30日)
- 245
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
Heading anchor links have no icon: AnchorJS is initialised with an empty `icon`対応中かも @cscheid が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#1419 ·
メンテナーはふだん 1 日以内に返信
-
bug testing windows
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#1346 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
quarto-dev/q2#1418 ·
メンテナーはふだん 1 日以内に返信
-
bug readers-writers windows
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
quarto-dev/q2#1416 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
BurntSushi/jiff#755 ·
メンテナーはふだん 1 日以内に返信
-
After the kernel is given up on, a new import leaves "Importing…" and its Cancel on the status lineオープンbug help wanted priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sawhorse3d/sawhorse#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MartinPTielemans/ilo#4607 ·