Get pandoc to generate PDF with sans-serif font family

走远了吗. 提交于 2020-08-23 21:03:08

问题


I'm trying to use pandoc to generate a PDF from Markdown source. I'd like the output to use only sans-serif fonts. Input:

# Hello

This is a test.

Command line:

pandoc -o output.pdf input.md --variable=fontfamily:arev

I get a fine-looking PDF, but the text is serif. Output:

I tried many different command lines, but the font (family) never changes.

I'm using Ubuntu 14.04. I installed pandoc via apt-get.


回答1:


I had to install arev, bera and mathdesign fonts first, but your command worked fine for me:

For Ubuntu and TeXLive these fonts are located in the package texlive-fonts-extra

The version from the Ubuntu repositories is quite old, so better first go here and install the latest from the Debian package.



来源:https://stackoverflow.com/questions/37232597/get-pandoc-to-generate-pdf-with-sans-serif-font-family

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!