Hiya

Welcome to my website!

I’m a tech writer by trade with a heavy focus on dev docs.

I’ve been writing my whole life, but I’ve also worked a bit in public education, and I’m a self-taught programmer.

I like to build things and break them to figure out how stuff works.

This is my place on the internet. It has a portfolio with some of my work and a blog where I can publish my own bits of writing and share stuff I like.

How to get Pandoc to respect custom table styles in Word templates

TL;DR: If you want to customize your tables and you don’t want to start with Pandoc’s default reference.docx template, you need to create your own new table style, name it Table, and modify that style to do whatever you want tables to do.

I’m helping automate a documentation process at work, and the last step involves converting a Markdown file to .docx. The team we’re helping sent over a reference file with all their custom “styles” (in quotes here because none of the formatting they want to use is a style in the Word sense of the word).

We’re using this reference file as our template to apply custom styling when we run the conversion. We need to associate all the custom formatting in this doc with the Word styles Pandoc knows about so that Pandoc can apply those styles correctly. This was going fine until I couldn’t get Pandoc to apply our custom table styles.

Pandoc applies styles from the table style named Table in your template

It turns out that when you pass a reference.docx file to Pandoc, it applies any styles from the table style called Table to the tables in your converted document. I tripped on this because there’s no default table style named Table in Word, and the first Stack Overflow answer I came across suggested the solution is to edit the raw XML in your converted document.

I should note here that the Pandoc user guide does identify the table style from reference.docx as “Table, but I don’t think that would have been enough for me to connect the dots. Also noteworthy is that when I google this on my personal computer, Google’s AI summary immediately tells me that I should create a new table style named Table. But Google’s AI summary is disabled on my work device, and I’ve had plenty of bad experiences using LLMs to troubleshoot Pandoc edge cases, so I thought I was making the smart choice by avoiding using the LLMs endorsed by our enterprise for this search.

I went about this the hard way, of course. Because it didn’t occur to me that I could just create a new table style called Table (or even to try this approach), I generated a new version of the reference.docx file, used Style Organizer to export that style to my own reference file, and went from there. I only learned you can indeed create your own new table style and even give it a custom, unique name (like, well, Table) until I started writing up this post to help other lost souls like myself and it occurred to me that I should probably just double check real quick that my workaround is indeed the only way to accomplish this task. Woe.

How I update this blog from my iPad

2025-11-15 update: I migrated this blog to Hugo and use Cloudflare for hosting, so this process is out of date. But I’ll leave it up for posterity.

I want to kickstart an extracurricular writing habit. I also want to write down the process I use to update this site from my iPad, so I can look it up after the writing habit has gone dormant and I need to remember how it all works. This post is a stone thrown at both birds.

Background

I use Jekyll to build this site and GitHub for source control. For hosting, I have a Digital Ocean droplet running Ubuntu and Nginx. I followed this guide to set it all up: How to Install Nginx on Ubuntu.

Process

To update the site from my iPad, I launch Safari and navigate to the repository with my source files on GitHub. From there, I hit . to start a codespace for my repository in a new tab. This codespace is a Visual Studio Code workspace loaded with the contents of my repository, all running in my browser.

I use this VS Code instance to make any changes I want to the source files. When I’m ready to build and preview the site, I open the integrated terminal for VS Code. I use bundle exec jekyll serve to update the contents of my _site directory and to check out a local preview that codepaces sets up via port forwarding. When everything checks out, I run an rsync command from the integrated terminal to send the contents of the _site directory to my server.

It’s a straightforward process, and the steps are pretty much the same when I update the site from VS Code on my laptop. Codespaces makes it possible to manage the whole process from start to finish from any device with a web browser.

Playlist: Spin Cycle

Here’s a link to a Spotify playlist with a bunch of songs I like: Spin Cycle.

I think I’ll keep adding to this. I want an evergreen playlist with ten thousand great pop songs.

If you want an implementation of this idea by someone with much more interesting taste, check out Ben Watt’s Spin Cycle playlist. I love to discover music by learning what other people are connecting to, and people who have made their lives about music tend to make good recommendations. Ben Watt is generous in updating his public playlist on a regular basis.