I’ve been experimenting with adding highlights to text in my daily posts. The idea is that it makes scanning easier. I pick out the important parts of each entry and add a <mark> HTML tag. Then I style the region like so:
|
|
Recently, there’s been a change in org that broke my markup when exporting from ox-hugo. Here’s the comment by kaushalmodi:
This was a recent breaking change that fixed an inconsistency in ox-hugo (compared to ox-html). If we want to export verbatim HTML, it needs to be in .. or in an HTML export block
His suggestion to use a macro was excellent, so I did that. At the top of my posts.org file, is this:
#+macro: mark @@html:<mark>$1</mark>@@
When I want to <mark> some text, I add the macro inline, like so:
I would like to {{{mark(mark this text)}}} so that it is highlighted
But who has time to add all that markup by hand? To make it easier, I created the following function:
|
|
Now, I select a region and run M-x jab/markregion. I may create a keybinding for it, too, but for now this is fast and easy.