• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

How can I find only MathType expressions?

Community Beginner ,
Dec 26, 2016 Dec 26, 2016

Copy link to clipboard

Copied

Mathtype'lı ifadeleri bulmak istiyorum script ile bunu nasıl yapabilirim?

TOPICS
Scripting

Views

555

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
Explorer ,
Dec 26, 2016 Dec 26, 2016

Copy link to clipboard

Copied

Would you like some chocolate sauce on it? 😄

Votes

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
Guru ,
Dec 26, 2016 Dec 26, 2016

Copy link to clipboard

Copied

Sounds Turkish to me

Votes

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
Community Beginner ,
Dec 26, 2016 Dec 26, 2016

Copy link to clipboard

Copied

Sure, of course.

Votes

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
Explorer ,
Dec 26, 2016 Dec 26, 2016

Copy link to clipboard

Copied

Yes, Turkish. Do you know Turkish?

Votes

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
Guru ,
Dec 27, 2016 Dec 27, 2016

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.

Votes

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
Community Expert ,
Dec 27, 2016 Dec 27, 2016

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

Votes

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
Community Beginner ,
Dec 27, 2016 Dec 27, 2016

Copy link to clipboard

Copied

File type is wmf.

Find wmf graphic and stop. And find next wmf graphic. Thanks.

Votes

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
Community Expert ,
Dec 27, 2016 Dec 27, 2016

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

Votes

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
LEGEND ,
Dec 28, 2016 Dec 28, 2016

Copy link to clipboard

Copied

LATEST

Hi Uwe,

Imho, I think the good answer is: why? [ Thanks for the 10-points gift! ] 

(^/)

Votes

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