LaTeXML The Manual

Appendix J Error Codes

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.

Warnings

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.

Errors

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.

Fatals

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:

  severity:category:object summary
      source locator
      description
      
      stack trace

the second and following lines are indented using a tab.

severity

One of Info, Warn, Error or Fatal, indicating the severity of the problem;

category

classifies the error or warning into an open-ended set of categories indicating whether something was expected, or undefined;

object

indicates the offending object; what filename was missing, or which token was undefined;

summary

gives a brief readable summary of the condition;

source locator

indicates where in the source document the error occurred;

description

gives one or more lines of more detailed information;

stack trace

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.

undefined

: The operation indicated by arg, typically a control sequence or other operation, is undefined.

ignore

: Indicates that arg is being ignored; typically it is a duplicated definition, or a definition of something that cannot be redefined.

expected

: A particular token, or other type of data object, indicated by arg, was expected in the input but was missing.

unexpected

: arg was not expected to appear in the input.

not_parsed

: A mathematical formula could not be successfully parsed.

missing_file

: the file arg could not be found.

latex

: An error or message generated from LaTeX code. and the corresponding LaTeXML code should be updated.

too_many_errors

: 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.

misdefined

: The operation indicated by arg, typically a control sequence or other operation, has not been defined properly.

deprecated

: Indicates that arg is a deprecated usage.

malformed

: The document is malformed, or will be made so by insert arg into it.

I/O

: some problem with input/output of the file arg, such as it not being readable. The exact error is reported in the additional details.

perl

: A perl-level error or warning, not specifically recognized by LaTeXML, was encountered. arg will typically die, interrupt or warn.

internal

: Something unexpected happened; most likey an internal coding error within LaTeXML.