From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24336 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Chris Jones Newsgroups: gmane.text.pandoc Subject: Re: pandoc correctly translates U+2024 thin space to '\,' but the spaces in PDF created by Xelatex are full-width Date: Sun, 2 Feb 2020 20:12:47 -0800 (PST) Message-ID: <561d210b-ceb6-4f9a-98e2-556f8e12e2ca@googlegroups.com> References: <818817e7-17c7-4bf4-b9fb-e300f6faaf37@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2625_395586392.1580703167276" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="95425"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD4675FCS4BBBQF333YQKGQETFIDG7I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Feb 03 05:12:51 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iyT6R-000OiD-Jc for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 03 Feb 2020 05:12:51 +0100 Original-Received: by mail-oi1-f190.google.com with SMTP id s25sf4368235oic.17 for ; Sun, 02 Feb 2020 20:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=s6KzIs69pVUdM0HVmmGasDUoFyuVGa3WFDXS3ZM/z+E=; b=dPZNMKUNWvft6QVbGDGlZ3dQHvT2bbjl1XHAmLpH0OFqvA6n5tQ02lMZ6KCYHl7iyg aJnv+ckWzMc/KfDFt/Yt1s4GCy6W0f5rIXKi1mkq+LsiqDBj061WzkW/JqJwAtirwPRr idcF9Y+NWXziC5mJQlwqKC0VRvb4sgbaJ4ReYjJllDVkLSxs+hhC5n9gUxfUHljo2FV2 zHPrV+SNHgV7ulI6lRpMoRH98/8TuUVcX4FPeMO/RXfSs7CclsbI2z+hFTeKVeHi27eu h9pQm9lIT/MLvbSiBGy2Vf0On55M0VGG1Jkr7HslOSWU+1yPMhE5vv7y2PVBIfT9xIR0 VYiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=s6KzIs69pVUdM0HVmmGasDUoFyuVGa3WFDXS3ZM/z+E=; b=lZ87A9F8tv+j5uX7XTiXrOxnr8ugbzwMbD4e6NOGFr0DPvAW+rBIBcKigC0JL/LtI+ Oi5uxAnwd9gbDhqOpBuAKtKKESarPVABrSMSZTEdowfxw04lpO9+8mkvQ8Ni1Ipi+qdJ G+laTUKMRtIQZ7GN7Hjb/dCna/EaiHXZ4+ii79LSTKenfDFCgr+3TYa9EEZTfSNBcEUI Omc24I2rT9cETjgc1+EJpCTQQm8mWcCnj/uFm3ydWLb+5hbqgYdioHs4uLEKTtN4+u5U NNu1Ri95A9VTi5/jVOk7aD3D60nrLz49jz702fPWlDPzof1UPbwEWD6fnNYRp81YJeU8 eYmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=s6KzIs69pVUdM0HVmmGasDUoFyuVGa3WFDXS3ZM/z+E=; b=M/EGzHWLRlPd7uDczIVQYHhXUnTFpcUvhtLHXQVzTP9de3dBwWhrL8FWTbwnLzggmt JMfHt+rfKBVqpC3K1xnClnMy/vsnEySTwKf3Ibn/vFb4BjZ2lKL/GqLzyEAp+45UiBSF 8OvXbZ60l5mCxNRE5vKDwu84gQsorY0a9hbt3alGhiefZNBt6wJIrgAkhl8CQCkMxRCU hZMhV7VeifRh5gdXEjlDMgzYY50NLME8rMSH/CtvkpigdP9P+YX7bDmHyyibjGGTpn4r 3BdQBP32aYFYrWRefu5Wi3NqJ2qe0tj869qxFNIP+Tp4pD/ctM34SAZ6ovx/8g5To/qi UpCg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVxuvLRcYctC2Eaomjz424FchsjQGQuwijbKtV0v7gseEpUvmD7 55jerHS/K+KWas4ZTcVLAqA= X-Google-Smtp-Source: APXvYqwnzvwjkQaus4dJYXeeAGeGNXPshX9r2pSHnmIQ9Zrb19/V89IbHYkVrkTEIowMd6WGcL2VSg== X-Received: by 2002:aca:3017:: with SMTP id w23mr12880057oiw.152.1580703170565; Sun, 02 Feb 2020 20:12:50 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:7109:: with SMTP id n9ls494468otj.10.gmail; Sun, 02 Feb 2020 20:12:48 -0800 (PST) X-Received: by 2002:a9d:67c9:: with SMTP id c9mr16762432otn.67.1580703167851; Sun, 02 Feb 2020 20:12:47 -0800 (PST) In-Reply-To: <818817e7-17c7-4bf4-b9fb-e300f6faaf37-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: cjns1989-Re5JQEeQqe8AvxtiuMwx3w@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:24336 Archived-At: ------=_Part_2625_395586392.1580703167276 Content-Type: multipart/alternative; boundary="----=_Part_2626_1966215166.1580703167276" ------=_Part_2626_1966215166.1580703167276 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm trying to modify the default.latex template and I see this: `\else % load polyglossia as late as possible as it *could* call bidi if RTL=20 lang (e.g. Hebrew or Arabic) \usepackage{polyglossia} \setmainlanguage*[$polyglossia-lang.options$]*{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ =20 \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs= .name$} $endfor$ \fi` Now I suspect that '[autospacing=3Dfalse]' is an option of the=20 \setmainlanguage command rather than a 'global' option of the poylglossia= =20 package. Therefore I would need to change this: ` \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}` to something that has 'autospacing=3Dfalse' added to the contents of=20 '$polyglossia-lang.options$', presumably a pandoc variable (?) How do I achieve this? Thanks, CJ On Saturday, February 1, 2020 at 2:18:30 PM UTC-5, Chris Jones wrote: > > Searched online for similar cases and didn't find anything relevant. > > The context is that I recently was made aware that the French insist that= =20 > a *thin space* be inserted immediately before some punctuation characters= =20 > *',:!?=C2=BB%*' etc.=E2=80=A6 So in dialogs for instance e.g. =E2=80=A6 t= he .md source has: =C2=AB=20 > =C2=B7 bonjour mademoiselle =C2=B7 =C2=BB where the middle dots represent= a single U+202f=20 > non-breaking space. > > When I take a look at the intermediate .tex file that pandoc generates th= e=20 > thin spaces are correctly converted to '\,' which I believe is the *latex= =20 > way *of coding thin spaces. But when I run xelatex on the latex file and= =20 > look at the resulting PDF I can see that the thin spaces have become=20 > regular-width spaces.=20 > > I compared the PDF output to another PDF I had created using plain latex= =20 > rather than pandoc and the U+202F's that I typed in my .tex source clearl= y=20 > materialize as thin spaces in the PDF. =20 > > What I suspect at this point is that one of the latex packages that pando= c=20 > sticks in the generated latex file (or the way it is invoked? perhaps a= =20 > combination of packages? =E2=80=A6?) is causing this. > > As to an *MWE*=E2=80=A6 I'm not sure it's really appropriate in this part= icular=20 > case=E2=80=A6 > > *Just in case=E2=80=A6 here's what I get from a minimal .md input file:* > > `\PassOptionsToPackage{unicode=3Dtrue}{hyperref} % options for packages= =20 > loaded elsewhere > \PassOptionsToPackage{hyphens}{url} > % > \documentclass[oneside,10pt,french,]{extbook} % cjns1989 - 27112019 -=20 > added the oneside option: so that the text doesn't jump left & right when= =20 > reading on a tablet/ereader > \usepackage{lmodern} > \usepackage{amssymb,amsmath} > \usepackage{ifxetex,ifluatex} > \usepackage{fixltx2e} % provides \textsubscript > \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=3D0 % if pdftex > \usepackage[T1]{fontenc} > \usepackage[utf8]{inputenc} > \usepackage{textcomp} % provides euro and other symbols > \else % if luatex or xelatex > \usepackage{unicode-math} > \defaultfontfeatures{Ligatures=3DTeX,Scale=3DMatchLowercase} > % \setmainfont[]{EBGaramond-Regular} > \setmainfont[Numbers=3D{OldStyle,Proportional}]{EBGaramond-Regular} = =20 > % cjns1989 - 20191129 - old style numbers=20 > \fi > % use upquote if available, for straight quotes in verbatim environments > \IfFileExists{upquote.sty}{\usepackage{upquote}}{} > % use microtype if available > \IfFileExists{microtype.sty}{% > \usepackage[]{microtype} > \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts > }{} > \usepackage{hyperref} > \hypersetup{ > pdftitle=3D{WME}, > pdfborder=3D{0 0 0}, > breaklinks=3Dtrue} > \urlstyle{same} % don't use monospace font for urls > \usepackage[papersize=3D{3.75 in, 6.0 in},left=3D.3 in,right=3D.3 in]{geo= metry} > \setlength{\emergencystretch}{3em} % prevent overfull lines > \providecommand{\tightlist}{% > \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} > \setcounter{secnumdepth}{0} > % Redefines (sub)paragraphs to behave more like sections > \ifx\paragraph\undefined\else > \let\oldparagraph\paragraph > \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} > \fi > \ifx\subparagraph\undefined\else > \let\oldsubparagraph\subparagraph > \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} > \fi > % set default figure placement to htbp > \makeatletter > \def\fps@figure{htbp} > \makeatother > > \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=3D0 % if pdftex > \usepackage[shorthands=3Doff,main=3Dfrench]{babel} > \else > % load polyglossia as late as possible as it *could* call bidi if RTL= =20 > lang (e.g. Hebrew or Arabic) > \usepackage{polyglossia} > \setmainlanguage[]{french} > \fi > > \title{WME} > \date{} > > \begin{document} > \maketitle > > \$ ECM > > \hypertarget{wme-title}{% > \chapter{WME (title)}\label{wme-title}} > > en lettres capitales, soigneusement imprim=C3=A9es au pochoir\,: > > --- =C2=AB\,Cr=C3=A9tins\,!\,=C2=BB murmura-t-il. > > \end{document}` > > *Customization* is minimal: old style numbers (proportional) and=20 > one-sided since the document is not destined for hard-copy printing=E2=80= =A6 > > What I have in mind at this point to try and figure out what is happening= =20 > is to work with a one line .md source that has some U+202F's and remove= =20 > default packages until the problem goes away but before I do this I thoug= ht=20 > maybe someone has run into something similar or might suggest a better=20 > approach than plain trial and error to help determine the cause of the=20 > problem. > > Thoughts? > > Thanks, > > CJ > > --=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/561d210b-ceb6-4f9a-98e2-556f8e12e2ca%40googlegroups.com. ------=_Part_2626_1966215166.1580703167276 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm trying to modify the default.latex template a= nd I see this:

