mac上的auctex和emacs [英] auctex and emacs on mac

查看:129
本文介绍了mac上的auctex和emacs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要的是能够成功使用emacs和auctex。

What I'd like is to be able to use emacs and auctex successfully.

某些系统信息:

ProductName:    Mac OS X
ProductVersion: 10.8.5
BuildVersion:   12F45

Emacs
Version 24.3 (9.0)

AUCTeX-version is a variable defined in `tex-site.el'.
Its value is "11.87"

有两件事我试过了。首先,根据推荐,在emacs之间交互地安装auctex:

There's two things that I've tried. First, installing auctex interactively from within emacs as recommended:

M-x package-list-packages RET

表面上看起来似乎正常工作:

On the surface things seem to be working as expected:

\documentclass{article}
\bein{document}
Hello world 
\section{Here lies a section}
Hello people.
\end{doument}

您不能在代码中看到它,但在我的emacs屏幕上,语法高亮正在工作,而auctex图标是可见的。环境完成命令也可以预期工作(如填写\begin和\figure内容)。现在发出编译命令:

You can't see it in the code, but on my emacs screen the syntax highlighting is working, and the auctex icons are visible. Also environment completion commands work expected (like filling in \begin and \figure stuff). Now issuing the compile command:

C-c C-c

我收到以下消息:

LaTeX: problems after [0] pages

看源码有两个错误没有被拾取,此外似乎文档不是即使没有错误即使编译,也没有创建dvi或pdf或aux文件。也测试查看功能,没有任何反应。所以似乎没有配置正确。

looking at the source there is two mistakes that are not picked up, furthermore it seems like the document is not even compiled even if there are no mistakes, there is no dvi or pdf or aux files created. Also testing the viewing functional, nothing happens. So it seems like something isn't configured properly.

其次,没有卸载或删除auctex(我怀疑可能与某事有关,但我不确定我们稍后会看到)我发现这个网页: http://algorithmicalrandom.blogspot.com/2012/08/getting-auctex-working-on-mac-os-x.html 建议从源代码开始构建:

Second, without uninstalling or removing auctex (which I suspect could have to do with something but I'm not sure as we'll see later) I found the webpage: http://algorithmicallyrandom.blogspot.com/2012/08/getting-auctex-working-on-mac-os-x.html That recommends building from source:

*) ./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --disable-preview --with-lispdir=/Applications/Emacs.app/Contents/Resources/site-lisp/
*) make
*) sudo make install

然后将这些行添加到.emacs文件中

Then add these lines to your .emacs file

(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)

认为这个安装成功是我下载的源代码是11.87版本,这是我当前正在运行的auctex的版本。然而,同样的行为仍然存在,基本上没有一个编译或查看功能似乎正在运行。

Something that makes me think this installation was successful is the source I downloaded is for version 11.87 and thats the version of auctex that I'm currently running. However, the same behavior continues, basically none of the compiling or viewing functionality seems to be working.

另一件事,从阅读看来,似乎你也需要预览 - latex.el包,当它包含在我的.emacs文件中

Another thing, from reading around it seems like you also need the preview-latex.el package, when including it in my .emacs file

(load "preview-latex.el" nil t t)

我收到一个错误,所以我很确定该包没有正确安装。所以我的问题主要是我在这里缺少什么?如何一起成功运行emacs和auctex(也可能是preview-latex.el包)?

I get an error so I'm pretty sure that package isn't installed properly. So my question is mainly, what am I missing here? How can I successfully run emacs and auctex (and maybe the preview-latex.el package also) together?

也许这包括完全删除auctex并再次安装。当我以交互方式安装它时,如何删除一个emacs包(尝试一个)?当我从源代码安装它时,如何删除emacs软件包(尝试两个)?

Maybe this includes removing auctex completely and installing it again. How do I remove an emacs package when I installed it interactively (try one)? How do I remove the emacs package when I installed it from source (try two)?

还有可能我没有安装ghost脚本,但我不确定如何检查。

Also its possible that I haven't installed ghost script but I'm not sure how to check.

男人,我知道这很多,我试图提供所需的任何信息。

Man, I know this is a lot, I'm trying to provide any information that is required. If you've waded through this and can help me I'd be so grateful.

推荐答案

@lawlist的评论帮助了我

A comment from @lawlist helped me:


您的 $ PATH 中是否有texbin?如果没有,您可以在
中添加$ code $ .emacs 或 init.el file:

Do you have texbin in your $PATH? If not, you could add this inside your .emacs or init.el file:

(setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))


这篇关于mac上的auctex和emacs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