Remove the \setlength{\arraycolsep}{0pt}
and it should work -- that seems to be causing the problem.
And please consider reporting problems like this on the pandoc bug tracker, so we can improve pandoc. It would be a relatively simple matter to change the texmath library (which pandoc uses for math conversions) to ignore (or better, do something with) the \setlength
command.
As for the figure, pandoc should be able to find the image; again, we'd be interested in a detailed bug report with enough information to reproduce the problem. (Also, be sure you're using the most recent version of pandoc, or at least tell us which version you're using.)
I was curious and tested html, epub, and docx and it turns out that
docx to context is the winner.
The sample document
I created the following document in google docs and exported it to html, epub and docx.
html to context
pandoc Test.html -t context -o Test.html.tex
Results in:
This is a sample document
There is italic text and~there is~bold text and maybe~bold italic text.
Also there is the occasional footnote.\high{\goto{{[}1{]}}[ftnt1]}
This will go on for twenty pages or so\ldots{}
\thinrule
\goto{{[}1{]}}[ftnt_ref1]~This is footnote~text.
You can see that html loses bold and italic and the footnote is awkward.
epub to context
The same formating loss and references awkwardness applies to epub.
pandoc Test.epub -t context -o Test.epub.tex
Results in:
This is a sample document
There is italic text and ~there is ~bold text and maybe ~ bold italic
text. Also there is the occasional footnote.
\high{\goto{{[}1{]}}[Test.xhtmlux5cux23ftnt1]}
This will go on for twenty pages or so\ldots{}
\thinrule
\goto{{[}1{]}}[Test.xhtmlux5cux23ftnt_ref1] ~This is footnote ~ text.
docx to context
On the other hand, the combination of docx-reader
and context-writer
produces decent code.
pandoc Test.docx -t context -o Test.docx.tex
Results in:
{\bf This is a sample document}
There is {\em italic text} and there is {\bf bold text} and maybe
{\em {\bf bold italic text.}} Also there is the occasional
footnote.\footnote{This is {\em footnote} {\bf text.}}
This will go on for twenty pages or so...
Best Answer
Beside that $$...$$ syntax is not recommended in LaTeX, it is unclear what are you doing really.
There are not an input latex file in the command line, but guessing that is
Saving this as
test.tex
, then:Producing this output:
Adding
-s -o test.html
only will save this inside a complete XHTML file, but of course, without rendering in any way.Guessing that you want really is render the math display class with Mathjax in a browser, then you should run:
Output in Firefox: