(texdraw)Errors while using TeXdraw


Next: Extending TeXdraw Up: More Details
Enter node , (file) or (file)node

5.1 Errors while using TeXdraw
==============================

TeX input is notoriously difficult to debug.  If TeX reports errors, so
much the better.  If the cause is not immediately obvious, consider
using a binary search strategy, removing sections of code with the
premature insertion of the '\bye' (or '\end{document}' for LaTeX)
command (with the appropriate closing of any open groups and the like).
Other strategies include the insertion of '\message{I am here}' at
appropriate places.  Try using '\tracingmacros=1'.  Many problems turn
out to be due to an incorrect number of macro arguments or incorrectly
delimited macro arguments.  The '\tracingmacros=1' option writes the
macro arguments and macro expansions to the TeX log file.

   Certain errors may not manifest themselves until well after the
offending command.  For instance, if a closing parenthesis is missing
from a TeXdraw coordinate, TeX continues searching for the parenthesis.
If one is found, perhaps many lines later, the TeXdraw error message
'invalid coordinate' will be printed at this later point.

   All input in the TeXdraw environment should be intended for
interpretation by TeXdraw commands.  TeXdraw places text inside a zero
size box (the text itself extends outside the box).  Extraneous input
manifests itself as a non-zero size TeXdraw text box.  This causes the
TeXdraw text and the PostScript graphics to be displaced from one
another.  An error message is issued if a non-zero width TeXdraw text
box is detected.  If this error message appears, look for unintended
character sequences amongst the commands to TeXdraw.

   Several TeXdraw commands pass their arguments "raw" to the PostScript
file.  That means that invalid arguments can generate PostScript errors
when the document is printed.  For instance the argument of the
'\setgray' command is passed straight through to the PostScript file.
If this argument is non-numeric, a PostScript error results.  Not all
PostScript printers report errors back to the user.  The print may just
stop prematurely.  One approach to debugging is to use a PostScript
previewer on a workstation.  That way, one can determine at which point
in the drawing the PostScript error occurs.


automatically generated by info2www version 1.2.2.9