MT-Script-CS3 ... CS5.

5 USER MANUAL © Mikizil V, 2011

What do you have to know irst to start using of MT-Script?
1. MT-Script-CS# must be installed by SETUP_MTScript.exe. You can download this installer from one of my sites ( or 2. Start SETUP_MTScript.exe only with admin rights to install scripts on Vista or Win7. 3. MT-Script works only with MathType (6 or later) equations named exactly in correspondence with this mask — Eqn####.(eps or wmf), where # — is digit. You can use any quantity of digits but it must be the same for all equations in your publication (Here and later I mean InDesign publication is the same phrase as InDesign document). For example, from Eqn00001.eps to Eqn 09999.eps — Ok; ✓ from eqn00001.eps to eqn09999.eps — incorrect names; ✗ from Eqn00001.eps to eqn09999.eps — incorrect names; ✗ from gl-1-fn-001.eps to gl-1-fn-999.eps — incorrect names; ✗ The best idea is to use digits’ quantity exceeds you need right now. If you see you have 1500 equations, please, use the mask with 5 digits (Eqn#####). It can prevent some monkey business in future. 4. All equations for your publication (and book as well) must be placed at the same folder. No some subfolders available... only one folder with all equations for your publication/book. 5. If you have a publication created before MT-Script but you need to process it, you can certainly convert it (to be more precisely ... convert equations) to use with MT-Script automatically by command “Convert to MT-Script standart”. This is very easy and quick. Please, read below at the chapter Command “Convert to MT-Script standart”. 6. The default language of MT-Script is English. MT-Script will give messages in Russian only for Russian localization. For all other localizations you will receive messages in English as well. If you can help me to translate MT-Script’s messages (or part of them) from English (or Russian) to your native language, a license of MT-Script (and serial number) will be present to you for your great deposit to this project. 7. Please, put your attention... Before using of MT-Script switch off the “Skip by leading” option from InDesign preferences ( ig. 1). (Ctrl+K —> Choose “Composition” —> switch off “Skip by leading”). Be sure all your publication with equations have this settings.

2 • MT-Script-CS3 ... CS5.5 user manual

Fig. 1

How to facilitate our heavy work?
MT-Script is the script’s system to facilitate a work low of MathType’s equations in InDesign publication. You can read about MathType+InDesign technique on this page I try to speed up and improve this work low by MT-Script. To understand what do scripts do we must to create an InDesign publication with equations manually. So, you have a Word document with MathType equations and empty InDesign publication. 1. Let’s work with Word. Choose from menu MathType the command Export equations. In the opened dialog choose the type of equations (WMF or PostScript none) and ile name pattern as Eqn#### ( ig. 2). MT-Script-CS3 ... CS5.5 user manual


Fig. 2

4 • MT-Script-CS3 ... CS5.5 user manual

Important! VERY IMPORTANT! Please, use only this pattern — Eqn####, where Eqn must be started from capital letter, # — digits. The quantity of digits must be constant for your publication (or/and book as well). For example, you can’t use Eqn001 — Eqn999 and then Eqn1000 — Eqn9999. For this case you must have Eqn0001 — Eqn9999. Please, don’t confuse to use the quantity of digits with a bit more than you need. For example, to work with equations from 1 to 9999, please, use the pattern Eqn##### (5 digits). Please, dont’s use any pre ixes or suf ixes in equations’ names... only clear Eqn####. 2. Let’s continue. Export equations from Word with replacing equations with appropriate ile’s names with tags <<>>. Save this ile and place it into InDesign. Now the time of equations has come. The next text have copied from Design Science site ( It will help you to understand how adjust equations manually. 1. Choose the Selection Tool . (Do not use the Direct Selection Tool for this.) 2. Click on the newly-placed equation. 3. From the Object menu, click Transform > Move. 4. To move the equation the proper amount, you could use trial and error and guess how much to move it. (With the equation selected, simply move it vertically with the arrow keys on the keyboard. If you do this, you don’t need to click Transform > Move.) With enough experience, this may prove to be the fastest way to align the inline equation. If you need to move the equation precisely though, there is a way to determine the exact amount of vertical shift. a. In MathType, open the equation you just placed into your InDesign document. MathType is probably still open with this equation in the workspace anyway. b. Select the entire equation, then copy it. c. When you copy an equation to the clipboard, MathType shows the height, width, and baseline of the equation in the MathType status bar (the bottom of the MathType window). For the equation above, it would reveal this information:

The height and width is information we don’t need in this case, but “B=3” means the baseline is 3 points, so that is our vertical shift.

MT-Script-CS3 ... CS5.5 user manual


