Skip to content

Instantly share code, notes, and snippets.

@lizijian
Last active April 21, 2016 11:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizijian/7857854 to your computer and use it in GitHub Desktop.
Save lizijian/7857854 to your computer and use it in GitHub Desktop.
Emacs org-mode export to pdf(chinese characters)
;; sudo apt-get install texlive texlive-xetex texlive-latex-extra
;; sudo apt-get install latex-cjk-all
;; add to org header
;; #+LATEX_HEADER: \usepackage{xeCJK}
;; #+LATEX_HEADER: \setCJKmainfont{SimSun}
;; or
;; #+LATEX_HEADER: \usepackage{ctex}
;; org-mode < 8.0
(setq org-latex-to-pdf-process '("xelatex -interaction nonstopmode %f"
"xelatex -interaction nonstopmode %f"))
(setf org-export-latex-default-packages-alist
(remove '("AUTO" "inputenc" t) org-export-latex-default-packages-alist))
;; org-mode 8.0
;; (setq org-latex-pdf-process '("xelatex -interaction nonstopmode %f"
;; "xelatex -interaction nonstopmode %f"))
;; export cn character
;; (setf org-latex-default-packages-alist
;; (remove '("AUTO" "inputenc" t) org-latex-default-packages-alist))
@autosquid
Copy link

cross reference is not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment