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

In the front end of v9, in any given cell that contains content, if I hit backspace to clear the content until there is nothing left, and then hit backspace one more time, the cell becomes a 'section'.

Is this a new feature? How do I use it?

Edit

Would someone verify this effect in the comments?

share|improve this question
    
What is the style of the "any given cell"? Does it happen in a regular Input cell? I can see that happening in SubSection –  Rojo Jan 25 '13 at 2:50
    
"any given cell" is a regular Input cell (one where I run expressions). –  QuantumDot Jan 25 '13 at 2:59
1  
Then that shouldn't happen. The cell option that controls this is StyleKeyMapping. Try evaluating CurrentValue[StyleKeyMapping] and see what comes out –  Rojo Jan 25 '13 at 3:01
    
@Rojo and @kguler, After running CurrentValue[StyleKeyMapping], I get {"=" -> "WolframAlphaShort"}. –  QuantumDot Jan 25 '13 at 3:16
1  
@QuantumDot, that is the key mapping for Input cells (which happens to be the setting for DefaultNewCellStyle); it means "typing = in the beggining of a new cell" changes the style of the cell from Input to WolframAlphaShort –  kguler Jan 25 '13 at 3:24

1 Answer 1

up vote 11 down vote accepted

In Version 9, in cells with Title, Subtitle, Subsubtitle or Section, Subsection, Subsubsection, ..., Subsubsubsubsection (perhaps others) style, Backspace in the beginning of the cell changes the cell style to the style of the next level up the hierarchy (e.g., Subsubsection > Subsection > Section). Similarly, Tab changes the style of the cell to that of the lower level; e.g., Section > Subsection > Subsubsection > ...

StyleKeyMapping suboption in the style definitions controls the behaviour in response to Backspace and Tab

  somestyles ={"Title", "Subtitle", "Subsubtitle",   "Section", "Subsection", "Subsubsection",
  "Subsubsubsection",   "Subsubsubsubsection"}; 
  Grid[ Prepend[{Style[#,#], Column[CurrentValue[{StyleDefinitions, #, StyleKeyMapping}], 
        Center]} & /@ somestyles, 
   Style[#, Bold, 16] & /@ {"Style", "StyleKeymapping"}], Dividers -> All]

enter image description here

share|improve this answer
3  
Very helpful! Unfortunately, I find this highly annoying. Is there any way to turn this feature completely off, for all notebooks, for both my computers? –  QuantumDot Jan 25 '13 at 4:42
3  
The style definitions for Title, Section etc. are in the file Default.nb. Although you can replace the appropriate lines in that file with StyleKeyMapping->{}, I would not recommend any tempering with the installation files. Instead, you can define your custom style along the lines used in these related Q/As: How can I style ... and Quickly editing the stylesheet and saving it –  kguler Jan 25 '13 at 4:57
    
I'm fascinated that a Tab in an empty subsubsection produces a subsubsubsection. I verified that it really does (the toolbar Style popup goes blank because it has no such menu item). But what the heck is a subsubsubsection? –  m_goldberg Jan 25 '13 at 6:06
    
@m_goldberg try another tab –  Rojo Jan 25 '13 at 6:22
1  
@Rojo. I tried again and got Subsubsubsubsection. I guess I can't count beyond three in the wee hours of the morning. –  m_goldberg Jan 25 '13 at 16:00

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.