ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: parameter setting
Date: Sat, 16 Jun 2012 15:18:11 +0200	[thread overview]
Message-ID: <F7421B16-07AF-4D96-86AD-1367E045B56C@googlemail.com> (raw)
In-Reply-To: <4E63CEE0-BC3A-4C66-91FB-DEF9FF197BE4@uva.nl>


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
___________________________________________________________________________________


  reply	other threads:[~2012-06-16 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 12:11 Meer, H. van der
2012-06-16 13:18 ` Wolfgang Schuster [this message]
2012-06-16 14:04   ` Meer, H. van der
2012-06-16 14:09     ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F7421B16-07AF-4D96-86AD-1367E045B56C@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).