Can we set some parameters to increase the indentation?

Hello, everybody! I am a beginner to Mathematica. When I write looping construct codes in the Notebook of Mathematica. I want to use the Python style. When I press Enter after an uncompleted function to start a new line, I found there is about a character size indentation. But I feel a character size indentation is not enough. Are th


some parameters in Mathematica need to be set to modify this indentation? How to set it?

In the menu 'Windows/Toolbar" activate the Ruler. You can adjust indention by cell type.

Thank you for your reply! But I can only adjust the total indention of the cell. Would you like to tell me how to make it like the Python indention style when I start a new line?

There is a LineIndent option. You can set it via the option inspector or you can set it via stylesheets.

Try using the Tabs key to indent a new line

Thank you very very much! You give the right way. It is just what I want.

Thank you very very much! You give me the right way!

Hi Q,

If you are new to the Wolfram Language (WL) I suggest you try not to use “Python style” to write WL code. Rather than transcribing procedural Python code to WL, use a functional approach instead. Here is a functional implementation

f[x_] := x - Exp[-x];
x0 = 0.5;
ϵ = 1.*10^-8;

NestWhileList[(# - f[#]/f'[#]) &, x0, ϵ < Abs[#1 - #2] &, 2]

Thank you very much! A good advice!I will try my best to learn the functional approach. It is the Wolfram Language (WL) way, the elegant style.