[NTG-context] Error markers for invalid section references

Marco Patzer homerow at lavabit.com
Mon Jan 7 13:02:35 CET 2013


Hi,

in the final stage of a document I always run a grep for ?? and
xxxx on the document to find invalid references and missing
bibliography entries.

However, in documents that do not have a section number the
references to the number are also wrong, they need to be references
to the name instead of the number. In this case no error marker is
printed and AFAIK not even a hint in the log file. The correct way
is to use \about instead of \in. Here's an example:

\setuphead [section] [number=no]
\starttext

\startsectionlevel [title=Alpha]
  See section \in[invalid]. \par %% prints ??
  See section \in[sec:bar]. \par %% prints nothing
  See section \about[sec:bar].   %% correct reference
  
  \startsectionlevel [title=Foo]
  \stopsectionlevel
  \startsectionlevel [title=Bar, reference=sec:bar]
  \stopsectionlevel
\stopsectionlevel

\stoptext

The wrong \in[invalid] reference receives an easy to find error
marker and an entry in the log file. The wrong entry \in[sec:bar] is
hard to find.

Is there a way to add ?? for those cases as well?


Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130107/a1454c58/attachment.pgp>


More information about the ntg-context mailing list