Skip to content

Figure cross referencing and knitr::read_chunk #8758

Answered by mcanouil
richardbeare asked this question in Q&A
Discussion options

You must be logged in to vote

Label needs a prefix such as fig- to be accounted as a cross-reference, see https://quarto.org/docs/authoring/cross-references.html.

Side note: FALSE is R syntax. In yaml, it is false. In Quarto, options use - not . as word separator.
Use execute to set globally option such as echo: false, see https://quarto.org/docs/reference/formats/html.html#execution and https://quarto.org/docs/computations/execution-options.html.
Finally, headers, list, and code cells should be surrounded by empty lines to avoid parsing issues.

In the end your Quarto document should look like the following:

---
title: "Test figure labels from code chunks"
format:
  pdf:
    keep-md: true
    keep-tex: true
execute:
  e…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@richardbeare
Comment options

@mcanouil
Comment options

@richardbeare
Comment options

@mcanouil
Comment options

@richardbeare
Comment options

Answer selected by richardbeare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants