Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


MathType Equation - Get mathml equations from MathType EPS

Participant ,
Jul 25, 2019 Jul 25, 2019

Copy link to clipboard

Copied

Hi,

     I want to get the MathML equation from eps image.  When reading image file, getting text like as below screenshot.

     MathML_FromEPS.png

     But the image has used fonts style like bold, bold-italic etc. when reading this MathML text from image that styles are missing.

     How can i retaining that styles with MathML?

TOPICS
Scripting

Views

811

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
community guidelines
Adobe Community Professional ,
Jul 26, 2019 Jul 26, 2019

Copy link to clipboard

Copied

Typefaces and styles aren't part of MathML. You might be able to match the Postscript part of the EPS to the MathML, but that's a Herculian task. And why bother: MathTools does a great job converting MathType EPSs to its own MatrhZone format, which is pure InDesign text, formatted and formattable.

P.

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
community guidelines
Participant ,
Jul 26, 2019 Jul 26, 2019

Copy link to clipboard

Copied

Hi,

     Thank you for your reply.

     How can i convert eps to mathml in indesign? can you please explain.

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
community guidelines
Adobe Community Professional ,
Jul 26, 2019 Jul 26, 2019

Copy link to clipboard

Copied

If you want the bare MathML from the EPS, then just copy it out of the EPS file. If you want it formatted as an equation then you need the MathTools plug-ins (see https://movemen.com/​) some other MathML-to-InDesign converter, but I have experience only with the MathTools plug-ins.

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
community guidelines
Participant ,
Jul 31, 2019 Jul 31, 2019

Copy link to clipboard

Copied

Hi,

     Yes i want to get the MathML equation from EPS image which i have posted.

     If i opened the image file in textedit it have font details but not occurate place and don't know how to retain that font style in mathml equation.

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
community guidelines
Adobe Community Professional ,
Aug 01, 2019 Aug 01, 2019

Copy link to clipboard

Copied

As I mentioned earlier, MathML doesn't know about fonts. The EPS files have font information, but that's outside the MathML When MathML is converted to text (by e.g. MathTools), it behaves like normal text and is displayed in the font set in the paragraph -- as it should. You don't need the font information from the EPS, and you couldn't use it anyway -- unless there is just one fornt specified in the EPS, and if you want to use that to override the paragraph's font, add a character style and apply it the the (math) text range.

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
community guidelines
Engaged ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

LATEST

I realize this question is a year and a half old, so either you haven't gotten an answer yet, you've gotten an answer elsewhere, or you've just moved on. Whatever the case, I'm answering it in case someone else finds this question on a search.

 

As you said, you can find the MathML inside an EPS created with MathType. (Actually you didn't mention MathType, but there it is in the first row of your MathML, saying it came from MathType.)

 

There are 3 things you can do:

 

  • You can take the MathML from the EPS:

 

%<?xmlversion="1.0"?><!--MathType@Translator@5@5@Ma
%thML2(Clipboard).tdl@MathML2.0(Clipboard)@--><math
%display='block'xmlns='http://www.w3.org/1998/Math/
%MathML'><mrow><mi>V</mi><mi>A</mi><mtext>&#x00A0;<
%/mtext><mn>5</mn><mtext>&#x00A0;</mtext><munderove
%r><mstylemathsize='140%'displaystyle='true'><mo>&#
%x2211;</mo></mstyle><mrow><mi>t</mi><mtext>&#x00A0
%;</mtext><mn>5</mn><mtext>&#x00A0;</mtext><mn>1</m
%n></mrow><mi>n</mi></munderover><mfencedclose="}"o
%pen="{"><mrow><mfrac><mrow><mi>E</mi><mostretchy='
%false'>(</mo><mi>C</mi><msub><mi>F</mi><mrow><mi>&
%#x0024;</mi><mo>,</mo><mi>t</mi></mrow></msub><mos
%tretchy='false'>)</mo></mrow><mrow><msup><mrow><mo
%stretchy='false'>(</mo><mstylemathvariant='bold'ma
%thsize='normal'><mn>1</mn></mstyle><mtext>&#x00A0;
%</mtext><mn>1</mn><mtext>&#x00A0;</mtext><mi>k</mi
%><mostretchy='false'>)</mo></mrow><mi>t</mi></msup
%></mrow></mfrac></mrow></mfenced></mrow></math><!-
%-MathType@End@5@5@-->!​

 

But once you get it, what do you do with it? You can't just copy it and paste it into MathType, because it doesn't look like MathML to MathType. Even if you find & replace to remove all the comment characters (%) and copy everything between <math> and </math> and paste that into MathType, it still won't work. So basically this chunk of commented EPS that looks like MathML isn't very useful to you.

 

  • There is also "MTEF" (i.e., MathType Equation Format) code inside the EPS. It looks like this:

 

%MathType!MTEF!1!1!+-
%feaahqart1ev3aaatCvAUfeBSjuyZL2yd9gzLbvyNv2Caerbqf
%gBHrxAU9gimLMBVrxEWvgarmWu51MyVXgaruavP1wzZbItLDhi
%s9wBH5garqqtubsr4rNCHbGeaGqiFu0Je9sqqrpepC0xbbL8F4
%rqqrFfpeea0xe9Lq-Jc9vqaqpepm0xbba9pwe9Q8fs0-yqaqpe
%pae9pg0FirpepeKkFr0xfr-xfr-xb9adbaqaaeGaciGaaiaabe
%qaaiqadaabaaGcbaaeaaaaaaaaa8qacaWGwbGaamyqaiaabcka
%caaI1aGaaeiOamaawahabeWcpaqaa8qacaWG0bGaaeiOaiaaiw
%dacaqGGcGaaGymaaWdaeaapeGaamOBaaqdpaqaa8qacqGHris5
%aaGcdaGadaWdaeaapeWaaSaaa8aabaWdbiaadweacaGGOaGaam
%4qaiaadAeapaWaaSbaaSqaa8qacaGGKaGaaiilaiaadshaa8aa
%beaak8qacaGGPaaapaqaa8qacaGGOaGaaCymaiaabckacaaIXa
%GaaeiOaiaadUgacaGGPaWdamaaCaaaleqabaWdbiaadshaaaaa
%aaGccaGL7bGaayzFaaaaaa!55FD!​

 

You can copy all of that and paste it into MathType and you'll have your equation. It works, but why not just do the easiest thing? That's next...

  • Since the EPS was created with MathType, you can open it with MathType. So just open it:MrMathType_0-1613661185088.png

So there it is. In a comment you said your goal "is to get the MathML equation from EPS image which i have posted". So there's the equation. You want the MathML with styling, so go to MathType's Preferences menu, then Cut and Copy Preferences. Set thusly:

MrMathType_1-1613661383956.png

Now copy the equation and you have the MathML with styling:

 

<math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mi>V</mi><mi>A</mi><mtext>&#x00A0;</mtext><mn>5</mn><mtext>&#x00A0;</mtext><munderover><mstyle mathsize='140%' displaystyle='true'><mo>&#x2211;</mo></mstyle><mrow><mi>t</mi><mtext>&#x00A0;</mtext><mn>5</mn><mtext>&#x00A0;</mtext><mn>1</mn></mrow><mi>n</mi></munderover><mfenced close="}" open="{"><mrow><mfrac><mrow><mi>E</mi><mo stretchy='false'>(</mo><mi>C</mi><msub><mi>F</mi><mrow><mi>&#x0024;</mi><mo>,</mo><mi>t</mi></mrow></msub><mo stretchy='false'>)</mo></mrow><mrow><msup><mrow><mo stretchy='false'>(</mo><mstyle mathvariant='bold' mathsize='normal'><mn>1</mn></mstyle><mtext>&#x00A0;</mtext><mn>1</mn><mtext>&#x00A0;</mtext><mi>k</mi><mo stretchy='false'>)</mo></mrow><mi>t</mi></msup></mrow></mfrac></mrow></mfenced></mrow></math>

 

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
community guidelines