How can I specify highlight styles to specific code blocks (multiple different code highlight styles)? #6787
-
DescriptionI have a quarto reveal.js presentation that needs to use multiple highlight-styles for different code chunks. The Is there a way to override the pandoc highlight styles within the quarto doc? Maybe using a fenced in code block to specify the style like this: Slide 1:::{.overide-highlight-style="espresso"} `` Slide 2and having another code block with a different style: `` It's not clear to me how I should go about this. If I could add a pandoc theme to a css rule I think this might be easier, but I'm not really sure how to do that either. I ran this in a terminal I'm not familiar with lua, but is this a situation where lua filters may be necessary? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Highlight style is used and applied by Pandoc globally. See upstream issues: From there, you could apply the styles manually or via a Lua filter. |
Beta Was this translation helpful? Give feedback.
-
@mcanouil thank you! i think that worked. For anyone curious, here's how I got it to work
qmd file:
here's the scss file:
|
Beta Was this translation helpful? Give feedback.
Highlight style is used and applied by Pandoc globally.
See upstream issues:
From there, you could apply the styles manually or via a Lua filter.