[NTG-context] Widgets color option not working with Mark IV

Reviczky, Adam adam.reviczky at kcl.ac.uk
Wed Jan 26 01:49:55 CET 2011


Hi,

I was playing a bit more with the field style properties and found out that if the font size is always different it works, but as soon as it has a size that was used before it defaults back to normal.

Here's the minimal example:

% begin of example
\starttext

\setupfields
[label,frame,horizontal]
[offset=4pt,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
[height=40pt,width=100pt,align=middle,background=screen,backgroundscreen=.90,frame=off]
[height=40pt,width=100pt,color=red,align=right,style=type,background=screen,backgroundscreen=.90,frame=off]

\setupfield
[sizea]
[horizontal]
[style={\switchtobodyfont[20pt]}]

\setupfield
[sizeb]
[horizontal]
[style={\switchtobodyfont[28pt]}]

\setupfield
[sizec]
[horizontal]
[style={\switchtobodyfont[20pt]}]

\definefield [Emaila] [line] [sizea] [] [pragma at wxs.nl]
\definefield [Emailb] [line] [sizeb] [] [pragma at wxs.nl]
\definefield [Emailc] [line] [sizec] [] [pragma at wxs.nl]

\field [Emaila] [your email]
\par
\field [Emailb] [your email]
\par
\field [Emailc] [your email]

\stoptext
% end of example

(field of Emaila has fontsize 20pt as defined, field of Emailb has fontsize 28pt as defined, but field of Emailc defaults back to normal 12pt? size instead of the defined 20pt. See attached pdf.)

As for the color option, I couldn't figure out why it's not working at all. Some hints appreciated.

Best wishes,
Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widgets.pdf
Type: application/pdf
Size: 6318 bytes
Desc: widgets.pdf
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110126/fd2d00bc/attachment.pdf>


More information about the ntg-context mailing list