From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32470 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Shigeru Kobayashi Newsgroups: gmane.text.pandoc Subject: Re: Issues with Quotation Marks in Pandoc When Mixing Japanese and English Texts Date: Tue, 11 Apr 2023 15:26:51 -0700 (PDT) Message-ID: <94d4f547-ec9b-44bf-9cf0-122d1eea1f02n@googlegroups.com> 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: multipart/mixed; boundary="----=_Part_19738_1381827655.1681252011572" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21750"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDN3RFWFQMMBBDF726QQMGQECB2LMKQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Apr 12 00:30:40 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pl1-f186.google.com ([209.85.214.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pmMVc-0005Wi-D4 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 12 Apr 2023 00:30:40 +0200 Original-Received: by mail-pl1-f186.google.com with SMTP id j2-20020a170902da8200b001a055243657sf5628176plx.19 for ; Tue, 11 Apr 2023 15:30:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681252239; cv=pass; d=google.com; s=arc-20160816; b=uSc4PgHQW2l4mJI11XaDpvcdCiy1oIyW7EAoW8wkqeTNUFOHTZqCw3pHQUAP/uMN4a hJYjtKp9KFghIrOx3tLAzKjlp4jxhLtjJNCqfMPe6dqN4ZPWnnCat25JbtbxU9pYCTVy 9k5AawrQz66G6FknKvlHr5Uwy4mt7iAT1O02hFSYVA72nOd1ZWFoZ/OLwbtisnQmOl+a 3Ts3RUXI8OTyVaYUd7qfSEqU1+yMbaR1ZUovmi6/xovRM8GqQXR/mAhnCDr8TSQN/f27 VGSU3CYu+oh7n7sLkjQBwaFuxT5CG+Bhrm5ExR5nYizwGI+SWt/+HG7DrErHb+o4h4Uw 5inA== 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:mime-version:subject :references:in-reply-to:message-id:to:from:date:sender :dkim-signature; bh=DbYdxbqaiUUx8fq/N7scKuINQ9gCvqbsqgd7rs6uYvs=; b=rR2aIxUgWzGw4HNC6SscuSHllkN/1kQUrifHqgB+DVcKm1srkgprdGHlPaZHm3qQ9c QkHgQa5qFr5DGyoOh+rmBeg0VMmp8Vyzb21pdYquWt7Wl9lIL8MiX1saby3VX/OO2gQf UqH5L9O8kiyDt3vIS1sC77/gNehFs5IpmthJ971sfmzNcs9mey+GP1au5q9P4tKoyi+Q LNUxp2lhb0/VLnHoHeoQDi2MMuZcy/JtRR+J3++TnB86KK5IlT7A/s4BLE/eroh7ikNY q7EhZ2QkAlqvQwATXcWrfcY8seKjpivLpbfYsLTb8yMpleJ1A6G3gZwn+FH6HD6aYhTr pusQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@iamas.ac.jp header.s=google20151224 header.b=KNK3mP2b; spf=pass (google.com: domain of mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org designates 202.241.206.44 as permitted sender) smtp.mailfrom=mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1681252239; 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:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=DbYdxbqaiUUx8fq/N7scKuINQ9gCvqbsqgd7rs6uYvs=; b=eJXnsr2d52UstEl1zGxoQl7R3oYm7nKtb1TL/MP+O0coAVuK6pzUgsrZwHpPSRbr39 OZqiHFmCc99T5PWVRokoc0YNMr4rClXmB4+6SSc2oxc9F7HyRYp/wpI4o91hV4SEgmrT C8G/fUQe5D5Fbk61RPNDPPsIrDlV7hYJEK8GewYS2c5PqjOpryIL3AiDet9RqSKzBjUv fDUqHObG5Z50s5lePsWyDSscX28qzGAyL+uEiozzoT3gPVgFuU+oPcikllhg+710XlS4 DiOpk7tOc/0I9QEptvTJlRY0bSfT8LFRoWpHIS3+abSZa4yRf4MTgklaoXWXx5TYSgWU h+Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681252239; 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:mime-version :subject:references:in-reply-to:message-id:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=DbYdxbqaiUUx8fq/N7scKuINQ9gCvqbsqgd7rs6uYvs=; b=KfxcmrKAkFQwur0uzy0Ap2fjqzvP+oT+HOTYJ/E45lXKkZ4iiMrU7AmcirsyugHfme +TTuxl691Jz3cO2ILQUYWuQEDW3zDE0ZV1HIFnSxMzdyGRRc1iKlT7vnJAVxHC/DtgUp wuVtEm+K9JtLqVtW3MDMlRjOGQ2ZbMwRFuHsERUawsBYZzsw1JENrNiGbl32dVS9dnwe FWmevxT/od3MzzNAH38Ujm9Z1s3pdfy3ZemMm/Wp3w9pN8FDuAMtXFA+R+EdrMdfSdZd jsH/yMwgAyc7DmLQHvzu Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AAQBX9f8wOFRUFfXaSHhB2R+1UT/p5WZCdY1W2idzgh8aG23dbfTYXSP WX0b6RzCZ4YNuROaXGLk6jI= X-Google-Smtp-Source: AKy350ZdYlSGXv5HwELg+WG/ZgKuauDNrski1jMheSEUm90wYvT98fZ6ZCANM8CIMXdVtBlcppjH/Q== X-Received: by 2002:a17:902:c209:b0:1a6:3ba4:fe04 with SMTP id 9-20020a170902c20900b001a63ba4fe04mr3026472pll.7.1681252239125; Tue, 11 Apr 2023 15:30:39 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:902:ea02:b0:19f:3460:3f0 with SMTP id s2-20020a170902ea0200b0019f346003f0ls33173040plg.5.-pod-prod-gmail; Tue, 11 Apr 2023 15:30:35 -0700 (PDT) X-Received: by 2002:a17:902:f547:b0:1a6:494b:5b0 with SMTP id h7-20020a170902f54700b001a6494b05b0mr9637669plf.40.1681252235335; Tue, 11 Apr 2023 15:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681252235; cv=none; d=google.com; s=arc-20160816; b=llDOxng5TVGNvLAaPqg4L6o2jNjviCRdJgf3t/IqD9BBQ1lWNMAUd3sNJITEG68zWU v0lmcDkfogNwFGDE0XUIAxwk+gg74bedT1LFbHq2pVnQU5B0ZcRSXVe+fMvdEfy7c1aD aasddHEsxxT9ddlutzrnRmgnSxKvhhJ4MUYvlJgO3Qstdvt1SgY9fVkwe2PUEOyjJKv8 L5JE8oK1lrBU/JQ3r4+QtPPbMVmdultYCfj3P3Igf2QG84RRYWAiT87bITIIxwBfxP/W fRzyicM8+yfKh4juKa4nAVL2j0coqAa+ptnfM2uyGjWtlylWd5gZTHr4tt0tpiO/GcQ4 tuTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :dkim-signature; bh=wW5xAEEaiolTERaUL9FDjBQG2xbYvsTF0RnAAUYQFz0=; b=YMhN5aSQMm6lvMLIcmNN+rVFFF1Kx8KSVH5h1wt2t8GUWrrVGfi4wbztzlhvE4njNs 0BBXNB+fUAd9AZisB242QTV9k/mVtmyVUhxiisyPhD6MdbZXh16XxFs47gwi8+T60QoO eGtRTB7JHHda5bfCulSXdZdMpECfdJSYUK9QFoAXBtmL7P09Y6x0ohEKTDQon1yZkIRi NQuhSorbBqPOxvku/Gky7oAOG2SfFj14i1Le0/TQI64dShn0/Y5wDaW4Lgbhqhk7SXuc O8mV6BxfVuaa4NJ73gT7L4i/hf64dsPS24DDPjeEtSIi2AnQXrqIMz0/R18fyrdSotTN pLjw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@iamas.ac.jp header.s=google20151224 header.b=KNK3mP2b; spf=pass (google.com: domain of mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org designates 202.241.206.44 as permitted sender) smtp.mailfrom=mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org Original-Received: from ss11.activegate-ss.jp (ss11.activegate-ss.jp. [202.241.206.44]) by gmr-mx.google.com with ESMTPS id iw5-20020a170903044500b001a1a9a5e546si1180674plb.9.2023.04.11.15.30.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2023 15:30:35 -0700 (PDT) Received-SPF: pass (google.com: domain of mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org designates 202.241.206.44 as permitted sender) client-ip=202.241.206.44; Original-Received: from mail.d.activegate-ss.jp (unknown [10.16.39.39]) (envelope sender: ) (not using TLS) by ss11.activegate-ss.jp (Active!gate) with ESMTP id MHa115174A; Wed, 12 Apr 2023 07:26:54 +0900 Original-Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-1842e194052so5306457fac.12; Tue, 11 Apr 2023 15:26:54 -0700 (PDT) X-Received: by 2002:a05:6870:1217:b0:177:b393:4007 with SMTP id 23-20020a056870121700b00177b3934007mr5566333oan.0.1681252012591; Tue, 11 Apr 2023 15:26:52 -0700 (PDT) X-Received: by 2002:a05:6870:1217:b0:177:b393:4007 with SMTP id 23-20020a056870121700b00177b3934007mr5566327oan.0.1681252012129; Tue, 11 Apr 2023 15:26:52 -0700 (PDT) In-Reply-To: X-Original-Sender: mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@iamas.ac.jp header.s=google20151224 header.b=KNK3mP2b; spf=pass (google.com: domain of mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org designates 202.241.206.44 as permitted sender) smtp.mailfrom=mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org 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:32470 Archived-At: ------=_Part_19738_1381827655.1681252011572 Content-Type: multipart/alternative; boundary="----=_Part_19739_2076351513.1681252011573" ------=_Part_19739_2076351513.1681252011573 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Bastien DUMONT, Thank you very much for your suggestions. > And if you use Unicode curly quotes inside the span? I tried this version, but unfortunately, there was no change in the output= =20 PDF (i.e., the Japanese font is used for the curly quotes). > If all else fails use Unicode curly quotes throughout and try this in the= =20 preamble: >=20 > \newfontfamily{\GeorgiaFont}{Georgia} > \usepackage{newunicodechar} > \newunicodechar{=E2=80=98}{{\GeorgiaFont =E2=80=98}} > \newunicodechar{=E2=80=99}{{\GeorgiaFont =E2=80=99}} > \newunicodechar{=E2=80=9C}{{\GeorgiaFont =E2=80=9C}} > \newunicodechar{=E2=80=9D}{{\GeorgiaFont =E2=80=9D}} I tried this as well, but unfortunately, there was no change in the output= =20 PDF. Initially, I suspected it was something in bxjsarticle that I had set in=20 documentclass. However, this problem does not occur when I output PDF with= =20 xelatex from an equivalent source, rather than converting from Pandoc to=20 TeX. I will investigate this a bit further. Best, Shigeru On Wednesday, April 12, 2023 at 7:01:45=E2=80=AFAM UTC+9 BPJ wrote: Den tis 11 apr. 2023 07:53Shigeru Kobayashi skrev: Dear Bastien DUMONT, Thank you very much for your reply. I tried as follows and got no changes.= =20 I'm sorry if I misunderstood your suggestion. *preamble.tex:* \usepackage{fontspec} \setmainfont{Georgia} \setjamainfont{BIZ UDMincho Medium} \babelfont[english]{rm}{Georgia} *input.md:* --- documentclass: bxjsarticle classoption: pandoc papersize: a4 --- [That person said, "Hello, world!"]{lang=3Den} And if you use Unicode curly quotes inside the span? If all else fails use Unicode curly quotes throughout and try this in the= =20 preamble: \newfontfamily{\GeorgiaFont}{Georgia} \usepackage{newunicodechar} \newunicodechar{=E2=80=98}{{\GeorgiaFont =E2=80=98}} \newunicodechar{=E2=80=99}{{\GeorgiaFont =E2=80=99}} \newunicodechar{=E2=80=9C}{{\GeorgiaFont =E2=80=9C}} \newunicodechar{=E2=80=9D}{{\GeorgiaFont =E2=80=9D}} Inspect the LaTeX output by pandoc and make sure you get curly quotes in=20 the LaTeX source, otherwise experiment with the +smart/-smart extension on= =20 input and output format till you get curly quotes in the LaTeX source. *shell:* $ pandoc -V lang=3Dja input.md -o input.pdf --pdf-engine=3Dxelatex -V pando= c -H=20 preamble.tex On Tuesday, April 11, 2023 at 2:32:57=E2=80=AFPM UTC+9 Bastien DUMONT wrote= : An if you put the English parts in language spans as I said and add in=20 header-includes \babelfont[english]{rm}{Georgia}?=20 Le Monday 10 April 2023 =C3=A0 04:30:37PM, Shigeru Kobayashi a =C3=A9crit := =20 > Dear Bastien DUMONT and John MacFarlane,=20 >=20 > Thank you very much for your reply.=20 >=20 > Regarding issue 1, I will use Unicode curly quotes instead of strait=20 quotes to=20 > avoid misinterpretation.=20 >=20 > Regarding issue 2, I tried marking the English text as [That person said,= =20 > "Hello, world!"]{lang=3Den}, but the result was the same (i.e., quotes ar= e=20 > typeset with the Japanese font instead of the English font). I also tried= =20 > Unicode curly quotes.=20 >=20 > I have confirmed that "pandoc input.md -t input.tex" generates a code as= =20 > expected as follows:=20 > \foreignlanguage{english}{That person said, ``Hello, world!''}=20 >=20 > Therefore, this is puzzling to me...=20 >=20 >=20 > Best regards,=20 > Shigeru KOBAYASHI=20 >=20 >=20 > On Tuesday, April 11, 2023 at 2:34:40=E2=80=AFAM UTC+9 John MacFarlane wr= ote:=20 >=20 > I would recommend using unicode curly quotes in the markdown when you're= =20 > working in a language without interword spacing. We rely on interword=20 > spacing for heuristics about smart quotes.=20 >=20 > > On Apr 9, 2023, at 4:53 PM, Shigeru Kobayashi =20 wrote:=20 > >=20 > > Dear Pandoc community,=20 > >=20 > > I have encountered two issues regarding Pandoc's handling of quotation= =20 > marks in cases where Japanese and English texts are mixed.=20 > >=20 > > I am using Pandoc version 3.1.2 on macOS 12.6.3, and I can reproduce=20 > these issues. If these are indeed bugs, I am planning to submit them as= =20 > issues on GitHub. However, I would appreciate any guidance if these=20 issues=20 > arise from my incorrect usage.=20 > >=20 > > Issue 1: Conversion of English phrases within Japanese text=20 > >=20 > > I have observed the following issue. "input.md" is the input file, and= =20 > "input.tex" is the output file.=20 > >=20 > > $ pandoc input.md -o input.tex=20 > >=20 > > input.md:=20 > > =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=20 > >=20 > > input.tex:=20 > > =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=20 > >=20 > > However, the conversion is correct when spaces are added before and=20 after=20 > the double quotation marks.=20 > >=20 > > input.md:=20 > > =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=20 > >=20 > > input.tex:=20 > > =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=20 > >=20 > >=20 > > Issue 2: The quotation marks are treated as Japanese text=20 > >=20 > > When converting with Pandoc, the quotation marks are treated as=20 Japanese=20 > text, resulting in an unnaturally wide gap. I have confirmed this using= =20 two=20 > files, "preamble.tex" and "input.md," and specifying as follows:=20 > >=20 > > $ pandoc input.md -o input.pdf --pdf-engine=3Dxelatex -H preamble.tex.= =20 > >=20 > > preamble.tex:=20 > > \usepackage{fontspec}=20 > >=20 > > \setmainfont{Georgia}=20 > > \setjamainfont{BIZ UDMincho Medium}=20 > >=20 > >=20 > > input.md:=20 > > ---=20 > > documentclass: bxjsarticle=20 > > classoption: pandoc=20 > > papersize: a4=20 > > fontsize: 10pt=20 > > ---=20 > >=20 > > # =E3=81=AF=E3=81=98=E3=82=81=E3=81=AB=20 > >=20 > > =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=20 > >=20 > > That person said, "Hello, world!"=20 > >=20 > > =20 > >=20 > > In contrast, when I directly write the content in TeX and output it=20 using=20 > $ xelatex test.tex, the quotation marks are treated as English text, and= =20 > the expected output is obtained.=20 > >=20 > > test.tex:=20 > > \documentclass[a4paper,xelatex,ja=3Dstandard]{bxjsarticle}=20 > >=20 > > \usepackage{fontspec}=20 > > \setmainfont{Georgia}=20 > > \setjamainfont{BIZ UDMincho Medium}=20 > >=20 > > \title{=E3=83=86=E3=82=B9=E3=83=88}=20 > > \begin{document}=20 > > \maketitle=20 > >=20 > > \section{=E3=81=AF=E3=81=98=E3=82=81=E3=81=AB}=20 > >=20 > > =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=20 > >=20 > > That person said, ``Hello, world!''=20 > >=20 > > \end{document}=20 > >=20 > > =20 > >=20 > > Shigeru Kobayashi=20 > >=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 Groups=20 > "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send= =20 an=20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > To view this discussion on the web visit [1]https://groups.google.com/d= /=20 > msgid/pandoc-discuss/=20 > 4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%40googlegroups.com.=20 > > =20 >=20 >=20 > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group.=20 > To unsubscribe from this group and stop receiving emails from it, send an= =20 email=20 > to [2]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > To view this discussion on the web visit [3] https://groups.google.com/d/msgid/=20 > pandoc-discuss/602edc59-8983-4459-bbbb-85cee5f013b3n%40googlegroups.com.= =20 >=20 > References:=20 >=20 > [1]=20 https://groups.google.com/d/msgid/pandoc-discuss/4a0eafdc-b4a2-4a6a-9488-d2= a1c9ef8351n%40googlegroups.com=20 > [2] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 > [3]=20 https://groups.google.com/d/msgid/pandoc-discuss/602edc59-8983-4459-bbbb-85= cee5f013b3n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter=20 --=20 You received this message because you are subscribed to the Google Groups= =20 "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an= =20 email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit=20 https://groups.google.com/d/msgid/pandoc-discuss/bad8035a-d12b-4ec2-be89-78= 8476948a56n%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 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/94d4f547-ec9b-44bf-9cf0-122d1eea1f02n%40googlegroups.com. ------=_Part_19739_2076351513.1681252011573 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear=C2=A0Bastien DUMONT,

