quarto-dev / quarto-dev/quarto-cli
format of word tables from quarto
@cscheid is already working on this.
Since May 24, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/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
---
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"))
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.