1

I've found Pandoc error messages to be completely uninformative, since the line number is always wrong. For example, right now I'm working on a file that is 223 lines long, and Pandoc says there's an error on "line 295" (specifically, it says l.295`. Line 295 obviously does not exist. Is there any way I can fix this? Am I just misinterpreting something?

  • 3
    the line number of the form l.295 is from tex not pandoc so will relate to the tex file that pandoc generated (or a file include into that file) not your original source. – David Carlisle Feb 27 '17 at 18:30
1

You could be calling some macro within your markdown file that uses a package. The arguments passed to that macro is processed and caused an error within the package code at line 295.

There's no true way to fix this in general, since the code is most likely valid within your document, but not within the package. Moreover, packages can call one another, making for a nested search of lines where mistakes can occur, with calls being valid until they are not. Another example of this is given in why is this error message line number wrong?

The proper solution here would be to understand what arguments are being passed to macros and compare that to what is allowed. Certain arguments may be fragile, for example.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.