From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29035 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:09:35 -0700 (PDT) Message-ID: <512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen@googlegroups.com> References: <543536ca-7ced-4033-ad1a-ecdd3fedaf44n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_506_718888547.1629126575480" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2035"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQ33EPTRYLBBMH75GEAMGQECM2QZDQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 16 17:09:39 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f192.google.com ([209.85.167.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mFeF9-0000Jr-6n for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 16 Aug 2021 17:09:39 +0200 Original-Received: by mail-oi1-f192.google.com with SMTP id i18-20020aca2b120000b02902678052797bsf6607751oik.13 for ; Mon, 16 Aug 2021 08:09:39 -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=1p9GcPEIu39mjv3yZY0aLvMzH+QJfKnw67jS5OSw35o=; b=G3mBUZ/RaDF0b0LoxG7ouyBlUAlOhlGiwwA8FFH+AZup9cQCj859U9MtLm0kYHrviZ JtMNbiCMY5ZLXHBbWpJYc6dUESrvbQOVTzZOJaCWQCaTpxaU3IQQXKRR+IMRnnWXJIkJ BZl3uHculT3tEmS9ePqaQNWXhbdfjxq4TwhUXl2oe8C0fBVpOevSCGTUtcIdKjZkUmpu U0pcngORgaj64ZCVOT5CBKzalFsQH3kRPj1Wo9Kek9uAf1qB6nUgw1FAOM33nNp8jShK TelWVENzdFKe0/rVP8e0eaDGw3Ybd1B8DZQgijVDG1vLK0MK8lddMnAQKaMKrqv+UiHJ R7Pg== 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=1p9GcPEIu39mjv3yZY0aLvMzH+QJfKnw67jS5OSw35o=; b=WKNPvalOMXoSpMb+Zb6MLm2dY9OlIAaHXkxBhSBgsjNRHbZCxfkeK/bWKvDtd/wXcO A3CQ1iEqpF0+8lEKoenLdhgtV774PD+Ie8eU63t5R3lIoc6OvCMUp6G1DJMdQBbE46aQ Y4qQMjqL9rvhKldTyczdQQAk3svXvu6VXHOZvpcjQ9+uPz6g7bDQ2PE8EpMsHOnGBn/+ EIYo50cTsHn66YG2p5aaBpAm7EpiCny+8iFpw5zAITl+8p8wqnWalY3YLdEFdCqg5SlK ILKFH+YrXbd676SEafZsa2YrT6xTB7RjRvZlViOBQV/kz2GJndlLZ+G1PiMKTAsU+Krf Aliw== 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=1p9GcPEIu39mjv3yZY0aLvMzH+QJfKnw67jS5OSw35o=; b=N8ICiQXouD8b5A5wXYqYN9mivY9rbnTECskkt/Q18Wec8PfZ4ko1aORKfoSiwAbEX1 8Adug1pAnGn3AodlFrUqlGzHWp7aAixd087tIKVuwNWTJOqRPpuKqTE5E0CzT7tuileJ I9tWDuir03NLAv1cIfHi7u7MRK3ChlBamzz0NoQgSSMvPPcVQDvC3dpPhJm91TpOKr5L LkEjiYk50qfDhHWw8NuWLlqC3od8lhMVhfKNJoxSI4lwrn4M1qaYtMke6VrgsROTuOwW ohpD4VwFaeJ4FN+cMUZB/bkSaY7s0wfDgDOzGI/tDsj87I9M8llj2enl83HE3RUnARyM KioQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532K8maT67Mg/x6RnZcW1WEVjNsV0jGxxV9/kldUXlwSEKHk44FO gbJLoLzULVYS+kIbB4mHoHE= X-Google-Smtp-Source: ABdhPJzU5Q28GELrHI7Ic2yEd7Tzu5S4VZyaql/exJRP515w4TQnaZKuosezqJpMhj9oyNtY9fb2OQ== X-Received: by 2002:a05:6808:18a9:: with SMTP id bi41mr12172559oib.76.1629126577662; Mon, 16 Aug 2021 08:09:37 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2143:: with SMTP id r3ls2207706otd.0.gmail; Mon, 16 Aug 2021 08:09:36 -0700 (PDT) X-Received: by 2002:a9d:2903:: with SMTP id d3mr12789199otb.117.1629126576039; Mon, 16 Aug 2021 08:09:36 -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:29035 Archived-At: ------=_Part_506_718888547.1629126575480 Content-Type: multipart/alternative; boundary="----=_Part_507_1982643640.1629126575480" ------=_Part_507_1982643640.1629126575480 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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`, `CJKmainfont= ` >> variables for the font names and the corresponding `mainfontoptions` etc= . >> variables. The latter are lists of strings with raw fontspec[^1] options= =20 >> in the format `'Option=3DValue'` or `'Option=3D{Multi-word value}'`. 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 cust= om >> template I have added that variable[^4]: >> >> $if(defaultfontfeatures)$ >> =20 >> \mainfontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endfor= $} >> $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 and= =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 are = a=20 >>> 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 can= =20 >>> choose any font installed as a .sty file at this path:=20 >>> `/usr/share/texlive/texmf-dist/tex/latex/psnfss/`, by setting a value t= o=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 installe= d=20 >>> at `/usr/share`, by setting the `--latex-engine` to `lualatext` or=20 >>> `xelatex`. =20 >>> >>> All my tests seem to look alike, and changing my fonts has no impact on= =20 >>> 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 system,= =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, 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/543536ca-7ced-4033-ad1= a-ecdd3fedaf44n%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/512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen%40googlegroups.com. ------=_Part_507_1982643640.1629126575480 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My attempts to test this yield errors looking like this:

```
$ pa= ndoc --defaults `pwd`/defaults --latex-engine=3Dlualatex --template=3Dmy_cl= ient.latex my_source_file.pdc -o my_result_file.pdf
pandoc: unrecognized= option `--defaults'
Try pandoc --help for more information.
```
l= ooking at the --help output yields this:

```
$ pandoc --help | gr= ep default
  -D FORMAT       &nb= sp;     --print-default-template=3DFORMAT  &n= bsp;            = ;  
          &nb= sp;            = --print-default-data-file=3DFILE       =            
 &nbs= p;            &= nbsp;         --default-image-exten= sion=3Dextension
```

but no `--defaults` switch.  What am I = missing here, please?

-- Hugh

On Monday, August 16, 2021 at 4:32:15 A= M UTC-4 BPJ wrote:


Den m=C3=A5n 16 aug. 2021 10:25BPJ <b...-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> skrev:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
You use t= he `mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont`
variables for the font names and the corresponding `mainfontop= tions` etc.
variables. The latter are lists of strin= gs with raw fontspec[^1] options in the format `'Option=3DValue'` o= r `'Option=3D{Multi-word value}'`. The
easie= st 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:
=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 cont= ain any
variable for `defaultfontfeatures` but
=
`\defaultfontfeatures{Scale=3DMatchLowercase}` is hard co= ded. In my custom
template I have added that variabl= e[^4]:

=C2=A0 =C2=A0 $if= (defaultfontfeatures)$
=C2=A0 =C2=A0 =C2=A0 \mainfon= tfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endfor$}
=C2=A0 =C2=A0 $else$
=C2=A0 =C2=A0 =C2=A0 \defaultfontfeatures= {Scale=3DMatchLowercase}
=C2=A0 =C2=A0 $endif$
=

Sorry, a typo: it should be `defaultfontfeature= s` rather than `mainfontfeatures`. That's what happens when you copy th= e 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 <hr= e...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
My te= sts seem to indicate that the fonts which are available to me are a functio= n of the value of the `--latex-engine=3D` switch.=C2=A0

If I set th= at switch to pdflatex (which seems to be the default), I can choose any fon= t installed as a .sty file at this path: `/usr/share/texlive/texmf-dist/tex= /latex/psnfss/`, by setting a value to the fontenc key at the top of my mar= kdown source file.=C2=A0

But I have not been able t= o sort out how to access other fonts installed at `/usr/share`, by setting = the `--latex-engine` to `lualatext` or `xelatex`.=C2=A0

=
All my tests seem to look alike, and changing my fonts has no im= pact on how the resulting pdf looks.=C2=A0

Ca= n someone please point me to some documentation which would help me underst= and how to use the full range of fonts available on this system, suitable f= or which ever value I set to the `--latext-engine` switch?=C2=A0

Th= anks,
-- 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 pa= ndoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid= /pandoc-discuss/543536ca-7ced-4033-ad1a-ecdd3fedaf44n%40googlegroups.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/512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen%40googlegroups.= com.
------=_Part_507_1982643640.1629126575480-- ------=_Part_506_718888547.1629126575480--