From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32474 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Issues with Quotation Marks in Pandoc When Mixing Japanese and English Texts Date: Wed, 12 Apr 2023 19:33:16 +0200 Message-ID: References: <4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n@googlegroups.com> <602edc59-8983-4459-bbbb-85cee5f013b3n@googlegroups.com> <94d4f547-ec9b-44bf-9cf0-122d1eea1f02n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000062aa4505f927018a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6709"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBZ6W3OQQMGQEZ73QHKI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Apr 12 19:33:33 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f189.google.com ([209.85.166.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pmeLb-0001TD-Eh for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 12 Apr 2023 19:33:31 +0200 Original-Received: by mail-il1-f189.google.com with SMTP id z18-20020a921a52000000b003293147d824sf2062114ill.18 for ; Wed, 12 Apr 2023 10:33:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681320810; cv=pass; d=google.com; s=arc-20160816; b=Din8fqptCQmv1drLDx2D0CXOIXkbDgSqGS6cu8EmLlSyD60+87dTEsbqtltqG+sTy9 oWjum5EOz0VOkKP/2j0p7zQf7su7gcIebmHT+3X3jx4itHi1BLpGJN2EDsIzU1kV40RN v8XXfdVS8Yy7an11LMKi3R9OtrfdKyuwAVO4m3pyEsIN3ZJ1PPcOER5IIKhPlw8U0tD+ +YJqAwdLpZWhy25cO0phbGdozztubt3Q7NnrAtbluyepVn0b5DXfPaIfoy00v1J+QpAt vA39ztoyElrP9UyC9AYvyPQ5BezPX549FDz4jrVuz4KlrvNEolfcBTV3oVPNP4K1I31N XRvw== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=izf4K6tsV4qfbl8ywrS8PZzBUYqlgLZbIiKtql+H8eE=; b=o8WtOPCEz3tCSeUQWiR7shw8ln+MFgA6+4foxSRchVj+GIK5xXUleQeWqIyR1+EXAC Igr4ZiuJFNnfEWhU2m37VP2XfqtBYYc6Ip0k36fLEMo+t5TmDYcMx4L/L0vbpDsSmSZZ zQxJ757eubpp7lp0ZUgGjto9woLOhbXLpFNzGD0JXvLDMBMa+Vmxjr1X1csBM0xiFj2/ rkc94A4jnOCr9Pzmgw099X511t6iD6IDAaQm8lEE6noIYZDGeqbBiLJndh2q8d3dH5SO TzL9v7VjXfOYFDl2G0/41e19Rw9q+maIC16xe6MxqV7D+667wTIhMsLYi7QhKfTInt7b 2WUg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZAq6rG6W; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::112a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1681320810; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=izf4K6tsV4qfbl8ywrS8PZzBUYqlgLZbIiKtql+H8eE=; b=TvJn1ijk19BcV8G8PbyL/K0Akd+XB9KGU+igcZsWelB8QmsHEreT/8xoY3dNJk76c+ MjqtVZl0cED+t+5igRtcA9Fggi9oiKglwuEI9YXFUYUsOB4RPbiRxv+PWCs89KjfE746 fnXdYROEGPknXTYemLLNpq2G8SmUoqscNe+3MavHlHG7lTAabRXGF0Qbdu6AGuaKXAVi IfzaEmH36uvqEkXuv2asRnPKR8YGCvviOOAFILz4klfqyxzapVYum8XXRptJvQ8vsGhN CQVLKxOOkJjjErGT0TGxqJi82p6oXcXWMkIriWmUHIjPNweG5MzHiEXLvBCLVvEGfGYQ pV7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681320810; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=izf4K6tsV4qfbl8ywrS8PZzBUYqlgLZbIiKtql+H8eE=; b=OwVAVngVWnTJ9s+IAQl0uKrmUtD1+M+qg5FjY3BLpHNrraNnRGTTRxvNxJZaGgh38C urz8MUiy0jPXUGY9V0mtb1BWgC7x4SMfo5M7ji04sXHn+eZ/cX14VRdg7rqwNsQ4Zj6P QeOu1nocvfCmaSVoWWkdKqkf3DmVVWaPaJMemFbhAx19M+vnE8x++ais2oATyfOhBy9P RhvhquxFtGh+hFZIoGDXVLZXM/OMOOsPFTzjPwUf98/3rkXO+K1K3oL47AGjVtUpHdZ1 5srAjL87fYB1p97IW1GJdTcxqkqzA5Rvg/k/PkSQ2+9PysaDntzmtgFum0R4XJ8pQ21e lr5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681320810; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=izf4K6tsV4qfbl8ywrS8PZzBUYqlgLZbIiKtql+H8eE=; b=YQL/eqSd+vb1yPOxoyXD2XyCncdTZgQdblrgQxWb6th2hUahZvgaMzstlXlA10qI5+ RFPTogR9ZNmbmjVsE4cwiP1pBn840epGJ+KAFaiSYPb83acFg6UiHttgTW90gvrSuKtJ T6oxj7ARzOPDJ1md1P7VR8oYhYZyl1Qy/+lXRv9Zawo/h8k0gBaSMS6H7FCk/R6zytJc Hwb4kp5/9A3nmL+qV9zM658daJjTe/wNctZ4I2j1AZMBepe4rITMiE8grfehss4HkHzc WXCT51z4HZMBRBpZ+Pqq Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AAQBX9eg2ckpvgPmwgXhOa38OXgEz8NQb5idhsW+RvHouDRLFkVmK9dm RqrrxPxXN+sBESiu9LKAH1Y= X-Google-Smtp-Source: AKy350ZCPTyoCSa/Mn0LDSB5N/AIayccaD90hb4297xsjEtpXg4zLT/0cFWs/P+ZbCalsiOJmMoyKg== X-Received: by 2002:a02:331b:0:b0:3c4:88e7:14cf with SMTP id c27-20020a02331b000000b003c488e714cfmr1476445jae.1.1681320810169; Wed, 12 Apr 2023 10:33:30 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6602:4012:b0:760:aa28:8353 with SMTP id bk18-20020a056602401200b00760aa288353ls412895iob.7.-pod-prod-gmail; Wed, 12 Apr 2023 10:33:27 -0700 (PDT) X-Received: by 2002:a6b:6404:0:b0:752:ed8f:2e9f with SMTP id t4-20020a6b6404000000b00752ed8f2e9fmr12939808iog.13.1681320806958; Wed, 12 Apr 2023 10:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681320806; cv=none; d=google.com; s=arc-20160816; b=fNKeqWfPKSaOJen0nagoi5i94rLQDF3sZiVxWAd/1YaFKx9OUXkWyGdEbQ0EtXBokE 31N2VQ1LLD9GijSOADsyorjAfC8Jh7mGbuRyDBVd1PYQnATL2N46Wcn6y6q7YQBs6MKF YijkajWkpMGftK/T2FL1cG+L1fciPN21m8rS2oeXeYtErTF96a8s5NjQW/whkQQf3EY7 nif2IUUVrXd1VZ/Exd426bEj+w8UPicwgXLfOzieohDumK9W9xOuG3yEh1dusu1hRrNA lk7x7704httRDi8IncsQedAWD8k/NdlA5gXAokjKiZwTPi5j1ByXanZNSGnN00t8L8au kZIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9qVEwo3lxpMVP3wMsejpLkPg5ErtvBhrrOY4ebDKN+U=; b=A5lBL1hjgzwL+fLzsqnqe19k5NjQqhSCyWK31/RemIMQhV3Mqwg11xxSNATnCj35uD vgQ984zaYi24u8sP62GqgImek9pCp1ezslAZxZpsRpcpK6cnNoJHHqxspUCcrX2ghjWJ 1nQ87KZQKV9Tir/8ufuddDMrTxpd1kFj6bFt6CbQugVqi8hCG4wxvUYz3lEaHF2B2jQ/ mBpi8cH/JhPKLzD/8w9qv6Sw64HuIUd91/q659M61yb47IZJglRCYd6yNIf0yl4vUPs6 k0/yJaH0APiktyWPleVVEACHLUWV7ooLh1Dhu5TwdVjpItuNxxWtVCz/RNV3aUTl3RhB LiUQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZAq6rG6W; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::112a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com. [2607:f8b0:4864:20::112a]) by gmr-mx.google.com with ESMTPS id co9-20020a0566383e0900b003e7efb1d848si1634039jab.3.2023.04.12.10.33.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Apr 2023 10:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::112a as permitted sender) client-ip=2607:f8b0:4864:20::112a; Original-Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-54c17fa9ae8so331730247b3.5 for ; Wed, 12 Apr 2023 10:33:26 -0700 (PDT) X-Received: by 2002:a05:690c:d0f:b0:545:f3ed:d251 with SMTP id cn15-20020a05690c0d0f00b00545f3edd251mr2878672ywb.1.1681320805836; Wed, 12 Apr 2023 10:33:25 -0700 (PDT) In-Reply-To: <94d4f547-ec9b-44bf-9cf0-122d1eea1f02n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZAq6rG6W; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::112a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:32474 Archived-At: --00000000000062aa4505f927018a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Have you looked at the LaTeX produced by pandoc. Den ons 12 apr. 2023 00:31Shigeru Kobayashi skrev: > 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 outpu= t > 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 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}} > > I tried this as well, but unfortunately, there was no change in the outpu= t > PDF. > > Initially, I suspected it was something in bxjsarticle that I had set in > documentclass. However, this problem does not occur when I output PDF wit= h > xelatex from an equivalent 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: > > > > 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= . > 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 > 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 > the LaTeX source, otherwise experiment with the +smart/-smart extension o= n > 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 pan= doc > -H preamble.tex > > > > On Tuesday, April 11, 2023 at 2:32:57=E2=80=AFPM UTC+9 Bastien DUMONT wro= te: > > 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=A9crit= : > > Dear Bastien DUMONT and John MacFarlane, > > > > Thank you very much for your reply. > > > > Regarding issue 1, I will use Unicode curly quotes instead of strait > quotes to > > avoid misinterpretation. > > > > 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 = are > > typeset with the Japanese font instead of the English font). I also > tried > > Unicode curly quotes. > > > > I have confirmed that "pandoc input.md -t input.tex" generates a code a= s > > expected as follows: > > \foreignlanguage{english}{That person said, ``Hello, world!''} > > > > Therefore, this is puzzling to me... > > > > > > Best regards, > > Shigeru KOBAYASHI > > > > > > On Tuesday, April 11, 2023 at 2:34:40=E2=80=AFAM UTC+9 John MacFarlane = wrote: > > > > I would recommend using unicode curly quotes in the markdown when you'r= e > > working in a language without interword spacing. We rely on interword > > spacing for heuristics about smart quotes. > > > > > On Apr 9, 2023, at 4:53 PM, Shigeru Kobayashi > wrote: > > > > > > Dear Pandoc community, > > > > > > I have encountered two issues regarding Pandoc's handling of quotatio= n > > 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 submit them as > > issues on GitHub. However, I would appreciate any guidance if 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, an= d > > "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 > Japanese > > text, resulting in an unnaturally wide gap. I have confirmed this using > two > > files, "preamble.tex" and "input.md," and specifying as follows: > > > > > > $ 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!" > > > > > > > > > > > > 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, an= d > > 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, sen= d > an > > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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%40googlegroups.com. > > > 8.47.43.png> > > > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [3] > https://groups.google.com/d/msgid/ > > pandoc-discuss/602edc59-8983-4459-bbbb-85cee5f013b3n%40googlegroups.com= . > > > > > References: > > > > [1] > https://groups.google.com/d/msgid/pandoc-discuss/4a0eafdc-b4a2-4a6a-9488-= d2a1c9ef8351n%40googlegroups.com > > [2] mailto:pandoc-discus...-/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=3Dfooter > > -- > 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 pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/bad8035a-d12b-4ec2-be89-= 788476948a56n%40googlegroups.com > > . > > -- > 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 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 > > . > --=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/CADAJKhAWNjWpvkSsy3j50v05q4e17AZpnkHbrFfF9modn0PWTw%40mail.g= mail.com. --00000000000062aa4505f927018a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Have you looked at the LaTeX produced by pandoc.
Den ons 1= 2 apr. 2023 00:31Shigeru Kobayashi <mayfair-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org> skrev:
Dear=C2=A0Bastien DUMONT,

