equation mif form
Copy link to clipboard
Copied
Hi - I have a question about adjusting equation boundary boxes in FM 2017. I recently discovered that some of our equations were not being rendered in our html help system. After much digging I found that this because we use a special font for our equations, and the software we use to generate our help system has trouble generating sufficient space around certain symbols (e.g., the summation symbol) for this font. Their help has refused to fix the problem, so I'm on my own.
One solution I came up with was to manually increase the size of the bounding box, turning
into
This fixes the problem. However, since there are hundreds of these equations in our documentation, this is not a workable solution (not to mention the danger of carelessly re-shrinkwrapping everything...).
I've been looking at the mif file to see if I can programmatically increase the size of the bounding box (maybe by padding it all around?), but have so far not had much success. I tried increasing the last value in <ShapeRect>, but this only changed the height of the box:
meaning that additional custom adjustments to <MathOrigin> seem necessary to adjust the equation position, which is again not workable.
Is there a better way to do this? I was hoping there was one number or setting I could change to pad all the equations around the bounding boxes, but have not yet found anything.
Copy link to clipboard
Copied
Old post, but you can automate this in extendscript.
var doc = app.ActiveDoc;
var AF = doc.FirstGraphicInDoc;
var PAD = 5000;
while (AF.ObjectValid() ) {
var AF_PARENT = AF.FrameParent;
if(AF.type == Constants.FO_Math) {
Err('\nINFO: found equation\n');
AF_PARENT.Height = AF.Height + (2 * 65535 + PAD);
AF_PARENT.Width = AF.Width + (2 * 65535 + PAD);
AF.LocX=-PAD/2;
AF.LocY=-PAD/2;
}
AF = AF.NextGraphicInDoc;
}

