From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29039 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hugh Esco Newsgroups: gmane.text.pandoc Subject: Re: How do I control and embed the fonts in my pdfs? Date: Mon, 16 Aug 2021 09:10:53 -0700 (PDT) Message-ID: References: <543536ca-7ced-4033-ad1a-ecdd3fedaf44n@googlegroups.com> <512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_498_117484518.1629130253821" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35553"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQ33EPTRYLBBD445KEAMGQEVLY47BA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 16 18:10:58 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f63.google.com ([209.85.161.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFfCT-0008uO-Mx for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 16 Aug 2021 18:10:57 +0200 Original-Received: by mail-oo1-f63.google.com with SMTP id w9-20020a4aca09000000b0028b7adc5bd2sf2546479ooq.11 for ; Mon, 16 Aug 2021 09:10:57 -0700 (PDT) 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=vmkcOfEU4ZEeULUmTUEuMQ93g6GNYSZ4usVk63+Wj9w=; b=Lln8gr6VNhe77h9ZfXABiSzzA9iY0h4pB8q9pB1ZCAJnwFlOJW/9wrctJ1vi9RkKyn vsnGrjF2D6Cu26xcMh2hySU3TJClMBgilWzbddBwaKEQJQrH589ZvtxpyHNpAaUFa2gU 6xVZDm6S1URRgUpWSZVgqrKZ/AZxyg7hTOUPRj2a3I3pfSbTvaSbPZmb5/bMrspfjTJb dYyhH5tPVI74tSeuFV9bLiDQWkXyk5SQtkejGFSPIL14WNHasqj2U8i658FjgeseXwzZ +kdY0s+c9HJxtIunrhmdxGLYNGkF5ztzvMtgMr7AfD4c+6JRdkH7F47VC6zxcMeNAfyK ZY1Q== 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=vmkcOfEU4ZEeULUmTUEuMQ93g6GNYSZ4usVk63+Wj9w=; b=cGAdHcI5bxs3iB/VdxaY/WJwHRSjW70if7xS+4ZgplczVDxi6tbdFvC/l9IGR3UnnZ GPB0914p2Vec/m0jnOENS8jfaEDiwUlYT0PDzQsQhUZbPIN1bQHiBNnoXz5U9N4oCWm/ vg5Ai3b8hsPc8MeKsPYxManTC+wjXYLFiK6vZ1Vpnn2p3Bi4XY7Exr2TE37n2hAu1ea+ BhyROWn3pVpXPJzDZWwKQsj3GW/7UV1ndgthFxzzC5IkbH30tJPtppaejqJpmyG7wlk/ XbXOP3FgHFlRz6wlJ4uymTgSIJ8TGQREZwjrb4FY5RCnLlk0+unCoq/wsp2lJ2IPvs+H uF4Q== 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=vmkcOfEU4ZEeULUmTUEuMQ93g6GNYSZ4usVk63+Wj9w=; b=ZS7x+vfW+KndJxbK7rh1ha0su/KZSRTOWUWGQqgzmNwd+rT+7DDikWHBmTzdYBXpvF EWu0QH2btqRigZodI2+LQLEhaT3MafCReP7FiPp7qHukXt3vsGo5qWK6+NGEmEir2Sji whYHjjrEaosHK6dymS/qsHiFTykNhk71FyQH4VOpROk7azpWGDA9sqivWhRRJxNH4nsU joCakLfByRsH/ApchaWfIc0AJd8W+Vj3qfCm5ebXOO2b/GVPjY3YsJ1OOIpl/8W1szFW ER0jIt61Tj1pdBTDg6nX04R2EO6hU8Z9otVYorbodoQKmm+E7v4wNMuRBOAuVGLMdbo4 /FPw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530pIrHlBIDoaoFLi0/6PKQ3DuaDyEV9aMpyG0fau/qnSz03MplW 07njdg2F9eeqvvnBdO2kLa8= X-Google-Smtp-Source: ABdhPJyiiU1HHu6apX9YD06CdRsIQphlxgfGFJcVerCAbaWr2twHpNRljkxbQp7VM/Lya1u2Hss58w== X-Received: by 2002:a9d:6414:: with SMTP id h20mr13521630otl.177.1629130256138; Mon, 16 Aug 2021 09:10:56 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:201d:: with SMTP id q29ls2239100oiw.7.gmail; Mon, 16 Aug 2021 09:10:54 -0700 (PDT) X-Received: by 2002:a05:6808:2219:: with SMTP id bd25mr12245824oib.33.1629130254607; Mon, 16 Aug 2021 09:10:54 -0700 (PDT) In-Reply-To: X-Original-Sender: hresco3-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:29039 Archived-At: ------=_Part_498_117484518.1629130253821 Content-Type: multipart/alternative; boundary="----=_Part_499_422271137.1629130253821" ------=_Part_499_422271137.1629130253821 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OK, this seems to be working better now: ``` pandoc 2.14.1 Compiled with pandoc-types 1.22, texmath 0.12.3, skylighting 0.11, citeproc 0.4.1, ipynb 0.1.0.1 User data directory: /home/hesco/.pandoc Copyright (C) 2006-2021 John MacFarlane. Web: https://pandoc.org ``` NEXT QUESTIONS: What path is being searched for fonts? =20 How do I know what my options are? On Monday, August 16, 2021 at 11:55:41 AM UTC-4 Hugh Esco wrote: > pandoc 1.19.2.4 > Compiled with pandoc-types 1.17.0.5, texmath 0.9.4.4, skylighting 0.3.3.1 > Default user data directory: /home/hesco/.pandoc > Copyright (C) 2006-2016 John MacFarlane > Web: http://pandoc.org > > On Monday, August 16, 2021 at 11:46:08 AM UTC-4 BPJ wrote: > >> You probably need to upgrade pandoc. >> What does pandoc --version say? >> >> Den m=C3=A5n 16 aug. 2021 17:10Hugh Esco skrev: >> >>> My attempts to test this yield errors looking like this: >>> >>> ``` >>> $ pandoc --defaults `pwd`/defaults --latex-engine=3Dlualatex=20 >>> --template=3Dmy_client.latex my_source_file.pdc -o my_result_file.pdf >>> pandoc: unrecognized option `--defaults' >>> Try pandoc --help for more information. >>> ``` >>> looking at the --help output yields this: >>> >>> ``` >>> $ pandoc --help | grep default >>> -D FORMAT --print-default-template=3DFORMAT = =20 >>> --print-default-data-file=3DFILE = =20 >>> --default-image-extension=3Dextension >>> ``` >>> >>> but no `--defaults` switch. What am I missing here, please? >>> >>> -- Hugh=20 >>> >>> On Monday, August 16, 2021 at 4:32:15 AM UTC-4 BPJ wrote: >>> >>>> >>>> >>>> Den m=C3=A5n 16 aug. 2021 10:25BPJ skrev: >>>> >>>>> You use the `mainfont`, `sansfont`, `monofont`, `mathfont`,=20 >>>>> `CJKmainfont` >>>>> variables for the font names and the corresponding `mainfontoptions`= =20 >>>>> etc. >>>>> variables. The latter are lists of strings with raw fontspec[^1]=20 >>>>> options in the format `'Option=3DValue'` or `'Option=3D{Multi-word va= lue}'`. The >>>>> easiest way is to specify them is in a defaults file[^2] like this: >>>>> >>>>> from: markdown >>>>> to: latex >>>>> pdf-engine: xelatex >>>>> variables: >>>>> mainfont: Noto Serif >>>>> sansfont: Noto Sans >>>>> monofont: Noto Mono >>>>> monofontoptions: >>>>> - 'Scale=3DMatchLowercase' >>>>> >>>>> For some reason the default latex template[^3] does not contain any >>>>> variable for `defaultfontfeatures` but >>>>> `\defaultfontfeatures{Scale=3DMatchLowercase}` is hard coded. In my= =20 >>>>> custom >>>>> template I have added that variable[^4]: >>>>> >>>>> $if(defaultfontfeatures)$ >>>>> =20 >>>>> \mainfontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$end= for$} >>>>> $else$ >>>>> >>>> \defaultfontfeatures{Scale=3DMatchLowercase} >>>>> $endif$ >>>>> >>>> >>>> Sorry, a typo: it should be `defaultfontfeatures` rather than=20 >>>> `mainfontfeatures`. That's what happens when you copy the wrong line a= nd=20 >>>> use search/replace to make up for it! :-/ >>>> >>>> >>>>> Font embedding depends on your XeTeX/LuaTeX settings. Usually it Just= =20 >>>>> Works. >>>>> >>>>> >>>>> [^1]: https://ctan.org/pkg/fontspec >>>>> >>>>> [^2]: https://pandoc.org/MANUAL.html#default-files >>>>> >>>>> [^3]: https://pandoc.org/MANUAL.html#templates >>>>> >>>>> [^4]: https://git.io/J0UJS >>>>> >>>>> >>>>> Den m=C3=A5n 16 aug. 2021 06:56Hugh Esco skrev: >>>>> >>>>>> My tests seem to indicate that the fonts which are available to me= =20 >>>>>> are a function of the value of the `--latex-engine=3D` switch. =20 >>>>>> >>>>>> If I set that switch to pdflatex (which seems to be the default), I= =20 >>>>>> can choose any font installed as a .sty file at this path:=20 >>>>>> `/usr/share/texlive/texmf-dist/tex/latex/psnfss/`, by setting a valu= e to=20 >>>>>> the fontenc key at the top of my markdown source file. =20 >>>>>> >>>>>> But I have not been able to sort out how to access other fonts=20 >>>>>> installed at `/usr/share`, by setting the `--latex-engine` to `luala= text`=20 >>>>>> or `xelatex`. =20 >>>>>> >>>>>> All my tests seem to look alike, and changing my fonts has no impact= =20 >>>>>> on how the resulting pdf looks. =20 >>>>>> >>>>>> Can someone please point me to some documentation which would help m= e=20 >>>>>> understand how to use the full range of fonts available on this syst= em,=20 >>>>>> suitable for which ever value I set to the `--latext-engine` switch?= =20 >>>>>> >>>>>> Thanks, >>>>>> -- Hugh Esco=20 >>>>>> >>>>>> --=20 >>>>>> You received this message because you are subscribed to the Google= =20 >>>>>> Groups "pandoc-discuss" group. >>>>>> To unsubscribe from this group and stop receiving emails from it,=20 >>>>>> send an 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/543536ca-7ced-4033-= ad1a-ecdd3fedaf44n%40googlegroups.com=20 >>>>>> >>>>>> . >>>>>> >>>>> --=20 >>> You received this message because you are subscribed to the Google=20 >>> Groups "pandoc-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send= =20 >>> an 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/512edc0d-8cbb-4e97-92b= 9-5cd1a1bdfffen%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/a821baa9-eb79-4bf9-9a1e-7a2c3b4714dfn%40googlegroups.com. ------=_Part_499_422271137.1629130253821 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OK, this seems to be working better now:

```
pandoc 2.14.1
Com= piled with pandoc-types 1.22, texmath 0.12.3, skylighting 0.11,
citeproc= 0.4.1, ipynb 0.1.0.1
User data directory: /home/hesco/.pandoc
Copyri= ght (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
``= `

NEXT QUESTIONS:

What path is being searched for font= s? 
How do I know what my options are?

On Monday, August 16, 2= 021 at 11:55:41 AM UTC-4 Hugh Esco wrote:
pandoc 1.19.2.4
Compiled with p= andoc-types 1.17.0.5, texmath 0.9.4.4, skylighting 0.3.3.1
Default user = data directory: /home/hesco/.pandoc
Copyright (C) 2006-2016 John MacFarl= ane
Web:=C2=A0 http://pandoc.org

On Monday, Aug= ust 16, 2021 at 11:46:08 AM UTC-4 BPJ wrote:
You probably nee= d to upgrade pandoc.
What does pandoc --version say?

Den m=C3=A5n 16 aug. 2021 17:10Hugh Esco <hre...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
My attempts to test this yield errors l= ooking like this:

```
$ pandoc --defaults `pwd`/defaults --latex-= engine=3Dlualatex --template=3Dmy_client.latex my_source_file.pdc -o my_res= ult_file.pdf
pandoc: unrecognized option `--defaults'
Try pandoc = --help for more information.
```
looking at the --help output yields = this:

```
$ pandoc --help | grep default
=C2=A0 -D FORMAT=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --pri= nt-default-template=3DFORMAT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --print-default-data-file=3DF= ILE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 --default-image-extension=3Dextension
```
but no `--defaults` switch.=C2=A0 What am I missing here, please?

= -- Hugh




--
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

--
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/a821baa9-eb79-4bf9-9a1e-7a2c3b4714dfn%40googlegroups.= com.
------=_Part_499_422271137.1629130253821-- ------=_Part_498_117484518.1629130253821--