Skip to content

An attribute a shortcut fixes

Some shortcuts fix a value they're named for: latex-only keeps content for PDF, so its symbol is always latex. A use writing a fixed attribute stops the build rather than let the name say one thing and the book do another.

What it looks like

::: {.latex-only symbol="epub"}
Only in print.
:::
ERROR: shortcut 'latex-only' fixes symbol
  │ ::: {.latex-only symbol="epub"}
  │ Only in print.
  The shortcut sets the value itself.
  Delete it.
  See https://keystone.knight-owl.dev/errors/fixed-attribute/

What it means

latex-only sets symbol itself. symbol="epub" would turn a PDF-only block into an EPUB-only one under a name that says otherwise.

Delete the attribute, or use the shortcut that means it

Write ::: latex-only alone. For another gate, use the shortcut named for it — epub-only — or ifdef with the symbol you want; see Conditional content.