Thank you very much for your= suggestions.

> And if you use Un= icode curly quotes inside the span?

I tried this version, but unfortunately, there was no change in the = output PDF (i.e., the Japanese font is used for the curly quotes).


&= gt; If all else fails use Unicode curly quotes throughout and try this in t= he preamble:
>=C2=A0
> \newfontfamily{\GeorgiaFont}{Georgia}
> \usepackage{newunicodechar}
> \new= unicodechar{=E2=80=98}{{\GeorgiaFont =E2=80=98}}
>= ; \newunicodechar{=E2=80=99}{{\GeorgiaFont =E2=80=99}}
> \newunicodechar{=E2=80=9C}{{\GeorgiaFont =E2=80=9C}}
> \newunicodechar{=E2=80=9D}{{\GeorgiaFont =E2=80=9D}}

I tried this as well, but unfortuna= tely, there was no change in the output PDF.

Initially, I suspec= ted it was something in bxjsarticle that I had set in documentclass. Howeve= r, this problem does not occur when I output PDF with xelatex from an equiv= alent source, rather than converting from Pandoc to TeX.

I will = investigate this a bit further.


Best,
Shigeru


=
On Wednesday, April 12, 2023 at 7:01:45=E2=80=AFAM UTC+9 = BPJ wrote:





