• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Trimming mathtype equation boundary spacing

Explorer ,
Oct 26, 2017 Oct 26, 2017

Copy link to clipboard

Copied

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

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Oct 27, 2017 Oct 27, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 30, 2017 Oct 30, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 05, 2017 Nov 05, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 06, 2017 Nov 06, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines