|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
AutoIndent
AutoIndent
is an option for Style and Cell that specifies what automatic indentation should be done at the beginning of a new line after an explicit return character has been entered.
DetailsDetails
- Possible settings for AutoIndent are:
-
False do no indentation True indent the same as the previous line Automatic indent according to the structure of the expression (default) - With AutoIndent->True, tabs or spaces used for indentation on the previous line are explicitly inserted at the beginning of the new line.
- With AutoIndent->Automatic, line breaks are always indicated by an \[IndentingNewLine] character even if they were originally entered using
or \[NewLine]. - Indentation after an \[IndentingNewLine] is automatically redone every time an expression is displayed.
- The amount of indentation after an \[IndentingNewLine] is determined by the settings for the LineIndent and LineIndentMaxFraction options.
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
Create a cell with AutoIndent->True:
| In[1]:= |
Type some spaces at the beginning of a line:
When you press the
key, Mathematica inserts the same indentation in the next line:
Create a cell with AutoIndent->Automatic:
| In[1]:= |
Every time you press
in this cell, Mathematica indents according to expression structure:
As you edit the cell further, the structural indentation shifts appropriately:
New in 3 | Last modified in 4
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
