Adjusting size and positioning of math notation in a Mathematica notebook?

6

2

Writing mathematics in a notebook is OK, but consider the following image:

enter image description here

In LaTeX, I can write:

$$y^2=\frac{1+2\sin^{-1}x}{2}$$

which displays as: $$y^2=\frac{1+2\sin^{-1}x}{2}$$

As you can see, the fraction is much larger and more readable. Is there a Mathematica command that will enlarge my fraction to match the LaTeX display style?

David

Posted 2014-12-10T06:40:33.413

Reputation: 14 143

Question was closed 2014-12-10T21:09:47.820

I just do not understand what we are speaking about. I tried to reproduce the behavior in Mma 10.0, Win7 within the Default and JournalArticle StyleSheets in the EquationNumbered cells and do not see the font size reduction, at least, by eye. Could you specify, what type of StyleSheet/Cell do you have in mind? – Alexei Boulbitch – 2014-12-10T08:30:25.733

@AlexeiBoulbitch: You can download the notebook here.

– David – 2014-12-10T16:51:04.043

I think there's something theoretically wrong in marking a question the duplicate of another question that itself is a duplicate of a third question. There ought to be some transitive law that says this is a duplicate of the earlier question. – Michael E2 – 2014-12-11T12:34:02.580

Answers

11

There are a few ways to do this. The easiest is probably the switch off the script level changes that are taking place by selecting the cell bracket and setting AllowScriptLevelChange->False in the options inspector:

enter image description here

For more subtle tweeking you need to leave AllowScriptLevelChange->True and adjust ScriptSizeMultipliers. For example with ScriptSizeMultipliers->{1.0} gives the same result since the multiplier is 1. By default you'll notice that the value is set to 0.71. So you can adjust the sizes to suite your needs by adjusting that value.

These adjustments can be made by selecting the cell and going to the Options Inspector. When you find settings that you want to use regularly it is probably best to incorporate these options into a cell style and create your own stylesheet.

Mike Honeychurch

Posted 2014-12-10T06:40:33.413

Reputation: 36 211

Thank you, it is very interesting. I have, however, two questions. First I formulated to David, the OP. Please have a look, am I wrong? Second, do you think it might be an alternative to make Shift+Ctrl+E and include the option into the cell code? – Alexei Boulbitch – 2014-12-10T08:32:52.297

@AlexeiBoulbitch 1. the OP does not state what stylesheet is being used and what type of cell the pic is taken from. I have made no assumptions. 2. If a user is inexperienced I do not recommend Shift+Ctrl+E. It is much safer to use the option inspector. – Mike Honeychurch – 2014-12-10T08:44:57.677

Yes, Mike, but I am a bit experienced. I just made few trials and see, for example, that ScriptSizeMultipliers->{1.0} is easy to add as the option to the whole CellBoxData, and it will give rise to the full size of both fractions and exponents, while addition AllowScriptLevelChange->False by OptionsInspector places it as the FractionBoxOptions for the outer FractionBox. It then only gives the full size of fractions, but not of exponents. – Alexei Boulbitch – 2014-12-10T09:15:45.743

To mimic TeX for displayed formulas, you need something like {ScriptSizeMultipliers -> {1., 0.7, 0.7, 1.}} as the BaseStyle of FractionBoxOptions of the formula cell. And maybe ScriptSizeMultipliers -> {0.7, 0.7, 1.} under "Display Options". But TeX, which is meant for printing, gets a bit too small for a computer screen, I think. – Michael E2 – 2014-12-10T15:17:05.913

Perhaps the best way would be a to create a "Display math" style with these options set and put these equations in their own cell (of this type)? – Szabolcs – 2014-12-10T16:32:09.773

@MichaelE2 I'm not familiar with TeX sizes actually -- all typesetting I have done previously was in Mma. My answer is based solely on the pics in the OP – Mike Honeychurch – 2014-12-10T20:32:26.977

@Michael E2 Michael, it is extremely interesting. I have, however, two questions and one proposal. First, it would be very instructive to understand, what properties are controlled by which figure here {ScriptSizeMultipliers -> {1., 0.7, 0.7, 1.}}? I tried to play with it, and only was able to find that the first, 1.controls the site of the secondary fraction and exponent, and the second figure, e.g., 0.7controls the offset of the denominator of the secondary fraction. So could you give a hint of the role of the others? Second, I tried to fix the ScriptSizeMultipliers – Alexei Boulbitch – 2014-12-11T09:06:07.023

@Michael E2 continuation: option with the OptionInspector, but failed. The OptionInspector does not react on my trial to introduce the change, and immideately switches back to the {0.71}that stayed there initially. So, please tell, if you have another experience. Third, I propose that though a good answer has already been done and accepted, you and @Szabolcs give your versions as the answers, rather than comments. It is because the information is very important. – Alexei Boulbitch – 2014-12-11T09:14:59.980

@AlexeiBoulbitch as I indicated in the final paragraph of my answer, the stuff can be incorporated into the StyleData for a cell. I didn't add that information because there has already been plenty of posts on that. And in fact this very post is a duplicate as well. Probably what is needed is a Wolfram typesetting tutorial that goes into a lot of detail – Mike Honeychurch – 2014-12-11T09:25:24.600

@AlexeiBoulbitch I put my answer here. Not sure if that's the best solution, but it did seem to be an answer to the other questions. I'll delete most of my comments here eventually.

– Michael E2 – 2014-12-11T15:35:52.430

1

The way I do it in my work is as follows:

enter image description here

Algohi

Posted 2014-12-10T06:40:33.413

Reputation: 19 067

There is a better way: give the cell where you are going to type the style DisplayFormula or DisplayFormulaNumbered. Done. This works especially nice in the JournalArticle StyleSheet. – Alexei Boulbitch – 2014-12-11T08:47:02.323