auctex
[Top][All Lists]

## Re: [AUCTeX] Three new user questions

 From: Ista Zahn Subject: Re: [AUCTeX] Three new user questions Date: Sat, 21 Jun 2008 21:19:45 -0400

oops, I meant to send this to the list. Sorry Ralf!
On Jun 21, 2008, at 8:43 PM, Ista Zahn wrote:


Thank you very much for your reply!

On Jun 21, 2008, at 5:18 PM, Ralf Angeli wrote:


* Ista Zahn (2008-06-21) writes:


1) Can I get AUCTEX to recognize macros from loaded packages? For

example, if I use \usepackage{hyperref} can I get AUCTEX to color the \href command the same way it does a regular \ref command? If so, how?


Assuming you have parsing enabled as described on the first page of the
AUCTeX manual, you can get AUCTeX from CVS which has support for
hyperref ... since, uh, 5 minutes.

Thanks, but I was just using hyperref as an example. What I would really like is for the editor to recognize which packages are loaded and recognize macros from all loaded packages. I realize of course that this may not be possible...



2) Can I get RefTEX to recognize custom cite commands when I load a
package like apacite? In other words, I'd like something like the
built-in jurabib citation style, with the prompts for which macro to
enter, but instead of the jurabib ones I want the apacite ones.


RefTeX does not provide support for apacite as for natbib or jurabib
yet.  But you can define your macros by customizing the variable
reftex-cite-format'.  See (info "(reftex)Citation Styles") and
(info "(reftex)Options (Creating Citations)").

Yes, I've looked at the documentation, but I don't understand what I need to do. I've been using emacs for about 12 hours...



3) I use Sweave a lot, and I want to be able to run Sweave (I have a shell script for this) on foo.Rnw, then latex on foo.tex. The problem is that if I ask the Sweave script to run latex it tries to run latex on foo.Rnw instead of foo.tex. Does anyone know how to make this work
properly?



How do you call the Sweave script? Did you add "nw", "Rnw" and "Snw" to
TeX-file-extensions' and reftex-file-extensions'?


I think aquamacs emacs is set up this way by default. I didn't add anything, but the editor seems to recognize .Rnw files and loads AUCTEX and RefTEX automatically.


Frankly I don't have much experience with how AUCTeX has to be set up

for Sweave. The above I picked up from some discussions on this list.
But since there are some Sweave users who also use AUCTeX perhaps you
get some information by searching the archives of the Sweave mailing

lists or asking there. Unless some Sweave user lurks on this list and
shares her or his wisdom.


Thanks for the tip, I'll ask this question in a more appropriate forum. On the other hand I'm worried that I'll simply be told to ask on an emacs mailing list because the question is really an AUCTEX question. Basically, I want the typesetting command to refer to foo.tex even though I'm calling it from a buffer named foo.Rnw.
--
Ralf





`