2

In Texshop there is a very useful tool. When I type _ or ^ in math mode, the braces appear automatically. Is there an analogous tool in Aquamacs?

  • Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – lockstep Jul 3 '13 at 7:39
  • This is certainly not an answer and barely a comment, but as an aside: you'll find that Aquamacs (which is based on / a fork of the unbelievably popular editor Emacs) can do literally anything you can think of, via the Emacs LISP language it is based upon. Some tools are built in, as you can see from giorano's answer, and some tools you can simply build yourself (or, of course, ask here or on SO). So yes, there is always an 'analogous tool.' :) – Sean Allred Jul 3 '13 at 15:31
3

In your Preferences.el file (the init file for Aquamacs) put this code

(setq TeX-electric-sub-and-superscript t)
  • AucTeX is magic. – Sean Allred Jul 3 '13 at 15:28
  • @SeanAllred yep, and next version will be even more magic: for example, it'll be easy to enter math mode $...$ or \(...\) by pressing $. You'll need to customize a single variable to do that. Until now, instead, people use electric-pair-mode or bind $ to a custom function. – giordano Jul 3 '13 at 15:34
  • This just in: AucTeX 11.87 and the infinite possibilities of authorized legilimency. – Sean Allred Jul 3 '13 at 16:10
  • Thanks, it works perfectly. Can you explain me how to use electric-pair-mode for math mode, please? – Francesco Jul 11 '13 at 14:38
  • @Fra I don't use it, so I cannot explain how exactly works. If I remember correctly you have to bind $ to self-insert-command, but I suggest you not to do so if you don't want to lose all AUCTeX features about $ insertion. – giordano Jul 11 '13 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.