Highlighted

equation mif form

New Here ,
Jan 22, 2018

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

shrink.png

into

expand.png

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:

height.png

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.

Views

129

Likes

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

equation mif form

New Here ,
Jan 22, 2018

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

shrink.png

into

expand.png

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:

height.png

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.

Views

130

Likes

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
Jan 22, 2018 0
New Here ,
Mar 22, 2018

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;

            }

Likes

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
Reply
Loading...
Mar 22, 2018 0