Search code examples
emacsmarkuporg-mode

Possible bug in Org Mode export of item with `(*)`


I'm using org mode to make a list that I would like exported to PDF. some items in the list have the combination (*) and this seems to throw org mode off.

This MWE

#+TITLE: Bug?
#+OPTIONS: *:nil toc:nil author:nil

- hello (*) I would like to have two items
- may (*) I please?

results in

enter image description here

even though the #+OPTIONS: *:nil part was obviously read and understood (the part between the stars is not bold as it would be had that line been missing.

Is this is bug? Am I doing something wrong? Is there a workaround?


Solution

  • The *:nil option is not the problem here.

    The problem comes from the fact that the * in (*) actually do emphasize the text (it is in bold font in the buffer). Given that, the exporter does its best, which is not very good.

    The bug here is to allow multiline fontification over distinct list items -- we'll try to fix it, but that's a rather complex issue.

    On top of the workaround above, have a look at `org-emphasis-regexp-components', thru which you can prevent parentheses as post/pre-characters in a fontified string.