[Tex/LaTex] Total newbie confusion with pandoc and changing fonts on pdf export

fontspandoc

I have pandoc and would like to change the awful default font when I convert a .MD to a .PDF.

I understand I can pass -V on the command line and that pandoc uses --pdf-engine=pdflatex by default. I would like to change the font family to https://tug.org/FontCatalogue/clearsans/. I try:

pandoc -V fontfamily="ANYTHING" test.md -o test.pdf

and just get

Error producing PDF.
! LaTeX Error: File `ANYTHING.sty' not found.

I am reading about different engines, which don't seem to be installed. I can look at a config file that is total mumbo-jumbo.

Can I just list what fonts or font family's are available and choose one on the command line?

I installed texlive on Centos 8 and it installed a lot… but there seems still more packages. It seems a lot of work to change a font!

tex --version
TeX 3.14159265 (TeX Live 2018)
kpathsea version 6.3.0

also I see included in the install were:

Name         : texlive-latex-fonts
Summary      : A collection of fonts used in LaTeX distributions
URL          : http://tug.org/texlive/
License      : LPPL
Description  : This is a collection of fonts for use with standard latex
             : packages and classes. It includes 'invisible' fonts (for use
             : with the slides class), line and circle fonts (for use in the
             : picture environment) and 'latex symbol' fonts. For full support
             : of a latex installation, some Computer Modern font variants
             : cmbsy(6-9), cmcsc(8,9), cmex(7-9) and cmmib(5-9) from the
             : amsfonts distribution, are also necessary. The fonts are
             : available as Metafont source, and metric (tfm) files are also
             : provided. Most of the fonts are also available in Adobe Type 1
             : format, in the amsfonts distribution.

Name         : texlive-collection-basic
Summary      : Essential programs and files
URL          : http://tug.org/texlive/
License      : Artistic 2.0 and GPLv2 and GPLv2+ and LGPLv2+ and LPPL and MIT
             : and Public Domain and UCD and Utopia
Description  : These files are regarded as basic for any TeX system, covering
             : plain TeX macros, Computer Modern fonts, and configuration for
             : common drivers; no LaTeX.

Name         : texlive-collection-fontsrecommended
Summary      : Recommended fonts
URL          : http://tug.org/texlive/
License      : Artistic 2.0 and GPLv2 and GPLv2+ and LGPLv2+ and LPPL and MIT
             : and Public Domain and UCD and Utopia
Description  : Recommended fonts, including the base 35 PostScript fonts,
             : Latin Modern, TeX Gyre, and T1 and other encoding support for
             : Computer Modern, in outline form.

Best Answer

On a recent TeX Live installation

pandoc -V fontfamily:ClearSans -V fontfamilyoptions:sfdefault test.md -o test.pdf

should work. To make sure that the right package is installed use the package manager tlmgr¹

tlmgr install clearsans

  1. Maybe you need to use sudo, depending on your installation