1

When exporting an Org document to ConTeXt using Pandoc, I noticed the following.

( [org code] → PDF output )

*bold*bold
*bold,* → *bold,*

/italics/italics
/italics,/ → /italics,/

~code~code
~code,~ → ~code,~

Note that, in each case, a final comma breaks the formatting.

Is there some way of coercing the formatting into working?

(Perhaps similar to this hack for Markdown regarding code blocks and lists?)

This question seems concerned with the Emacs syntax highlighting, and so the fix is made from within Emacs; I'm using Pandoc to export the Org document to ConTeXt – so I can make finer typographical adjustments. Therefore changing Emacs' settings won't work.

  • Possible duplicate of Inline verbatim and code with quotes in Org-mode – Kaushal Modi Jul 29 '16 at 19:15
  • Regarding your question update: In that case, if I understand correctly, this question would be for the pandoc developers. – Kaushal Modi Jul 29 '16 at 19:37
  • @KaushalModi; I was hoping that there would be some hack in the Org language – if not, this question can serve as search fodder. – digitalis_ Jul 29 '16 at 19:53
  • It would be more of a pandoc hack, because pandoc org -> foo export supports only a subset of what the org exporters support in emacs. In any case, see if inserting ZERO WIDTH SPACE after that comma helps ( emacs.stackexchange.com/a/16702/115 ). – Kaushal Modi Jul 29 '16 at 19:55
  • @KaushalModi; In that case, is this question a duplicate? (If the answer to it lies as an aside in another question, and not an answer?) – digitalis_ Jul 30 '16 at 11:07
1

I'm the dev maintaining pandoc's org-mode reader. There currently is no setting equivalent to org-emphasis-regexp-components in Emacs, though adding this is possible in principle. We'd need to design a way to simply and uniformly pass variables to the reader.

As for now, the workaround suggested by @digitalis_ in the comments is the best option: Just add a zero with space character (C-x 8 <RET> ZERO WIDTH SPACE) between the comma and the closing markup character. Pandoc uses the default setting for characters which are forbidden at the inner border of markup, so any use of tabs, newlines, carriage returns, simple space, comma, and single/double quotes before the closing markup prevents the sequence from being interpreted as markup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.