Subfigures are numbered as separate figures, and `layout-ncol` has no effect in HTML

Đang mở
#1,309 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
html, markdown, rust
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Start with the figure and subfigure handling in the q2 Rust crates, then compare HTML output for layout-ncol against the docx writer, which already lays subfigures side by side. Run the render from the repro on a small two-image document and check whether the subfigure ids get (a) and (b) numbering. Done means the cross-references resolve as in Quarto 1 and the HTML output includes the layout panel and row markup.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

A figure div with subfigures (the example from the q2 Figures guide) gives each subfigure its own top-level number instead of "(a)" and "(b)". The parent figure gets the next number. In HTML, layout-ncol is only written out as a data-layout-ncol attribute: there's no layout panel or CSS, so the images stack. In docx, the subfigures sit side by side in a table, but each image keeps its full width (5.56 in), where Quarto 1 scales them to the column (3.25 in).

Repro

::: {#fig-pair layout-ncol=2}
![Left](fig-a.png){#fig-l}

![Right](fig-b.png){#fig-r}

Two figures
:::

See @fig-pair, @fig-l and @fig-r.

q2 render sub.qmd --to html (and --to docx)

Actual: captions "Figure 1: Left", "Figure 2: Right", "Figure 3: Two figures"; text "See Figure 3, Figure 1 and Figure 2". In HTML, no quarto-layout-panel or quarto-layout-row.

Expected (Quarto 1): subcaptions "(a) Left" and "(b) Right" under "Figure 1: Two figures"; text "See Figure 1, Figure 1 (a) and Figure 1 (b)"; a two-column layout.

A layout panel without subfigure ids (::: {layout-ncol=2} with two captioned images) has the same HTML problem.

Ngôn ngữ chính
Rust
Star
316
Fork
23
Merge trung bình
11 giờ 49 phút
Pull request đã merge (30 ngày)
245

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/q2

Tất cả issue của quarto-dev/q2

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.