5 Replies Latest reply on Nov 19, 2014 11:51 AM by Murali_Vetha

    Superscript Italic and Normal Italic

    Murali_Vetha Level 1

      Hi,

       

      In a Indesign documentI have find superscript Italic and Normal Italic, then apply character style for superscript italic and then apply character style for Normal Italic, When I apply Normal Italic then all Italics including superscript Italic are changing as Normal Italic. See below my coding and how can I proceed.

       

      My Coding:

       

      app.findTextPreferences = app.changeTextPreferences = null;

      app.findChangeTextOptions.includeMasterPages = false;

      app.findTextPreferences.fontStyle ="Italic";

      app.findTextPreferences.position = Position.SUPERSCRIPT;

        try{

        app.changeTextPreferences.appliedCharacterStyle ="15 Superscript Italic";

        app.documents.item(0).changeText();

        }

        catch(e){

        app.documents.item(0).characterStyles.add({name:"15 Superscript Italic", fontStyle:"Italic", position:Position.SUPERSCRIPT});

        app.changeTextPreferences.appliedCharacterStyle ="15 Superscript Italic";

        app.documents.item(0).changeText();

        }

       

      app.findTextPreferences = app.changeTextPreferences =null;

      app.findChangeTextOptions.includeMasterPages = false;

      app.findTextPreferences.fontStyle ="Italic";

        try{

        app.changeTextPreferences.appliedCharacterStyle ="15 Italic";

        app.documents.item(0).changeText();

        }

        catch(e){

        app.documents.item(0).characterStyles.add({name:"15 Italic", fontStyle:"Italic"});

        app.changeTextPreferences.appliedCharacterStyle ="15 Italic";

        app.documents.item(0).changeText();

        }

       

      Thanks

      Vetha