From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113031 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Unusual error with \doifinstring in \startbtxrenderingdefinitions ... \stopbtxrenderingdefinitions Date: Sat, 9 Oct 2021 23:42:59 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5694507958921488563==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum , mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 10 05:49:21 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 1mZPpx-0000hU-6a for gctc-ntg-context-518@m.gmane-mx.org; Sun, 10 Oct 2021 05:49:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DC5C228898A; Sun, 10 Oct 2021 05:45:33 +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 fyBvt9UfDI9j; Sun, 10 Oct 2021 05:45:33 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3428D28899F; Sun, 10 Oct 2021 05:45:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3FF5A2889AB for ; Sun, 10 Oct 2021 05:45:29 +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 FrgxH9-2t2qf for ; Sun, 10 Oct 2021 05:45:26 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.174; helo=mail-il1-f174.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (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 EC60828899D for ; Sun, 10 Oct 2021 05:45:25 +0200 (CEST) Original-Received: by mail-il1-f174.google.com with SMTP id k3so5883025ilu.2 for ; Sat, 09 Oct 2021 20:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eqyo2T20J9HOghC+kNu8ivB1IcK94xFvpZeYEHP+9z4=; b=WFQc0kpCxe3F0dNbVT1+8Rx6gQNoeuREi14JM8yRlDYfUa9UllaR4wQh+zISEyLeXE fC/SK1SyefE5zNaUetEdp8dkbDxLB8dKVDmIDr8dA+HwlqxYgWSCFjObHPDQvUGZLsp/ DtMmKvqA8y2vYkkfBQLwr5bicVdakskwQmXRcIwMuI/f0K4oV8dvYMk0F5jev8wcgoFE HuXKMXFhgpivJmKdvwNkz42VZl0vGh2qNnCtjHypfOT/H3fnI7qgvrkMyhfYv5lwwqRj vvQGMmPVsCTWt6xCMnY305cDk71Q6P82dGfSCCfvOAwg8tQS1jW46QcmWaZSfYHCsfD4 lhAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eqyo2T20J9HOghC+kNu8ivB1IcK94xFvpZeYEHP+9z4=; b=Tb+LEvEbS9DB5VusK/aC7FctCMontVIkSCQVf7e5Cr6fcN1ChyyEziCAX0IwH1feuM rzba+UEm3OV7r8UC7CUPHu3aZk6u00GaTxblESwXMia3VtoUEzac+ZlmLna0TgbaErN7 EVkhfxcbk0llSWNizAnxoCHuAcrIk7GYW0GDqQdoVs81TNgGMVzv0aI7NrRhEYIqhcno jJk6lzMKeraZVqr0FBzRxK2yKxldMR2i5vIMZIaOhxzREaOQWrDnYaRwq8HFRluqkdM/ 0cidzZcvdDySRmKfFIaW6cOHMrm+8xoKQXI2kFhlFNKSITgUliTL2R6mdVvpCTLuUs/V SVHQ== X-Gm-Message-State: AOAM532E8lw7Ujw1cxpgHIP2yzDeIXtibBzFPn+gs/zrwym2NjbMr4Zx bLZNAq959VSMLFwq2DFlXkPlsCr6UgHp09woIW8= X-Google-Smtp-Source: ABdhPJyFQcuOke+0/R1BHmi64cZA6jQd90Dk67NCP5wxJv7+xnKx3BOA6gq26Fh5g+SR/nzK/4X44jqyx4fAXewDfzo= X-Received: by 2002:a05:6e02:1a8e:: with SMTP id k14mr3200438ilv.77.1633837524226; Sat, 09 Oct 2021 20:45:24 -0700 (PDT) In-Reply-To: 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:113031 Archived-At: --===============5694507958921488563== Content-Type: multipart/alternative; boundary="00000000000040971f05cdf7713e" --00000000000040971f05cdf7713e Content-Type: text/plain; charset="UTF-8" The test using \removepunctuation that you provided does what it should be doing (it produces 6 instances of "test-test" with the intervening punctuation mark in each case removed), but it doesn't do what I'm trying to do in the MWE above. I'm trying to take certain punctuation marks that follow the \autopuncttest macro and place them before it instead. Looking at the typo-chr .lua and .mkiv files, I see that there are \pushpunctuation and \poppunctuation methods in addition to the \removepunctuation method. These might be useful for this purpose, but in any case, I still have to check if the trailing character is one of the characters in a specified set/string, and this is where the error is arising. Joey On Sat, Oct 9, 2021 at 12:50 PM Hans Hagen wrote: > On 10/9/2021 5:40 PM, Joey McCollum via ntg-context wrote: > > Hi, > > > > I'm trying to define concise biblatex-style citation macros for a custom > > bibliographic style specification with support for intelligent placement > > of trailing punctuation, and I've encountered an unusual error. If I try > > to define the macros within the btxrenderingdefinitions environment, > > then the code for handling trailing punctuation with the > > \doifinstring and \doifnotinstring macros fails in some cases. > > Specifically, it correctly detects when the trailing punctuation is a > > period, comma, or semicolon, but not when it is a colon, exclamation > > point, or question mark. The following MWE reproduces the error: > > > > ``` > \starttext > > test,\removepunctuation -test > test;\removepunctuation -test > test:\removepunctuation -test > test?\removepunctuation -test > test!\removepunctuation -test > test.\removepunctuation -test > > \stoptext > > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > --00000000000040971f05cdf7713e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The test using \removepunctuation that you provided does w= hat it should be doing (it produces 6 instances of "test-test" wi= th the intervening punctuation=C2=A0mark in each case removed), but it does= n't do what I'm trying to do in the MWE above. I'm trying to ta= ke certain punctuation marks that follow the \autopuncttest macro and place them before it instead. Looking at the typo-chr .lua and .mkiv files, I see that there are \= pushpunctuation and \poppunctuation me= thods in addition to the \removepunctuation method. These might be useful f= or this purpose, but in any case, I still have to check if the trailing cha= racter is one of the characters in a specified set/string, and this is wher= e the error is arising.
Joey

On= Sat, Oct 9, 2021 at 12:50 PM Hans Hagen <j.hagen@xs4all.nl> wrote:
On 10/9/2021 5:40 PM, Joey McCollum via ntg-context= wrote:
> Hi,
>
> I'm trying to define concise biblatex-style citation macros for a = custom
> bibliographic=C2=A0style specification with support for intelligent pl= acement
> of trailing punctuation, and I've encountered an unusual error. If= I try
> to define the macros within the btxrenderingdefinitions environment, <= br> > then the code for handling trailing punctuation with the
> \doifinstring=C2=A0and \doifnotinstring macros fails in some cases. > Specifically, it correctly detects when the trailing punctuation is a =
> period, comma, or semicolon, but not when it is a colon, exclamation <= br> > point, or question mark. The following MWE reproduces the error:
>
> ```
\starttext

test,\removepunctuation -test
test;\removepunctuation -test
test:\removepunctuation -test
test?\removepunctuation -test
test!\removepunctuation -test
test.\removepunctuation -test

\stoptext



-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
--00000000000040971f05cdf7713e-- --===============5694507958921488563== 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== --===============5694507958921488563==--