Para/Character Style Name show by script

Hi,
Every one (Specially John Hawkinson) Sir i have one more question. Question is that my InDesign CS4 Sample file lots of character style (Nested Style) on my single paragraph style. Is this any script (Java/Apple) show Paragraph/Character style name show where these style apply.
(1) This is paragraph style
(2) First character style on (paragraph style)
(3) Sec/Third character style on (paragraph style)
After run script
thank you
regard
snegig

Well, this one is not easy.
There is not a good way for scripts to add display adornments that are not objects in your document. That's possible with plugins, but not really with scripts.
But a script could add arrows and boxes and soforth to your document, such as on another layer.
So yes, it's  possible for you to have a script walk through your document and call out style names. It sounds like it would be a pain. I don't know of an existing script that does this, but perhaps someone else does. (I'm only answering since you asked me explicitly...)
Sorry, good luck.

Similar Messages

  • New character style not showing up in TOC style

    I created a new character style called Subchapter....
    Then I went to layout>toc styles.. and hit [new]. Under "Style" my new character style "Subchapter" is not there. Also, under the "Styles in Table of Contents....include paragraph styles.." my new character style "Subchapter" is not in the other styles list.
    What am I missing?
    Thanks.
    Also, forgot to mention, I am in book mode at this point. Maybe I need to add that new character style to each .IDD chapter of the book?

    NEvermind, it was because I was making a character style, not a paragraph style. Now it shows up.
    Thanks anyways.

  • Why does CS6 InDesign Book epub output generate and apply new graf and character style names in CSS?

    I created an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document. I worked absolutely as clean as I could.
    I synchronized the book to that single overall document several times, including immediately before exporting the book to epub. My export settings disallowed any local formatting. Character styles were restricted to one named "Italic" for which the only format applied was Italic in the Font Style field, and one named "Small Caps" for which NO formatting was included in the character style.
    There was, as far as I can see, no reason for any character or paragraph styles to export to anything but identically-named CSS entries. That is to say, any text with the character style "Italic" applied in the InDesign doc should have output with the same text with a span class entry of "Italic" around it.
    I still ended up with p and span CSS entries with extra numbers appended to them:
    span.Italic {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-1 {
    font-variant:normal;}
    span.Italic-1 {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-2 {
    font-variant:normal;}
    span.Italic-2 {font-style:italic;
    font-weight:normal;}
    span.Small-Caps-3 {
    font-variant:normal;}
    span.Italic-3 {
    font-style:italic;
    font-weight:normal;}
    and
    p.x-SECTION-BREAK, p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, p.x-SECTION-BREAK-3  and so on.
    Why would the InDesign epub output engine choose to generate and apply new spans and paragraph-level styles, which multiply the complexity of editing the CSS directly? How can I prevent InDesign from doing this?

    Perhaps I wasn't clear. When I wrote "an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document" I meant to emphasize  the part where I CLEARLY said "UNTIL text was copied over." The text I copied over had plenty of paragraph styles. I was trying to point out that each individual document had no PREVIOUSLY EXISTING character or paragraph styles that might have added complexity to the epub output. .
    So, every paragraph in each document had a paragraph style attached, a total of maybe 20 different paragraph styles throughout the book. The only CHARACTER LEVEL styles I cared about exporting were Italic, for text that was set in italic, and Small Caps, for CAPITALIZED text that I wanted to be able to make smaller in the CSS, since I am not allowed to embed fonts and therefore have no other way of creating small caps in the xhtml files inside the epub.
    So, given that I had two character styles applied to various bits of text throughout my InDesign book ("Italic" and "Small Caps"), I would like to know why there are multiple CSS entries generated: Italic, Italic-1, Italic-2, Small Caps, Small Caps-1, Small Caps-2, and so on.
    Ditto paragraph styles. I had a paragraph style called "SECTION BREAK" in each document. Not only did paragraph style "SECTION BREAK" contain identical specs in each document--I know they did because I copied each from one single doc where they were being used identically--but I also synchronized the book repeatedly.  So why would the xhtml docs and the CSS output need p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, and p.x-SECTION-BREAK-3?

  • Applying [None] character style

    I have a script that finds text with a certain character style, cuts that text from the main story and anchors it in a frame that sits in the margin.
    Everything works fine except that I'd like to have the option of removing the character style. However, when I apply the [None] character style InD shows [None] in the character style lists but the formatting for the character style that was just removed remains on the text.
    Is there a way to have it work as if the [None] was manually selected from the character style list? i.e.: where the character style formatting is removed as well?
    Thanks,
    Ken

    Hello!
    I'm trying to start understanding this javascript thing... Does anyone know how I can modify this so it will also have the option of removing all the character styles in all the text frames, or all the stories in the document? I have several documents with 10 stories each that will need to have the character styles removed before we continue formatting.
    I took a swing at it myself, but haven't been able to get it to work. I really don't know much about scripting! Here's what I tried:
    if (app.documents.length == 0) ErrorExit("Please open a document and try again.");   
    var gScriptName = "Apply character style None keeping overrides"; 
    var gScriptVersion = "1.0"; 
    var doc = app.activeDocument; 
    var sel = doc.selection[0]; 
    var all = app.documents[0].stories.everyItem()
    if (doc.selection.length != 1) ErrorExit("One text frame or some text should be selected, or the cursor should be inserted into the text."); 
    if (sel.constructor.name == "TextFrame") { // a text frame is selected 
         ApplyNone(sel.texts[0]); 
    else if (sel.constructor.name == "Character" || // some text is selected  
         sel.constructor.name == "Word" || 
         sel.constructor.name == "TextStyleRange" || 
         sel.constructor.name == "Line" || 
         sel.constructor.name == "Paragraph" || 
         sel.constructor.name == "TextColumn" || 
         sel.constructor.name == "Text") 
              ApplyNone(sel); 
    else { 
         ApplyNone(all); 
    //===================================== FUNCTIONS  ====================================== 
    function ApplyNone(sel) { 
         var noneStyle = doc.characterStyles.item("[None]"); 
         var basedOnNone = app.activeDocument.characterStyles.add({name:"None", basedOn:noneStyle}); 
         sel.applyCharacterStyle(basedOnNone); 
         basedOnNone.remove(noneStyle); 
    function ErrorExit(error, icon) { 
         alert(error, gScriptName + " - " + gScriptVersion, icon); 
         exit(); 
    I also tried this, but to no avail.
    ar gScriptName = "Apply character style None keeping overrides"; 
    var gScriptVersion = "1.0"; 
    var doc = app.activeDocument; 
    var sel = doc.selection[0]; 
    var all = app.documents[0].stories.everyItem()
    ApplyNone(all); 
    //===================================== FUNCTIONS  ====================================== 
    function ApplyNone(sel) { 
         var noneStyle = doc.characterStyles.item("[None]"); 
         var basedOnNone = app.activeDocument.characterStyles.add({name:"None", basedOn:noneStyle}); 
         all.applyCharacterStyle(basedOnNone); 
         basedOnNone.remove(noneStyle); 
    function ErrorExit(error, icon) { 
         alert(error, gScriptName + " - " + gScriptVersion, icon); 
         exit(); 
    Any thoughts? I'm thinking that app.documents[0].stories.everyItem() probably isn't right...
    Thanks for your help!

  • How to specify character style to anchored objects markers depending on the objects formats?

    I have a long document contains much of anchored text frames with custom positions and want to delete them by aplying character styles to their markers.

    Create a new character style to apply it. And change the character style name in this code to yours, then execute it.
    main ();
    function main (){
        app.findGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat = "~a";
        var objectsArray = app.activeDocument.findGrep();
        for (var c = 0; c < objectsArray.length; c++) {
            if (objectsArray[c].textFrames.length > 0) //The anchored object is a text frame
                var targetTextFrame = objectsArray[c].textFrames.item(0);
                var textFramePosition = targetTextFrame.anchoredObjectSettings.anchoredPosition;
                if (textFramePosition == AnchorPosition.ANCHORED) // the object have custom position
                    //Create a new charater style and change the character style name to yours. 
                    objectsArray[c].appliedCharacterStyle = app.activeDocument.characterStyles.itemByName("Delete");
    Then make a GREP search for this character style, and if you want delete them all by Change All button.

  • Tagging for Character Style

    Hi All,
    Need to insert tagging (character style name) surrounding the text which has character styles applied in InDesign document.
    Example: This is <italic>an</italic> example of <bold>character style</bold> tagging text.
    Please provide JS code for this.
    Thanks in advance,
    Mon

    Hi,
        Try this. I'm also fresher...
    First u have to create tags manually with names b, bi,i, sc (bold,bolditalic,italic, small caps)...
    then execute this js...
    docObj=app.activeDocument;
    xmlObj = docObj.xmlTags;
    pageObj=docObj.pages.item(0);
    myTextFrame=pageObj.textFrames.item(0);
    myText=myTextFrame.parentStory.paragraphs.item(0);
    app.findTextPreferences = app.changeTextPreferences =  NothingEnum.nothing;
    app.findTextPreferences.fontStyle = "Bold";
    app.changeTextPreferences.markupTag=xmlObj[0].name;
    alert(app.changeTextPreferences.markupTag);
    app.activeDocument.changeText();
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.fontStyle = "Bold Italic";
    app.changeTextPreferences.markupTag=xmlObj[1].name;
    alert(app.changeTextPreferences.markupTag);
    app.activeDocument.changeText();
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.fontStyle = "Italic";
    app.changeTextPreferences.markupTag=xmlObj[2].name;
    alert(app.changeTextPreferences.markupTag);
    app.activeDocument.changeText();
    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.capitalization = Capitalization.SMALL_CAPS;
    app.changeGrepPreferences.markupTag=xmlObj[4].name;
    alert(app.changeGrepPreferences.markupTag);
    app.activeDocument.changeGrep();

  • CS3 Character Style Changes Color On Save

    Hi All-
    I have a CS3 file where I imported character styles (using the character styles palette -> load character styles) from another file. I apply that style to a type layer, it looks fine (i.e. is applied correctly), then I save the file, and close. Upon opening the file that char. style's color is changed from white to a spot color. Any idea why?
    System: AI CS3 on Windows XP 32bit
    Thanks in advance.
    Tom

    Hi,
    I had a similar problem, which was caused by type having "overrides"
    when applying Character Styles.
    This is indicated by an asterisk appearing in the Character style name in the palette) when you select the type.
    This has something to do with applying a new style to type which already
    has some appearance attributes.
    Found that the solution was to clear overrides when applying a character style to selected type, by Alt-clicking on the new character style.
    Then, hopefully, the character style of the type is saved properly, and displays correctly the next time you open the drawing.
    Bye...
    Andrew

  • Find character styles

    Hi,
    How to find character styles through javascript

    finding text using character style means the below code will do that...
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.appliedCharacterStyle = "char_style";//character style name
    found = app.activeDocument.findGrep (true);
    for (i = 0; i < found.length; i++){
        found[i].select();
    app.findGrepPreferences = app.changeGrepPreferences = null;
    Vandy

  • Script needed to generate a list of paragraph and character styles from the Book Level

    Hello,
    I am using FrameMaker 11 in the Adobe Technical Communication Suite 4 and I need to find a script that will generate a list
    of paragraph and character styles from the book level.
    I am working with unstructured FrameMaker books, but will soon be looking at getting a conversion table developed
    that will allow me to migrate all my data over to Dita (1.1 for now).
    Any thoughts, ideas on this is very much appreciated.
    Regards,
    Jim

    Hi Jim,
    I think the problem you are having with getting a response is that you are asking someone to write a script for you. Normally, you would have to pay someone for this, as it is something that folks do for a living.
    Nonetheless, I had a few minutes to spare, so I worked up the following script that I believe does the job. It is very slow, clunky, and totally non-elegant, but I think it works. It leverages the book error log mechanism which is built in and accessible by scripts, but is spendidly unattractive. I hope this gives you a starting point. It could be made much more beautiful, of course, but such would take lots more time.
    Russ
    ListAllFormatsInBook()
    function ListAllFormatsInBook()
        var doc, path, fmt;
        var book = app.ActiveBook;
        if(!book.ObjectValid()) book = app.FirstOpenBook;
        if(!book.ObjectValid())
            alert("No book window is active. Cannot continue.");
            return;
        CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
        CallErrorLog(book, 0, 0, "** Book format report for:");
        CallErrorLog(book, 0, 0, book.Name);
        var comp = book.FirstComponentInBook;
        while(comp.ObjectValid())
            path = comp.Name;
            doc = SimpleOpen (path, false);
            if(doc.ObjectValid())
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, doc, 0, "");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Paragraph formats:");
                fmt = doc.FirstPgfFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextPgfFmtInDoc;
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Character formats:");
                fmt = doc.FirstCharFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextCharFmtInDoc;
            else
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "!!!  Could not open: " + comp.Name + " !!!");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
            comp = comp.NextComponentInBook;
    function CallErrorLog(book, doc, object, text)
        var arg;
        arg = "log ";
        if(book == null || book == 0 || !book.ObjectValid())
            arg += "-b=0 ";
        else arg += "-b=" + book.id + " ";
        if(doc == null || doc == 0 || !doc.ObjectValid())
            arg += "-d=0 ";
        else arg += "-d=" + doc.id + " ";
        if(object == null || object == 0 || !object.ObjectValid())
            arg += "-O=0 ";
        else arg += "-O=" + object.id + " ";
        arg += "--" + text;
        CallClient("BookErrorLog", arg);

  • How to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scripting

    how to get all how to get all paragraphs style and their fonts of a  indesign file and write all info with para info into txt file with scriptingstyle and their fonts of a  indesign file and write all info with para info into txt file with scripting

    I write the script this one works
              var par=doc.stories.everyItem().paragraphs.everyItem().getElements();
      for(var i=par.length-1;i>=0;i--)
           var font=par[i].appliedParagraphStyle.name;
            var font1=par[i].appliedFont.name;
             var size=par[i].pointSize;
            WriteToFile (par[i].contents  +   "\r" +  "Style  : " + font  + "\r" +  "FONT1  : " + font1  + "\r" +  "Size  : " + size  + "\r", reportFilePath);
                            function WriteToFile(text, reportFilePath) { 
        file = new File(reportFilePath); 
        file.encoding = "UTF-8"; 
        if (file.exists) { 
            file.open("e"); 
            file.seek(0, 2); 
        else { 
            file.open("w"); 
          file.writeln(text);  
        file.close(); 
    Thanks for all your support

  • Delete space from para style name

    Hi All,
    There are some space character at the end of my paragraph style naming.
    How can we delete [space] only from at the end of the paragraph style name? I don't want to delete [space] if it is coming between paragraph style naming.
    Please provide the js code.
    Thanks,
    Tansk

    Please provide the js code.
    Oh sure, you are in a hurry, right?
    Can you not call upon the scripting forum for every menial task? Please? In these six hours you were twiddling your thumbs and nervously checking the forum every five minutes or so, you could have done this by hand.
    Oh whatever:
    for (p=2; p<app.activeDocument.paragraphStyles.length; p++)
         app.activeDocument.paragraphStyles[p].name = app.activeDocument.paragraphStyles[p].name.replace(/\s+$/,'');

  • My table of contents does not use the entry style I select for words in the paragraph that have character styles applied to them in the chapter, so some of the letters are showing up as green, which is fine in the chapter but not in the TOC.

    My table of contents does not use the entry style I select for words in the paragraph that have character styles applied to them in the chapter, so some of the letters, specifically parameters, are showing up green, which is fine in the chapter but not in the TOC. I can manually fix this in the TOC by changing the character style to none after the toc  has been generated, but I don't want to do this.

    What application are you running? Please ask this in the forum of the product you're using.

  • [CS5 JS] Problem in Applying character styles xml tag names

    Hi,
    e.g. 1
    <italic>This is a italic text with <sup>superscript value</sup></italic>
    e.g.2
    <sup>This is a superscript text with <bold>Bold superscript</bold></sup>
    <italic>  mapped to character style "italic" and
    <sup> mapped to character style "sup"
    In my java script I already mapped the xml tags to specific character styles. In some of the cases (see e.g.1 and e.g.2) I need to map it to other character styles.
    In e.g.1 I need to apply a new character styles "italicSup" for the text "superscript value" same way
    In e.g.2 I need to apply a new character styles "BoldSup" for the text "Bold superscript".
    Can any know how to do this?
    Green4ever

    FYI, I am using
    Win Xp-SP2, CS5 7.0.3

  • Need script to place line break based on character style

    I'm a designer and know very little about scripting or XML, but here goes. I have some XML files I'm formatting for print, and they don't have paragraph returns where they need to be. The returns always need to be before a specific XML tag (that I can change to a specific character style to make it easier to find...). But I don't see a way to do this using the usual InDesign Find/Replace tools, so I assume scripting is going to be the answer. Anyone know how to accomplish this?
    Here's an example of the content I'm working with. The breaks need to happen BEFORE each <City> element. I'm using InDesign CS6 on a Mac.
    <?xml version="1.0" encoding="UTF-8"?>
    <Regions><Region>
    BIG BEND COUNTRY<City>
    <City_Name>ALPINE                       
    </City_Name><Event_Name>
    Big Bend Ranch Rodeo                                                                                </Event_Name>
    <Date>August 8-9                                                                                                                                                                                                                                                         
    </Date><Venue_Name>
    Sul Ross State University S.A.L.E. Arena</Venue_Name>
    <Website1>www.bigbendranchrodeo.com                                            
    </Website1><Phone1>
    4323642696</Phone1>
    <Phone2></Phone2>
    </City><City>
    <City_Name>ALPINE                       
    </City_Name><Event_Name>
    Big Bend Balloon Bash                                                                               </Event_Name>
    <Date>August 30-September 1                                                                                                                                                                                                                                                     
    </Date><Venue_Name>
    Alpine-Casparis Municipal Airport</Venue_Name>
    <Website1>bigbendballoonbash.com                                        
    </Website1><Phone1>
    4328377486</Phone1>
    <Phone2></Phone2>
    </City><City>
    <City_Name>EL PASO                      
    </City_Name><Event_Name>
    Alfresco! Fridays                                                                                   </Event_Name>
    <Date>August 1, 8, 15, 22, 29                                                                                                                                                           
    </Date><Venue_Name>
    Convention Center Plaza</Venue_Name>
    <Website1>www.alfrescofridays.com                                              
    </Website1><Phone1>
    915/534-0600</Phone1>
    <Phone2/></City>
    Thanks in advance!

    karol wrote:
    You can use [ code ] tags when pasting code https://bbs.archlinux.org/help.php#bbcode
    For it to really auto-update the mirrorlist it has to be put in a cronjob :-)
    If I run it twice, will the original mirrorlist (moved to mirrorlist.bak after the first run) be irrevocably lost?
    Just nitpicking: you don't have to use 'g' for global changes in the sed substitutions as there is only one occurrence per line.
    Thanks Karol - I made the adjustments above to address both comments. The 'g' for sed I think is OK to leave in :-)
    Last edited by Archieman (2011-05-31 04:00:55)

  • Numbered bullet character style with underline not showing

    Hi,
    I have a paragraph style for numbered bullets where I've used a character style for the numbered bullet.
    The character style has an underline applied so the effect looks like white text on a blue box, the blue box being created by the underline.
    The 'Paper' coloured number is showing, I can see it by placing a coloured box behind the text box to test.
    But the blue underline is not showing. When I apply the character style on other text it works fine.
    Could this be a bug?
    InDesign CC, Mac OS X 10.8.4

    Thanks for responding.
    "Paper" is the colour I am using for the character colour and then using another named colour for the underline.
    But it is happening the same as you suggest in your screengrab.
    In my screengrab below I have put in a black box to show that there is no underline appearing!
    And my paragraph style with that character style applied:
    So how do we submit this as a bug? And why hasn't it been fixed before now?!!!
    thanks.

Maybe you are looking for

  • Ripping Files From a Non Commercial DVD

    Is there an alternative to MPEG Streamclip for doing this? I love the little app but just wondered if there was anything else out there that does an equally or better job? Regards, Kenny.

  • Budget check for purchase order

    Hi everyone! We have NO problems with budget check for the SC. But when we create a PO and exceeds the budget no message are displayed. The only thing that happens is that the PO gets status "error in process". But if we change the PO (still exceedin

  • Search on classfication using Trex-index

    Hi all, In the IMG for DMS, there is a setting to configure an index for searching on classification data. Where is it possible to search on that index? Only through portal or is there a way to search in GUI? I dont think it is used in CV04N, but ple

  • I'm about to throw the whole system out the window...

    iTunes said that I had too much stuff to fit on my iPod and it would make a "My iPod Selections" playlist to update from. Well, it made it, but alot of the songs I really wanted weren't put there, and the ones I could live without were put there. Fru

  • LinkedButton in a Columngrid

    Hi everyone, how can I set a linkedbutton in a column grid? I've seen some samples about matrix, but not about grid Thanks Carles