Skip to main content
潔38992292yczw
Participating Frequently
November 25, 2024
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
November 27, 2024
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".

16 replies

Peter Kahrel
Community Expert
Community Expert
November 25, 2024

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
November 25, 2024

@Peter Kahrel 

 

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

 

 

 

Translate
Peter Kahrel
Community Expert
Community Expert
November 25, 2024

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
November 25, 2024

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
November 25, 2024

Thanks!! jimmy!!

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

Translate
Community Expert
November 25, 2024

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
November 25, 2024

Thanks!! Eugene

Translate