Alright, so I wanted to mess around with “pdc hs” – basically, getting a Pandoc document converted to HTML, but with some syntax highlighting sprinkled in. Here’s how I went about it.
First, I grabbed a simple Markdown file I had lying around. Nothing fancy, just some text and a bit of code. Let’s call it . This was my starting point, you know, the raw material.
Then, I fired up my terminal. I’m a command-line kind of guy, it just feels more… direct. I already had Pandoc and a syntax highlighter (we’ll get to that) installed. If you don’t, you’ll need to get those sorted first. It’s usually pretty straightforward with your system’s package manager.

The Basic Conversion
My first step was a simple conversion, no highlighting yet. I typed in something like this:
pandoc * -o *
See? Super basic. This takes and spits out . I opened the HTML file in my browser, and yep, it was my Markdown, all nicely formatted as HTML. But the code blocks? Plain, boring text.
Adding Some Sparkle (Syntax Highlighting)
This is where things get a bit more interesting. I needed a syntax highlighter. There are a few options, but I went with highlighting-kate
. I found it easy to use it with Pandoc.
- I checked that using this command –help pandoc, if
highlighting-kate
it is correct installed
Now, I modified my command:
pandoc * --to html --highlight-style=kate -o mydoc_*
See that --highlight-style=kate
? That’s the key. It tells Pandoc to use highlighting-kate
for the code blocks.

I ran the command, opened mydoc_*
, and boom! My code blocks were now all colorful and pretty. Much easier to read, and it just looks way better.
Tweaking and Experimenting
Of course, I didn’t stop there. I played around with different highlighting styles. You can find a list of available styles, I just tried a few until I found one I liked.
You can also customize things further, like adding line numbers or changing the output format. Pandoc has a ton of options, so it’s worth digging into the documentation if you want to get really fancy.
So, that’s my little adventure with “pdc hs”. It’s not rocket science, but it’s a neat trick to have in your toolbox if you work with Markdown and want to create nice-looking HTML with highlighted code. The key is to start simple, get the basics working, and then experiment with the different options.