From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82112 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.comp.tex.context Subject: Fwd: Heading in setuplayout from a variable Date: Fri, 26 Apr 2013 14:33:30 +0200 Message-ID: References: <517A678A.80709@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366979622 4358 80.91.229.3 (26 Apr 2013 12:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Apr 2013 12:33:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 26 14:33:44 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UVhqQ-0004U6-SG for gctc-ntg-context-518@m.gmane.org; Fri, 26 Apr 2013 14:33:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 20FFE101E8; Fri, 26 Apr 2013 14:33:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oOLB4VYynzSK; Fri, 26 Apr 2013 14:33:38 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1683B101E4; Fri, 26 Apr 2013 14:33:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A097101E4 for ; Fri, 26 Apr 2013 14:33:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qa+euyYIYTWR for ; Fri, 26 Apr 2013 14:33:31 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id E36EF101E0 for ; Fri, 26 Apr 2013 14:33:31 +0200 (CEST) Original-Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3QCXUX5021921 for ; Fri, 26 Apr 2013 14:33:31 +0200 Original-Received: by mail-we0-f182.google.com with SMTP id s43so3549361wey.41 for ; Fri, 26 Apr 2013 05:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=s33/pyH+HFm+CTIqpvmWWnvaPiAsiJiyT4YAoJFYMZI=; b=wYPC0206jarfOkHGZkYLMOqHU1BSc8OB0YNc0T1oRK95BEZ4C8Mvw5kJv5/SZ+Vy8K CdDtQIAijP6UysaysuFkwlhJoQyzHiZpYBzjJTMr1QXwG2j/Ha+Q3YxZfnsRI1RKiC8h J79qRyMOkj/SPr1o2dc8gPmlKx8KsE15hsHB1iSDoZG8dsQ/6z67TGKEA1NTAwhfAY5+ /Nhl7SlaLt38tRuvjzZOBEYimoeDQy+Oq7di/QT4QcIOsXdLYyK61jrRVDKcZC2XFd2Q F8unYhknc2ekGi13n1y6LV3ItUtRmYElJjhmmEwVeFbeDMYvxmDeFj9YGLJwjYpjmbjQ Co9g== X-Received: by 10.180.85.103 with SMTP id g7mr3702369wiz.23.1366979610753; Fri, 26 Apr 2013 05:33:30 -0700 (PDT) Original-Received: by 10.194.109.233 with HTTP; Fri, 26 Apr 2013 05:33:30 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c03::236; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07JsAxuI8 - 53b483aa45cf - 20130426 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82112 Archived-At: Send to Hans instead of to the list. :-( ---------- Forwarded message ---------- From: Cecil Westerhof Date: 2013/4/26 Subject: Re: [NTG-context] Heading in setuplayout from a variable To: Hans Hagen 2013/4/26 Hans Hagen : > On 4/26/2013 1:27 PM, Cecil Westerhof wrote: >> >> It is a long time since I used ConTeXt. I am starting again. >> >> I have the following code: >> \setvariables[meta][type=cecil] >> >> \if\getvariable{meta}{type}=cecil >> \setvariables[meta][ >> name={Cecil Westerhof}, >> ] >> \setvariables[layout][ >> header=0mm, >> ] >> \fi >> >> But that does not work. >> >> For the conditional I also tried: >> \ifx\getvariable{meta}{type}\cecil >> >> But that does not work either. >> >> What is the correct way to define the comparison? > > > \doifelse {\getvariable{meta}{type}} {cecil} { > ... > } { > ... > } Thanks. That works. In my case I use a \doif. Is there also something like a switch statement? If not I could use a nested \doifelse. -- Cecil Westerhof -- Cecil Westerhof ___________________________________________________________________________________ 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 ___________________________________________________________________________________