I am trying to convert a latex document to docx (hell, logs that do not accept latex or pdf messages) but get an error referring to a line outside the range of the original latex file (the file has 385 lines). I checked only instances of \\ (inside the table) and this seems unproblematic. The error also persists if the table is deleted. The latex source is compiled in pdf on MiKTeX.
The error occurs if I try to convert it to other formats, so this is not a problem for converting docx. It is hard to make a reproducible example, since I donโt know which part of the code is causing the problem (since this refers to the line number outside the input file). Is the error message a reference to the pandoc source?
Command:
pandoc -f latex article.tex -o article.docx
Error message:
pandoc.exe: Error: "source" (line 407, column 1): unexpected "\\" expecting white space, "%", new-line, "begin", letter, "*", "[", "}", "egroup", "endgroup", "{", "bgroup", "begingroup", "-", "``", "`", "'", "~", "$$", "$", "^", "_", "^^", "]", "#", "&", "\\" or " end"
Any ideas on how to shoot shoot?
I don't know if this is suitable for Stackoverflow or http://tex.stackexchange.com , but there are more search queries for pandoc here.
Edit:
Now I found out that conversion works if the input file is moved to. /temp/input.tex and I'm really confused. Related files (.eps, .bib) were moved with it, and the files in both folders were renamed, so the old temporary files did not affect the tex conversion. There are no strange characters or spaces in the source folder. I am even more confused and annoyed. However, at least I can get the converted file.