3

I'm trying to convert/export a org file to Markdown. Most Markdown supports math with $x^2$ or $$x^2$$. I tried ox-gfm and pandoc, but they don't seem to handle it correctly:

org file:

\[x^2\]  
$$x^2$$  
$x^2$  
\(x^2\)
$x^2$

exported markdown file:

\[x^2\]  
\[x^2\]  
\(x^2\)  
\(x^2\)
\(x^2\)

None of these show up as math in a markdown file (correct would be $x^2$).

Does anyone know how to get the correct behavior? Note: I use spacemacs.

Jasper
  • 131
  • 2

1 Answers1

1

The markdown exported in org is generic: it does not handle the many flavors that are extant. You are probably better off using pandoc to do conversions to markdown:

 pandoc -r org -w markdown_github foo.org > foo.md

You can find what formats pandoc supports with the --list-input-formats and --list-output-formats options.

NickD
  • 27,023
  • 3
  • 23
  • 42