From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108621 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jan Willem Flamma Newsgroups: gmane.comp.tex.context Subject: Typing efficiency Date: Fri, 4 Sep 2020 14:02:25 +0200 Message-ID: <9A39F242-5579-4FCB-A29C-FC6C728480E1@hxcore.ol> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2720031978961987185==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19082"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 04 14:02:50 2020 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 1kEAQb-0004qJ-OP for gctc-ntg-context-518@m.gmane-mx.org; Fri, 04 Sep 2020 14:02:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A3EF21A8A73; Fri, 4 Sep 2020 14:02: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 Zr6i5EiJ4lGC; Fri, 4 Sep 2020 14:02:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DE07A1A8A79; Fri, 4 Sep 2020 14:02:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BBCC51A8A73 for ; Fri, 4 Sep 2020 14:02:27 +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 iesDu6g5Pm4b for ; Fri, 4 Sep 2020 14:02:27 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.48; helo=mail-ej1-f48.google.com; envelope-from=register12c@gmail.com; receiver= Original-Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 0C8F11A8A56 for ; Fri, 4 Sep 2020 14:02:26 +0200 (CEST) Original-Received: by mail-ej1-f48.google.com with SMTP id gr14so7126300ejb.1 for ; Fri, 04 Sep 2020 05:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:date:from:subject:thread-topic:message-id:to :content-transfer-encoding; bh=mEymdPkPZ5HIksAJU+vIqaseKBOrQqAj7Zr9oGLRxwU=; b=OcrEj6n8nK46g7GMz2aDzZZ2MU7HSzWFNV2SaKCINRIPATAEUzlXhozq9Pf/e02PC0 so7XaeS43gjEkm4DIpoYY9qkie/aIQ35zu5L3iwJn7FT5s68iZLUvlj/AWc7BhdKBi8g 26MZMS4O2qZlLnm1nkfzrf/l/Xqx0ngQIF6U0Gr0YJqyMWbFYMtqQxd3G+SzeVdAxzFr WOgwq03WYVjmUObQ0q937jYCfjlTAygipGoCUjihqO2iTKgYmlrW+Q37NaDkm8qTzlr5 3RTKyVPs4zEUPUff22g8p/oiySK/G00e5P9HBSoSKnollCJyF4ZB1UEeicQw7dJrsGWE XahA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:from:subject:thread-topic :message-id:to:content-transfer-encoding; bh=mEymdPkPZ5HIksAJU+vIqaseKBOrQqAj7Zr9oGLRxwU=; b=nl1/sClon3MGqJZPpvw8SgVrt1cBiZJQm7b6ul1U8foRmOCw2hRYv9f/itKGK5g2Zf QNKL4ORbE2/0waknmzfUmN7zCxfsT4fcjauOuAM9zJCJtuFRzF6ncFc4YSEtgAzkKwBC COCXe33dCC6Fl00r8i3KzaQGj00hp0ZZimQukuzT429ICrlKdy3PGauVBtbi/t3mCx7Y pmp6I+QeraMg/+fULnO0KuYvKPxzvqGrtHZJ8IHoIhLg+KIFMYhaYatinnK600pxA4DS smSgyDE/VasClT9vFhzRmppRrOlxLtc7oEHhuhjYT75yElHmT18YHKg1DIKH/VvRCsm9 X77Q== X-Gm-Message-State: AOAM532YSMsmUGd5YoU8FT7SwxGEAbo0OdCh4dbWXXz0I1bCWnsZ5kTl PcnFtUIGxGQ/8WkAxWMRyPfLKm7bnnr0gw== X-Google-Smtp-Source: ABdhPJzC+Jnfq35wyI6xNcr35n0pTzowJmkWuTvp0X1FRanc8TRlUY4N8nMpSuaPsb002DfYpyZdlg== X-Received: by 2002:a17:906:d282:: with SMTP id ay2mr6587676ejb.265.1599220946444; Fri, 04 Sep 2020 05:02:26 -0700 (PDT) Original-Received: from smtp.gmail.com ([2001:984:3852:1:995e:a95:52c:836a]) by smtp.gmail.com with ESMTPSA id j3sm5752240edd.92.2020.09.04.05.02.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2020 05:02:26 -0700 (PDT) Thread-Topic: Typing efficiency 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:108621 Archived-At: --===============2720031978961987185== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Dear list member,

 

Following up from:

https://www.mail-archive.com/ntg-context@ntg.nl/msg94719.htm= l

 

The below MWE works but how can I avoid having to type

=C2=A0=C2=A0=C2=A0 \startmode[en]

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \getbuffer[en]<= o:p>

=C2=A0=C2=A0=C2=A0 \stopmode<= /p>

=C2=A0=C2=A0=C2=A0 \startmode[nl]

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \getbuffer[nl]=

=C2=A0=C2=A0=C2=A0 \stopmode=

 

after ev= ery block of text?

 

I tried to define a new start/stop pair as follows:

\definestartstop[Bufen][

=C2=A0=C2=A0=C2=A0 before=3D{\startmode[en]

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \startbuf= fer[en]},

=C2=A0=C2=A0=C2=A0 after=3D{\s= topbuffer

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 \getbuffer[en]

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \stopmode}]

 

but that fails.

=

 

No doubt a c= lever solution exists that minimizes the typing.

 

Kind regards,

Jan Willem

 

 

=3D=3D=3D

\setupinteraction[state= =3Dstart]

 

%\enablemode[nl]

\enablemod= e[en]

 

\defineselector [language] [max=3D2,n=3D1]

\startmode[en]

=C2=A0=C2=A0= =C2=A0 \setupselector[language][n=3D1]

\= stopmode

\startmode[nl]

=C2=A0=C2=A0=C2=A0 \setupselector[language][n=3D2]<= /o:p>

\stopmode

=  

\starttext

 

\startsection[title= =3D\select{language}{English title}{Dutch title}]

 

=C2=A0=C2=A0=C2=A0 \sta= rtbuffer[en]

=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 This is English text.

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \stopmode

=C2=A0=C2=A0=C2=A0 \stopbuffer

=C2=A0=C2=A0=C2=A0 \startbuffer[nl]

= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This is Dutch text.

=C2=A0=C2=A0=C2=A0 \stopbuffer

 

=C2=A0=C2=A0=C2=A0 = \startmode[en]

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \getbuffer[en]

=C2=A0= =C2=A0=C2=A0 \stopmode

=C2=A0=C2=A0=C2= =A0 \startmode[nl]

=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 \getbuffer[nl]

=C2= =A0=C2=A0=C2=A0 \stopmode

 

\stopsection

 

\stoptext

 

 

= --===============2720031978961987185== 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== --===============2720031978961987185==--