Skip to content

format of word tables from quarto #9655

Open
@KipBalkcom-USDA

Description

@KipBalkcom-USDA

Discussed in #9650

Originally posted by KipBalkcom-USDA May 13, 2024

Description

There appears to be a format change from the previous version of Quarto I was using (1.3.???) compared with the latest version (1.4.554). As suggested in the discussion, I removed the reference document and the cross reference label. The rendered table format is what I expected, but I obviously want to be able to use cross referencing the automatically number tables and I don't want to manually format the table captions. Hopefully, this issue can eventually be resolved.

Current software:
Windows 10
Quarto 1.4.554
Word Microsoft 365

current_behavior.docx

---
title: "Reproducible Table in Quarto"
engine: jupyter
format: docx 
---

```{python}
#| tbl-cap: Years and locations.
#| echo: FALSE

import pandas as pd
from tabulate import tabulate
from IPython.display import Markdown

# define values
field_ops = (pd.DataFrame({
    "Year": ['2020', '2021'],
    "Location": ["Loc1", "Loc2"]}))

Markdown(tabulate(
    field_ops, headers="keys", showindex=False, tablefmt="pipe"))

``` 

Metadata

Metadata

Assignees

Labels

crossrefdocxIssues with the docx formatenhancementNew feature or requesttablesIssues with Tables including the gt integrationtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions