From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112611 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Test for displaying a header Date: Thu, 26 Aug 2021 19:56:22 +0200 Message-ID: <5a9e0c8c-1b30-41cf-0429-ff854a7b7fd5@gmail.com> References: <40A5A4E3-D83B-49CC-86C0-E402899F7B47@bittext.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8194780409999354812==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.48 Cc: Wolfgang Schuster To: mailing list for ConTeXt users , Fabrice Couvreur via ntg-context Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 26 19:57:02 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJJcZ-000AUk-UB for gctc-ntg-context-518@m.gmane-mx.org; Thu, 26 Aug 2021 19:56:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6D7D6286D3D; Thu, 26 Aug 2021 19:56:30 +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 LqRIs7kVNIZb; Thu, 26 Aug 2021 19:56:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 240C0286D44; Thu, 26 Aug 2021 19:56:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7F1B4286D3D for ; Thu, 26 Aug 2021 19:56:26 +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 emoeqz9d63kA for ; Thu, 26 Aug 2021 19:56:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.45; helo=mail-wr1-f45.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Original-Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id B3B6C286D28 for ; Thu, 26 Aug 2021 19:56:24 +0200 (CEST) Original-Received: by mail-wr1-f45.google.com with SMTP id z4so6375516wrr.6 for ; Thu, 26 Aug 2021 10:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=TGIm4Isi1XJT/5GHKTb/cRW8oeeS06jaotcq5nu53SU=; b=BwxrEO4zbuD7+R7KXSRxk4s7tonYfBYktX5fd09MTr1rRVlNp2/mI4zBcbQD8vLWBy Wbii7f9e+DdbNZGZXw5SKlHlcQNhAP5IS6fbt+bBgwD/sJfiNUcoRy4g5X6+PPj1/h+h tq3URLnlG0B8UDPc9xXnz9l9P5Y7eJh4533lTVoWnotiMz4M/xcbtaeFV0O7qltK5kJ8 /hAcEVElK5N3hFWqQwJu2Tm9fqDONo7eoWgLBXkcthUsQejnw197dTdxsWnHz5lZgLtY VMKOilnykZkX/7mfk8eXvypq/sOxgERVrCV9C0eQwTcxx5goE5VOUEsmMOc72v7Yah6/ m1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=TGIm4Isi1XJT/5GHKTb/cRW8oeeS06jaotcq5nu53SU=; b=RWoaLl7CZB3JWxmnpdd8uMESWMPkCnFX6BUjTvPcRQHSrlQ8GvvWKWxM2ktkdpUlPo ldihJLYNGiB7IsgZooF3AkheVXkNty8jtARR81FfqPqq10FLLpUf508Erfui/+jIJlsp YiUitHRYoNDHaxSPF19NtN1CSiBpxlcG/b0QDAdS9z+hBNmGOwQRvQLFPWhhfMEASLyF XtNBygjLo2TPxJXCaWH7xC/2Xa9g52mCzcTMABVoxPQ5r1Vbk1CItOAurf+/pZERd/xr xWWOgsR/dD+LFC1HKVdxtfmQ8sSbwV724L0WTfy5w+yRgcrfsXedxTwHhoZ6TEpwd9EG v/YQ== X-Gm-Message-State: AOAM533Fl0PNB+Exhp08w0cxTQDJW6SrEWn7vhUephf7Vt5FQqWUm+Fg 610JK7W2wgSG9d7O/zBFXI8= X-Google-Smtp-Source: ABdhPJxA+M/WndoYyx1I8shYOhK9JZQmqweGdgDZqUHgPHKbNCdWSQnBnUWsKjRmeykd7Wsh0J96zg== X-Received: by 2002:adf:82b0:: with SMTP id 45mr5659270wrc.161.1630000584372; Thu, 26 Aug 2021 10:56:24 -0700 (PDT) Original-Received: from ?IPv6:2a02:810d:a8bf:d45c:bd2d:140f:92f3:cc71? ([2a02:810d:a8bf:d45c:bd2d:140f:92f3:cc71]) by smtp.gmail.com with ESMTPSA id 17sm3168001wmj.20.2021.08.26.10.56.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Aug 2021 10:56:23 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:112611 Archived-At: This is a multi-part message in MIME format. --===============8194780409999354812== Content-Type: multipart/alternative; boundary="------------BA8F07459931DAD685B9E0B5" Content-Language: en-US This is a multi-part message in MIME format. --------------BA8F07459931DAD685B9E0B5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Fabrice Couvreur via ntg-context schrieb am 26.08.2021 um 19:06: > Hi, > > Using this (almost what I'm trying to do) without success > > [...] > > \startsetups[header] > \doifelse{\totalnumberofpages}{1} > {\setupheadertexts[\setups{header}]} >     {} > \stopsetups This stores the page check in the setups environment  but you never call it. The call from within the environment itself can't work because the content is never evaluated and even if it would be called you create an endless loop. Wolfgang --------------BA8F07459931DAD685B9E0B5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Fabrice Couvreur via ntg-context schrieb am 26.08.2021 um 19:06:
Hi,

Using this (almost what I'm trying to do) without success

[...]

\startsetups[header]
  \doifelse{\totalnumberofpages}{1}
    {\setupheadertexts[\setups{header}]}
    {}
\stopsetups


This stores the page check in the setups environment  but you never call it. The call from within the environment itself can't work because the content is never evaluated and even if it would be called you create an endless loop.

Wolfgang

--------------BA8F07459931DAD685B9E0B5-- --===============8194780409999354812== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8194780409999354812==--