Am 20.02.2014 um 21:12 schrieb Pablo Rodriguez <oi...@gmx.es>: > Dear list, > > I have the following sample: > > \starttext > > \chapter{Chapter} > > .\doifemptyelse{\getmarking[section][current]} > {\getmarking[chapter][current]} > {\getmarking[section][current]}. > > \section{Section} > > .\doifemptyelse{\getmarking[section][current]} > {\getmarking[chapter][current]} > {\getmarking[section][current]}. > > \stoptext > > I must be missing something extremely basic, because I think that the > first condiitonal occurs when \getmarking[section][current] is empty > (dots have nothing in between). > > How can I make the first conditional work?
You can’t, markings are only reliable when you use them in the header of footer of the page. To access the values of a heading you can use the \structurevariable and \namedstructurevariable commands. \starttext \chapter{Chapter} A: \doifsomethingelse{\namedstructurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \section{Section} A: \doifsomethingelse{\structurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \subsection{Subsection} A: \doifsomethingelse{\structurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________