quarto-dev / quarto-dev/quarto-cli
PDF: Erroneous interaction between project type `book` and `{.content-visible when-profile="<PROFILE>"}`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Using 1.2.269 on linux, bioconductor_docker.
cat /etc/os-release:
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
...
Includes:
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for Ubuntu Bionic
Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
Consider the following:
-
_quarto.yml:profile: group: - [A, B] -
index.qmd:::: {.content-visible when-profile="A"} # Print in profile A only ::: ::: {.content-visible when-profile="B"} # Print in profile B only ::: -
Call
quarto render --to=pdf --profile=Aorquarto render --to=pdf --profile=B
==> all works as expected. Profile specific content rendered as requested. -
Change
_quarto.ymlto:project: type: book book: chapters: - index.qmd profile: group: - [A, B] -
Call
quarto render --to=pdf --profile=A
==> all works as expected. Profile specific content rendered as requested. -
Call
quarto render --to=pdf --profile=B
==>quartoignores the.content-visiblestanzas and renders BOTH!?
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.
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.
Research direction
Start with the minimal _quarto.yml and index.qmd configuration in the report, then run the two quarto render --to=pdf --profile commands for profiles A and B to reproduce the discrepancy. Trace PDF book rendering and .content-visible when-profile handling; done means profile B renders only its B-specific content, as profile A already does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100