ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using \currentreferencenumber triggers “has a hidden number” in log file
@ 2019-07-18 19:04 Marco Patzer
  0 siblings, 0 replies; only message in thread
From: Marco Patzer @ 2019-07-18 19:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-18 19:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 19:04 Using \currentreferencenumber triggers “has a hidden number” in log file 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).