On 4/17/2013 12:55 PM, Marco Patzer wrote:
On 2013–04–17 "H. Özoguz" wrote:
With \at[ref] one can get the pagenumber of a reference. If this reference is not there (maybe in another file, not included at that moment) there is no error given, but two question marks ??. That is of course useful, but what if I WANT an error? Because that is the only fast way to detect typing errors in references.
ConTeXt requires multiple passes to get the references right, which means the first run would always fail if missing references trigger an error and should be delayed to the second run. Seems possible, though.
I use the following command to detect wrong references. It's not pretty, but it does it's job reasonably well.
pdftotext
- | grep -E '\?\?|!!'
If you run \starttext test \in{someplace}[somewhere] \stoptext there are messages in the log like: references > unknown reference '[][somewhere]' as well as a summary: references > start problematic references references > unknown > 1: [][somewhere] references > stop problematic references ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------