LaTeX 2021

I still need to produce typeset documents on occasion, some of which contain Japanese text. Markdown → Pandoc → LaTeX → pdf is probably the most hassle free way for me, but it's always been something of a moving target. This is how I set things up in 2021, as a note to my future self.

TeX distribution

On MacOS, I use TinyTeX. I installed it, non-root, with the provided shell script.

curl -sL "" | sh

CJK font

I was able to render Japanese font after installing the following two packages. I had to be root for this.

sudo tlmgr install xecjk
sudo tlmgr install ctex


I use Pandoc to turn markdown into a pdf. I installed it via Homebrew like any other package. I rendered with the following command.

pandoc -V papersize:a4 -V CJKmainfont="YuMincho Medium" -V geometry:margin=0.5in -t latex --pdf-engine=xelatex -o cv.pdf %

where % is the markdown file.

Until next time.