Whenever I used an underscore it automatically adds those curly brackets to it. Now sometimes thats nice, but sometimes you really dont need this. Is there a way to disable that feature? I roamed through the options several times now but can't find the one regarding my problem.

migrated from stackoverflow.com Aug 31 '11 at 17:58

This question came from our site for professional and enthusiast programmers.

  • Though _{1} and _1 are equivalent, I believe it's best to stick to the braces. A well known counterexample is _\in which might surprise the beginner; writing _{\in} it won't break. – egreg Aug 31 '11 at 23:20
  • Actually, while some (like George Gratzer, in his book More Math into LaTeX) advocate the uniform use of braces to delimit materials in subscripts and superscripts, I find that it does decidedly not enhance the legibility of the LaTeX/TeX code that contains lots of expressions with sub- and superscripts. In fact, a thicket of _{t}, ^{n} etc terms, rather than the simpler _t and ^n terms, can make it harder to decipher the code. To improve legibility, it's far more important to leave adequate whitespace, to break up long lines judiciously, and to indent as appropriate. – Mico Sep 1 '11 at 4:01

There are two ways you can control this behaviour in TeXShop: permanently or temporarily.


At the top of each source window there should be a check box called Key Bindings. (If it's not there, you can add it by choosing the Customize Toolbar item from the Window Menu and dragging it to the toolbar.)

Toolbar image

If you unclick the checkbox, you can turn off all automatic substitutions temporarily.


If you want to change just the behaviour of the underscore or caret, you can permanently change them by choosing the Key Bindings menu item from the Source menu. This will give you the Key Bindings editor and you can change any key binding you like:

enter image description here


Can't you simply use a backslash? \_

  • I think the original question was about the use of the underscore character in math mode, where it serves to initiate subscript material. In text mode, of course, the use of a lone _ will trigger an error/warning message. – Mico Sep 1 '11 at 3:56
  • 1
    No, the question is actually about the behaviour of the TeXShop editor itself. – Alan Munn Sep 1 '11 at 4:24

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.