Skip to content

?(caption) in DOCX when eval: false and output: true #3629

@rgaiacs

Description

@rgaiacs

Bug description

Zip with minimal working example

Consider the follow Quarto document

---
title: "Minimal Working Example"
---

Foo

```{r}
#| echo: false
#| eval: false
#| output: true
#| label: tbl-mwe
#| tbl-cap: MWE.

data.frame(
  x = c(1, 2),
  y = c(1, 2)
)
```

Bar

Convert it to DOCX with quarto render --to html produces

Screenshot from 2022-12-12 14-59-32

Note the ?(caption) between Foo and Bar produced as the output of the cell block.

Convert the same document to HTML with quarto render --to html produces

Screenshot from 2022-12-12 15-01-29

The cell block does NOT produce any visible output.

Change output: true to output: false resolves the problem but would be great that eval: false implies output: false for DOCX as it does for HTML.

User Environment

quarto check:

[✓] Checking Quarto installation......OK
      Version: 1.3.34
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.10 (Conda)
      Path: /home/raniere/mambaforge/bin/python
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /usr/lib/R
      LibPaths:
        - /home/raniere/R/x86_64-pc-linux-gnu-library/4.2
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      rmarkdown: 2.16

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

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcrossrefdocxIssues with the docx formatverify-fixedAlready fixed, awaiting verification from the issue reporter to confirm.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions