quarto-dev / quarto-dev/quarto-cli

[knitr] Cell should not allow two caption attributes

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

@cderv is already working on this.

Since Jun 10, 2024.

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

Description

When setting fig.cap in global knitr::opts_chunk every table gets appended the value set globally to fig.cap

--- 
title: "Test"
date: "`r Sys.Date()`"
format: pdf
editor_options: 
  chunk_output_type: console
---

```{r}
knitr::opts_chunk$set(fig.cap = '123')
```

```{r}
tbl_data <- tibble::tibble(a = letters[1:5], b = LETTERS[1:5])
```

```{r}

#| tbl-cap: 'Test GT'
#| tbl-label: test_gt
  tbl_data |> gt::gt()
```

test.pdf

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.