quarto-dev / quarto-dev/quarto-cli

format of word tables from quarto

Open
#9,655 2 comments 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since May 24, 2024.

crossref docx enhancement tables triaged-to
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

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"))

``` 

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.