[英]How to use Auctex + preview-latex + orgmode in emacs
I use Emacs orgmode exclusively. 我仅使用Emacs orgmode。 I installed auctex from Melpa.
我从Melpa安装了auctex。 My understanding is that
preview-latex
is packaged with auctex with no special setup required. 我的理解是,
preview-latex
与auctex打包在一起,不需要特殊的设置。
preview-latex
on any inline latex equations preview-latex
What am I doing wrong here? 我在这里做错了什么?
Thank you 谢谢
You are not doing anything wrong: org-mode
has its own latex preview mechanism and does not use (indeed, cannot use) preview-latex
. 您没有做错任何事情:
org-mode
具有自己的乳胶预览机制,并且不使用(实际上,不能使用) preview-latex
。 There was talk a long time ago on the ML about integrating preview-latex
into org-mode
, but it has never been done. 很久以前,关于ML的讨论是关于将
preview-latex
集成到org-mode
,但从未完成。
The best method I found to preview latex in orgmode is: 我发现在orgmode中预览乳胶的最佳方法是:
sudo apt-get install dvipng
Cc Cx Cl
Equation goes from this: 等式由此得出:
$$\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d} = \frac{product\ of\ numerators}{product\ of\ denominators}$$
Use Cc Cc
to revert. 使用
Cc Cc
还原。
I do have Auctex installed (though I don't think dvipng
uses it at all. And in my emacs init
file I have: 我确实安装了Auctex(尽管我不认为
dvipng
使用它。在我的emacs init
文件中,我有:
* AucTex: Require AucTex
(require 'tex-site')
* LaTeX: Enable LaTeX Math mode by default
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
This is very sweet! 真是太好了!
make sure dvipng dvisvgm installed correctly 确保正确安装了dvipng dvisvgm
(executable-find "dvipng")
(executable-find "dvisvgm")
then add 然后加
(setq org-latex-compiler "xelatex")
to your init.el 到您的init.el
to make default latex compiler as xelatex 将默认的乳胶编译器设置为xelatex
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.