quarto-dev / quarto-dev/quarto-cli

Embedded code cells don't inherit project level options

Open
#8,497 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm using the embed feature in a book to execute/display code cells from multiple languages in a single chapter.

If I add options like fig-width and fig-height in _quarto.yml, the options aren't applied to the outputs of the embedded code cells -- the plot is not 2x2.

Screenshot 2024-01-29 at 6 06 08 PM

If I add them to the chapter that has the code embedded, they're again not applied -- the plot is not 2x2.

Screenshot 2024-01-29 at 6 14 56 PM Screenshot 2024-01-29 at 6 14 59 PM

If I add the options to the individual .qmd files that have the original code cells, they are applied -- the plots are 2 x 2.

Screenshot 2024-01-29 at 6 07 45 PM Screenshot 2024-01-29 at 6 07 53 PM

I'm on Quarto 1.4.549. The book is at https://github.com/mine-cetinkaya-rundel/quarto-tdg.

Note: I had freeze: false while investigating if this was a freeze issue, but it's set to auto in the repo so that the book builds with the GitHub action.

cc @cwickham

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.

Research direction

Reproduce the behavior in the linked quarto-tdg book using its _quarto.yml, chapter options, and source .qmd files, with freeze set to auto as in the repository. Compare embedded-cell outputs with plots configured in the original files; done means project- or chapter-level fig-width and fig-height are inherited by embedded cells.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, yaml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.