ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Error markers for invalid section references
@ 2013-01-07 12:02 Marco Patzer
  2013-01-07 21:56 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Patzer @ 2013-01-07 12:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1096 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error markers for invalid section references
  2013-01-07 12:02 Error markers for invalid section references Marco Patzer
@ 2013-01-07 21:56 ` Hans Hagen
  2013-01-07 22:06   ` Marco Patzer
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2013-01-07 21:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 1/7/2013 1:02 PM, Marco Patzer wrote:
> 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?

I'll print an !! although it might become optional at some point if I 
find that it has unwanted side effects.

Hans


-- 

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error markers for invalid section references
  2013-01-07 21:56 ` Hans Hagen
@ 2013-01-07 22:06   ` Marco Patzer
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Patzer @ 2013-01-07 22:06 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 553 bytes --]

On 2013–01–07 Hans Hagen wrote:

> >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?
> 
> I'll print an !! although it might become optional

That's totally fine with me. Optional means one can turn it on and
off, perfect.

> at some point if I find that it has unwanted side effects.

Using \in with numbering turned off has side-effects, too ;)

Thanks Hans!

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-07 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-07 12:02 Error markers for invalid section references Marco Patzer
2013-01-07 21:56 ` Hans Hagen
2013-01-07 22:06   ` Marco Patzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).