Cell option ignored on a diagram cell
Q-2-47 — Cell option ignored on a diagram cell
A diagram cell has no execution engine to pass unrecognized options to, so this option has no effect.
What this means
A ```mermaid block can carry cell options, written after a
%%| marker at the top of the block:
```mermaid
%%| label: fig-review
%%| fig-cap: The review cycle.
flowchart LR
Draft --> Review
```
Diagram cells accept exactly five: label, fig-cap, fig-scap,
fig-alt, and fig-align. Anything else raises this warning, and the
option is dropped.
Why this happens
The warning covers two different mistakes, and the message tells you which one you have.
The option is not one Quarto knows. Usually an execution option carried over from a code cell:
```mermaid
%%| echo: false
flowchart LR
A --> B
```
echo is meaningful for a ```{python} cell because an engine
runs it and decides whether to show the source. A diagram is not
executed — the source is sent to the browser and drawn — so there is no
engine to interpret the option and nothing sensible for Quarto to do
with it.
This is also what you see for Quarto 1’s theme and mermaid-format,
which Quarto 2 does not yet support.
The option is a real Quarto option that does not apply here. The
clearest case is fig-scap on a numbered diagram: a short caption has
somewhere to go on an unnumbered figure but not on a numbered float, so
it is reported rather than silently discarded.
Why the warning is specific to diagrams
Executable cells are deliberately not warned about. There, an
unrecognized key is normally an engine option — echo, eval,
warning, or something engine-specific — that the engine reads
directly. Warning about those would fire on nearly every real document.
How to fix
Delete the option. If it was doing something in a Quarto 1 document,
check whether Quarto 2 supports the feature yet — diagram sizing
(fig-width, fig-height), pre-rendered output (mermaid-format) and
theming are all listed as not-yet-available in the
Diagrams guide.