Am 13.10.2012 um 18:53 schrieb Zenlima
Hi Sietse, hi Wolfgang,
thanks for your first feedback. Right now I am working on your suggestions.
@Wolfgang: I don't understand your suggestion: "add a label key to disable/enable the label text". Can you describe it more detaily or in other words? I am not sure how to implement it with the refs to a paragraph.
Here is a example where I used a few helpers, e.g. \installdirectcommandhandler creates \setupreferencecommand and \referencecommandparameter. \unprotect \installnamespace {referencecommand} \installdirectcommandhandler \????referencecommand {referencecommand} \def\referencecommand {\dodoubleempty\referencecommand_direct} \def\referencecommand_direct[#1][#2]% {\begingroup \ifsecondargument \setupreferencecommand[#1]% \edef\m_reference{#2}% \else \edef\m_reference{#1}% \fi \usereferencecommandstyleandcolor\c!style\c!color \getreference[title][\m_reference]% \doif{\referencecommandparameter\c!label}\v!yes{\referencetext\v!page}% \referencecommandparameter\c!left \getreference [page][\m_reference]% \referencecommandparameter\c!right \endgroup} \definelabelclass[reference] \setupreferencetext[\s!en][page={ on page }] \setupreferencetext[\s!de][page={ auf Seite }] \setupreferencecommand [\c!label=\v!yes, \c!left=(, \c!right=)] \protect \starttext \dontleavehmode\reference[knuth]{Donald E. Knuth}% \input knuth \blank \referencecommand[knuth] \blank \referencecommand[left={[},right={]}][knuth] \blank \referencecommand[style=italic,color=red][knuth] \stoptext Wolfgang