[OS X TeX] Aquamacs, AucTeX, and preview-latex
Peter Dyballa
Peter_Dyballa at Web.DE
Sun Nov 27 22:37:11 CET 2005
Am 27.11.2005 um 18:45 schrieb Cameron Hooper:
> Really? Aquamacs help (Aquamacs for Emacs Veterans -> Latex Support)
> says to install the AucTeX package maintained by Norm Gall at
> http://yaced.sourceforge.net. Before I did this, visiting a .tex file
> loaded tex-mode, not auctex.
The Help is probably elder then the ELisp code. Look here:
/Applications/Aquamacs
Emacs.app/Contents/Resources/site-lisp/edit-modes/preview/
You make AUCTeX take regime over all TeX files you need to enable it:
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'LaTeX-mode-hook '(lambda () (TeX-fold-mode 1)))
and again you need to load a bit: (require 'tex-site). And here can be
one problem: I think this file needs so customisation for its locality.
>
>> You not only need to activate preview-latex by loading the ELisp
>> file, you too need to add the path to the preview-latex files:
>>
>> (add-to-list 'load-path "/Library/Application Support/Emacs/preview")
>
> I assumed Aquamacs did this automatically as it explicitly says auctex
> should be installed at this location. Anyway I added the following
>
> (add-to-list 'load-path "/Library/Application
> Support/Emacs/site-lisp/preview")
>
> but nothing changed. So I then tried
>
> (add-to-list 'load-path "/Library/Application
> Support/Emacs/site-lisp/site-start.d")
>
> Again no change.
I don't know what might be going wrong. I hope you did the installation
of AUCTeX and preview-latex according to the documentation and let make
do it ... You can put into site-start.el or .emacs or into *scratch*
with eval-region when you need it this little bit of code:
(defadvice load (before debug-log activate)
(message "(Tipp von Kai G):Loading now: %s" (ad-get-arg 0)))
This will record in *Messages* which files get loaded. For me, when I
first load a TeX source, this gets recorded:
/Library/Application Support/Emacs/site-start.el
(Tipp von Kai G):Lade jetzt: preview-latex.el
preview-latex wird geladen
...
(Tipp von Kai G):Lade jetzt:
/Applications/Emacs.app/Contents/Resources/site-lisp/site-start.d/
auctex.el
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/site-start.d/
auctex.el (source)...
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/tex-site.el
(source)...done
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/site-start.d/
auctex.el (source)...done
...
(Tipp von Kai G):Lade jetzt:
/Applications/EmacsJCVS.app/Contents/Resources/site-lisp/site-start.d/
preview-latex.el
Loading
/Applications/EmacsJCVS.app/Contents/Resources/site-lisp/site-start.d/
preview-latex.el (source)...done
Loading
/Applications/EmacsJCVS.app/Contents/Resources/share/emacs/22.0.50/
site-lisp/site-start.el (source)...done
(Tipp von Kai G):Lade jetzt: preview-latex
Loading preview-latex (source)...
preview-latex wird geladen
Loading preview-latex (source)...done
...
Loading latex...
Loading edmacro...done
Loading easy-mmode...done
Loading latex...done
Loading font-latex...
Loading bytecomp...done
Loading font-latex...done
Applying style hooks...
(Tipp von Kai G):Lade jetzt: /Users/pete/..../auto/AUC.el
Loading /Users/pete/..../auto/AUC.el (source)...done
(Tipp von Kai G):Lade jetzt:
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
graphicx.elc
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
graphicx.elc...done
Loading tex-buf...done
(Tipp von Kai G):Lade jetzt:
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
babel.elc
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
babel.elc...done
(Tipp von Kai G):Lade jetzt:
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
ngerman.elc
Loading
/Applications/Emacs.app/Contents/Resources/site-lisp/auctex/style/
ngerman.elc...done
Loading ispell...done
Starting new Ispell process...
Applying style hooks... done
Sorting environment...
Removing duplicates... done
Loading tex-fold...done
Loading reftex...done
Loading reftex-auc...done
Loading reftex-dcr...done
Automatic display of crossref information was turned on
Loading preview...
Loading byte-opt...done
Loading preview...done
Applying style hooks... done
You see that it isn't 'my' installation that gets used ...
>
> The only files in /Library/Application Support/Emacs were added by
> auctex installer. I went ahead and deleted them but kept the load
> statement in .emacs. On startup emacs complained that it couldn't open
> load file preview-latex.el. So I deleted the (load "preview-latex.el"
> nil t t) line from .emacs. Now emacs starts but auctex is not loaded.
As mentioned above AUCTeX needs the (require 'tex-site) first and then
the statements to make it take over over elder ELisp software. Upon
correct installation these files and directories will appear in the
install directory:
drwxr-xr-x 6 root admin 204 29 Sep 20:44 preview
-rw-r--r-- 1 root admin 324 29 Sep 20:44 auctex.el
drwxr-xr-x 43 root admin 1462 29 Sep 20:44 auctex
-rw-r--r-- 1 root admin 12421 29 Sep 20:44 tex-site.el
For my Emacsen I added this code make them be aware of all new places:
(setq load-path
(mapcar 'expand-file-name
(append '(
"/Library/Application Support/Emacs"
"/Library/Application Support/Emacs/reftex"
"/Library/Application Support/Emacs/auctex"
"/Library/Application Support/Emacs/auctex/images"
"/Library/Application Support/Emacs/preview")
load-path)))
Can you describe how you installed AUCTeX and preview-latex and which
versions they are? There are also TeX files that are being installed
into the TeX installation (the preview package, as available from CTAN.
>
> Finally I decided to ignore the Help's suggested save location and
> installed to ~/Emacs, the place I normally add emacs packages and
> deleted the earlier installation. I rearranged the installed files,
> turned around 3 times, spat, added ~/Emacs/site-start.d to my load
> path and loaded auctex.el and preview.el.
What you're describing here is something that you added to your
Emacsen's start-up code. Maybe the other code never got into Emacs. You
can check success of additions to load-path by checking the value of
load-path in Emacs (C-h v load-path <RET>) ...
--
Greetings
Pete
"What is this talk of 'release'? Klingons do not make software
'releases'. Our software 'escapes' leaving a bloody trail of
designers and quality assurance people in its wake."
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the macostex-archives
mailing list