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.
1 Answer
There are two ways you can control this behaviour in TeXShop: permanently or temporarily.
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.)
If you unclick the checkbox, you can turn off all automatic substitutions temporarily.
Permanently
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:
\_
_{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._{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.