Warning and Error messages are printed to STDERR during the execution of latexml and latexmlpost. As with TeX, it is not always possible to indicate where the real underying mistake originated; sometimes it is only realized later on that some problem has occurred, such as a missing brace. Moreover, whereas error messages from TeX may be safely assumed to indicate errors with the source document, with LaTeXML they may also indicate LaTeXML’s inability to figure out what you wanted, or simply bugs in LaTeXML or the librarys it uses.
are generally informative that the generated result may not be as good as it can be, but is most likely properly formed. A typical warning is that the math parser failed to recognize an expression.
generally indicate a more serious problem that is likely to lead to a malformed result. A typical error would be an undefined control sequence. Generally, processing continues so that you can (hopefully) solve all errors at once.
are errors so serious as to make it unlikely that processing can continue; the system is likely to be out-of-sync, for example not knowing from which point in the input to continue reading. A fatal error is also generated when too many (typically 100 regular errors have been encountered.
Warning and Error messages are slightly structured to allow unattended processing of documents to classify the degree of success in processing. A typical message satisfies the following regular expression:
the second and following lines are indented using a tab.
One of Info, Warn, Error or Fatal, indicating the severity of the problem;
classifies the error or warning into an open-ended set of categories indicating whether something was expected, or undefined;
indicates the offending object; what filename was missing, or which token was undefined;
gives a brief readable summary of the condition;
indicates where in the source document the error occurred;
gives one or more lines of more detailed information;
optionally gives a brief or long trace of the current execution stack.
The type is followed by one or more keywords separated by colons, then a space, and a human readable error message. Generally, this line is followed by one or more lines describing where in the source document the error occured (or was detected). For example:
Error:undefined:\foo The control sequence \foo is undefined.
Some of the more common keywords following the message type are listed below, where we assume that arg is the second keyword (if any).
The following errors are generally due to malformed TeX input, incomplete LaTeXML bindings, or bindings that do not properly account for the way TeX, or the macros, are actually used.
: The operation indicated by arg, typically a control sequence or other operation, is undefined.
: Indicates that arg is being ignored; typically it is a duplicated definition, or a definition of something that cannot be redefined.
: A particular token, or other type of data object, indicated by arg, was expected in the input but was missing.
: arg was not expected to appear in the input.
: A mathematical formula could not be successfully parsed.
: the file arg could not be found.
: An error or message generated from LaTeX code. and the corresponding LaTeXML code should be updated.
: Too many non-fatal errors were encountered, causing a Fatal error and program termination.
The following errors are more likely to be due to programming errors in the LaTeXML core, or in binding files, or in the document model.
: The operation indicated by arg, typically a control sequence or other operation, has not been defined properly.
: Indicates that arg is a deprecated usage.
: The document is malformed, or will be made so by insert arg into it.
: some problem with input/output of the file arg, such as it not being readable. The exact error is reported in the additional details.
: A perl-level error or warning, not specifically recognized by LaTeXML, was encountered. arg will typically die, interrupt or warn.
: Something unexpected happened; most likey an internal coding error within LaTeXML.