From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108642 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jan Willem Flamma Newsgroups: gmane.comp.tex.context Subject: Re: Typing efficiency Date: Sun, 6 Sep 2020 13:28:28 +0200 Message-ID: References: <9A39F242-5579-4FCB-A29C-FC6C728480E1@hxcore.ol> <3E8EE726-5A29-48EE-BE8D-DAE1612FFBB6@elvenkind.com>, <50f2eb1f-e6af-f94f-5405-3e465be205b4@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1645143881950323297==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4104"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 06 13:29:03 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 1kEsr1-0000yN-3r for gctc-ntg-context-518@m.gmane-mx.org; Sun, 06 Sep 2020 13:29:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 63D85164942; Sun, 6 Sep 2020 13:28: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 98tSKtwBNn4V; Sun, 6 Sep 2020 13:28:28 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7AA5C164943; Sun, 6 Sep 2020 13:28:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F2F80164943 for ; Sun, 6 Sep 2020 13:28: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 5m4o0L8WmpWv for ; Sun, 6 Sep 2020 13:28:26 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.41; helo=mail-ej1-f41.google.com; envelope-from=register12c@gmail.com; receiver= Original-Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 25D95164942 for ; Sun, 6 Sep 2020 13:28:26 +0200 (CEST) Original-Received: by mail-ej1-f41.google.com with SMTP id gr14so13082208ejb.1 for ; Sun, 06 Sep 2020 04:28: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:in-reply-to:message-id :references:to:content-transfer-encoding; bh=G6sqT0pohk2qzFO0guvxftgzKgZ5JWF4lbYuxzAs2Mg=; b=GoGUCVSeIGN4sQtioi2ZI0Pfz/6P1GFcS/07mCCY2HlHgmcwAIxMr2f4uAHeMdbd9o j8sYP5NKGb42vl5Rn9QlpDqKZ6Z5Zzz6ZxJWBm1bZfAbAO/jMyf6DY9tulYp73VV720X wXUU9UviKDnrWYvq/SvghLf5zAQaWohT60c30h+xjhH+Fd8VaCo1VSv1DuEODZwtNBzl qIKOn7GqJoPfr8GvrcEddVuuQ0GcRmf57+4TpsLzqY0ZoIFLhb8s7jBmmpZYSxKpy3OD 1F85TTa9efdaAMCj0AsBG1BZxZsElyMalW5sCYCkrZMI5GUw60FCudKF0WSAVHZmHQyQ QwMQ== 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 :in-reply-to:message-id:references:to:content-transfer-encoding; bh=G6sqT0pohk2qzFO0guvxftgzKgZ5JWF4lbYuxzAs2Mg=; b=ROfJoiRvRLZ/DF83asGOuyPfS6rPy6QtfPKqotWb79axn5znF0YZVT92MzOgja3NjI PjEsaSy8cjHqxUW/vbL5fSyIAOuRdiEsT4LJOZSl8uKOL50IYnSnM7zK0Wh6meSTyJUv vpXQgTefPEVC9p1ffeuqH8UTZ8XZ0zkY/mrITtfE+VHSPHggCE4KyYdCO7LUVUXLS3hz DN8c1jje4HtF36t6j1lV41UbRUzUBatRX8rgQlqBiooLWyVphzPUGEPu3Fxp2wmxqU2E dC2Nj16hE0FT7tQOuM7sRqvz7ykmHhvmBA9HHNtvddukjC094iTYJfiL/ouKPKgrGPQG fPKw== X-Gm-Message-State: AOAM533hGFf+7TIYnYU5g/ELvS3pfQ1OtHxoMucx125DKBV04fN8DH5t ZKt6Eppe9ZSgEo1X2q+gaaEofFdFaasKNQ== X-Google-Smtp-Source: ABdhPJxMuF1S755JZ9VedtkwDpO1hUXY5A0YdnQOIPXyA3lOZNH+56YnnwZxsRuvE0SvIUe7vDUR1w== X-Received: by 2002:a17:906:4819:: with SMTP id w25mr15965884ejq.300.1599391705297; Sun, 06 Sep 2020 04:28:25 -0700 (PDT) Original-Received: from smtp.gmail.com ([2001:984:3852:1:41c5:719d:88ff:b554]) by smtp.gmail.com with ESMTPSA id nm7sm11747439ejb.70.2020.09.06.04.28.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2020 04:28:25 -0700 (PDT) Thread-Topic: RE: [NTG-context] Typing efficiency In-Reply-To: <50f2eb1f-e6af-f94f-5405-3e465be205b4@gmail.com> 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:108642 Archived-At: --===============1645143881950323297== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Thank you Taco an= d Wolfgang.

 

I will ha= ve a look at both solutions.

 

Kind regards,

Jan Willem Flamma

 

From: Wolfgang Schuster
Sent: = Friday, 4 September 2020 16:26
To: mailing list for ConTeXt users
Subject: Re: [NTG-cont= ext] Typing efficiency

 

Taco Hoekwater schrieb am 04.09.2020 um 15:51:

>

> Hi,

>

> Sounds like a job for the blocks mechanism more so tha= n buffers:

>= ;

> <= /o:p>

> \defineblock[e= ntext]

> \d= efineblock[nltext]

>=C2=A0=C2=A0=C2=A0

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

> \startmode[en]

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

>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \keepb= locks[entext]

= > \stopmode

> \startmode[nl]

>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \setupselector[language][n=3D2]=

>=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 \keepblocks[nltext]

> \stopmode

>=C2=A0=C2=A0

> \starttext

>=C2=A0=C2=A0

<= p class=3DMsoNormal>> \startsection[title=3D\select{l= anguage}{English title}{Dutch title}]

>=C2=A0=C2=A0

> \beginentext

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

= > \endentext

> \beginnltext

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

> \endnltext

>=C2=A0=C2=A0

> \stopsection=

>=C2=A0=C2=A0 <= o:p>

> \stoptext=

 

 

It can also be done with bu= ffers.

&n= bsp;

\definebuffer = [entext]

\defi= nebuffer [nltext]

 

\de= fineselector [language] [max=3D2,n=3D1]

 

= \startmode[en]

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

=C2=A0=C2=A0= =C2=A0=C2=A0 \def\stopentext{\getentext}

\stopmode

 

\startmode[nl]

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

=C2=A0=C2=A0=C2= =A0=C2=A0 \def\stopnltext{\getnltext}

\stopmode

 

\starttext

 

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

 =

\startentext<= /span>

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

\stopentext

\startnltext

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

=

\stopnltext

 

\stopsection

 

\stoptext

 

Wolfgang

__________________________________________________________________= _________________

If your question is of interest to others as well, please add an entry = to the Wiki!

<= o:p> 

maillist= : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context=

webpage=C2=A0 : ht= tp://www.pragma-ade.nl / http://context.aanhet.net

archive=C2=A0 : https://bitbucket.org/= phg/context-mirror/commits/

wiki=C2=A0=C2=A0=C2=A0=C2=A0 : http://contextgarden.net<= /o:p>

___________________= ________________________________________________________________=

&= nbsp;

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