From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29037 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:54:22 -0700 (PDT) Message-ID: <09c945ef-4dfd-4c0b-9ac5-645464b619d4n@googlegroups.com> 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_722_1302709048.1629129262743" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28197"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDQ33EPTRYLBBL4U5KEAMGQEVTRZB2I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 16 17:54:26 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 1mFewT-00078H-VI for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 16 Aug 2021 17:54:26 +0200 Original-Received: by mail-oo1-f64.google.com with SMTP id a127-20020a4a4c850000b029028b35f322edsf4029771oob.9 for ; Mon, 16 Aug 2021 08:54:25 -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=OKYRjD5m/J466e3VO3AoqCr4Y1An7WBhqFhlNY4k6tY=; b=AegBH7JZhYBTszbuIChX56inHXBiSEaoNqKZfz2yQKh3BYfPD5nTzEVs4J0l07wUQ4 QV1ZGYtWf2TClEwkuilNSqLErG7eKIjIBJ4WTuTmbVM9hPQDwL8rsOkh7nZnJ6qF0Y3a uNnGyePZhzO3aKPCMUEG97MbwhJR3D1OCxWpVqYnzfeDboptKpY/lcJE2T4MemcQnCSf I+meM8nvqFlmbNx1FAH3WOtjDub8qWyuEMJ4M2ieT59yaJdpPrw9PE8+6/1MUxbT4yhw 5UH2iyo3nSIhDtpD0p5UNHvzkn2tckkii+OoPM6t2sxDqblRX72crfc9CA2JuNSkpM/U Uc+w== 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=OKYRjD5m/J466e3VO3AoqCr4Y1An7WBhqFhlNY4k6tY=; b=P1+OIx6DQdOw7WlS9VUZanX18IjH5T0tR/kIhTmIaWjKcTj+UBGxgCxUUFY6RFSw/f jltKsfINYM02IVks/sL1PfHQfv/zKAQYAracZYFk2A9SelSS4YoVGYWcjYtuR2mECp77 WUya8ZzH06GNr1Vgfbop9vNrRsM89dQxobaTXePlybytZ6tqh88lyRtgLnh1lOSh8/pr R4+nleRbmR+c+zaB90ZKwb0zKUgj2jJZiYahT2pxihCT+v7YjNlctnDIgD+HoCYDVwW9 yldd221+bfIZDiX3IcTMPgTZ3mt+NjL6J/xetWPtts05bBRhBUBVU6AnqlSdJn9NFy0y dJeg== 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=OKYRjD5m/J466e3VO3AoqCr4Y1An7WBhqFhlNY4k6tY=; b=lAI9pl9fRleQq3pmsanyhUhrGp3w95rRIwAQobk00mADe3Qh1w0XwJ+FqGyAhYCHWx 1Juw5py1tDfBTOvHdJ/ekCqnN69RiqtInSZ03dXhPKrdUNo1/GOSDycgYr7ABY32LF/2 2j5E3N7AUioVvjBCHZ7l+DdUvb1jcWcH06mM1rRt6t2hg3lvz2xrg4G48yk9F7lphzHP t3t7aHzZJ1j+BqHvpzaF68z1i/Ewiy5sr0x0gGAq8qh0ZRVVl3U3mevvfOMn4V7vmvte aIzmdz5XlL0//SEhs+Ujwv+yBF4djsXz9E5Ta2FamG1U4in7wy//+aM/KubD6AVFK5xq +1uQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532e3EOj613Y9PxaYdAWOPfhpjP5sDABDrV7qNu6xJBxe6JYzDwM YeDEfVclrLnaYap0vo+OdB8= X-Google-Smtp-Source: ABdhPJxy/r/RcpuibH5XPhVJl5BDD9TGoBlSoFQPNweOlLm3gYlz1dxRV929gTJOftghcZT4b+j1JA== X-Received: by 2002:aca:dd87:: with SMTP id u129mr12139077oig.158.1629129264927; Mon, 16 Aug 2021 08:54:24 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2a05:: with SMTP id y5ls2244648otu.2.gmail; Mon, 16 Aug 2021 08:54:23 -0700 (PDT) X-Received: by 2002:a05:6830:43a3:: with SMTP id s35mr13166026otv.262.1629129263389; Mon, 16 Aug 2021 08:54:23 -0700 (PDT) In-Reply-To: <512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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:29037 Archived-At: ------=_Part_722_1302709048.1629129262743 Content-Type: multipart/alternative; boundary="----=_Part_723_1075502380.1629129262743" ------=_Part_723_1075502380.1629129262743 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I also tried adding that yaml to the template (no-go); and to=20 `my_source_file.pdc`, which was the most promising, successfully producing= =20 a latex or pdf file, depending on the result file extension I provided. I= =20 am now expirementing to determine if changing the font will change the=20 result file. =20 On Monday, August 16, 2021 at 11:09:35 AM UTC-4 Hugh Esco wrote: > 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`, `CJKmainfon= t` >>> variables for the font names and the corresponding `mainfontoptions` et= c. >>> variables. The latter are lists of strings with raw fontspec[^1] option= s=20 >>> in the format `'Option=3DValue'` or `'Option=3D{Multi-word value}'`. Th= e >>> 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 cus= tom >>> template I have added that variable[^4]: >>> >>> $if(defaultfontfeatures)$ >>> =20 >>> \mainfontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endfo= r$} >>> $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= =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 ca= n=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 = 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 `lualate= xt`=20 >>>> or `xelatex`. =20 >>>> >>>> All my tests seem to look alike, and changing my fonts has no impact o= n=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-ad= 1a-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/09c945ef-4dfd-4c0b-9ac5-645464b619d4n%40googlegroups.com. ------=_Part_723_1075502380.1629129262743 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I also tried adding that yaml to the template (no-go); and to `my_sour= ce_file.pdc`, which was the most promising, successfully producing a latex = or pdf file, depending on the result file extension I provided.  I am = now expirementing to determine if changing the font will change the result = file. 




