From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32467 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Issues with Quotation Marks in Pandoc When Mixing Japanese and English Texts Date: Tue, 11 Apr 2023 05:32:50 +0000 Message-ID: References: <4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n@googlegroups.com> <602edc59-8983-4459-bbbb-85cee5f013b3n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14323"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBBPC2OQQMGQETBYT75A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Apr 11 07:32:57 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f56.google.com ([209.85.218.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pm6cj-0003W6-Qa for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 11 Apr 2023 07:32:57 +0200 Original-Received: by mail-ej1-f56.google.com with SMTP id a640c23a62f3a-94a342f6516sf102825466b.0 for ; Mon, 10 Apr 2023 22:32:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681191177; cv=pass; d=google.com; s=arc-20160816; b=JMdGKMgBvjaCzFads8bXtvy3AtZvSTWXpGx1qQGPOPuW44lxMCQwiaYivjG9wo5zqs LHbRxzwGwA3KN9D5L/ij0ptYnCwlvggl4coBWvVL8eSMe8hHPbxQ6kkhPO66ZPGmgTbG nnUD1B3XzOlfvesXgbYeXjBMXIygKR6A39MX/vS1/WV+Pq73T1gvq3T6fHn3NxY/DN1b vxzdbj4z1f4e8LjvJ/Wijdr1Fvu7TYK5siTRUCQ28TuKdmk+7pEyFGIh1AzvtHv60viW fgNZv1+2lnp1XYBNRPwQU0dmi2GL783wK+Cx/EWHCR68cqHN5ljVfI5PufhgFkqIcBw7 aR7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=D7Fvjb2sPvBpMeKJz0eJK5JxQn9Q8nTR8EcfOSSpOVM=; b=lyx3icblcTdFNN0qR/6GsTP0Jaj9zgwhDo1NSi1Uln2nnSeX21fpgek4MZeC1gbcOh aSErU+5E3pWcOPLxDu3ZCTIy8zv+McLvDbXpnz3WiJPu+bLH/ZrPrTANKS7rJBhl2fD9 5IuxDsNXXR0VNUTdNRvlBvL/vxF3xfcGz36BJkb0sxrtY++3gutvovCezZphwhprlWAF psrCyeIxMwID08W2vEbvXkhkIRY8ic8jycg/C4o/Y70b0//j94Hw5gMwsO2gvrgA+5t4 iVI0E92ej40zQ5fvAZoOoXGhsM5RmBi5vtzC3jOQLHsCFbr0V/0PF4ESlKpA73qPWQJp wiJw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jdQra+dk; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1681191177; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=D7Fvjb2sPvBpMeKJz0eJK5JxQn9Q8nTR8EcfOSSpOVM=; b=qiB2kCo9tjth3NkMYqQmvYqhCPNo6Smrpa99u4dEdHEz4LfyLGdHc+3Z+V1hfKkYr8 jIX6x7EsO70OJPNNChMqe+EFClE8hzTlh82jwJzF1ZvY/6yoYbRIjjSbD3wvGIhAHEft KVsQO0FDUhiWOKPtRJ0rvfIW+Tnb7bDebc9ZVxt657sJrQEaQhR3Qz0bt7T/RiUCRYlc BO+7A8FoYErovLXy0Js/8KniCgVpsvnBx5CCjACsPV6yY/9B8YKzC7FN4GAtXmUiqnew wr5XKegft586fzzJqzl57adgcLs/G7m X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681191177; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=D7Fvjb2sPvBpMeKJz0eJK5JxQn9Q8nTR8EcfOSSpOVM=; b=3n2kdo99xLPq4Yv6Y+NFV8LCwL1hVbamwzI5KkQterLiw+FAaUNTCPpaAnLEEibUqc acvWCmNrA0sYRTWCU32zKyBit2gR2i4hjhYeUcvax4M9KiqGTGa5rQvg7TvsnkisA4zW VZTjwtvdFq5MZkGcQWDt7lZLkDq2ZidoMxQ6ikHD4oT8o0cRZneGmWU9gKSLre653Eun 1I7eIWE7R5VtYi4Y9Mw3S+hGr9b0qKuVGhvWeYiAvl Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AAQBX9egvmGwM9Hp/LTOAxF/HvwApK6ZDreFH5HFXCU3BrFPoHdi7ns1 VcbQu48GVWZcBZ6ArMuDtlY= X-Google-Smtp-Source: AKy350am7tMng+gUlQ/8kl5mt6XTvUHy8l1zBSDPu1raO3T1VV/IN7e2+z0Jh1PYsWEhaFaQ76tv4A== X-Received: by 2002:a50:c31b:0:b0:4fb:30fc:1e99 with SMTP id a27-20020a50c31b000000b004fb30fc1e99mr4469847edb.0.1681191177334; Mon, 10 Apr 2023 22:32:57 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:51d4:b0:504:9a87:717e with SMTP id r20-20020a05640251d400b005049a87717els2694337edd.0.-pod-prod-gmail; Mon, 10 Apr 2023 22:32:52 -0700 (PDT) X-Received: by 2002:a05:6402:1043:b0:4fe:9689:96bb with SMTP id e3-20020a056402104300b004fe968996bbmr12421708edu.35.1681191172555; Mon, 10 Apr 2023 22:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681191172; cv=none; d=google.com; s=arc-20160816; b=DYl+mV/hp+b6uoa9a+eZ6uUPdxdqXHG7zDetQKJ8uDZEQl25Y6y/cCKUI4PBln1M3U /73gYJxY3lmKEtGLLCd76/ESLoXOtMhkTWQU2Vn8BZHyrAjz6F2V/gK7kVl0ZuK6MgwP 0kqrZ5N7VfqfnUChLqII175yz2hNNz4sk2vRralstPD/Z3uTJOA6qn2PZ+Wfzie9wL6k 6nAzEEe/Nr8dEQ7y6w7oQtwk8A+FmVqUsHg2w2kcJ615/SBJN5lE12PQehBFPUEI7GC3 a5sIl9FkvBZNyOWkCLlGXL5HYqTMiTUB989ecySMY4jGIq75jghIeXmhW5gg705d56Wt 2ELQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=ocmnD6xV1ojpOQv7hrhnaEjwvUtWB1K+Tc+DVLhRZvw=; b=abE+zn3Mh5nbOsnNwcAO6ganyccdmRxTs7U9RXQzyCy7h9ZAY6f4E0flXZllC5T92L Z/myN8Fm3r2MHgw68tC2nzmE7tIf9bJTC7Jbhub9eE/gjNzcxG9U+tsBF5zNbxvy2Xlq 9rkFuV8rkOvBFmRNVIyM06P0br6SWHoAnAiOG7eNpiyOEGbAuU3bKULsmDIfR7kFo2e4 hmR2g7pF9LmhjfwEgNf48Nyo1r8wD010kRwXnNJgxzasqH6BJGcXEtryrI94ZbDNqMCO /SIjOyOw/M6SifKl7VqGbg3MOKL6LMOLNQ1bUi4wNPXvJoiIt5lZjh4a6p65k1DO3xd3 6pGA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jdQra+dk; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id cy11-20020a0564021c8b00b005047dc64e8dsi497231edb.5.2023.04.10.22.32.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 22:32:52 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2095A2402DA for ; Tue, 11 Apr 2023 07:32:52 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PwZHR4fWBz6tw0 for ; Tue, 11 Apr 2023 07:32:51 +0200 (CEST) Content-Disposition: inline In-Reply-To: <602edc59-8983-4459-bbbb-85cee5f013b3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jdQra+dk; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32467 Archived-At: An if you put the English parts in language spans as I said and add in head= er-includes \babelfont[english]{rm}{Georgia}? Le Monday 10 April 2023 =C3=A0 04:30:37PM, Shigeru Kobayashi a =C3=A9crit : > Dear=C2=A0Bastien DUMONT and=C2=A0John MacFarlane, >=20 > Thank you very much for your reply. >=20 > Regarding issue 1, I will use Unicode curly quotes instead of strait quot= es to > avoid misinterpretation. >=20 > Regarding issue 2, I tried marking the English text as [That person said, > "Hello, world!"]{lang=3Den}, but the result was the same (i.e., quotes ar= e > typeset with the Japanese font instead of the English font). I also tried > Unicode curly quotes. >=20 > I have confirmed that "pandoc input.md -t input.tex" generates a code as > expected as follows: > \foreignlanguage{english}{That person said, ``Hello, world!''} >=20 > Therefore, this is puzzling to me... >=20 >=20 > Best regards, > Shigeru KOBAYASHI >=20 >=20 > On Tuesday, April 11, 2023 at 2:34:40=E2=80=AFAM UTC+9 John MacFarlane wr= ote: >=20 > I would recommend using unicode curly quotes in the markdown when you= 're > working in a language without interword spacing. We rely on interword > spacing for heuristics about smart quotes. >=20 > > On Apr 9, 2023, at 4:53 PM, Shigeru Kobayashi = wrote: > > > > Dear Pandoc community, > > > > I have encountered two issues regarding Pandoc's handling of quotat= ion > marks in cases where Japanese and English texts are mixed. > > > > I am using Pandoc version 3.1.2 on macOS 12.6.3, and I can reproduc= e > these issues. If these are indeed bugs, I am planning to submit them = as > issues on GitHub. However, I would appreciate any guidance if these i= ssues > arise from my incorrect usage. > > > > Issue 1: Conversion of English phrases within Japanese text > > > > I have observed the following issue. "input.md" is the input file, = and > "input.tex" is the output file. > > > > $ pandoc input.md -o input.tex > > > > input.md: > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF"Hello, world!"=E3=81=A8=E8=A8= =80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > input.tex: > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF''Hello, world!{}``=E3=81=A8=E8= =A8=80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > However, the conversion is correct when spaces are added before and= after > the double quotation marks. > > > > input.md: > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF "Hello, world!" =E3=81=A8=E8= =A8=80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > input.tex: > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF ``Hello, world!'' =E3=81=A8=E8= =A8=80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > > > Issue 2: The quotation marks are treated as Japanese text > > > > When converting with Pandoc, the quotation marks are treated as Jap= anese > text, resulting in an unnaturally wide gap. I have confirmed this usi= ng two > files, "preamble.tex" and "input.md," and specifying as follows: > > > > $ pandoc input.md -o input.pdf --pdf-engine=3Dxelatex -H preamble.t= ex. > > > > preamble.tex: > > \usepackage{fontspec} > > > > \setmainfont{Georgia} > > \setjamainfont{BIZ UDMincho Medium} > > > > > > input.md: > > --- > > documentclass: bxjsarticle > > classoption: pandoc > > papersize: a4 > > fontsize: 10pt > > --- > > > > # =E3=81=AF=E3=81=98=E3=82=81=E3=81=AB > > > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF "Hello, world!" =E3=81=A8=E8= =A8=80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > That person said, "Hello, world!" > > > > > > > > In contrast, when I directly write the content in TeX and output it= using > $ xelatex test.tex, the quotation marks are treated as English text, = and > the expected output is obtained. > > > > test.tex: > > \documentclass[a4paper,xelatex,ja=3Dstandard]{bxjsarticle} > > > > \usepackage{fontspec} > > \setmainfont{Georgia} > > \setjamainfont{BIZ UDMincho Medium} > > > > \title{=E3=83=86=E3=82=B9=E3=83=88} > > \begin{document} > > \maketitle > > > > \section{=E3=81=AF=E3=81=98=E3=82=81=E3=81=AB} > > > > =E3=81=9D=E3=81=AE=E4=BA=BA=E3=81=AF ``Hello, world!'' =E3=81=A8=E8= =A8=80=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82 > > > > That person said, ``Hello, world!'' > > > > \end{document} > > > > > > > > Shigeru Kobayashi > > > > > > -- > > You received this message because you are subscribed to the Google = Groups > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, s= end an > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [1]https://groups.google.c= om/d/ > msgid/pandoc-discuss/ > 4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%40googlegroups.com. > > >=20 >=20 > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= email > to [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [3]https://groups.google.com/d/m= sgid/ > pandoc-discuss/602edc59-8983-4459-bbbb-85cee5f013b3n%40googlegroups.com. >=20 > References: >=20 > [1] https://groups.google.com/d/msgid/pandoc-discuss/4a0eafdc-b4a2-4a6a-9= 488-d2a1c9ef8351n%40googlegroups.com > [2] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [3] https://groups.google.com/d/msgid/pandoc-discuss/602edc59-8983-4459-b= bbb-85cee5f013b3n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/ZDTxAtxL0d8CgXx4%40localhost.