Skip to main content
潔38992292yczw
Participating Frequently
Nov 25, 2024 2:19 AM UTC
Answered

MathML

Hi there!!

MathML for InDesign is great!!

I wish I could change font color something like below...

 

            <math mathcolor="#000000">
                <mrow>            
                    <mi>a</mi>            
                    <mi>b</mi>
                    <mi>c</mi>
                    <mi>d</mi>
                    <mi>e</mi>
                    <mi>f</mi>
                    <mi mathcolor="#d0111b">g</mi>
                    <mi>h</mi>
                    <mi>i</mi>        
                </mrow>            
            </math>
Peter Kahrel
Peter KahrelCorrect answer
Community Expert
Nov 27, 2024 10:29 PM UTC
quote

Start reading this thread from the top.


By @Peter Kahrel

 

I can swear the question was for "font" - not "color"? 

 


They asked "change fonts for MathML, like color?" Meaning, I guess, "change font attributes, like colour".

17 replies

Robert at ID-Tasker
Legend
Feb 10, 2025 1:11 AM UTC
Inspiring
Oct 29, 2026 7:28 AM UTC

By the way, has Adobe exposed any interfaces in the latest C++ SDK for handling mathematical expressions—specifically, for iterating through mathematical expressions within a text stream and retrieving their MathML string representations?

Translate
Peter Kahrel
Community Expert
Community Expert
Nov 25, 2024 9:54 AM UTC

There's something I don't understand. @jimmy_2799 wrote 

 

>To change the font color in MathML for InDesign, you can use the mathcolor attribute as you've done in your example. This should apply the specified color to the elements within the tag.

 

That's what you did originally. He didn't say anything about mrow, which you applied, and which you claim worked. But when I tried it InDesign said that the structure is invalid (after inserting / in the closing <mrow> tag). Can you give us a screenshot that shows that it worked?

 

Translate
Robert at ID-Tasker
Legend
Nov 25, 2024 11:10 AM UTC

@Peter Kahrel 

 

You are right - but color change works without <mrow>:

 

 

 

Translate
Peter Kahrel
Community Expert
Community Expert
Nov 25, 2024 11:39 AM UTC

It does indeed when I tried again. No idea what went wrong earlier.

 

But now I understand even less. @潔38992292yczw reported an MML structure which he said doesn't work, but which is in fact correct and works. Then he reports that he fixed it, but the fix is ungrammatical and doesn't work. Oh, well.

Translate
潔38992292yczw
Participating Frequently
Nov 25, 2024 8:31 AM UTC

This Worked!!!

I had to insert <mrow>...

 

            <math mathcolor="#000000">
                <mrow>            
                    <mi>a</mi>            
                    <mi>b</mi>
                    <mi>c</mi>
                    <mi>d</mi>
                    <mi>e</mi>
                    <mi>f</mi>
                     <mrow>        
                        <mi mathcolor="#d0111b">g</mi>
                     <mrow> 
                    <mi>h</mi>
                    <mi>i</mi>        
                </mrow>            
            </math>
Translate
潔38992292yczw
Participating Frequently
Nov 25, 2024 8:22 AM UTC

Thanks!! jimmy!!

It Woked!!!!!!!!!!!!!!!!!!!!!!!!

Translate
Community Expert
Nov 25, 2024 6:58 AM UTC

As far as I'm aware it's SVG - so you'd need to export it from InDesign - manipulate it and replace it - or manipulate it after exporting for InDesign.

 

SVG is RGB only and can't do 100% black in CMYK - -it's RGB black

https://creativepro.com/how-to-avoid-print-problems-with-mathml-in-indesign/

Translate
潔38992292yczw
Participating Frequently
Nov 25, 2024 8:22 AM UTC

Thanks!! Eugene

Translate