PowerPoint: Inserting Source Code with Syntax Highlighting
Jun 10, 2021 08:46 · 139 words · 1 minute read
When giving talks, I often want to show some small code samples on my slides. Of course, it should look nice and have syntax highlighting. This is not an easy feat. There are several options for showing code on your slides:
- You can use a presentation software that can manage source code highlighting out of the box, e.g. Reveal.js or the LaTeX beamer package
- You can convert the code to an image via Carbon or Codeimg.
But, if you, like me, want to continue using PowerPoint (the whole company is using PowerPoint & we often combine slides from different slide decks), there is another very easy option available: Just put your code into VS Code, enable syntax highlighting, and then copy-paste the code into PowerPoint. The formatting - including syntax highlighting - will stay intact magically. Just awesome 😍
- You are in control
- My Favorite Shortcuts for VS Code
- Customizing my shell: From bash to zsh to fish
- JSON5: JSON with comments (and more!)
- jq: Analyzing JSON data on the command line
- Get Total Directory Size via Command Line
- Changing DNS server for Huawei LTE router
- Notes on Job & Career Development
- Adding full-text search to a static site (= no backend needed)
- Generating a random string on Linux & macOS