public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Hugh Esco <hresco3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: How do I control and embed the fonts in my pdfs?
Date: Mon, 16 Aug 2021 08:09:35 -0700 (PDT)	[thread overview]
Message-ID: <512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen@googlegroups.com> (raw)
In-Reply-To: <CADAJKhB_Sb1F4-LrHw=Wwh9GUYuyyN6HpENW7zue-c7Gw=3CDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4505 bytes --]

My attempts to test this yield errors looking like this:

```
$ pandoc --defaults `pwd`/defaults --latex-engine=lualatex 
--template=my_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=FORMAT                 
                        --print-default-data-file=FILE                  
                        --default-image-extension=extension
```

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

-- Hugh 

On Monday, August 16, 2021 at 4:32:15 AM UTC-4 BPJ wrote:

>
>
> Den mån 16 aug. 2021 10:25BPJ <b...-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> 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 
>> in the format `'Option=Value'` or `'Option={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=MatchLowercase'
>>
>> For some reason the default latex template[^3] does not contain any
>> variable for `defaultfontfeatures` but
>> `\defaultfontfeatures{Scale=MatchLowercase}` is hard coded. In my custom
>> template I have added that variable[^4]:
>>
>>     $if(defaultfontfeatures)$
>>       
>> \mainfontfeatures{$for(mainfontfeatures)$$mainfontfeatures$$sep$,$endfor$}
>>     $else$
>>
>       \defaultfontfeatures{Scale=MatchLowercase}
>>     $endif$
>>
>
> Sorry, a typo: it should be `defaultfontfeatures` rather than 
> `mainfontfeatures`. That's what happens when you copy the wrong line and 
> use search/replace to make up for it! :-/
>
>
>> Font embedding depends on your XeTeX/LuaTeX settings. Usually it Just 
>> 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ån 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=` switch.  
>>>
>>> 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: 
>>> `/usr/share/texlive/texmf-dist/tex/latex/psnfss/`, by setting a value to 
>>> the fontenc key at the top of my markdown source file.  
>>>
>>> But I have not been able to sort out how to access other fonts installed 
>>> at `/usr/share`, by setting the `--latex-engine` to `lualatext` or 
>>> `xelatex`.  
>>>
>>> All my tests seem to look alike, and changing my fonts has no impact on 
>>> how the resulting pdf looks.  
>>>
>>> Can someone please point me to some documentation which would help me 
>>> understand how to use the full range of fonts available on this system, 
>>> suitable for which ever value I set to the `--latext-engine` switch?  
>>>
>>> Thanks,
>>> -- Hugh Esco 
>>>
>>> -- 
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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 
>>> <https://groups.google.com/d/msgid/pandoc-discuss/543536ca-7ced-4033-ad1a-ecdd3fedaf44n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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/msgid/pandoc-discuss/512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 8732 bytes --]

  parent reply	other threads:[~2021-08-16 15:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  4:55 Hugh Esco
     [not found] ` <543536ca-7ced-4033-ad1a-ecdd3fedaf44n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16  4:58   ` Hugh Esco
     [not found]     ` <a038e9eb-401c-4e63-b44c-86ec89d76e60n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16  7:42       ` Bastien DUMONT
2021-08-16  8:25   ` BPJ
     [not found]     ` <CADAJKhCkmKrY+-ZUzZg3W4hW=tLsa4irz4KP-_-dzJsB+tUfUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-16  8:32       ` BPJ
     [not found]         ` <CADAJKhB_Sb1F4-LrHw=Wwh9GUYuyyN6HpENW7zue-c7Gw=3CDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-08-16 15:09           ` Hugh Esco [this message]
     [not found]             ` <512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16 15:45               ` BPJ
2021-08-16 15:55                 ` Hugh Esco
     [not found]                   ` <f3ace520-a935-4bae-a6f3-0790f0d51b3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16 16:10                     ` Hugh Esco
     [not found]                       ` <a821baa9-eb79-4bf9-9a1e-7a2c3b4714dfn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-16 16:31                         ` Hugh Esco
     [not found]                           ` <0735c963-74ca-4917-99d7-2b058b0d205cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-17 17:03                             ` BPJ
     [not found]                               ` <895ca2cc-d5a6-c55a-ddbb-ea3ca9c441e4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-08-18 17:52                                 ` Hugh Esco
     [not found]                                   ` <e775729a-ce74-4727-a451-bc9058b5086en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-18 18:06                                     ` BPJ
2021-08-16 15:54               ` Hugh Esco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512edc0d-8cbb-4e97-92b9-5cd1a1bdfffen@googlegroups.com \
    --to=hresco3-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).