auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] adding C-c C-f C-p shortcut for \textipa


From: Roger Levy
Subject: Re: [AUCTeX] adding C-c C-f C-p shortcut for \textipa
Date: Tue, 22 Jan 2008 12:05:24 -0800
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

Ralf Angeli wrote:
* Roger Levy (2008-01-22) writes:

I am a linguist who uses AucTeX and I would like to add a key binding
for C-c C-f C-p that behaves exactly like other C-c C-f * commands
(e.g., C-c C-f C-e for \emph), but introduces the textfont \textipa
(from the tipa package, for the International Phonetic Alphabet). How
would I do this? It looks to me like I need to customize TeX-font-list but I'm not sure the best way to do it (I'd prefer to doing this in my .emacs file directly to using Emacs customization menus).

This is surprising because 1) the customization interface is supposed to
provide an easy way of customizing variable for people not fluent in
Lisp (but not limited to them) and 2) the changes _are_ directly written
to the init file.

So you could do
M-x customize-variable <RET> LaTeX-font-list <RET>
(assuming you are going to use \textipa in LaTeX mode), change the
value, save it and be done.

OK -- I have done this and it seems to work after saving and restarting emacs. Thanks a lot (though it took me a while to figure out that I could only insert ^P as a character with the sequence C-q C-p)!


If you really want to manually put some code which you might not
understand into your init file, then use something like the following
(not tested):

(add-to-list 'LaTeX-font-list '(?\C-p "\\textipa{" "}"))

My justification for wanting to put it into my .emacs file is so that I can more easily make the same change to multiple machines. I generally feel comfortable enough with Emacs lisp to understand simple code snippets and make my own changes, but not fluent enough to come up with my own novel snippets for this kind of customization.

At any rate, the snippet above doesn't turn out to work (I'm guessing that emacs doesn't know about LaTeX-font-list until a LaTeX document has actually been opened?), so I'll stick with the user-friendly customization for now.

[this is also posted on gnu.emacs.help]

Simultaneous multi-posting is usually considered bad practice.  It often
leads to redundant support work and answers since people from one list
might not see what people from the other list have answered.

OK, I consider myself duly scolded. I only committed this error in this case because I had already posted the question to gnu.emacs.help when I realized that the AUCTeX mailing list is really probably the better forum. I've posted a new message on the gnu.emacs.help thread directing people not to respond.

Thanks very much for the help!

Best

Roger


--

Roger Levy                      Email: address@hidden
Assistant Professor             Phone: 858-534-7219
Department of Linguistics       Fax:   858-534-4789
UC San Diego                    Web:   http://ling.ucsd.edu/~rlevy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]