Copy link to clipboard
Copied
Mathtype'lı ifadeleri bulmak istiyorum script ile bunu nasıl yapabilirim?
Copy link to clipboard
Copied
Would you like some chocolate sauce on it? 😄
Copy link to clipboard
Copied
Sounds Turkish to me
Copy link to clipboard
Copied
Sure, of course.
Copy link to clipboard
Copied
Yes, Turkish. Do you know Turkish?
Copy link to clipboard
Copied
Hayır, bir kelime değil
(No)
I'll leave Uwe to answer the Math question, it looks like his on the right track.
Copy link to clipboard
Copied
Hi,
what is the file format of your MathType expressions:
WMF or EPS ? Other?
Are other graphics imported that are not MathType expressions with the same file format?
What would you like to do with the found graphic?
Regards,
Uwe
Copy link to clipboard
Copied
File type is wmf.
Find wmf graphic and stop. And find next wmf graphic. Thanks.
Copy link to clipboard
Copied
selahattind27349779 wrote:
File type is wmf.
Find wmf graphic and stop. And find next wmf graphic. Thanks.
I'd suggest the following for maximum flexibility and minimum coding:
1. Apply a distinct object style to all containers for placed WMF graphics.
2. Use the UI's OBJECT Find/Replace functionality to search and to access the containers.
The following script written in ExtendScript will search all graphics placed in the active document and applies an object style named "WMF" to all frames that contain WMF graphics.
Define your own object style named "WMF" before or let the script do it. Wheras if you are preparing the object style you have more control over its definition (apart of the name) before running the script. You can undo the script's action in one go.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
app.doScript
(
applyObjectStyleToWMFContainers,
ScriptLanguage.JAVASCRIPT,
[],
UndoModes.ENTIRE_SCRIPT,
"Apply object style to WMF containers | SCRIPT"
);
function applyObjectStyleToWMFContainers()
{
// If no document is open, do nothing:
if(app.documents.length == 0){return};
// The name of the object style we like to apply
// to the containers of all placed WMF graphics:
var nameOfObjectStyle = "WMF";
var doc = app.documents[0];
var wmfObjectStyle = doc.objectStyles.itemByName(nameOfObjectStyle);
// Get all graphics in the document:
var allGraphics = doc.allGraphics;
var allGraphicsCount = allGraphics.length;
// If the objcet style with name in variable nameOfObjectStyle is not found
// create the object style:
if(!wmfObjectStyle.isValid)
{
doc.objectStyles.add({name : nameOfObjectStyle});
};
// Apply the object style to every container of a WMF found in the document.
// NOTE: Alternatively one can apply the object style to the WMF itself,
// but InDesign's UI for OBJECT Find/Replace would not be able to find it.
for(var n=0;n<allGraphicsCount;n++)
{
if(allGraphics
.imageTypeName == "Windows Metafile") {
allGraphics
.parent.appliedObjectStyle = wmfObjectStyle; }
}
// Use UI functionality OBJECT find/replace to search for all frames with object style by its name.
};
To distinguish MathType WMFs from none-MathType WMFs would require a deeper analysis of the graphics contents.
Regards,
Uwe
Copy link to clipboard
Copied
Hi Uwe,
Imho, I think the good answer is: why? [ Thanks for the 10-points gift! ]
(^/)