pretext-cli
pretext-cli copied to clipboard
Better error messages for `tikz` compilation
Compiling my book, I got a very strange error message while processing images:
! Undefined control sequence.
l.15 \resizebox
After hunting this down, I discovered my docinfo.ptx file wasn't being included and so tikz wasn't being loaded.
It turns out \resizebox is part of graphicx which is loaded by tikz. Never having seen this error before, it took a while to hunt down, and I suspect it would be confusing even to those experienced with LaTeX (especially since \resizebox is inserted by PreTeXt and not in the user's code).
Perhaps this psecific error could be detected and a helpful message might be added like
This error may be caused by a missing LaTeX preamble. Such a preamble is supplied in `<docinfo>`.