It failed to convert markdown to pdf file by pondoc on my CentOS8 server.
I installed all missing components about texlive.

yum install texlive*

But pandoc could’t find Chinese characters to generate complete PDF file.

/path/pandoc /path/ --pdf-engine=xelatex -o /path/yang.pdf

So I downloaded Chinese font file and install it.
You can find source file on some font website such as
Put the font file under path /usr/share/fonts.
You can create a new folder local under it, then copy your font file to the folder.
Finally, Update font list information, and you can find your font information by fc-list.

$ cp SourceHanSansCNLight.otf  /usr/share/fonts/local
$ fc-cache /usr/share/fonts/local
$ fc-list |grep SourceHan

Use new command line to generate PDF file:

/path/pandoc /path/ --pdf-engine=xelatex -o /path/yang.pdf -V mainfont='Source Han Sans CN'

It works!

Categories: ShellTool

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments

XOR Strings
: Input your strings, the tool can encrypt and decrypt them.

Would love your thoughts, please comment.x