no color with interaction and reference format
Hi list, when I am using reference formats to put text in front of my text references, I get no color. Please see the following minimal example \setupinteraction[state=start] \definereferenceformat[insec][text=section~] \starttext \section[mylabel]{A Section} A Reference to \in{section}[mylabel] and \insec[mylabel]. \stoptext On my machine only the first reference is red (aka colored), but I think both should be, as it was some betas ago. Is this a bug or has the interface changed? I'm using standalone 20111125 21:29 MkIV. Thanks in advance! Stefan
Am 30.11.2011 um 12:56 schrieb Stefan Müller:
Hi list,
when I am using reference formats to put text in front of my text references, I get no color. Please see the following minimal example
\setupinteraction[state=start] \definereferenceformat[insec][text=section~] \starttext \section[mylabel]{A Section} A Reference to \in{section}[mylabel] and \insec[mylabel]. \stoptext
On my machine only the first reference is red (aka colored), but I think both should be, as it was some betas ago. Is this a bug or has the interface changed? I'm using standalone 20111125 21:29 MkIV.
I quick fix for strc-ref.mkvi but it’s better to change the \dosetXXXattributes command in mult-aux.mkiv. The problem is the test for the \colorattributehash macros which are never empty because the hold the full name of the namespace and not the value of the key. \unexpanded\def\execute_reference_format#name% {\start_goto_reference \edef\currentreferenceformat{#name}% \gdef\leftofreference {\referenceformatparameter\c!left }% \gdef\rightofreference {\referenceformatparameter\c!right }% \edef\currentreferenceformatlabel {\referenceformatparameter\c!label }% \edef\currentreferenceformattype {\referenceformatparameter\c!type }% \edef\currentreferenceformatsetups {\referenceformatparameter\c!setups }% \edef\currentreferenceformatautocase{\referenceformatparameter\c!autocase}% % \dosetreferenceformatattributes \c!style \c!color % \ifx\fontattributehash\empty \else % \resetinteractionparameter\c!style % \fi % \ifx\colorattributehash\empty \else % \resetinteractionparameter\c!contrastcolor % \resetinteractionparameter\c!color % \fi \edef\currentreferenceformatstyle {\referenceformatparameter\c!style }% \edef\currentreferenceformatcolor {\referenceformatparameter\c!color }% \dosetreferenceformatattributes \c!style \c!color \ifx\currentreferenceformatstyle\empty \else \resetinteractionparameter\c!style \fi \ifx\currentreferenceformatcolor\empty \else \resetinteractionparameter\c!contrastcolor \resetinteractionparameter\c!color \fi \ifx\currentreferenceformatlabel\autoreferencelabeltextflag \edef\currentreferenceformatlabel{\autoreferencelabeltext}% \fi \ifx\currentreferenceformatautocase\v!yes \setcharactercleaning[1]% \fi \ifx\currentreferenceformatlabel\empty \defaultleftreferencetoks {\referenceformatparameter\c!text}% \defaultrightreferencetoks\emptytoks \else \defaultleftreferencetoks {\leftlabeltext \currentreferenceformatlabel}% \defaultrightreferencetoks{\rightlabeltext\currentreferenceformatlabel}% \fi \ifx\currentreferenceformattype\empty \def\currentreferenceformattype{default}% \fi % \ifx\currentreferenceformatsetups\empty \def\currentreferencecontent{\filterreference\currentreferenceformattype}% \else \def\currentreferencecontent{\directsetup\currentreferenceformatsetups}% \fi % \let\leftofreferencecontent \empty \let\rightofreferencecontent\empty \pickup_goto_reference} Wolfgang
On 30-11-2011 13:28, Wolfgang Schuster wrote:
I quick fix for strc-ref.mkvi but it’s better to change the \dosetXXXattributes command in mult-aux.mkiv. The problem is the test for the \colorattributehash macros which are never empty because the hold the full name of the namespace and not the value of the key.
I changed that attributes handler (I'd also like to change the name but that needs some coordination with modules that use it). I also added some more commandhandler usage (so now we have 4 todo's left). In the process related font and color switching has been de-mkii'd and sped up a bit. Another big change is that page-txt is now a mkvi module (quit esome rewritten code). As there have been some optimizations the slow down due to the new handler mechanism is neglectable (some 0.0003 sec per page) and due to some other optimization (footnote checking) the raw pps speed is higher now. Anyhow, a consequence of this is that there will be no beta now as you (read: WS) have to do some checking against your module code. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Stefan Müller
-
Wolfgang Schuster