Hi BP,

Thanks for the advice, but yes, I've spent days and days reading, and trying and experimenting with all of the listed options and arguments. It's astonishing something so simple as setting a font family could take such a massive amount of time. Regarding use of -d

https://pandoc.org/MANUAL.html#default-files says:
"Here is a sample defaults file demonstrating all of the fields that may be used:"
[code block]

fontfamily is not included ^ in that code block above, of valid metadata or defaults values.

If you or anyone has a working local version using pdflatex, I'd love to see:

1. Your exact pandoc command used
2. Your exact yaml file if one is use
3. The argument you are using to call that yaml

Thanks!



On Wednesday, July 7, 2021 at 3:21:50 AM UTC-4 BP wrote:
Reading the relevant parts of the manual should clear things up:

https://pandoc.org/MANUAL.html#option--defaults

https://pandoc.org/MANUAL.html#default-files

I always use XeLaTeX but I think that fontfamily should go in the metadata section of a defaults file:

``````yaml
metadata:
  fontfamily: whatever
  fontfamilyoptions:
    - 'option=value'
``````

Using XeLaTeX (`pdf-engine: xelatex` in a defaults file or `--pdf-engine=xelatex` on the command line) along with `mainfont: Helvetica` would probably solve your problem instantly provided the system in your docker image has this font installed (or you might install Noto Sans as a very good alternative if a free Helvetica OTF/TTF version isn't available). However XeLaTeX is considerably slower than pdfLaTeX which may matter if you are serving this live.


Den tis 6 juli 2021 23:51Shakr Maker <shakr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi John, Pedro,

Where (in what file) are you defining this yaml when you get your Helvetica result? Are you adding this yaml to your .md file? Or some other file? How are you calling it and with what arg?
---
fontfamily: helvet
...


I've tried passing it in as -d (which it apparently isn't, based on https://pandoc.org/MANUAL.html#default-files)
I've tried using --metadata-file (which it perhaps isn't and appears to ignore https://pandoc.org/MANUAL.html#option--metadata-file)
I've tried passing it in as a sequential yaml file per (https://pandoc.org/MANUAL.html#extension-yaml_metadata_block)
And I earlier tried the straight argument without the yaml, -V fontfamily=helvet

None of them work. I still don't get Helvetica.

Thanks for any help!



On Thursday, July 1, 2021 at 11:56:24 AM UTC-4 John MacFarlane wrote:

I do get Helvetica font when I try this (pandoc test.md -o test.pdf).

"Pedro P. Palazzo" <pedro....@gmail.com> writes:

> OK, there's something weird going on with Pandoc (not the Docker image). I created a test file with the following in the front matter:
>
> ---
> fontfamily: helvet
> header-includes:
> - \renewcommand\familydefault{\sfdefault}
> ---
>
> If I run `pandoc -o myfile.pdf`, it does NOT use Helvetica. However, if I run `pandoc -o myfile.tex` and then `pdflatex myfile`, the document DOES come out in Helvetica. Not sure where to go from here, though.

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e14acfcd-b5da-42ef-9261-fc5a0ab0953bn%40googlegroups.com.

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/05b006e2-3858-4537-b7ac-2763bd9190adn%40googlegroups.com.