Skip to main content
adam leonk54817122
Participating Frequently
February 22, 2025
Question

MathML doesn't update offset from baseline

  • February 22, 2025
  • 2 replies
  • 901 views

Hello,

I'm writing a text with a lot of inline math equations and references to variables.

 

Inserting a MathML object works, where it automatically adjusts the offset from the baseline. However, if I edit the object again, the offset doesn't update according to the new elements.

 

The same also happens if I copy an object (say a variable) to a different part of the text, the offset resets to zero. I have to go into edit MathML on the object I want to copy, copy the MathML, go to the part of the text I want, insert MathML. And it's really tedious.

 

Is this just because the feature is in its infancy? Is it a bug? Or is there something I'm missing? Perhaps there's a hotkey to automatically adjust offset?

2 replies

Peter Kahrel
Community Expert
Community Expert
February 24, 2025

In my experience InDesign places the equation correctly relastive to the baseline, but the type is too big. When you reduce the type size, the equation is misaligned. So the thing to do is to determine (once) the correct type size (it'll be about half the textt's type size) and use that value while you place the equation. That works.

Robert at ID-Tasker
Legend
February 24, 2025

@Peter Kahrel

 

Even for things like this? 

 

Peter Kahrel
Community Expert
Community Expert
February 24, 2025

The ones I tried worked fine, e.g.

 

 

ID doesn't add enough space before and no space at all after the line with the equation, but the alignment of the eqn in the line is ok.

 

 

Robert at ID-Tasker
Legend
February 22, 2025

When you insert MathML object in InDesign - it doesn't correctly "level" itself:

 

 

Its bottom edge will always be leveled with the baseline - there is no automatic equation's baseline recognition / calculation.

 

Maybe you've had your equations imported from MathType or MathMagic - as EPS/WMF files - then repositioned by an extra script - but InDesign's Equations implementation is very basic.

 

Here is an example of importing bunch of equations - from WORD - with automatic conversion from WORD's MathML notation to native MathML objects in InDesign:

 

 

They are all bottom aligned to the baseline of the text.

https://community.adobe.com/t5/indesign-discussions/indesign-math-graphics-a-better-way/m-p/15150539#M610817

 

adam leonk54817122
Participating Frequently
February 22, 2025

That cannot be correct. 

The first one is when I write x₂ using "Insert MathML". Here you can see the subscript is below the baseline. Second one, I take x² and use "edit MathML" and convert it to x₂, the subscript is on the baseline. Third one, I take the first x₂ and copy it, the subscript is below the baseline. Fourth I take the first x₂, copy it to a different text frame and copy that back.

 

There's clearly something inconsistent happening.

Robert at ID-Tasker
Legend
February 22, 2025

Yeah, strange. 

 

For me - either manually or through scripting - it's always "wrong". 

 

What version of InDesign are you using? 

 

I'm still on 20.0