Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

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

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

2 Answers

up vote 6 down vote accepted

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.)

Toolbar image

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:

enter image description here

share|improve this answer
add comment

Can't you simply use a backslash? \_

share|improve this answer
    
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
    
Thanks for the clarification. –  Mico Sep 1 '11 at 5:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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