org-mode 的设置(仅仅是一个笔记保存)

Fuping posted @ 2014年6月02日 00:10 in 未分类 with tags org-mode latex , 2358 阅读

从vim转到emacs的主要原因是org-mode, 写这篇笔记是记录下一些中文pdf设置

  1. 手动安装texlive导致emacs无法编译tex文件
  2. org-mode中文设置问题
  3. org-mode超链接出现的红方框

1.emacs调用auctex编译tex文件的默认与bashrc的路径是不一样的, 由于手动安装在不在emacs所能够调用的路径

因此我们应该重新添加emacs的路径。

setenv "PATH" (concat (getenv "PATH") ":/usr/local/texlive/2013/bin/x86_64-linux/"))
(setq exec-path (append exec-path '("/usr/local/texlive/2013/bin/x86_64-linux/")))

2.org-mode默认调用的是pdflatex, 因此需要重新设置编译引擎为xelatex

(setq org-latex-pdf-process '("xelatex -interaction nonstopmode %f"
                               "xelatex -interaction nonstopmode %f"))

还需在org文件添加

#+LATEX_HEADER: \usepackage{fontspec}
#+LATEX_HEADER: \setmainfont{你要用的中文字体}

3.当生成的pdf文件出现难看的红方框可以

在org文件添加

#+LaTeX_CLASS_OPTIONS: [colorlinks]
blog comments powered by Disqus