New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in the LaTeX to DOCX converter {\color{incolor}In [{\color{incolor}}]:} #1907
Comments
Can you please provide a slightly bigger code snippet? Just to check, your workflow is IPython -> LaTeX -> Pandoc -> Docx? |
Thank you mpickering! I confirm that my workflow is IPython notebook (.ipynb) -> ipython nbconvert -> Latex Document (.tex) -> Pandoc -> Docx document (.docx). I prepared a smaller version of my document and I attach the latex source and the docx result. I have commented the docx file to mark the problems, re-assumed below:
P.S.: I send you the material via email as I don't understand how to attach things on this platfom. |
I forgot to mention some the technical details. The exact command lines given to produce the are:
The version of the programs is the following
I am running the things on Windows 7. Cheers |
I didn't receive an email, could you please paste the latex source in a gist and post the link here? |
Dear Matthew, I try again to send the material via e-mail. I will also do what you ask. Cheers On 2 February 2015 at 20:39, Matthew Pickering notifications@github.com
|
Here is the gist link: https://gist.github.com/alkhwarizmi/80cb7ba3524c61765c32 And here is a google drive link to get the pdf and docx document as well: https://drive.google.com/folderview?id=0B9GtA85Qi8QYX3pkQkl1ekhhN1U&usp=sharing Hope it's enough. Thank you! |
On closer examination: the issue is not with
which is a special fancyvrb environment that allows commands to be used inside a verbatim environment. Pandoc can't really handle this, because it doesn't allow formatting inside code blocks, and doesn't purport to handle fancyvrb environments. |
Hmm, I seem to be getting this same issue, and according to http://pandoc.org/README.html, you do purport to handle fancyvrb, under the "Creating a PDF" section. Since I'm using MikTeX on Win10, I'm not sure how to accomplish the other suggestion I found to use xelatex. So, where does this issue stand at this point? |
Pandoc uses fancyvrb on the output side (creating latex/pdf). This issue concerns latex on the input side. |
I'm using ipython notebook, so I'm not sure I care what "side" the problem is on. I just want a working solution! |
I was just about to close this, as it's a really old issue. But when I run the above gist, pandoc 2.0.5 consumes more and more memory till it's killed. The problematic part is the following snippet. Pipe it to
|
The snippet above parses successfully now... |
After conversion from a LaTeX document (generated automatically by the ipython notebook exporter) the latex sections referring to the original python code are left probably unconverted in the output.
The smallest code snippet i got in the document is the following
{\color{incolor}In [{\color{incolor}}]:}
I think the problem could be that the filter does not have yet an infrastructure to manage colors. Everyone using pandoc to convert ipython notebooks to docx document would be better off getting the code in black with a different style (fixed size character) in the meantime the color infrastructure gets implemented.
I can provide larger code snippets for testing if required.
Also I have a latex equation which is not translated correctly in the docx format. It is not easy to see a reason why the formula should be translated erroneously. Shall I file another bug for that?
Thank you for the job, Pandoc is great!
The text was updated successfully, but these errors were encountered: