How to isolate serious errors from warnings?
I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should: (1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported. (2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing. (3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying. Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there. Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters) --Joel
Am 18.04.24 um 02:09 schrieb Joel via ntg-context:
I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should:
(1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported.
(2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing.
(3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying.
Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there.
Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters)
You can enable trackers like \enabletrackers[figures.*] But that just gives more log messages for debugging. You get the list of all trackers with: context --global m-trackers.mkiv For your use case, directives are more helpful, like \enabledirectives[logs.errors=*] (i.e. break at every error) AFAIK that just handles missing characters, references and modules ATM, but this information might be outdated. You get all directives with context --global m-directives.mkiv Hraban
On 4/18/2024 8:26 AM, Henning Hraban Ramm wrote:
Am 18.04.24 um 02:09 schrieb Joel via ntg-context:
I'm about to have a lengthy (2,000+ page) document published. Normally if it compiles and looks okay, I regard that as meaning no errors appeared, but I've noticed that sometimes ConTeXt will still compile, even if something isn't displayed on screen as it should:
(1) I tried placing a table inside a startitemize environment, as instead of it not compiling, it left a message in the document warning that wasn't supported.
(2) In another case, I had an image that ConTeXt couldn't find, as I mispelled the filenmame, and it fully compiled and made a PDF, without me noticing.
(3) Or maybe in some case, a font couldn't be found for a specific character, so a single character in the file isn't displaying.
Those are just some examples; I intended for something to be printed on the PDF, but it isn't showing there.
Since a document of this size will have a lot of messages, is there a way to adjust the settings, from "show everything" to "show some" to "show only serious errors"? Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters)
You can enable trackers like
\enabletrackers[figures.*]
But that just gives more log messages for debugging.
You get the list of all trackers with:
context --global m-trackers.mkiv
For your use case, directives are more helpful, like
\enabledirectives[logs.errors=*] (i.e. break at every error)
AFAIK that just handles missing characters, references and modules ATM, but this information might be outdated.
You get all directives with
context --global m-directives.mkiv
often the log files has some summaries at the end ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 18 Apr 2024, at 01:09, Joel via ntg-context
wrote: ... Or maybe to use > to send the errors to another file for careful study? (using Linux if that matters)
You can run the job from the command line and redirect to a file: $ context file.tex > output.log 2>&1 but that is essentially the same as the .log file that is produced by default when you run from the command line. As your book is large you could try adding \writestatus commands at suitable points so that when your messages appear in the log you know that processing reached that far in the book. Also you could use \writestatus to output messages before and after known problem areas so you can look to see if there is any telltale output in the log and then search for that elsewhere. HTH — Bruce Horrocks Hampshire, UK
participants (4)
-
Bruce Horrocks
-
Hans Hagen
-
Henning Hraban Ramm
-
Joel