Note: This information is also displayed in the status bar when you irst save the equation as EPS, but depending on the position of your mouse pointer, the status bar may revert to standard display after momentarily showing the height, width, and baseline information. If you happen to notice the baseline information when you save the equation, you don’t need to perform the step of copying the equation to the clipboard. d. Back to InDesign, in the Move dialog, change the value of Vertical to equal the baseline value you got from MathType, in this case, 3 pts. In InDesign, if the default units are set to picas, this is a value of 0p3, as shown below:

e. Click OK. For equations that are larger than the surrounding text, such as 1. Perform steps 1 through 3 from the section above. 2. The baseline for this equation is 15 pts. If you enter “15” in the Move dialog (i.e., “0p15”), InDesign will convert it to picas accordingly (i.e., “1p3”). (You can also use the arrow keys as described in step 8 above.) 3. Our document now looks like this:
n! r !(n  r )!

Not the best-looking document in the world! 4. Select the line of text immediately below the equation. The easiest way to do this is to triple-click anywhere in the line with the Type Tool:

6 • MT-Script-CS3 ... CS5.5 user manual

5. Now we need to change the value in the Leading section of the Character Formatting Controls. The default value is 120% of the point size of the font. In our case, the font is 12 pt, so the default leading is 14.4 pt. To that value, we need to add in a value equal to two-thirds of the equation baseline. In our case, the baseline is 15 pts, so we need to add 10 pts to the leading (2/3 of 15), making it 24.4 pt. Press Tab or Return to accept the value. Now our document looks like this:

6. You may need to adjust the amount of leading for various equations, but in general, adding two-thirds of the equation’s baseline value works pretty well. And now we will place and adjust equation by MT-Script. So, go back to the point 2. when you have an empty InDesign publication with text with <<Eqn###.eps>>-tags instead equations and a folder with appropriate equations’ iles. 3. Select the text to place equations by Text tool (T) or select frame with text by Selection tool or select nothing to place equations in all publication (click with the Selection tool on empty place of publication... with no texts or frames or smth else). Open menu MT-Script-CS# (in main InDesign menu) and choose “Place equations instead of the text with tags”. Now you will see the dialog. Script asks you to choose the folder with equations. Find it and press Ok. One moment... and equations are in your publication. What does this script do except replacing tags with equations? 1. Script reads information about baseline offset from EPS or WMF- ile and shifts down the placed object (so called rectangle in InDesign DOM) on the value of baseline offset. Now the baselines of text and equation coincide. But the text above and/or below can be superimposed. 2. To correct it the script changes the leading of character containing the equation to split equation and the text-line above. MT-Script-CS3 ... CS5.5 user manual


You can choose the equation with Text tool (T) and see leading in the Character palette in InDesign. To split the equations and a text-line below the script enables Text Wrap. Please, open the TextWrap palette in InDesign ( ig. 3) and choose the equations with the Selection Tool . You will see the active “Jump Object” mode in Text Wrap and some values of wrapping.

Fig. 3

How can we change this settings? For this purpose you can use command Preferences from MT-Script-CS# menu (or start MT-Dialog-CS$.jsx from palette Scripts in InDesign).

Command Preferences
(or start MT-Dialog-CS$.jsx) I will write the names of settings in two different ways. The terms in bold are the same you can ind in scripts now and bold-italics in round brackets are for new version of MT-Script. From preference dialog you can change the next points: • Updating of shift of a base line (A bit shift of baseline) (in points) (see ig. 4 pos. 1) allows you to change the base line value which was read by MT-Script from MathType’s equations. Default is zero. Positive and negative values are possible both. Being set here this value is added to the native baseline of each equation after placing, editing, converting, processing procedures. • Additional displacement upwards from equation (Adds to the leading) (in points) (see ig. 4 pos. 2) — this parameter adds some value to the basic leading of characters containing equations (can be positive or negative).

8 • MT-Script-CS3 ... CS5.5 user manual


1 2 3 4 5

6 7 8 9 10 11 12 13

Fig. 4

As you know inline object is placed on the character place. For example, all your equations being as inline object occupies only ONE character for each one in the text. If cursor is on the left side of the equation, press right-arrow button with Shift, you will select the equation and you can change the leading by the Character palette. This script changes the leading by adding ‘Additional displacement upwards from equation' (Adds to the leading) to the automatically calculated leading for a equations in according with equations height and baseline shift value. If this parameter is –100 then equations will have an autoleading. If it will be negative with value more than native leading then the leading will be 0 (zero). Example, native leading is 15 pt. You set 5pt. The result is 15 + 5 = 20pt. You set –5pt. The result is 15 – 5 = 10pt. You set –20pt. 15 – 20=-5pt, but the leading must not be negative therefore new leading is 0 (zero). • Switch on the applying leading for the equation (for all scripts) (Apply leading’s settings to the equations) (see ig. 4 pos. 6). If it’s off then all leading’s settings described above will not be applied and the line ‘Additional displacement upwards from equation' (Adds to the leading) will be grey. MT-Script-CS3 ... CS5.5 user manual


