ole/wml equation can't transfer into tex, but \includegraphics
jinhangli opened this issue · 4 comments
hello, I use the same docx with @gsfs , but in the tex file, I only get:
\textbf{\textnormal{Express your answers to the following questions in terms of} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image4.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject3.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image5.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject4.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image6.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject5.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image7.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject6.bin}\textnormal{, and} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image8.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject7.bin}\textnormal{.} }
I would like to have the equation correctly converted into the math version. Could anyone give me some help?
I use the latest version of the code and tried both Linux and windows versions.
Thanks a lot. @gimsieke @mkraetke
Originally posted by @jinhangli in #84 (comment)
Hi @jinhangli,
would you please provide a sample docx file with your issue? Docx2tex supports equations from MathType and the Word's internal equation editor. If the file contains only the raster image of an equation, we cannot help. Then a OCR solution would be advisable but this is out of the scope for docx2tex.
Best, Martin
Hi @mkraetke,
The equations in the docx files are Word's internal equation editor. The format should be oleObject.
#84 (comment)
I use the test_image.docx in the issues. (as mentioned in the issues, the equation should be transferred correctly) But I only get the Tex like below:
`
\begin{document}
\textbf{\textnormal{A sphere of radius} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image1.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject1.bin} \textnormal{is negatively charged with a uniform volume} \textnormal{charge density} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image2.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject2.bin}\textnormal{.} }
\textbf{\includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image3.emf}}
\textbf{\textnormal{Express your answers to the following questions in terms of} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image4.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject3.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image5.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject4.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image6.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject5.bin}\textnormal{,} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image7.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject6.bin}\textnormal{, and} \includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image8.emf}\includegraphics[width=1\textwidth]{embeddings/oleObject7.bin}\textnormal{.} }
\end{document}
`
My Java version is java version "1.8.0_65" and I use the code docx2tex-1.8-release.zip.
Could you please give me some hints on what should I try to make the equations into Tex correctly?
Appreciate your kind help.
This issue has been fixed a while ago. I created a new release which incorporates the fix. Please just download docx2tex release 1.9. The output should look like this for your file:
\textbf{\textnormal{A sphere of radius} $R$ \textnormal{is negatively charged with a uniform volume} \textnormal{charge density} $\rho _{0}< 0$\textnormal{.} }
{\centering \textbf{\includegraphics[width=1\textwidth]{test_image.docx.tmp/word/media/image3.emf}}
\par}\textbf{\textnormal{Express your answers to the following questions in terms of} $\rho _{0}$\textnormal{,} $\varepsilon _{0}$\textnormal{,} $R$\textnormal{,} $r$\textnormal{, and} $\hat{\mathbf{r}}$\textnormal{.} }