# MathType equations alignment in InDesign publication Script MT-TreatEq-CS*.jsx

MT-Script uses leading and wrapping to align equations in InDesign publication.

To start this process select text and click * MT-Script-CS**->Treat the text with equations* or start MT-TreatEq-CS**.js from palette Scripts in InDesign.

MathType equation in publication is a graphic object in graphic frame.

Lets understand what's going on with equation in publication. Create new publication, place some text and place into the text a MathType equation (EPS file). You can do it manually.

If an equation is large it operlaps text above and/or below. You can click on equation by Selection tool and move up and down. Only equation moves. Text above and below doesn't move and overlapping remains. To solve this problem we need increase leading of insertion point for graphic frame with equation. This will push back text above.

To push back text below it's need to apply some wrapping from bottom to graphic frame with equation.

MT-Script do it automatically. It gets size of equation and baseline position from equation and align it according to this parameters pushing back lines above and below.

Please, try to play with parameters from *MT-Script preferences*.

For example, change * "Updating of shift of baseline"* (

**3**) and process equations from selection. You see the baseline of equations would be just a bit changed.

* "Additional displacement upwards from the equation" (4). *You can set value in points to add it to the existing leading in insertion point of graphic frame with equation.

Another explanation. Select an equation by text tool. Look at leading. Lets it is 12.5 points and lets your equation overlaps text above. Type in * "Additional displacement upwards from the equation"* 10 and process equations. New leading will be 12.5+10 = 22.5. Type -10 pt (12.5-10 = 2.5) and overlapping will increase.

Type -100 and auto leading will be applied to the graphic frame. It garantees lack of overlapping.

The same situation is with * "Additional displacement downwards from the equation in the multiple paragraphs"* (

**5**). This is just value of wrapping below the equation. Play with it and see the result.

MT-Script gives you additional possibilities. You can set different wrapping below for equations in one-line and multilines paragraphs. Possibly it will be useful for you.

Also you can force MT-Script check whether number of lines in paragraphs has changed to apply different wrapping to equations. Turn on ** "Switch on checking of one- and multiline paragraphs transition"** (

**7**) to do it.