* parameter setting
@ 2012-06-16 12:11 Meer, H. van der
2012-06-16 13:18 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Meer, H. van der @ 2012-06-16 12:11 UTC (permalink / raw)
To: ConTeXt NTG
In order to be able to use attributes on xml-nodes freely, the following situations can arise:
The foregroundcolor parameter gets a value:
<node color="red"> correctly sets ..[foregroundcolor=\xmlatt{#1}{color}] color to red.
However, in the next case the current foregroundcolor should be left as is, but reverts to black:
<node> ..[foregroundcolor=] and is apparently reset to the general default.
trying the following seemed the solution, but it does not work:
..[\doifnot{\xmlatt{#1}{color}}{\empty}{foregroundcolor=\xmlatt{#1}{color}}]
giving in the log:
{foregroundcolor=orange}' in line 16 (249>:)
check > missing or ungrouped '=' after '\doifnot {}{}
Putting the above \doif inside an \expanded{} does not alter the behaviour.
How to accomplish leaving the parameter as is for an absent attribute?
Hans van der Meer
___________________________________________________________________________________
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] 4+ messages in thread
* Re: parameter setting
2012-06-16 12:11 parameter setting Meer, H. van der
@ 2012-06-16 13:18 ` Wolfgang Schuster
2012-06-16 14:04 ` Meer, H. van der
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2012-06-16 13:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 16.06.2012 um 14:11 schrieb Meer, H. van der:
> In order to be able to use attributes on xml-nodes freely, the following situations can arise:
>
> The foregroundcolor parameter gets a value:
> <node color="red"> correctly sets ..[foregroundcolor=\xmlatt{#1}{color}] color to red.
>
> However, in the next case the current foregroundcolor should be left as is, but reverts to black:
> <node> ..[foregroundcolor=] and is apparently reset to the general default.
When you write “foregroundcolor=” you apply *nothing* to the key and the last setting is changed.
> trying the following seemed the solution, but it does not work:
> ..[\doifnot{\xmlatt{#1}{color}}{\empty}{foregroundcolor=\xmlatt{#1}{color}}]
> giving in the log:
> {foregroundcolor=orange}' in line 16 (249>:)
> check > missing or ungrouped '=' after '\doifnot {}{}
>
> Putting the above \doif inside an \expanded{} does not alter the behaviour.
>
> How to accomplish leaving the parameter as is for an absent attribute?
You can try “\expdoifnot{\xmlatt{#1}{color}}{}{backgroundcolor=\xmlatt{#1}{color}}”
but I can’t say for sure without a example.
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] 4+ messages in thread
* Re: parameter setting
2012-06-16 13:18 ` Wolfgang Schuster
@ 2012-06-16 14:04 ` Meer, H. van der
2012-06-16 14:09 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Meer, H. van der @ 2012-06-16 14:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 419 bytes --]
On 16 jun. 2012, at 15:18, Wolfgang Schuster wrote:
You can try “\expdoifnot{\xmlatt{#1}{color}}{}{backgroundcolor=\xmlatt{#1}{color}}”
but I can’t say for sure without a example.
I tried that, but it makes no difference and the color does not appear:
mkiv-base.map} (virtual://buffer.embedded_x_table.1
check > missing or ungrouped '=' after 'foregroundcolor=orange'
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 3408 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 4+ messages in thread
* Re: parameter setting
2012-06-16 14:04 ` Meer, H. van der
@ 2012-06-16 14:09 ` Wolfgang Schuster
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2012-06-16 14:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 503 bytes --]
Am 16.06.2012 um 16:04 schrieb Meer, H. van der:
> On 16 jun. 2012, at 15:18, Wolfgang Schuster wrote:
>
>> You can try “\expdoifnot{\xmlatt{#1}{color}}{}{backgroundcolor=\xmlatt{#1}{color}}”
>> but I can’t say for sure without a example.
>
> I tried that, but it makes no difference and the color does not appear:
> mkiv-base.map} (virtual://buffer.embedded_x_table.1
> check > missing or ungrouped '=' after 'foregroundcolor=orange'
Send a complete example!
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3065 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2012-06-16 14:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-16 12:11 parameter setting Meer, H. van der
2012-06-16 13:18 ` Wolfgang Schuster
2012-06-16 14:04 ` Meer, H. van der
2012-06-16 14:09 ` Wolfgang Schuster
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).