Skip to main content
banl_05
Inspiring
October 26, 2017
Question

Trimming mathtype equation boundary spacing

  • October 26, 2017
  • 2 replies
  • 3096 views

Hi

I want reduce mathtype equation left, right, top and bottom spacing in indesign file.

But some of serif characters hide when trimming the space.

Here is my code. Please help

for (var i = 0; i < graphics.length; i++) {     

link = graphics.itemLink;     

image = link.parent;     

frame = image.parent;    

frame0=Math.round(frame.geometricBounds[0]);    

frame1=Math.round(frame.geometricBounds[1]);    

frame2=Math.round(frame.geometricBounds[2]);    

frame3=Math.round(frame.geometricBounds[3]);  

frame.geometricBounds = [frame0, frame1+2, frame2, frame3-2];

}

Thanks

Balaji

    This topic has been closed for replies.

    2 replies

    MrMathType — Retired
    Participating Frequently
    October 30, 2017

    You didn't say how you're getting the equations into InDesign, nor even that they're EPSs. If they're from a Word document, and if you're getting them into InDesign for Windows by placing the entire Word document into InDesign, then Loic.Aigon is mostly correct. The equations are converted on the fly to EPS, but it's InDesign that does it, not MathType.

    Whether they come from Word or not, MathType by default adds 2 pixels of padding to all sides of an equation. You can change this value (make sure to exit MathType first -- including the MathType Server in the SYSTRAY/Notification Area if you're on Windows):

    • Windows: HKEY_CURRENT_USER\Software\Design Science\DSMT6\Windows (change PicturePadding)
    • Mac: ~/Library/Preferences/com.DesignScience.DSMT6.plist (change <key>Windows/PicturePadding</key>)

    If they're in Word, change the value identified above, then with the document open in Word, run the Convert Equations command (on the MathType tab in Word for Windows or the MathType menu in Word 2011). "Convert" MathType equations to MathType equations, and it will apply the new padding value.

    If the equations are not from Word, there's no [easy] way to correct the padding in batch.

    Bob Mathews

    WIRIS Science, creators of MathType

    banl_05
    banl_05Author
    Inspiring
    November 6, 2017

    Hi Bob Mathews

    Thank you so much. It is very helpful. Sorry for the late reply.

    I have eps(mathtype) files in a folder. is there any way to correct padding for those files.

    Thanks,

    Balaji

    MrMathType — Retired
    Participating Frequently
    November 6, 2017

    That's what I was thinking about with this sentence:

    If the equations are not from Word, there's no [easy] way to correct the padding in batch.

    If it's possible to correct the padding on all of your EPSs, I'm not aware of how to do that, whether in batch or individually.

    Loic.Aigon
    Legend
    October 27, 2017

    If I am right MathType produces on the fly eps files that get imported as links. In that case, changing the frame geometry may indeed hide some part of the graphic.

    To prevent so, you need to either compute new geometry for the graphic and apply or rely on the native fit method for the frame. The first is less expensive but require more logic. The second is easy to call but costly in performance.

    Once that said we are talking about milliseconds gaps here.