shell:
$ pandoc -V lang=3Dja input.= md -o input.pdf --pdf-engine=3Dxelatex -V pandoc -H preamble.tex
=


On Tue= sday, April 11, 2023 at 2:32:57=E2=80=AFPM UTC+9 Bastien DUMONT wrote:
An if you put the English parts = in language spans as I said and add in header-includes \babelfont[english]{= rm}{Georgia}?

Le Monday 10 April 2023 =C3=A0 04:30:37PM, Shigeru Kobayashi a =C3=A9= crit :
> 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 st= rait quotes to
> avoid misinterpretation.
>=20
> Regarding issue 2, I tried marking the English text as [That per= son said,
> "Hello, world!"]{lang=3Den}, but the result was the same (i.e., = quotes are
> typeset with the Japanese font instead of the English font). I a= lso 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 MacF= arlane wrote:
>=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 <
may...-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org> wrote:
> >
> > Dear Pandoc community,
> >
> > I have encountered two issues regarding Pandoc's handli= ng of quotation
> 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 reproduce
> these issues. If these are indeed bugs, I am planning to sub= mit them as
> issues on GitHub. However, I would appreciate any guidance i= f these issues
> 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 adde= d 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 te= xt
> >
> > When converting with Pandoc, the quotation marks are tr= eated as Japanese
> text, resulting in an unnaturally wide gap. I have confirmed= this using two
> files, "preamble.tex" and "input.md," and specifying as foll= ows:
> >
> > $ pandoc input.md -o input.pdf --pdf-engine=3Dxelatex -= H preamble.tex.
> >
> > 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!"
> >
> > <pandoc test 2023-04-10 8.47.43.png>
> >
> > In contrast, when I directly write the content in TeX a= nd output it using
> $ xelatex test.tex, the quotation marks are treated as Engli= sh text, and
> the expected output is obtained.
> >
> > test.tex:
> > \documentclass[a4paper,xelatex,ja=3Dstandard]{bxjsartic= le}
> >
> > \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}
> >
> > <xelatex test 2023-04-10 8.46.44.png>
> >
> > 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 email= s from it, send an
> email to pandoc-di= scus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> > To view this discussion on the web visit [1]https://groups.google.com/d/
> msgid/pandoc-discuss/
> 4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%40= googlegroups.com.
> > <xelatex test 2023-04-10 8.46.44.png><pandoc t= est 2023-04-10 8.47.43.png>
>=20
>=20
> --
> You received this message because you are subscribed to the Goog= le Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it= , send an email
> to [2]pandoc-discus...= @googlegroups.com.
> To view this discussion on the web visit [3]https://groups.google.com/d/msgid/
> pandoc-discuss/602edc59-8983-4459-bbbb-85cee5f013b3n%40googlegroups.com.
>=20
> References:
>=20
> [1] https://groups.google.com/d/msgid/p= andoc-discuss/4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%40googlegroups.com
> [2] mailto:pandoc-disc= us...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [3] https://groups.google.com/d/msgid/pandoc-discuss/602edc59-8983-4459= -bbbb-85cee5f013b3n%40googlegroups.com?utm_medium=3Demail&utm_source=3D= footer

--
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-discus..= .@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/94d4f547-ec9b-44bf-9cf0-122d1eea1f02n%40googlegroups.= com.
------=_Part_19739_2076351513.1681252011573-- ------=_Part_19738_1381827655.1681252011572--