I use org-mode lists, both plain-text lists and numbered lists. I precede my lists with a "list title," which for me is any line ending in a colon.
Grocery list: - tomatoes - spinach - blueberries
I'd like these list titles to be automatically italicized in export to HTML and LaTeX PDF.
I don't want to do this by making it a headline, since by design, as we know, there is no way to end an org-heading and return to the parent level without creating a new heading.
So instead, I want org to automatically consider any lines ending with a colon as list titles. (Even better would be to exclude headlines and lines that have a period somewhere before the ending colon.)
I figured out how to fontify such lines within the Emacs buffer itself by defining a new face:
(defface list-title-face '((t (:background "pale green"))) "fontify list titles") (font-lock-add-keywords 'org-mode '(("^.*:[ ]*$" . 'list-title-face)))
But how do I create an org-emphasis type so that the emphasis will be respected in org-export?
org-emphasis-regexp-components looks promising.