From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95077 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Bug with setuplanguage Date: Sun, 05 Jun 2016 08:24:15 +0200 Message-ID: <5753C58F.10909@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5892438000663454820==" X-Trace: ger.gmane.org 1465107912 11247 80.91.229.3 (5 Jun 2016 06:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Jun 2016 06:25:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 05 08:25:01 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b9RUa-0003Mo-Q2 for gctc-ntg-context-518@m.gmane.org; Sun, 05 Jun 2016 08:25:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id EAF48ECD1; Sun, 5 Jun 2016 08:24:31 +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 E1rzuNYKzU_O; Sun, 5 Jun 2016 08:24:29 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id DA2DDECD3; Sun, 5 Jun 2016 08:24:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 761D0ECD1 for ; Sun, 5 Jun 2016 08:24: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 vkxj3jvj5j4B for ; Sun, 5 Jun 2016 08:24:28 +0200 (CEST) Original-Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id EBB68ECD0 for ; Sun, 5 Jun 2016 08:24:18 +0200 (CEST) Original-Received: by mail-wm0-f49.google.com with SMTP id z87so40070369wmh.0 for ; Sat, 04 Jun 2016 23:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=o2xGz8X8reFioWgBV/S9cer5qaEcflK6727KePjgWTM=; b=ogGdzrjCS9m932DBWBlLcgXKzM/bgClz+RqiFiUsoNOTDgcg5mGyG9SkiCIi9MC8TN ZdpJj0ZxoIslmR70ew8ZvZwdft167rOmnjjtelsvt+mC4NStttJ89wUDEzcGM7s+j5oQ uFfj+cygklJ9xwPJrs5tHnMEWwEX4wi4dVNo1JAfHXhdeH9q2xAoq9GBV3lS4pfpW0dG 22AXB8QyrZ/kYTgPhKIqbv1M3jl2hsJYfYWRBoT8Csjv5mnSlMHBF8sLx9GIbEbDq/VF k1cBbgjQl+EWi5yjXd4QZDm9VWIPyqZHXJ9oNdtgRWgXsdg+MTLH/jeK8ST4LjrNn9IM idKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=o2xGz8X8reFioWgBV/S9cer5qaEcflK6727KePjgWTM=; b=aWZt9712wQvO6OCtRsYexfrpQHrndW53swczFwt/5IASVhxzbd5mJtmZMIG4m0VPgf Ct3Z7sacBhUArlp3E8BkeGwan4nM62xodFgSIVHfJTdzJdmpcaAkUV2vQSmHSZLZYriV PrB8LO6OByPb3dwJjbaUMSpApPPSN9cy2KqHfsFlm5ZI877aih3uEDNosxcAstZIS81X 6TP72hHPMHMNc20LlAAodTyyrnmzqalJPAZKtXesYRewjCCxc+L4FaqY7HA9tG+equHi GvC6aGXKKbh4ltyDrgbNSniNe6NI6Kwe9SVgD8t1NQ4EAswDGF2cj9liyTkIS1HF8S1f xlCQ== X-Gm-Message-State: ALyK8tKWorf4cEoXSgLQ46QoO2EF2tLUluTUoWRFsZaWFwMJau1+BJwIxc7aYCVQ2FQIpg== X-Received: by 10.28.126.72 with SMTP id z69mr6508209wmc.22.1465107858580; Sat, 04 Jun 2016 23:24:18 -0700 (PDT) Original-Received: from keima.localdomain (x2f27aaa.dyn.telefonica.de. [2.242.122.170]) by smtp.gmail.com with ESMTPSA id g129sm17276864wme.1.2016.06.04.23.24.17 for (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Jun 2016 23:24:17 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:95077 Archived-At: This is a multi-part message in MIME format. --===============5892438000663454820== Content-Type: multipart/alternative; boundary="------------010702010301080609020409" This is a multi-part message in MIME format. --------------010702010301080609020409 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Aditya Mahajan > 5. Juni 2016 um 00:32 > Hi, > > I discovered this bug while answering a question on TeX.SX. Consider: > > \define\cyrdash{\dontleavehmode\scale[sx=3D0.80]{---}} > \unprotect > \setuplanguage > [\s!ru] > [ > \c!midsentence=3D\cyrdash, > \c!leftsentence=3D\cyrdash, > \c!rightsentence=3D\cyrdash, > ] > \protect > > > \setupbodyfont[dejavu] > > \starttext > Normal text|<|English > > \mainlanguage[ru] > Normal text|<|Russian > \stoptext > > The pdf shows: > > Normal text=E2=80=94English > Normal text=E2=80=9ERussian > > Why the quote instead of the emdash. The output is okay is if=20 > \mainlanguage is set before |<| is used for the first time. When subsentences are nested the inner group uses the leftsubsentence=20 and rightsubsentence symbols. \mainlanguage[ru] \starttext outer|<|inner|<|nested|>|inner|>|outer \stoptext Wolfgang --------------010702010301080609020409 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
5.= =20 Juni 2016 um 00:32
Hi,

I discovered this bug while answering a question on TeX.SX.=20 Consider:

\define\cyrdash{\dontleavehmode\scale[sx=3D0.80]{---}}
\unprotect
\setuplanguage
=C2=A0 [\s!ru]
=C2=A0 [
=C2=A0=C2=A0=C2=A0 \c!midsentence=3D\cyrdash,
=C2=A0=C2=A0=C2=A0 \c!leftsentence=3D\cyrdash,
=C2=A0=C2=A0=C2=A0 \c!rightsentence=3D\cyrdash,
=C2=A0 ]
\protect


\setupbodyfont[dejavu]

\starttext
Normal text|<|English

\mainlanguage[ru]
Normal text|<|Russian
\stoptext

The pdf shows:

Normal text=E2=80=94English
Normal text=E2=80=9ERussian

Why the quote instead of the emdash. The output is okay is if=20 \mainlanguage is set before |<| is used for the first time.
When subsentences are nested the inner group uses the leftsubsentence=20 and rightsubsentence symbols.

\mainlanguage[ru]

\starttext
outer|<|inner|<|nested|>|inner|>|outer
\stoptext

Wolfgang
--------------010702010301080609020409-- --===============5892438000663454820== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============5892438000663454820==--