Copy link to clipboard
Copied
var fp = app.selection[0].graphics[0].itemLink.filePath;
var f = File(fp);
f.open('w');
var fs = f.read();
f.close();
var baseline = fs.match(/%%Baseline:\s+(\S+)/)[1];
Baseline equation script not working. (File type .wmf)
Copy link to clipboard
Copied
Hi Ahmet,
what would you expect as result?
What is the actual result?
Does the wmf file contain %%Baseline at all?
Regards,
Uwe
Copy link to clipboard
Copied
NO, It doesn't contain. Is there any other way to do this?
Copy link to clipboard
Copied
Hi!
December 24 is not the best day to play Maths!
(^/)
Copy link to clipboard
Copied
Well, thank you. But could you just give me an idea?
Copy link to clipboard
Copied
If you want to play Maths into InDesign, make some serious researches on MathType, MT-Script and MathMagic, on Windows and Mac OSX!
When done, if time, maybe I'll help you!
(^/)
Copy link to clipboard
Copied
Okay. Thanks. I will researches. 🙂
Copy link to clipboard
Copied
Obi- Wan "January 21 Is it a good day to deal with mathematical expressions?" :)) Please help me.
Copy link to clipboard
Copied
You can't align WMF files to the baseline because they don't contain any baseline value. You should ask your customer/supplies to save the equations as MathType files, which are EPS files and contain (among others) the equation's baseline value. The EPS equation can be opened and read like any file to obtain the baseline value.
Peter
Copy link to clipboard
Copied
Hi,
Play Maths with MathType could be very hard!
It's a long time I've not treated eq.
As I've already written, I only use MathType into a personal complex conversion process [Word/TeX/FrameMaker source files --> MathType + Word files --> TeX eq. + Word files --> import in InDesign] and re-build the eq. to MathMagic eq.
Why? … because, in ID:
• I use Grep to correct authors' equations work!
• MathMagic magically plays with eq. baseline [automatic]!
• MathMagic magically plays with eq. formatting (font, char size, color, …) depending of the para where eq. are [Javascript]!
(^/)
Copy link to clipboard
Copied
Thank you. But How can mathmagic do it?
Copy link to clipboard
Copied
How can mt-script do it?
Copy link to clipboard
Copied
Beware of the mt-prefix: it's usually associated with MathTools, not MathType. If you have your equations in MathType EPS format, a script can read the baseline value and position the equation. There are various scripts around to do that -- google around and you're bound to find some.