`\else
=C2=A0 % load polyglossia= as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Ar= abic)
=C2=A0 \usepackage{polyglossia}
=C2=A0 \setmainlanguage[$pol= yglossia-lang.options$]{$polyglossia-lang.name$}
$for(polyglossia-ot= herlangs)$
=C2=A0 \setotherlanguage[$polyglossia-otherlangs.options$]{$p= olyglossia-otherlangs.name$}
$endfor$
\fi`

N= ow I suspect that '[autospacing=3Dfalse]' is an option of the \setm= ainlanguage command rather than a 'global' option of the poylglossi= a package.

Therefore I would need to change this:<= br>

`=C2=A0 \setmainlanguage[$polyglossia-lang.opt= ions$]{$polyglossia-lang.name$}`

to something that= has 'autospacing=3Dfalse' added to the contents of '$polygloss= ia-lang.options$', presumably a pandoc variable (?)

How do I achieve this?

Thanks,
CJ

On Saturday, February 1, 2020 at 2:18:30 PM UTC= -5, Chris Jones wrote:
Searched online for similar cases and didn't find anythin= g relevant.

The context is that I recently was mad= e aware that the French insist that a thin space be inserted immedia= tely before some punctuation characters ',:!?=C2=BB%' etc.= =E2=80=A6 So in dialogs for instance e.g. =E2=80=A6 the .md source has: =C2= =AB =C2=B7 bonjour mademoiselle =C2=B7 =C2=BB where the middle dots represe= nt a single U+202f non-breaking space.

