I have some source code like example.py --help that i want to fit into a heading and export to pdf.
Unfortunately org-mode exports --help to LaTeX without escaping so I end up with an equivalent to \ndash{}help, a long dash and not to separate dashes.
I tried to escape the dashes --help which ended up like spaces in the LaTeX file and therefor as well in the pdf.
I tried to write {-}{-}help which would give me --help in the pdf and not the ligature of two dashes (long dash). But when I export {-}{-}help from org-mode, the braces will be escaped to {-}{-}help in the LaTeX export, which leads to {-}{-}help in the pdf.
I tried then to write {-}{-}help which let to {-}{-}help in the LaTeX code, hence the pdf output is {-}{-}help.
Has anyone a clue how to escape -- from org-mode the correct way?
I suceeded, but ended up with a really ugly solution:
**** example.py
#+BEGIN_LATEX
{-}{-}help
#+END_LATEX
- foo
- bar
The answer was found here: http://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code
The answer from fniessen is far more practical since it does not blow up the org-file:
**** =example.py --help=
- foo
- bar
should do it. Or the version with ~ instead of =.