From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100529 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: conditional format in xtables Date: Tue, 10 Apr 2018 23:07:28 +0200 Message-ID: <5ACD2790.9090700@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0779419410912101786==" X-Trace: blaine.gmane.org 1523394360 5200 195.159.176.226 (10 Apr 2018 21:06:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Apr 2018 21:06:00 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 10 23:05:55 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f60Sd-00019L-Rc for gctc-ntg-context-518@m.gmane.org; Tue, 10 Apr 2018 23:05:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B6793625E1B; Tue, 10 Apr 2018 23:07:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ew9WYFpkA9-N; Tue, 10 Apr 2018 23:07:43 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5B0F9625E0C; Tue, 10 Apr 2018 23:07:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D4B04625E0C for ; Tue, 10 Apr 2018 23:07:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id afxvy9x7tw0C for ; Tue, 10 Apr 2018 23:07:42 +0200 (CEST) Original-Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5B622625E0B for ; Tue, 10 Apr 2018 23:07:32 +0200 (CEST) Original-Received: by mail-wr0-f179.google.com with SMTP id o3so1825320wri.2 for ; Tue, 10 Apr 2018 14:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=9rZ4Zl6pojq1s018XrOY5j6AQIACVdAeTvTTtTbrib8=; b=ACSB4HPeicPUSXaTVO2vLt6RpQOe/fT8z9IJReO+ONJdo8gDp+3adY8sjd60+KSILX jU7KXL8F5x//ojIY9/89LMtr1eAIa+a4sUyWTZFh6L6TiUYe8j041KcXEcUOteyei0HM TbgpuRdvgOIYpHb7ZewCcATYauKH6DldNKIiyxAmWwqs6yJPIpG4kZBV9j9BtmMatAhy Tu22FZsXWnjEELaVm0/ERGZ+1l/8I7UEFTjeueKa2w2oriixjxr9lm24YU6XQKpVKXDW ObEQ3ublvITH0ZtgVQB4AOn56xb7jaFJBA8qoo5WWaKf9HJFpjMqh5hPuKbHFoQCCcmO hh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=9rZ4Zl6pojq1s018XrOY5j6AQIACVdAeTvTTtTbrib8=; b=pJ74Mk2IQZFPIGKjyfZIp1nXx2bhP3ph8ulc+ewv7c8yejhHtireG4/uB7lW+2QTpM 66XJi6origVgK8A+ZtBtIJJPKh+rJ9DXWkotGF8f3hb3P0J/qYAs4TvU8jIS7sKqsKQu XeosqolZETHREwpPKpaaQZrIi8w4tOL77mgLzIgzmMU4qJJYz8pcwcw1m1tk9iVkEAbf y8nbNQkc+AnTP+VXwYSaQAGOxnKh5wDIpDjLaaC9RHF3GNHFYlayQnhHrw18z0eF3ZKe aIHmohlvTVGAbdAqUcfprNcUOvdhHkJqxLD7Kjcv+tsIsbwFJ3RsbwmwS6v3IGtwvfla 4dUQ== X-Gm-Message-State: ALQs6tCAFdNt3gd1ijVp157W35wFAzvEKFisZ0Ztlp4NAPl0zGxWAKUC 7ysvQr5IejxJ1demAV7n3wNGheFN X-Google-Smtp-Source: AIpwx49a9Luigevvj0lk4ZJ+kmSEWEkP/RcLyq2W02dw4Jszk7DTxAnn+hLhfP4/EyJOScdd700F0g== X-Received: by 10.223.154.100 with SMTP id z91mr1458253wrb.120.1523394451735; Tue, 10 Apr 2018 14:07:31 -0700 (PDT) Original-Received: from [192.168.1.11] (x5ce38820.dyn.telefonica.de. [92.227.136.32]) by smtp.gmail.com with ESMTPSA id m35sm4869320wrm.59.2018.04.10.14.07.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 14:07:30 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:100529 Archived-At: This is a multi-part message in MIME format. --===============0779419410912101786== Content-Type: multipart/alternative; boundary="------------070301050600040301090007" This is a multi-part message in MIME format. --------------070301050600040301090007 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit The normal \doif... commands don’t work because they aren’t expandable but you can use the \expdoif... commands (look into setup-en.pdf for all of them). Wolfgang > Pablo Rodriguez > 10. April 2018 um 19:18 > Dear list, > > thanks to Wolfgang, I learnt to set conditional format in xtables, such > as in: > > \setupxtable > [foregroundcolor={\ifnum\currentxtablecolumn=2 red\else green\fi}] > \starttext > \startxtable > \startxrow > \startxcell one \stopxcell > \startxcell two \stopxcell > \startxcell tree \stopxcell > \startxcell four \stopxcell > \stopxrow > \stopxtable > \stoptext > > My question is whether I can use ConTeXt conditionals instead of the > ones from TeX. {\doifelse{\currentxtablecolumn}{2}{red}{green}} doesn’t > work here. > > Many thanks for your help, > > Pablo --------------070301050600040301090007 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit The normal \doif... commands don’t work because they aren’t expandable
but you can use the \expdoif... commands (look into setup-en.pdf for all of them).

Wolfgang
10. April 2018 um 19:18
Dear list,

thanks to Wolfgang, I learnt to set conditional format in xtables, such
as in:

\setupxtable
[foregroundcolor={\ifnum\currentxtablecolumn=2 red\else green\fi}]
\starttext
\startxtable
\startxrow
\startxcell one \stopxcell
\startxcell two \stopxcell
\startxcell tree \stopxcell
\startxcell four \stopxcell
\stopxrow
\stopxtable
\stoptext

My question is whether I can use ConTeXt conditionals instead of the
ones from TeX. {\doifelse{\currentxtablecolumn}{2}{red}{green}} doesn’t
work here.

Many thanks for your help,

Pablo

--------------070301050600040301090007-- --===============0779419410912101786== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============0779419410912101786==--