By default the text wrap of equation from below is 0. But you can change its value with the next parameters. • Additional displacement downwards from the equation in the multiline paragraph (Adds to the text wrap value from below in multiline paragraph) (in pixels) (see ig. 4 pos. 3) — changes the text wrap of equations from below in multiline paragraphs. • Additional displacement downwards from the equation in the single-line paragraph (Adds to the text wrap value from below in single-line paragraph) (in pixels) (see ig. 4 pos. 4) — changes the text wrap of equations from below in single-line paragraphs. This parameter has a check box. If you will switch it off then the value in ‘Additional displacement downwards from the equation in the multiline paragraph’ (Adds to the text wrap value from below in multiline paragraph) will apply to all equations independently from number of lines in paragraph and the value in ‘Additional displacement downwards from the equation in the single-line paragraph' (Adds to the text wrap value from below in single-line paragraph) will not be used. If you will switch it on then all equations in single-line paragraph will have one value of text wrapping from below but all equations in multi-line paragraphs will have another value from ‘Adds to the text wrap value from below in multiline paragraph’. • Switch on the checking of one- and multiline paragraphs transitions (see ig. 4 pos. 8) — tells to the script to check when number of paragraph’s lines changes. If this check is switch on then the script will automatically control the text wrap of equation after its editing. For example, irstly you have an equation in a single line paragraph. You have edited it. As a result this paragraph became a multiline. If this checkbox is switched on then the text wrap of this (!!!! and all other equations in this paragraph aw well !!!!) will change from value for single-line paragraphs to multiline. If it’s switched off then equations in this paragraphs will not feel the transition from single- to multiline paragraphs. To do the appropriate text wrapping you must start “Treat (Process) the text with equations” manually. The default is switched on. This is most commonly used settings. *** Let’s examine brie ly all other settings. • Swicth on the checking of equations’ duplication (Choose duplicated equations) (see ig. 4 pos. 7) (for Edit equation). This settings in luence only when you edit an equation. Let it is switched on. You start editing some equation. Assume it has link which is not unique. If you will correct this equation than the origin’s EPS or WMF ile will be changed. Therefore all other equations in your publication linked to this origin ile will be changed as well. To avoid this problem scripts will create the copy of editing ile, rename it properly and relink your editing equation (screen equation) to new ile-origin. All changes was done in it will not concern all other equations (screen equations) in your publication.

10 • MT-Script-CS3 ... CS5.5 user manual

But with this settings the editing is slower and may be very slow in dependence from equations’ quantity. The best idea is switch “Swicth on the checking of equations’ duplication” off and start “Test the duplicated equation” from time to time. You must know when the publication has got many times copied equations to ix it in time. • Switch on(off) ProgressBar for all scripts (Show progress bar) (see ig. 4 pos. 10). Can be on or off. It’s convenient feature to stare the script’s working. • Show MT-GateCS#.exe status (Show status info) (see ig. 4 pos. 9). Do you want to have a feedback with the MT-Script? Switch it on if yes. The script will show the name of active process and possible errors if they will occur. *** Lower our sight a bit more low. Here you can choose the type of equations’ iles (EPS or WMF) (see ig. 4 pos. 13). This option utilizes when an equation is being created, or is being formatted, or you take a ind-change procedure. For more details see below. • Preference ile — ***** (see ig. 4 pos. 12). This is a way to connect a MathType’s preferences ile with MT-Script to convert equations to new format accordingly to this pref- ile... or to create new equation with the settings from this pref- ile... or to make ind-change procedure. • Clear Pref (see ig. 4 pos. 11). This is a way to break a connection with MathType’s pref- ile. This feature is useful to format equations with no changes (for example, to con-

Fig. 5. Press “Preference ile - ...” to open a dialog and choose the *.eqn ile

MT-Script-CS3 ... CS5.5 user manual

• 11

vert from EPS- iles to WMF- iles with no format changes) or to create new equation with MathType’s factory settings. At the header of this dialog you can choose Russian or English (see ig. 4 pos. 14) to interact the MT-Script with. The steps to change language from one to another are... 1. Start InDesign. 2. Open some publication. It must be saved. So, if you’ve created a new publication, please, press Ctrl+S to save it. If you’ve converted a publication from earlier version, save it too. 3. Only after steps 1–2 is done, go to the menu MT-Script-CS# and choose Preferences (this is the last line in a drop-down menu). 4. In the opened dialog choose the language you need and certainly press Ok. 5. Restart InDesign to activate the changes.

