quarto-dev / quarto-dev/quarto-cli

Errant additional line in table caption is created when a second row of computationally generated tables is created

Open
#10,237 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug docx
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

An additional line is created in the second row second column of a 3 col by 2 row set of tables is produced.
This makes the tables in the second row sort of randomly unaligned.
image

Steps to reproduce
---
format:
  docx
---

```{python}
#| output: false
#| echo: false

import pandas as pd
import numpy as np
from IPython.display import Markdown, display
from tabulate import tabulate

# Create a 10x10 DataFrame with random integers between 0 and 100
data = np.random.randint(0, 100, size=(2, 2))
df = pd.DataFrame(data)
```

```{python}
#| echo: false
#| warning: false
#| layout-ncol: 3
#| tbl-colwidths: [80,15,15]

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

display(Markdown(tabulate(
    df, headers=df.columns, showindex=True)))

```

Expected behavior

The tables in the second row should be in the same line. There should be no additional space added.

Actual behavior

There is an errant space added when putting tables in a second row.

Your environment

IDE: VSCode
Version: 1.90.2 (Universal)
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:37:41.291Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 22.5.0

OS: Ventura 13.4 (22F66)

Quarto check output

Quarto 1.4.554
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.554
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: v2024.06
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/user/Library/TinyTeX/bin/universal-darwin
Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Users/user/Desktop/home/27_interns/gm_quant_intern_2024/env/bin/python3
Jupyter: 5.7.2
Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.3.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

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.

Research direction

Start by rendering the supplied .qmd example with the Python/Jupyter engine to DOCX and inspect the six generated tables, focusing on the second row and second column. Compare the output with the expected aligned layout; the issue is resolved when no additional caption line or space appears in the second row.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
cli, content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.