Open GiantCrocodile opened 7 years ago
From html to odt is not working completely:
[pandoc warning] Could not determine image size in `data:image/png,%89PNG%0D%0A%
1A%0A%00%00%00%0DIHDR%00%00%00%01%00%00%00%01%08%02%00%00%00%90wS%DE%00%00%00%01
sRGB%00%AE%CE%1C%E9%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00
%00%07tIME%07%DB%0B%0A%17%041%80%9B%E7%F2%00%00%00%19tEXtComment%00Created%20wit
h%20GIMPW%81%0E%17%00%00%00%0CIDAT%08%D7c%60%60%60%00%00%00%04%00%01%274%27%0A%0
0%00%00%00IEND%AEB%60%82': could not determine image type
and thus odt to pdf fails too because of a libpng error.
Can you provide the smallest amount of HTML in that file that triggers the error?
The [pandoc warning] Could not determine image size
is only a warning...
@mb21 How do I know which line is triggering the error? To me it looks like I don't get any information about which line it fails from input. It could be related to this: https://de.wikipedia.org/wiki/Hausschwein#Anzahl_der_gehaltenen_Schweine because it says something about a table.
Unfortunately, the only way is trial and error (see first whether it's in the first or second half, then in which quarter, etc.) (or output to .tex and inspect that file)... you can also see whether it's already fixed in the latest nightly builds..
It is related to this html it seems:
<removed afterwards>
After I removed this part I get this error:
!pdfTeX error: pdflatex (file ./tex2pdf.6204/39e9cda2c77eb8e20f79f2ef82d503f466
2ee611.png): libpng: internal error
==> Fatal error occurred, no output PDF file produced!
libpng error: Not a PNG file
pandoc: Error producing PDF
The problem seems to be the nested tables, minimal example:
<table>
<tr>
<td>
<table>
<tr>
<td>foo</td>
<td>bar</td>
</tr>
</table>
</td>
</tr>
</table>
Here is the latex that pandoc produces for the above minimal example:
\begin{longtable}[]{@{}l@{}}
\toprule
\begin{minipage}[t]{0.97\columnwidth}\raggedright
\begin{longtable}[]{@{}ll@{}}
\toprule
foo & bar\tabularnewline
\bottomrule
\end{longtable}\strut
\end{minipage}\tabularnewline
\bottomrule
\end{longtable}
This produces the error on the nested \begin{longtable}
.
It says here that longtable can't be nested. We could try to detect nested tables and use tabular for those (though this may also require other changes).
@jgm I have an ODT file with a nested table, and it's ignored even in pandoc -t json
. Is it bug, or just the way it works now? Or is my version just too old?
pandoc 1.19.2.4
This could be a limitation of the ODT reader, but I'm not very familiar with that.
Same trouble from .docx
to .tex
with the attached file test.docx
. Is there a way to fix this issue?
When I use
to parse this dowloaded Wikipedia article https://de.wikipedia.org/wiki/Hausschwein I get this error:
I read that I can use pandoc for tasks like this so I would expect it to work - especially without an error. If this use case is wrong I'm sorry as I'm new to pandoc.