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=en}, 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 as 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 AM UTC+9 John MacFarlane wrote: > 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. > > > On Apr 9, 2023, at 4:53 PM, Shigeru Kobayashi > wrote: > > > > Dear Pandoc community, > > > > I have encountered two issues regarding Pandoc's handling 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 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, and > "input.tex" is the output file. > > > > $ pandoc input.md -o input.tex > > > > input.md: > > その人は"Hello, world!"と言いました。 > > > > input.tex: > > その人は''Hello, world!{}``と言いました。 > > > > However, the conversion is correct when spaces are added before and > after the double quotation marks. > > > > input.md: > > その人は "Hello, world!" と言いました。 > > > > input.tex: > > その人は ``Hello, world!'' と言いました。 > > > > > > 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=xelatex -H preamble.tex. > > > > preamble.tex: > > \usepackage{fontspec} > > > > \setmainfont{Georgia} > > \setjamainfont{BIZ UDMincho Medium} > > > > > > input.md: > > --- > > documentclass: bxjsarticle > > classoption: pandoc > > papersize: a4 > > fontsize: 10pt > > --- > > > > # はじめに > > > > その人は "Hello, world!" と言いました。 > > > > 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=standard]{bxjsarticle} > > > > \usepackage{fontspec} > > \setmainfont{Georgia} > > \setjamainfont{BIZ UDMincho Medium} > > > > \title{テスト} > > \begin{document} > > \maketitle > > > > \section{はじめに} > > > > その人は ``Hello, world!'' と言いました。 > > > > 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, 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/4a0eafdc-b4a2-4a6a-9488-d2a1c9ef8351n%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/602edc59-8983-4459-bbbb-85cee5f013b3n%40googlegroups.com.