Command “Place equations instead of the text with tags” from menu MT-Script-CS# in the main menu of InDesign (start MT-PasteEq-CS#.jsx)
So, you have got an InDesign’s publication with imported text with tags <<Eqn#### (# is digit).eps (or wmf)>>. This document must be saved before you start placing equations by MT-Script. Choose some text area (by Text tool) or some text frame with your text (by Selection tool ) to process ONLY selected visible area... or select nothing (click with Selection tool anywhere outside of your pages) to process all your publication (all visible and hidden texts).

Fig. 6

12 • MT-Script-CS3 ... CS5.5 user manual

Click “Place equations instead if the text with tags”. Choose the folder with equations (exported from Word). Click Ok. Wait a moment. You can watch the process by progress-line. *** After the placing is done you can use the command...

“Treat (Process) the text with equations” (or start MT-TreatEq-CS#.jsx)
... to adjust equations more precisely. You must choose some text with Text tool or text frame with Selection tool or choose nothing before start this command. This command will process equations according to the main settings of MT-Script described above.

Fig. 7

Command “Test the duplicated equations” (“Get rid from duplicated equations”) (start MT-ClearDoubleLinks-CS#.jsx).
You publication possibly have some duplicated equations. Let’s put two terms: • equation (in InDesign) is a simple view of formula on your screen. The equation is what you see, it’s only visual expression of some content saved in ile. (I will discuss all about MT-Script assumed equations are only what you see on a screen and no more.)

MT-Script-CS3 ... CS5.5 user manual

• 13

Fig. 8

• MathType’s generated EPS or WMF- ile linked to InDesign (or simply EPS (WMF) ile) is an origin for equation. It has content to show equation on computer screen.) Can you have two or more equations linked to the same ile? Yes, you can. Copy-paste technique helps you to create they so more as you want. You can edit one of this equations. So you will change the ile-origin. But this ile is the origin for all other sibling-equations. And they will get not updated links. You will see yellow triangles in the InDesign’s palette Links near names of correspondent links. Ok. Let’s update all links. Oh, what’s matter? We have edited one equation, but many other equations have updated as well. Do you like this behavior? I don’t like because I will lose control under my publication. All equations in publication must have a unique EPS(WMF) ile-origin. This feature will get rid publication from duplicated equations. You will have more iles-origins and each of them will correspond to unique equation on the screen and vise a versa. Please, use this opportunity before you start editing your publication to prevent disadvantages discussed above.

Command “Place new equation” (start MT-NewEq-CS#.jsx)
You can create a new equation directly in InDesign!! without Word!! Put the text cursor into the text or select some text to change it with a new equation or use Selection tool to insert new equation into the left top corner of an active page. Keep in mind the parameters from Preferences. Do you remember where you can connect MathType’s preferences ile with MT-Script? Yes, in main MT-Script preferences you can choose MathType’s pref- ile to create a new equations with the appropriate settings.

14 • MT-Script-CS3 ... CS5.5 user manual

Please, don't forget about this settings to create equations with needed settings!!!

Fig. 9

Or you can press Clear Pref to break connection. In this case your new equation will be created with MathType’s default (so called factory) setting (font — Times New Roman and so on). The type of a new equation will be the same as you choose in the main settings (EPS or WMF). If you create a new equations in publication which already has equations, its ile will be placed (automatically by MT-Script, of course) into the folder with all equations for your publication. Note, it must be the unique folder for all MathType’s iles for your publication or/and book. If you create a new equations in publication with no equations, then MT-Script will create new folder MT-NewEquations in the folder with your publication (nearby of it) and will place a new equation into it. If you want this folder would have another name, please, rename it manually and then relink equations by yourself (it’s easy with InDesign). That’s all you need to create ine equations from within InDesign.

Command “Edit the equation” (start MT-EditEq-CS#.jsx)
Click an equation by Selection tool and choose “Edit equation” from menu. MathType will be opened. Make some changes, save equation in MathType and close it. Changes will be applied to an equation in InDesign and it will be adjusted automatically with exact conformity to MT-Script settings (see MT-Script Preferences).

MT-Script-CS3 ... CS5.5 user manual

• 15

Command “Batch transformation of equations” (“Format Equations”) (start MT-Convert-CS#.jsx)
Keep in mind the parameters from Preferences. Do you remember where you can connect MathType’s preferences ile with MT-Script? Yes, in main MT-Script preferences you can choose MathType’s pref- ile to format equation with the appropriate settings. Or you can press Clear Pref to break connection. In this case the settings of your equations (fonts, styles, sizes) will not be changed. The type of ile-origins will be changed as you have chosen (EPS or WMF). Before the formatting will start, MT-Script asks you about getting rid from duplicated equations. You can agree or not to do this. This command is analogue to the same named command of MathType for Word.

Fig. 10

16 • MT-Script-CS3 ... CS5.5 user manual

Command “Convert to MT-Script standart” (start MT-RenameEqn-CS#.jsx)
This command have two goals: 1. It helps you to convert earlier created InDesign document with equations (before MT-Script) to allow processing by MT-Script. How does it work? Click on this element of menu. The dialog will appear. • Equations folder name ( ig. 11, pos. 1) — type here the name of folder which will be created nearby with the ile of your publication. So your InDesign ile ( ile of publication) and this folder will be at the same folder. The default name is “Формулы”. This is in Russian. Please, type it in English. You can name this folder on your discretion. • File name patter ( ig. 11, pos. 2) — You must enter ‘#’ so times as numbers you need in this mask or leave as default. • Number of irst equation ( ig. 11, pos. 3). This is the number of the irst equation to be renamed and copied into the folder you typed above. I think the best practice is leave it as default (=1). I must explain it more clearly.

1 2 3

Type the folder's name here

Fig. 11

MT-Script-CS3 ... CS5.5 user manual

• 17

So, let’s discuss the next example. You have a publication with a lot of equations named as or something else. The names of iles and their extensions don’t matter. Script will detect type of iles (EPS or WMF) automatically. The main is that iles was exported by MathType. I assume that you typed “myEquations” at the irst line of dialog (Equations folder name). The next line is left unchanged. The default mask is that you need. The last line ... let it will be as default. Press Ok. What is the result? This script look through all links in InDesign document. If the irst MathType exported ile is found (for, example it is, script detects its type. Let it will be EPS. So, script copies from origin folder to the folder myEquation and renames it to Eqn0001.eps. The next ile (let it will be will be copied to myEquation folder and will be renamed too and so on. As a result your publication will contain absolutely the same equations as later, but they will be linked to iles in folder myEquations and named from Eqn0001.eps till Eqn1551.eps (for example). Ok, but you have another InDesign document in your book and you want to continue this process to obtain all documents been “converted to MT-Script standart” Open next InDesign document. Start command “Convert to MT-Script standart”. Do nothing. The folder for export is the same, mask is the same too, number of irst equation is 1. Do nothing and don’t worry. Script will automatically detect the number of last exported equation and a new equation will have a number exceed previous by 1.

2. The next goal of this script is to prepare some part of your publication for exporting to new publication. Both publications should correspond to standard MT-Script. Please, read the next example.
You have two publications — number 1 and number 2. They are absolutely different. You have to use some part of publication 1 with equations in publication 2. But this publications have different folders with equations. Certainly, you can copy-paste some text from 1 to 2, but this text contains equations too and they are linked to other folders. More over, some of them can have the same names as some equations in publ. 2. Now your work will be very hard. But not with the MT-Script.

18 • MT-Script-CS3 ... CS5.5 user manual

Let’s see. 1. Open the folder with equations for publ. 2. Find and remember the number of the last equation. Let it will be 01575. 2. Select needed text from publication 1, start “Convert to MT-Script standart”. • The dialog will appear. • Type the name of the folder for “converted” equations, for example, “myEqn”. • Type correct mask. In our case it should be #####. • The number of the irst equations should be 1575+1 = 1576. • That’s all. Press Ok. • Then copy-paste the selected text from publ. 1 to publ. 2 and copy all iles from the folder myEqn to the folder with equations for publ. 2. • Update links in publ. 2. • All are ready. Certainly you can format equations in new pasted text by MTScript and so on.

Command “Export to Word” (start MT-InDesign2Word-CS#.jsx)
It allows you to export InDesign publication with equations to Word with editable equations.
• Select a text area to export or select nothing to export all document. • Simple start it and press Ok. • When Word will appear choose from menu MathType --> Convert equations. • “Equation type to convert” — choose all; • “MathType equations (OLE objects)” — choose it. • Start conversion.

Fig. 12

MT-Script-CS3 ... CS5.5 user manual

• 19

Command “Find/Change in equations” (start MT-FindChange-CS#.jsx)
will be discussed a bit later.

Fig. 13

20 • MT-Script-CS3 ... CS5.5 user manual

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.