From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29038 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 08:55:41 -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_486_2101094703.1629129341230" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35269"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQ33EPTRYLBB7UU5KEAMGQER26T6EQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 16 17:55:44 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f64.google.com ([209.85.161.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFexj-0008vt-SF for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 16 Aug 2021 17:55:44 +0200 Original-Received: by mail-oo1-f64.google.com with SMTP id i5-20020a4ad385000000b0028bd047a835sf617172oos.12 for ; Mon, 16 Aug 2021 08:55:43 -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=RaP1IAYhqn2VORxL8KHnoP3iAZjrivSzvraxoXEqBZc=; b=a4zk/Xe3EXKLRs0jrc8FxU1y4VFzPq2ECHy3OqQ1dgwPhA4C1TFtEu/CJn4mXKN+sJ zoFRm5lMaMzC/B5QnkUANz4VDep+hOh0vACorxclWS56+m6TtasNlZM2Ez5GL+PenQ7v oBCQHvenk9g91YnKgYM+WQ9WPnL3IO92EsN4DnUKxGm+mfo37N2KJbs13N1ZS0ja4cpi qyn8atDaTjhwLpLvtQc9O611+SxJW1XhvVs5KHz8TYfh+MlHfmMzUBt2K5pfY/D6kJuE y871N1Flua3I04qVflzYkbiMjF5kCWmM8ELsQwXk6ctu9iNkrn3l3HBKzm0IY/cjPt8d yNMA== 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=RaP1IAYhqn2VORxL8KHnoP3iAZjrivSzvraxoXEqBZc=; b=HF6ibRlb0q7t/Rb/7L8+1p8u14xeVVf6rwYeyD37kDCRPDkef5WeyPrMVl/mWPrNQH ctaR1fVgIwbkVEEjLVGpnnHvLUodtO3RYDGeGsq4f52sQ6GpauLu7AWz6gBPKoQe6IGJ X+p+0t9PbJoyYcgBUjQoSRYy55UdiIclfWD1NyGxMEcssI2XTValZD41o4AJdUQ8NRV7 E4WgYo5XGSHxWYfoCZTQEQB1NxALRoSHrZvnfP0L+uevo/4OrjzW1a2xmdS/uH7/CnHw P4Ud1JAm9m4vsvxx43goHYSZrnGUTf+CIMQReTJ4m3eIqCGf8r/sSUZAF2DHaV50eNIs ZWvw== 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=RaP1IAYhqn2VORxL8KHnoP3iAZjrivSzvraxoXEqBZc=; b=LMCl/t05NJeUy5MfxG086N6XgG3O0zPQnajBrumenucbnAwNgfp8LFcWG1l25k7Bob ojNC2Ydqj5ReeMkfQcqOnW9QceNEC31LkPvtrqtISoZPL54PYwIVOvTE1/hG7Y/uWJA9 GsLh4bOQQprJMBlk3lpPk7lPl6ZNpm0HpLThF8b4D7HAGfRDR/mooAGy0blauBxSgV3Q Y73YOK9Y4CXdMRivFmN5jQb51Zr6KFRlFUs2nIS0vasAJR6VgPGbgTcSJFRNgU1Xe4r5 puDTyyj8dvIO9p5engmjLyKQuGt+XE6oYesJj40a2e6SgCn0XDAogv0qC6Tj5V14MYGL nsaQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533G3lsv9XMK621CdVumSOpbgSdjyFWz1RF/v3BeT5EoYpHK6Jwg 8cRnoAjzN7FngtKnWqJbwXs= X-Google-Smtp-Source: ABdhPJxDAz+d1qT8jn68OBnUGL5ZNokdEFBK7OOhXCfhcSZsY+i0oJH2xMWkL/u42yxRJzHVuQm+/Q== X-Received: by 2002:a05:6808:13c5:: with SMTP id d5mr11825940oiw.56.1629129342864; Mon, 16 Aug 2021 08:55:42 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2143:: with SMTP id r3ls2250031otd.0.gmail; Mon, 16 Aug 2021 08:55:41 -0700 (PDT) X-Received: by 2002:a9d:6398:: with SMTP id w24mr8324750otk.140.1629129341692; Mon, 16 Aug 2021 08:55:41 -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:29038 Archived-At: ------=_Part_486_2101094703.1629129341230 Content-Type: multipart/alternative; boundary="----=_Part_487_1044704994.1629129341230" ------=_Part_487_1044704994.1629129341230 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 val= ue}'`. 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 cu= stom >>>> template I have added that variable[^4]: >>>> >>>> $if(defaultfontfeatures)$ >>>> =20 >>>> \mainfontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endf= or$} >>>> $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 an= d=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 ar= e=20 >>>>> 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 value= 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 `lualat= ext`=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 me= =20 >>>>> understand how to use the full range of fonts available on this syste= m,=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, sen= d=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/543536ca-7ced-4033-a= d1a-ecdd3fedaf44n%40googlegroups.com=20 >>>>> >>>>> . >>>>> >>>> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> 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-92b9= -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/f3ace520-a935-4bae-a6f3-0790f0d51b3fn%40googlegroups.com. ------=_Part_487_1044704994.1629129341230 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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://pand= oc.org

On Monday, August 16, 2021 at 11:46:08 AM UTC-4 BPJ wrote:
<= /div>
=
You probably need to upgrade pandoc.
What does pando= c --version say?

Den m=C3=A5n 16 aug. 2021 = 17:10Hugh Esco <hre...@gmail.= com> skrev:
My attempts to test this yield errors looking like this:
```
$ pandoc --defaults `pwd`/defaults --latex-engine=3Dlualatex -= -template=3Dmy_client.latex my_source_file.pdc -o my_result_file.pdf
pan= doc: unrecognized option `--defaults'
Try pandoc --help for more inf= ormation.
```
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 --print-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=3DFILE=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

On Monday, Aug= ust 16, 2021 at 4:32:15 AM UTC-4 BPJ wrote:


Den m=C3=A5n 16 aug. 2021 10:25B= PJ <b...-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> skrev:
You u= se the `mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont`
<= div dir=3D"auto">variables for the font names and the corresponding `mainfo= ntoptions` etc.
variables. The latter are lists of s= trings with raw fontspec[^1] options in the format `'Option=3DValue'= ;` or `'Option=3D{Multi-word value}'`. The
e= asiest way is to specify them is in a defaults file[^2] like this:

=C2=A0 =C2=A0 from: markdown
=C2=A0 =C2=A0 to: latex
=C2=A0 = =C2=A0 pdf-engine: xelatex
=C2=A0 =C2=A0 variables:<= /div>
=C2=A0 =C2=A0 =C2=A0 mainfont: Noto Serif
=C2=A0 =C2=A0 =C2=A0 sansfont: Noto Sans
=C2=A0 =C2=A0 =C2=A0 monofont: Noto Mono
=C2=A0 = =C2=A0 =C2=A0 monofontoptions:
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 - 'Scale=3DMatchLowercase'

=
For some reason the default latex template[^3] does not c= ontain any
variable for `defaultfontfeatures` but
`\defaultfontfeatures{Scale=3DMatchLowercase}` is hard= coded. In my custom
template I have added that vari= able[^4]:

=C2=A0 =C2=A0 = $if(defaultfontfeatures)$
=C2=A0 =C2=A0 =C2=A0 \main= fontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endfor$}
=
=C2=A0 =C2=A0 $else$
=
=C2=A0 =C2=A0 =C2=A0 \defaultfontfeatu= res{Scale=3DMatchLowercase}
=C2=A0 =C2=A0 $endif$

Sorry, a typo: it should be `defaultfontfeatur= es` rather than `mainfontfeatures`. That's what happens when you copy t= he wrong line and use search/replace to make up for it! :-/


Font embedding depends on your XeTeX/LuaTeX= settings. Usually it Just Works.




=



Den m=C3=A5n 16 aug. 2021 06:56Hugh Esco <hre...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
My tests seem to indicate that the fonts which are= available to me are a function of the value of the `--latex-engine=3D` swi= tch.=C2=A0

If I set that switch to pdflatex (which seems to be the = default), I can choose any font installed as a .sty file at this path: `/us= r/share/texlive/texmf-dist/tex/latex/psnfss/`, by setting a value to the fo= ntenc key at the top of my markdown source file.=C2=A0

<= div>But I have not been able to sort out how to access other fonts installe= d at `/usr/share`, by setting the `--latex-engine` to `lualatext` or `xelat= ex`.=C2=A0

All my tests seem to look alike, a= nd changing my fonts has no impact on how the resulting pdf looks.=C2=A0

Can someone please point me to some documentati= on which would help me understand how to use the full range of fonts availa= ble on this system, suitable for which ever value I set to the `--latext-en= gine` switch?=C2=A0

Thanks,
-- Hugh Esco

--
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.
To view this discussion on the web visit https://groups.google.= com/d/msgid/pandoc-discuss/543536ca-7ced-4033-ad1a-ecdd3fedaf44n%40googlegr= oups.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-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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/f3ace520-a935-4bae-a6f3-0790f0d51b3fn%40googlegroups.= com.
------=_Part_487_1044704994.1629129341230-- ------=_Part_486_2101094703.1629129341230--