Thank you very much for you= r suggestions.

> And if you use Uni= code curly quotes inside the span?

<= div>I tried this version, but unfortunately, there was no change in the out= put PDF (i.e., the Japanese font is used for the curly quotes).
<= br>

> If = all else fails use Unicode curly quotes throughout and try this in the prea= mble:
>=C2=A0
> \newfontfamily{\GeorgiaFont}{Georgia}
> \usepackage{newunicodechar}
> \newunicodech= ar{=E2=80=98}{{\GeorgiaFont =E2=80=98}}
> \newuni= codechar{=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 PDF.

Initially, I suspected it was somet= hing in bxjsarticle that I had set in documentclass. However, this problem = does not occur when I output PDF with xelatex from an equivalent source, ra= ther than converting from Pandoc to TeX.

I will investigate this a b= it further.


Best,
Shi= geru


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


Den = tis 11 apr. 2023 07:53Shigeru Kobayashi <may...-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org> skrev:
Dear=C2=A0Bastien DUMONT,

Thank you very much for your= reply. I tried as follows and got no changes. I'm sorry if I misunders= tood your suggestion.

preamble.tex:
\usepackage{fontspec}<= br>\setmainfont{Georgia}
\setjamainfont{BIZ UDMincho Medium}
\babelfo= nt[english]{rm}{Georgia}

input.md:
---
documentclass: b= xjsarticle
classoption: pandoc
papersize: a4
---

[That pers= on 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 p= reamble:

\newfontfamily{\GeorgiaFont}{Georgia}
\usepackage= {newunicodechar}
\newunicodechar{=E2=80=98}{{\Georgi= aFont =E2=80=98}}
\newunicodechar{=E2=80=99}{{\Georg= iaFont =E2=80=99}}
\newunicodechar{=E2=80=9C}{{\Geor= giaFont =E2=80=9C}}
\newunicodechar{=E2=80=9D}{{\Geo= rgiaFont =E2=80=9D}}

Ins= pect the LaTeX output by pandoc and make sure you get curly quotes in the L= aTeX source, otherwise experiment with the +smart/-smart extension on input= and output format till you get curly quotes in the LaTeX source.




<= div dir=3D"auto">

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



<= /div>
On Tuesday, April 11, 2023 at 2:32:57=E2=80=AFP= M UTC+9 Bastien DUMONT wrote:
An if yo= u put the English parts in language spans as I said and add in header-inclu= des \babelfont[english]{rm}{Georgia}?

Le Monday 10 April 2023 =C3=A0 04:30:37PM, Shigeru Kobayashi a =C3=A9cr= it :
> 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 stra= it quotes to
> avoid misinterpretation.
>=20
> Regarding issue 2, I tried marking the English text as [That perso= n 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 als= o tried
> Unicode curly quotes.
>=20
> I have confirmed that "pandoc input.md -t input.tex" gen= erates a code as
> expected as follows:
> \foreignlanguage{english}{That person said, ``Hello, world!'&#= 39;}
>=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 MacFar= lane wrote:
>=20
> I would recommend using unicode curly quotes in the markdown w= hen you're
> working in a language without interword spacing. We rely on in= terword
> spacing for heuristics about smart quotes.
>=20
> > On Apr 9, 2023, at 4:53 PM, Shigeru Kobayashi <may...-+k8b35VvZrR3+QwDJ9on6Q@public.gmane.org> w= rote:
> >
> > Dear Pandoc community,
> >
> > I have encountered two issues regarding Pandoc's hand= ling 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 ca= n reproduce
> these issues. If these are indeed bugs, I am planning to submi= t them as
> issues on GitHub. However, I would appreciate any guidance if = these issues
> arise from my incorrect usage.
> >
> > Issue 1: Conversion of English phrases within Japanese te= xt
> >
> > 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!&q= uot;=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, worl= d!{}``=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!&= quot; =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 trea= ted as Japanese
> text, resulting in an unnaturally wide gap. I have confirmed t= his using two
> files, "preamble.tex" and "input.md," and = specifying as follows:
> >
> > $ 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!&= quot; =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 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}
> >
> > <xelatex test 2023-04-10 8.46.44.png>
> >
> > Shigeru Kobayashi
> >
> >
> > --
> > You received this message because you are subscribed to t= he Google Groups
> "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails = from it, send an
> email to = pandoc-discus...-/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%40googlegroups.com.
> > <xelatex test 2023-04-10 8.46.44.png><pandoc tes= t 2023-04-10 8.47.43.png>
>=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-= discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> 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/pandoc-discuss/4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%40googlegroups= .com
> [2] mailto:pa= ndoc-discus...-/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=3Dfooter

--
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 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 pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/94d4f547-e= c9b-44bf-9cf0-122d1eea1f02n%40googlegroups.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/CADAJKhAWNjWpvkSsy3j50v05q4e17AZpnkHbrFfF= 9modn0PWTw%40mail.gmail.com.
--00000000000062aa4505f927018a--