Unable to produce PDF document with Korean characters.

I am trying to produce a report listing names. Some of the names are in Chinese, Japanese, and Korean language. I am using xelatex engine. I cannot produce the names in Korean from RStudio if I render them in PDF. However, the names appear fine when knitting to DOC and HTML format.

While searching for a solution, I came across the post at http://yufree.github.io/blog/2014/07/21/rmd-to-pdf.html and https://github.com/yufree/democode/tree/master/cjk.

I followed thru with the suggestion and tried to use the example Korean.rmd (on Git), but I failed to make it work. I am not getting any warnings or errors in the RStudio render console.

*/usr/local/bin/pandoc +RTS -K512m -RTS Kr.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Kr.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine xelatex --variable graphics --include-in-header /var/folders/l9/z4zg58wj35z_s0pxd9fnrgn00000gn/T//Rtmp7inWDf/rmarkdown-str24875729cdae.html --variable 'geometry:margin=1in' *

processing file: Kr.Rmd
output file: Kr.knit.md

Output created: Kr.pdf

The resulting Kr.pdf does not show the Korean text when loaded in Acrobat DC. However, the TOC shows the heading in Korean fine. What am I doing wrong? Please note I am not familiar with LaTex and Pandoc.

Following info is returned by RStudio sessionInfo() call.

R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.2.1

I have a similar setup on a Windows computer which also exhibits the same PDF rendering problem.

Any help or link to resources will be much appreciated.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.