Overriding Blackfriday

I set up this site recently using the static site generator hugo, and the academic theme, as this seemed to provide everything I wanted.

Pages can be written in markdown, which I’ve already used for a lot of my teaching material, and both code and mathematical equations end up rendered nicely. One additional thing it does, is use Blackfriday which is a markdown processor that converts shortcodes to different symbols and can make everything look a little nicer. It’ll automatically render things like 1/2 as 12 for example, or (R) as ®.

This last one was a bit of a problem as I have (R) in one of my paper abstracts as part of a reference to a Physical Review B Rapid Communication. I didn’t want this to be substituted with a ® but also didn’t want to disable Blackfriday completely. As you’ve seen here, another alternative is to mark it as code; but this would have looked off in a reference. I didn’t find any other good alternatives in the documentation, or support forums.

I figured out onne way around this, that will make everything look like it should, and lets you keep using Blackfriday elsewhere is to substitute part of the shortcode with unicode. For example, writing (R) will produce (R) and (C) will produce ©. You can get a full listing of characters on wikipedia (you’ll need the decimal code to use with this format - so R is 82).