[OS X TeX] Two question regarding CarbonEmacs
Peter_Dyballa at Web.DE
Sun Nov 28 19:53:53 EST 2004
Am 26.11.2004 um 16:50 schrieb Martin Buchmann:
> Hi all,
> has anyone tried to installed the preview-latex package  with
> CarbonEmacs? I installed with Xemacs under X11 but it would be much
> nicer to have it as a Macintosh application. I just don't know to
> install the sourceforge package, i.e. running configure doesn't find
> or accept he CarbonEmacs.
When you're using Enrico Franconi's Enhanced Carbon Emacs (v.
nothing's needed -- except:
* A working LaTeX installation
* A recent GhostScript
* The `texinfo' package
You can find this all in Gerben Wierda's i-Packages, even dvipng is
there, the utility that generates the graphics that can be displayed in
Emacs. This copy (Emacs) from
http://www.webweavertech.com/ovidiu/emacs.html and this one (Carbon
Emacs) from http://mindlube.com/products/emacs/index.html both need
everything: the three things above +
* A working AUCTeX installation (http://www.gnu.org/software/auctex/)
I think this missing piece is best installed via Fink.
Enrico Franconi has made two mistakes: these files
belong into /Applications/Emacs.app/Contents/Resources/info/ and the
file /Applications/Emacs.app/Contents/Resources/info/dir needs this
line added as line #51
* preview-latex: (preview-latex). To preview LaTeX constructs
and this addition at the end:
* preview-latex: (preview-latex). A preview mode for GNU Emacs
(Maybe he didn't really install preview-latex, he just made it.)
Actually this is kind of cosmetics is needed to enable you to study the
infos on preview-latex.
Reftex's version is quite recent 4.21, but preview-latex is 0.7.3. So I
tried an update. In Terminal.
1. A directory in which to make preview-latex: 'mkdir -p
2. Go there: 'cd ~/Library/texmf/src' or 'pushd ~/Library/texmf/src'
3. Unpack the archive: 'tar zxvf '<and now drag and drop the archive
preview-latex-0.8.1.tar.gz from Finder into the Terminal> and finish
4. You've seen what's in the package, go now into its source directory:
'cd preview-latex-0.8.1' or 'pushd preview-latex-0.8.1'
5. Now comes a delicate step: configuration. './configure --help' shows
what options are possible, but you have to make a reasonable choice and
set reasonable values. './configure --prefix=/usr/local/teTeX
--with-emacs=/sw/bin/emacs' would be a good choice, but for Enhanced
Carbon Emacs we need a different approach. configure's helpful output
shows the importance of PREFIX and EPREFIX, but we have to put the TeX
related files somewhere onto the /usr/local/teTeX/share/texmf.local
tree and Emacs Lisp related somewhere into the /Applications/"Enhanced
Carbon Emacs".app/Contents/Resources tree. I thought this could be
fine: './configure --with-texmf-dir=/usr/local/teTeX/share/texmf.local
preview' ... but one of the configuration statements was this:
-eval '(let* ((x (unless (and (boundp '\''image-types) image-types)
(error "This Emacs does not support images"))))
(write-region (if (stringp x) (princ x '\''ignore) (prin1-to-string x))
It led to this printing on the Terminal: configure: error: "You need an
Emacs that supports images"
So finally: Enrico Franconi's Enhanced Carbon Emacs is *not* usable for
preview-latex! (But it's very useful to copy settings, .el files, learn
about efficient modes and .el files!)
The other carbonized Emacsen have reftex but no auctex or
preview-latex. And they have no shell script by the name of "emacs".
Enrico Franconi's script is that simple:
> ### Launch mac-emacs from shell
> /Applications/Emacs.app/Contents/MacOS/Emacs "$@"
After you've created this file invoke in Terminal 'chmod 755
And they don't have auctex. I don't whether it's important to install
AUCTeX for the specific Emacs version -- I just created sym(bolic)
links to that auctex that was installed via Fink:
ln -s /sw/share/emacs21/site-lisp/auctex
OK! So we can continue with the next step ouf our process(ion)!
6. Successfully configuered you can make the package: 'make'.
7. Now do the installation: 'sudo make -k install'.
8. One step by hand is needed (IMO): 'cp preview-latex.el
9. Start Emacs.app and create a site-start.el file in
/Applications/Emacs.app/Contents/Resources/site-lisp with about that
(unless (boundp 'preview-latex)
< again here fits in the site-start.el from Enrico Franconi's Enhanced
Carbon Emacs >
;;; Carbon emacs does not handle inline images ???
(autoload 'LaTeX-preview-setup "preview")
(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup)
10. Enrico Franconi enhanced his version with many extras. So you'll
have to remove or comment a lot of lines of his site-start.el. You
could simplify some of his statements:
> (defvar pdf-previewer-program "texdoc" "PDF previewer")
> (defvar ps-previewer-program "texdoc" "PS previewer")
> (defvar dvi-previewer-program "texdoc" "DVI previewer")
and edit TeX-macro-global to this
> ;; Directories containing the sites TeX macro files and style files
> (setq TeX-macro-global '("/usr/local/teTeX/share/texmf.local/tex/"
You should create a ~/.MacOSX/environment.plist file. See
http://developer.apple.com/qa/qa2001/qa1255.html. Then these lines in
site-start.el (somewhere at the beginning) would work correctly.
(concat (getenv "INFOPATH")
preview-latex starts a bit slow. Sometimes you might need to invoke the
previewing more than once.
> My next issue is similar. I'm using a literate programming tool called
> noweb  for which an emacs mode exists but i don't know how to
> install it.
This needs a C compiler. It works better with Icon
You know how to unpack an archive and how to go to the src.
Without Icon uncomment the lines #10 #11 with a'#'. Set CFLAGS to
'-DTEMPNAM' because Mac OS X 10.3.6 at least has tempnam(3). These
settings will help:
'sudo make -k install'
;; Put this into your ~/.emacs to use this mode automagically.
;; (autoload 'noweb-mode "noweb-mode" "Editing noweb files." t)
;; (setq auto-mode-alist (append (list (cons "\\.nw$" 'noweb-mode))
For me it works ...
"Let's face it; we don't want a free market economy either."
James Farley, president, Coca-Cola Export Corp., 1959
--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX