markdown - prevent pandoc from converting $ into mediawiki <math> -
i converting markdown file mediawiki table using pandoc:
content of file mtcars.md:
|   |c1   |c2 | |:--|:----|:--| |7  |p$a |a  | |8  |ab  |b  | |9  |p$a |c  | then (i using ubuntu 64 bits , pandoc version 1.13.2)
pandoc -t mediawiki -o mtcars.txt mtcars.md but 2 $ signs interpreted <math>...</math>:
{| ! !c1 !c2 |- |7 |p<math>a |a | |8 |ab |b | |9 |p</math>a |c |} how can dollar signs instead?
the pandoc documentation says:
anything between 2 $ characters treated tex math. opening $ must have non-space character right, while closing $ must have non-space character left, , must not followed digit. thus, $20,000 , $30,000 won’t parse math. if reason need enclose text in literal $ characters, backslash-escape them , won’t treated math delimiters.
so, 1 way put backslash in front of $:
|   |c1   |c2 | |:--|:----|:--| |7  |p\$a |a  | |8  |ab  |b  | |9  |p\$a |c  | output:
| |c1 |c2 | |:--|:----|:--| |7 |p$a |a | |8 |ab |b | |9 |p$a |c | (i don't seem same mediawiki output formatting you, point).
another way put space after $, although adds space in output.
the interpretation of $ signs part of markdown extension called tex_math_dollars - should able suppress altogether specifying input format of markdown-tex_math_dollars or markdown_strict (although did not work on older version of pandoc have here).