Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to group the 2 parts of the If statement and others like it by using () to help me be able to still understand what my code is doing the next day I look at it.

I started to use 2D math in input cells, and it is a nice feature of Mathematica.

But noticed that () changes size depending on what is inside them. So I end up with non-symmetrical (different size) parentheses within the same logical grouping. An example will help show this:

enter image description here

Notice how the top () are small compared to the lower (). The code will look better on the screen if the sizes of these () are kept the same. (either both large, or both small, is not important, as long as the size is the same)

This happens with With and any other such command.

I know the () are not needed. I just use them to make the code easy to read. When I have complicated logic, these help me see the parts more clearly.

Here is the actual code that generated the above converted to InputForm in order to paste it here

If[x == 1, x = 0, x = Sqrt[y^2] ]; 

Question is: Is there a way to control this aspect of the display in input cells for 2D math so that parentheses are the same even if using 2D math?

share|improve this question
up vote 6 down vote accepted

If you want the height of the () in StandardForm input cells to be fixed to one character tall, modify the "StandardForm" style in corresponding stylesheet would help:

Cell[StyleData["StandardForm"], SpanMaxSize->0]

Note this will affect all spanning characters such as parentheses, brackets, braces and etc. Please do search span in document center for more relevant options and details.

share|improve this answer

Your Answer


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.