ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* no color with interaction and reference format
@ 2011-11-30 11:56 Stefan Müller
  2011-11-30 12:28 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Müller @ 2011-11-30 11:56 UTC (permalink / raw)
  To: ntg >> mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: no color with interaction and reference format
  2011-11-30 11:56 no color with interaction and reference format Stefan Müller
@ 2011-11-30 12:28 ` Wolfgang Schuster
  2011-12-02 17:34   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2011-11-30 12:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: no color with interaction and reference format
  2011-11-30 12:28 ` Wolfgang Schuster
@ 2011-12-02 17:34   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2011-12-02 17:34 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-02 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30 11:56 no color with interaction and reference format Stefan Müller
2011-11-30 12:28 ` Wolfgang Schuster
2011-12-02 17:34   ` Hans Hagen

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).