From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24337 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: John MacFarlane 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: Mon, 03 Feb 2020 09:02:37 -0800 Message-ID: References: <818817e7-17c7-4bf4-b9fb-e300f6faaf37@googlegroups.com> <561d210b-ceb6-4f9a-98e2-556f8e12e2ca@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="ciao.gmane.io:159.69.161.202"; logging-data="63027"; mail-complaints-to="usenet@ciao.gmane.io" To: Chris Jones , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBPFE4HYQKGQEJBHT5BA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Feb 03 18:03:04 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ua1-f55.google.com ([209.85.222.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iyf7n-000GD3-3h for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 03 Feb 2020 18:03:03 +0100 Original-Received: by mail-ua1-f55.google.com with SMTP id p15sf3860490uao.9 for ; Mon, 03 Feb 2020 09:03:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1580749382; cv=pass; d=google.com; s=arc-20160816; b=gsi5+LlFZVziGXykXLK9sCQkFoPZaW0CM+pGF2dKWjN7f5wnct5mZun8DpFxVFmWJg /9QWzxaTEeKWANPQbNcYD+5vAQzPJybCGGMsIVnVaD4zVbFARFJEBdZtRZGRneSEtxWN yoTIuLaL6Cv6WborFXowD63mWHjPe6tLdmExF2n/3TGojmWR1Vsisy/u1Rg8ztidWww+ eolKfy58zqeEHoxAaFt+Oshu94INjY6tjUVm21Hu0UmvRUpRa+ykxDdDe0+Hbn3ofYp5 KucIWv8zBfDiFllN4zNYfjWDZbu/Q+5wTG5dhS/trKNmsZvS1OoI7fvRbs7CoOqBSbuP chuA== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=GP3XTTAz+iv6ZTu2PGulcvV8egTYmB43QdJSnPorSOg=; b=Ah/xnbNXwwJGdipbhpaN5VC3crxVtti5ORAmpmOmu6OEAWGJP0BgaLlGnS6ScTjSCa VnUob6IUyQh42IEE1H7IQTcdp3HAb8RxYjtevaOktNYDDR/lRIwbPcwoivJnKhRUnnKN apoa3cZm+EV3/VODzMb3PKDS/sIJUOVPe4oeqe5dS9B5R7HufS+pP9AJTp4Cflx5Zk0x FH4cDgXfa2YpA0b/IZFYa3KmC8ntZQoQQzUD+Zqot/KOreU96yEzZQHYeVaUbGVzNlNB UDzwSbsh/6rCe2Z2ew+y4ppuW6UrjomV2e2PqGnncs5gabuc/OFUHxrDquzO06AKfdqw MPAg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=VWwWSHs7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=GP3XTTAz+iv6ZTu2PGulcvV8egTYmB43QdJSnPorSOg=; b=pJ2pfeqnFtodUdM5p4kRJCzWXRfXCxI+YAptxGfK0YTHAhnAUYIpGhl20dqnTr8vZo nIOUNVRDATn1KDjPMuKRoQlt2rHf/XHuvt1mmH5hid+3cXR1YziSZ/mYW5cVoNJ9DcZb C+AWOvR+/eO3eEX3AG5DGxvPvg85NqkkbeHiBapjX/YgBb146ms4XPp8fxMk2qUXcLoV nxciGUx0ZoK+9nixdhdDrk/d8fB2W2H/usCC5IR02K7QsQZjB8eHW52C/mDPrNOmqMpf 8/qM7KwgYJYKrHW8s27PuWXJNrONA9yufUel9Ma2VVaERjp9k3/x1kXp7pZr17WVKl0u hBMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=GP3XTTAz+iv6ZTu2PGulcvV8egTYmB43QdJSnPorSOg=; b=G4anWh/paxqL8rtHVpkxWU4aNuxYSCvVI1Ffmkhn0v8Aliyj8s8X1p14Pnhunj/EjX GhxhoWK73i0TVOhkNBZXnLSxBasHAcnomvhNWYTZIDroug4WLKRasNkxTi5eUQ6NLYVv 2IG8Jly44SVxB15KRGBSxJ+IBQ3blZ3+m7WaT9D5VqYy2uVA/Ok9AHuJ+0gyvJw4Cz9O kUaVhGRjOjMXWnPbLaB+FZaySATlpuZfsWtt6SeBpEsTpx2wtbr047b+PWTkcUxc0TWK RYMk7vzzUgriEZJBs8tmyw1Q/Xxfqp+n7+h4Udium8OvQbYRT5JbM5QhvTlRp07Cb7DZ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWefABZN6tHS6rXk9f117e8uZ19VdFjhD+iFqAo+vgYiDrIlYN6 Q4Tduj13rVM9S9j2WKooQBM= X-Google-Smtp-Source: APXvYqyZNf3uG8kfmBI6a655E5JHlB10eURlHrwl83ZOzVmzmfEin8yIWu76IypqgQXBYmxM9K8A/Q== X-Received: by 2002:ab0:4ea0:: with SMTP id l32mr15047699uah.69.1580749376756; Mon, 03 Feb 2020 09:02:56 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ab0:30d8:: with SMTP id c24ls1086783uam.1.gmail; Mon, 03 Feb 2020 09:02:51 -0800 (PST) X-Received: by 2002:ab0:5bc6:: with SMTP id z6mr15022812uae.46.1580749371732; Mon, 03 Feb 2020 09:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580749371; cv=none; d=google.com; s=arc-20160816; b=sU/XfoZy6ENuc/5nWNak9p27Dj4NnKbCUskZ1/ovNpjgWOUU8nOcZJuuj3GTo2tcZk Dps1XOrvLSdHsNP+lM1DAhOB6XHvrMNCBeckj2Ivb/pXoL+BU5KI55+HPgaJYltBSfzH mvIs5423gxZGfhNWQqvnY6N9jY6TU8TRBuPMpe7g/fLOPa4hJnIuxD0HKCAU2hSZ5C9Y /2Yc1EZQx9krUQtuLXHTwGat/UOfVSVeCUqtKS/Dn94ST79jggIV32DgNs5Ev9Rlgo/f 4Rd5GJ/rHyewhAdFyMLdr0rKDEpYu2itmtSma+R0IXFjXiVhz78DFWYZkAnRtKQhXZT5 8m4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=tcGwFVWxEypeF0RC6oB6v+nqlaZhtnN7W9F6dpZGBSE=; b=paXY96PJpCTJyOPpT+0ge1OCx0eO00k/lkkquK0+vEDKYSykXco2jdA5rhDLKQ/jVF mJGg5ZFkptf5mgmXK+aAcq2xR1IPuZRqzaFtawykFi0NiSefLPXxUuVpEsrociBnsMKp HGIhaiZ67SQTVnkupmWe7B6dWP5W/4lxn8Oxz7BPB9OS6vL0K+RZHYDP6OZhJJ3D5RQM PA7LeGDYK7lab92BJVQl4eTxsAMgU+HLOMtQ3drLE01BZYJTnk5NBjDsd+biMzsVfTdW MZGq2gXebThu3UDSgbwOjxtim9z0Ffrm2bGMxQjXoyOtg5bS9uGr8MW00Yn2b5uWGgiy Bzuw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=VWwWSHs7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com. [2607:f8b0:4864:20::635]) by gmr-mx.google.com with ESMTPS id t76si945970vkb.1.2020.02.03.09.02.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2020 09:02:51 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) client-ip=2607:f8b0:4864:20::635; Original-Received: by mail-pl1-x635.google.com with SMTP id t14so6089144plr.8 for ; Mon, 03 Feb 2020 09:02:51 -0800 (PST) X-Received: by 2002:a17:902:7b86:: with SMTP id w6mr23723731pll.317.1580749370635; Mon, 03 Feb 2020 09:02:50 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id b130sm20810212pga.4.2020.02.03.09.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 09:02:49 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id A176FA18F; Mon, 3 Feb 2020 12:02:38 -0500 (EST) In-Reply-To: <561d210b-ceb6-4f9a-98e2-556f8e12e2ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=VWwWSHs7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:24337 Archived-At: You should be able to put something like this in your yaml metadata: --- polyglossia-lang: options: 'autospacing=3Dfalse' ... Chris Jones writes: > 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-otherlan= gs.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 tha= t=20 >> a *thin space* be inserted immediately before some punctuation character= s=20 >> *',:!?=C2=BB%*' etc.=E2=80=A6 So in dialogs for instance e.g. =E2=80=A6 = the .md source has: =C2=AB=20 >> =C2=B7 bonjour mademoiselle =C2=B7 =C2=BB where the middle dots represen= t a single U+202f=20 >> non-breaking space. >> >> When I take a look at the intermediate .tex file that pandoc generates t= he=20 >> thin spaces are correctly converted to '\,' which I believe is the *late= x=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 clear= ly=20 >> materialize as thin spaces in the PDF. =20 >> >> What I suspect at this point is that one of the latex packages that pand= oc=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 par= ticular=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 whe= n=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 font= s >> }{} >> \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]{ge= ometry} >> \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 happenin= g=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 thou= ght=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/561d210b-ceb6-4f9a-98e2-556f8e12e2ca%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/m25zgnmwnm.fsf%40johnmacfarlane.net.