0x01. issue: C-c C-e lp导出pdf中文乱码
org-mode pdf wasn't produced
0x02. 安装LaTeX
sudo apt-get install texlive-full
➜ ~ sudo apt-get install texmaker
0x03. 安装字库
将C:/windows/fonts下你喜欢的字体拷贝到~/.fonts(我拷贝的是常用的六种中文字体simsun.ttc 和sim开头的.ttf)
注销一下.
0x04. 配置emacs
;; org-mode 8.0
(setq org-latex-pdf-process '("xelatex -interaction nonstopmode %f"
"xelatex -interaction nonstopmode %f"))
0x05. 修改需要导出的org文件
在文件头中放入下面的配置,就是配置上面copy的字库信息.
#+LATEX_HEADER: \usepackage{xeCJK}
#+LATEX_HEADER: \setCJKmainfont{SimSun}
这个时候依然会有报错,但是实际上生成的pdf已经没有乱码了.
Package lmenu is obsolete!
Package sregex is obsolete!
preceding-sexp: End of file during parsing
org-babel-exp process Emacs-lisp at position 472...
Saving file /home/iamcxl369/pi/md/org-mode/test.tex...
Wrote /home/iamcxl369/pi/md/org-mode/test.tex
Processing LaTeX file test.tex...
PDF file produced with errors.