When I take= a look at the intermediate .tex file that pandoc generates the thin spaces= are correctly converted to '\,' which I believe is the latex wa= y of coding thin spaces. But when I run xelatex on the latex file and l= ook at the resulting PDF I can see that the thin spaces have become regular= -width spaces.

I compared the PDF output to a= nother PDF I had created using plain latex rather than pandoc and the U+202= F's that I typed in my .tex source clearly materialize as thin spaces i= n the PDF.=C2=A0

What I suspect at this point= is that one of the latex packages that pandoc sticks in the generated late= x file (or the way it is invoked? perhaps a combination of packages? =E2=80= =A6?) is causing this.

As to an MWE=E2=80= =A6 I'm not sure it's really appropriate in this particular case=E2= =80=A6

Just in case=E2=80=A6 here's what I = get from a minimal .md input file:

`\PassOptio= nsToPackage{unicode=3Dtrue}{hyperref} % options for packages loaded el= sewhere
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[= oneside,10pt,french,]{extbook} % cjns1989 - 27112019 - added the onesi= de option: so that the text doesn't jump left & right when reading = on a tablet/ereader
\usepackage{lmodern}
\usepackage{amssymb,amsmath}=
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \text= subscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=3D0 % if pdftex
=C2=A0 = \usepackage[T1]{fontenc}
=C2=A0 \usepackage[utf8]{inputenc}
=C2=A0 \u= sepackage{textcomp} % provides euro and other symbols
\else % if luatex = or xelatex
=C2=A0 \usepackage{unicode-math}
=C2=A0 \defaultfontfeatur= es{Ligatures=3DTeX,Scale=3DMatchLowercase}
%=C2=A0=C2=A0 \setm= ainfont[]{EBGaramond-Regular}
=C2=A0=C2=A0=C2=A0 \setmainfont[Numbe= rs=3D{OldStyle,Proportional}]{EBGaramond-Regular}=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 % cjns1989 - 20191129 - old style numbers
\fi
% use = upquote if available, for straight quotes in verbatim environments
\IfFi= leExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if av= ailable
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\U= seMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt font= s
}{}
\usepackage{hyperref}
\hypersetup{
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pdftitle=3D{WME},
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pdfborder=3D{0= 0 0},
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 breaklinks=3Dtrue}
\urlstyle{same}=C2=A0 % don't use monospace f= ont for urls
\usepackage[papersize=3D{3.75 in, 6.0 in},left=3D.3 in,righ= t=3D.3 in]{geometry}
\setlength{\emergencystretch}{3em}=C2=A0 % pre= vent overfull lines
\providecommand{\tightlist}{%
=C2=A0 \setlength{\= itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}=
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragr= aph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragra= ph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined= \else
\let\oldsubparagraph\subparagraph
\renewcommand{\subp= aragraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
% set = default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}<= br>\makeatother

\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=3D0 % if pdftex<= br>=C2=A0 \usepackage[shorthands=3Doff,main=3Dfrench]{babel}
\else<= br>=C2=A0 % load polyglossia as late as possible as it *could* call bidi if= RTL lang (e.g. Hebrew or Arabic)
=C2=A0 \usepackage{polyglossia}
=C2= =A0 \setmainlanguage[]{french}
\fi

\title{WME}
\date{}

= \begin{document}
\maketitle

\$ ECM

\hypertarget{wme-title}= {%
\chapter{WME (title)}\label{wme-title}}

en lettres capitales, = soigneusement imprim=C3=A9es au pochoir\,:

--- =C2=AB\,Cr=C3=A9tins\= ,!\,=C2=BB murmura-t-il.

\end{document}`

Customization is minimal: old style numbers (proportional) and one-sid= ed since the document is not destined for hard-copy printing=E2=80=A6
=

What I have in mind at this point to try and figure out= what is happening is to work=20 with a one line .md source that has some U+202F's and remove default pa= ckages=20 until the problem goes away but before I do this I thought maybe someone has run into something similar or might suggest a better approach than=20 plain trial and error to help determine the cause of the problem.

Thoughts?

Thanks,

CJ

--
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/561d210b-ceb6-4f9a-98e2-556f8e12e2ca%40googlegroups.co= m.
------=_Part_2626_1966215166.1580703167276-- ------=_Part_2625_395586392.1580703167276--