-
Notifications
You must be signed in to change notification settings - Fork 225
Description
Right now we syntax highlight all source files using source-highlight.
It would be nice to also syntax highlight all the code in the slides and labs. Would reduce eyestrain, especially for the labs.
The good news is that this can be done already:
- pandoc supports named code blocks, so all we need to do is add
cppto all our code blocks. - reveal.js has . It's broken currently, but can be fixed by just adding
Line 22 in 2dcae87
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, reveal.js/in front.
Ideally, the highlighting would be consistent across all sources. The labs will most likely stay in light mode, and probably the source files as well, but the slides are dark mode. That doesn't mean we can't have consistent highlighting, though, as many themes have both light and dark variants.
So all we need to do is find a theme! I personally have a soft spot for One Dark and One Light, having worked on Atom as they were being developed (they also have corresponding Emacs variants), but I understand that this really isn't a decision for me to make 😁.
Notes:
- Pandoc does not use CSS for its theming, which is...slightly annoying. I should be able to figure out the CSS --> JSON conversion required, though, or just manually override the colors with CSS anyway after they've been generated.
- source-highlight takes in the
--style-css-fileargument.