Reputation: 2297
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
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?
Upvotes: 2
Views: 230
Reputation: 2605
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.
Upvotes: 5
Reputation: 7884
I'm not certain if this is a bug or not. I was able to reproduce it, however if I escaped the *
the export occurred as expected.
#+TITLE: Bug?
#+OPTIONS: toc:nil author:nil
- hello (\*) I would like to have two items
- may (\*) I please?
Latex created:
\begin{itemize}
\item hello (\*) I would like to have two items
\item may (\*) I please?
\end{itemize}
I will however post the question to the mailing to confirm whether this is the expected behaviour or not in this situation. The thread for this question is HERE.
EDIT I edited to correct the LaTeX that was exported (needed to add this as 1 char is not enough, feel free to remove this line.)
Upvotes: 1
Reputation: 2297
I found a work-around for this behavior (bug?): add an empty line between the two offending lines:
#+TITLE: Workaround!
#+OPTIONS: toc:nil author:nil
- hello (*) I would like to have two items
- may (*) I please?
gives:
Thus allowing the string (*)
to exist in an item (or rather in two consecutive items)
Upvotes: 1