Background
Looking to include the section within an index.
Problem
In LaTeX the nameref
package allows coding a contextual macro called \currentname
. This allows users to refer to the current section (or chapter, or part) without needing to type it in explicitly.
Ultimately, I'd like to include the current name in the index. For example:
\starttext
\placeindex
\page [yes]
\startchapter[title={Title1},]
\index{item+\currentchaptername}
\input knuth
\stopchapter
\startchapter[title={Title2},]
\index{item+\currentchaptername}
\input knuth
\stopchapter
\stoptext
Being able to reference the chapter title indirectly has other uses than the one given above.
Question
What is the equivalent to \currentname
in ConTeXt?
Ideas
I have tried: \the\chapter
, \show\thechapter
, \thechapter
, \currentchaptername
, etc. I have also looked at \nameref{marker}
, but that, even if it worked, seems like an obtuse solution.
Related
Some related information: