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

Abierto
#1,309 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
html, markdown, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
316
Forks
23
Merge medio
11 h 49 min
PR fusionados (30 d)
245

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de quarto-dev/q2

Todos los issues de quarto-dev/q2

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.