On Monday, August 16, 2021 at 11:09:35 AM UTC-4 Hu= gh Esco wrote:
On Monday, August 16, 2021 at= 4:32:15 AM UTC-4 BPJ wrote:


Den m=C3=A5n 16 aug. 2021 10:25BPJ <b...-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> skrev:
You use the `mainfont`, `sans= font`, `monofont`, `mathfont`, `CJKmainfont`
variabl= es for the font names and the corresponding `mainfontoptions` etc.
variables. The latter are lists of strings with raw fontspec= [^1] options in the format `'Option=3DValue'` or `'Option=3D{Mu= lti-word value}'`. The
easiest 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: xelat= ex
=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 monofontopt= ions:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - 'Scale=3DMat= chLowercase'

For som= e reason the default latex template[^3] does not contain any
variable for `defaultfontfeatures` but
`\d= efaultfontfeatures{Scale=3DMatchLowercase}` is hard coded. In my custom
template I have added that variable[^4]:

=C2=A0 =C2=A0 $if(defaultfontfeatures= )$
=C2=A0 =C2=A0 =C2=A0 \mainfontfeatures{$for(mainf= ontfeatures)$$mainfontfeatures$$sep$,$endfor$}
=C2= =A0 =C2=A0 $else$
=C2=A0 =C2=A0 =C2=A0 \defaultfontfeatures{Scale=3DMatchLowe= rcase}
=C2=A0 =C2=A0 $endif$

Sorry, a typo: it should be `defaultfontfeatures` rather than `ma= infontfeatures`. That's what happens when you copy the wrong line and u= se 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` = switch.=C2=A0

If I set that switch to pdflatex (which seems to be t= he default), I can choose any font 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 markdown source file.=C2=A0

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

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

Can someone please point me to some document= ation which would help me understand how to use the full range of fonts ava= ilable on this system, suitable for which ever value I set to the `--latext= -engine` 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...@googlegr= oups.com.
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/09c945ef-4dfd-4c0b-9ac5-645464b619d4n%40googlegroups.= com.
------=_Part_723_1075502380.1629129262743-- ------=_Part_722_1302709048.1629129262743--