Hi,

I use

  \enabletrackers
    [structures.referencing.empty]

to catch references by number to sections without a number. The log
file contains “has a hidden number…” in that case. I have a command
that uses \currentreferencenumber which triggers the “has a hidden
number…” warning in the log file. But that command takes care not to
output the contents of that variable. But merely using it in an
\doif\currentreferencenumber is sufficient to trigger the log
message. Example:

\enabletrackers
  [structures.referencing.empty]

\def\foo[#1]{%%
  \doifreferencefoundelse{#1}{%%
    \doifelse\currentreferencenumber\emptyreference
    {Foo}{Bar}}%%
}

\setuphead
  [section] [number=no]

\starttext
  \startsection [title=Foo, reference=sec:foo]
    \samplefile{knuth}
  \stopsection
  \foo[sec:foo]
\stoptext

Then check the log file for “has a hidden number”.

1) How to not trigger the log message when checking
   \currentreferencenumber? Or alternatively

2) Is there a better way to find invisible references?

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to