Finding "End Nested Style Here" option

Hi,
How to find and replace the "End Nested Style Here" marker through InDesign CS3-JS.
Thanks,
P. Ramkumar

If you use findText, you can find it using ^h
In findGrep it is ~h
Dave

Similar Messages

  • Can't get the "End Nested Style Here" function to work

    Hello,
    I have been testing a very simple nested style routine in InDesign CS3.
    It has a number with a period after it (and I have a character style named number), a single word followed by a colon (and I have a character style for that word and the colon) and then a paragraph of text (and a style called body for that). Because there are sometimes more than one paragraph of text, I used the Insert, Special Character-Other-"end nested style here" character, in the TYPE menu, to tell InDesign how long to use the body copy style (the final character style) before kicking in a new start up sequence starting with the Number style. But, no matter what I try, the second paragraph wants to begin the sequence over, even though, it has just a hard return and no "end style sheet here" character.
    Any thoughts....
    thanks
    barbara

    Hi Bob,
    That is what I thought...but, then when I learned about the End Nested Style Sheet here character, I thought that would override that issue.
    Thanks for clarifying that there is no way around the new paragraph issue.
    I kept thinking there has to be a way and I just don't know how to do it, but I guess that is not the case. That is the only downfall to me regarding that amazing feature.
    thanks!
    Barbara

  • CS3: typography and end nested style delimiters

    Hello,
    I'm trying to trick InDesign into exporting INX files in which all nested style delimiters are marked by an ENS character (a processing instruction in the exported INX). This makes the transform to XML much easier, because you can group adjacent, like-styled text without actually processing that text to find instances of character delimiters.
    I've written a JavaScript to process a layout, inserting an ENS character at every instance of any non-ENS delimiter (as defined in the paragraph style). The problem is that this seems to affect the layout in unanticipated ways.
    All seems well -- the nested character styles are properly applied, and InDesign seems to be paying attention to the required character delimiters and ignoring the inserted ENS characters. Mostly.
    In some cases, the ENS characters affect the typography of a paragraph. They seem to adjust applied kerning. The flow of text adjusts slightly at the insertion of the ENS character.
    I'd much appreciate any input on how InDesign handles ENS characters, especially when they aren't called for by the nested style definition.
    Thanks,
    Andrea

    Hi Dave,
    Thanks for your speedy reply.
    There are enough instances of nested styles that we're trying to avoid explicit ENS characters at all cost. There will be so many of them to enter!
    So ENS characters affect the resolution of nested styles even when they aren't used as delimiters in the nested style definitions? Is InDesign essentially looking for either the declared delimiter *or* an ENS character?
    If so, is there any way that can be overridden?
    Thanks,
    Andrea

  • How to end grep styles?

    Grep styles (in Paragraph style) is one of the fabulous option in indesign CS4, but i am having one doubt that do we have any option to end grep style at any particular instant like we have "END NESTED STYLE HERE" to end nested style.

    You should state the full string to match in your GREP query. If it matches all, then all gets marked. If you don't want it to match all, you need to adjust the GREP query.
    Alternatively, if you feel you have to "prematurely end" your character style, you can use a nested style instead.

  • Problems with Nested Styles

    I'm trying to create a nested style in In Copy CS5. What I want for it to do is to create the first few words with a certain character style then revert back to the Paragraph style setting. I have the nested style set to end with the end nested style here special character but it seems to stay in the format of the nested style no matter what I do.
    Any suggestions?

    What I did is create a new document which comes in with a certain paragraph style by default (a certain font and regular type). When I created a nested style using a character style in the Paragraph style we normally use it did not seem to be working correctly. I would have to apply the same style from the paragraph styles menu for the nested style to apply correctly. Otherwise it would apply the nested style to the whole paragraph instead of ending after three words.
    Either way after fiddling around with it for awhile and closing and restarting InCopy a few times it appears to be working correctly.Whichj brings me to another question, do you have to restart InCopy for changes to take effect?

  • Nested style: everything preceeded by 3 spaces needs to be italicized

    I'm doing a directory for a church. I got my nested style sheet to place a rule before each entry and to bold the family name. At the end of each listing, the children in each family are listed. I created a nested style for the names. I tried defining the nested style as through 3 spaces but that italicizes everything except the family name. How do I use nested style to see the three spaces through hard return and italicize everything in between?
    Screen shot with tabs and spaces. The very first entry (Ainsle family) is how it should look.
    Thanks in advance for your help.
    [screen shot removed by host per Richard's request]

    Richard,
    You're a little confused about this.
    First, do NOT worry about putting the em space after the names. Just do a Replace All to change instances of three spaces to an em space. (I'm assuming you didn't put three spaces anywhere else.)
    At the end of the nested styles, you want to apply None up to the first em space.
    Then you want to apply the character style italic until the end of the paragraph which you can define as the end nested style here character.
    That should be all you need.
    However, I noticed that you've got an error in the listing for Kevin Alexander and Julie Hansen. The rule underneath their names is wrong.
    Finally, you ought to think a second before posting an image on the web with people's real names, addresses, emails, home and work phones, etc.
    If it is possible to revoke that image, do it now!

  • Indesign nested style not displaying correctly

    Hello, having a little bug here. when i style something that has a nested style, the styling doesn't continue after multiple lines unless i open and close the document... here is a visual example.
    the first paragraph is displaying correctly, the second is displaying improperly.
    the body colored text (bold cyan) style stops at an "end nested style" character, and the normal paragraph copy style (black) continues after that to the next bullet. but as you can see it won't visually show the new styling until i reopen the document. very weird, correct?
    am i making sense? any ideas?
    mac 10.5.6
    2x3.2quad eight core
    id cs4

    Mike,
    I would edit the first nested style to apply through one bullet (copy n paste a bullet here); or better: set up the paragraph style to make bullets and you could instead charcter style the bullet from the Bullets and Numbering part of the dialog box, and leave it out of the nested style section.
    Question: Do you want the blue to cover a set number of lines? Then define a line style, just south of the nested styles part of the dialog box.
    If the trick relies on a End Nested Style character embedded, then you are probably doing that because you want random word count lengths for the blue character style to be applied in different paragraphs. Sounds like work, tho, to me, and I would look for a simpler rhythm, if there is one.
    Mike Witherell in Maryland

  • Nested style highlights pink as if there's a missing font (?)

    setting up a new document here, and trying to make the first character in each paragraph use Body 01 DROP CAPS character style. in this capture i've set it to the first three characters for testing (never mind the term drop caps; trying to use nested style here).
    no matter what i set the typeface to in the character style, it won't display as nested. what would cause this?

    There is a hierarchy to styles. First, the paragraph style is applied to all type in the paragraph, including any nested character styles that are part of the paragraph style definition. Next any character styles are applied, which override the formatting assigned in the paragraph style, and finally, any formatting you apply locally by selecting text and changing the parameters is applied, and that overrides everything.
    Local formatting overrides show up for selected text as a Plus sign after the style name in the Paragraph Styles panel. Do you see the plus sign when you select your text? I suspect not. More likely, you've applied a default character style to everything, so no matter what settings you have in your paragraph style they will be overridden by the applied character style. As I said before, character styles are used only for selected text. They are used for "special" text that needs to be different in some way from the other text in a paragraph -- the basic formatting for the entire paragraph is defined in the paragraph style.
    When you highlight an entire paragraph there should NOT be a character style showing as applied as well. The character style should be either [None], indicating that no text has an overriding character style applied, or it should be blank, indicating that some portion of the text has a character style applied, but not the whole paragraph.
    Bottom line, with no text selected make sure the character style is set to [None] before you begin adding text, and only apply character styles through Nested, Line, or GREP styles in your paragraph style, or by selecting specific text and manually applying the style. Manually applied character styles survive changes to the paragraph style, and are actually the most useful if they are fairly generic, applying just a color, or bold or italic, but not specifying a face or size, so they let the face and size change to match any changes made to the paragraph style -- you usually don't want 9 pt minion bold suddenly appearing in the middle of a paragraph that you've changed to 12 pt Helvetica unless it's a product branding. Instead a style that says only Bold would give you 12 pt Helvetica Bold.

  • Find/Change problems within a nested style?

    I have a problem with Find/Change (in both CS4 and CS5) not recognizing text within its “find” parameters when text that fits those parameters is part of a nested style. I want to find any instance of italic in the text, regardless of what paragraph or character style it is, but F/C only intermittently finds italics, both within and without that text existing in a nested style. Has anyone come across this issue?
    There is NOTHING different about the text that is recognized by F/C–or not recognized–that shows up in any of the panels or palettes. There are no font conflicts. I’ve replaced prefs and saved data files. If I go into the character palette and change the italic portion of the nested style to “italic” character style (it shows up in character palette as [none], even though it has a nested style), then F/C finds it for sure; but if I don’t do that, then F/C will sometimes find it, and sometimes not, and sometimes in one instance and not in another! There is no hidden formatting that shows up in story editor. I remade another nested para style with the same formatting but with varying results! Help… I’ve tried everything.

    I have a problem with Find/Change (in both CS4 and CS5) not recognizing text within its “find” parameters when text that fits those parameters is part of a nested style. I want to find any instance of italic in the text, regardless of what paragraph or character style it is, but F/C only intermittently finds italics, both within and without that text existing in a nested style. Has anyone come across this issue?
    There is NOTHING different about the text that is recognized by F/C–or not recognized–that shows up in any of the panels or palettes. There are no font conflicts. I’ve replaced prefs and saved data files. If I go into the character palette and change the italic portion of the nested style to “italic” character style (it shows up in character palette as [none], even though it has a nested style), then F/C finds it for sure; but if I don’t do that, then F/C will sometimes find it, and sometimes not, and sometimes in one instance and not in another! There is no hidden formatting that shows up in story editor. I remade another nested para style with the same formatting but with varying results! Help… I’ve tried everything.

  • Grep Styles/Nested Styles from the end of the paragraph

    Hi -
    It appears that grep styles, and nested styles only allow you to apply styles from the beginning of the paragraph until the match.
    I'd like to be able to apply styles from the END of the paragraph going back.
    This would allow me to apply a non-breaking character style to the end of a paragraph to control "runts". You could make the last two words of a paragraph non breaking, or set a 15 character threshold.
    This wouldn't work for all cases, but I'm working with centered, non-justified text, so it should work fine. If the feature were there.
    I'm sure there are other things one could do with it as well.
    There's a good discussion, and a MANUAL work-around on
    http://pdsassoc.com/tipsCS/DeruntingParagraphs/index.html
    Tom

    I used your suggestion and reviewed the tutorial again.
    Sometimes a missing piece of info drives you nuts.
    Thanks again.
    My clients will love this enhancement.
    CS rocks.

  • Nested styles and textStyleRanges

    HI all!
    I have to recognize all textStyleRanges in my documents.
    Unfortunately character styles described by a nested style are not really applied to the text and the paragraph looks like a single textStyle range.
    Is it possible to apply the characterStyles from nested styles?
    thanks.
    Ivan

    Ok. You could test every single character with the property appliedNestedStyle. That will give you an array of applied nested styles. The result would be an undefined object (case: no nested style applied) or an array of length 1 or length >1 if more styles overlap on a certain character.
    Code:
    var myCharacterStylesArray = myCharacter.appliedNestedStyles;
    for(var n=0; n<myCharacterStylesArray.length;n++){
        $.writeln(myCharacterStylesArray[n].name)
    The problem here is: which of the styles will win to format the character?
    My tests are showing (and I could be dead wrong!), the last listed style in that array will list the winner.
    Code for testing  a selection of some characters with different nested styles or GREP styles (with overlapping results)  applied:
    var selectedCharacters = app.selection[0].characters;
    for(var n=0;n<selectedCharacters.length;n++){
        try{
        $.writeln(selectedCharacters[n].appliedNestedStyles[selectedCharacters[n].appliedNestedStyles.length-1].name);
        }catch(e){};
    exit();
    If there are no applied nested styles, the try/catch will prevent this loop ending throwing an error.
    Of course we have to factor in a regular applied character style as well:
    var selectedCharacters = app.selection[0].characters;
    for(var n=0;n<selectedCharacters.length;n++){
        try{
        if(selectedCharacters[n].appliedCharacterStyle.index === 0){
            $.writeln("The winner is:"+"\t"+selectedCharacters[n].appliedNestedStyles[selectedCharacters[n].appliedNestedStyles.length-1].name);
        else{$.writeln("The winner is:"+"\t"+selectedCharacters[n].appliedCharacterStyle.name)};
        }catch(e){};
    exit();
    Phew, this took me a while to find out…
    Uwe

  • JS:CS3 Newbie needs help! find/change character styles

    I'm new to scripting and JavaScript is giving me a headache, but I'll keep trying. What I'm trying to do is automate a few things so that the production time of our school newspaper is reduced while insuring accuracy.
    I've played around a little with the text find change sample and the changing or adding paragraph styles in the InDesignCS3_ScriptingGuide_JS.pdf and I barely understand what I'm doing.
    When us page designers receive text to place in the document, our editors mark the text with tags like: < b >text< / b >, where the word "text" is to be bolded. (there wouldn't any spaces between < and b and > etc. I just did that so It'll show up here). We have basic character styles and paragraph styles set up, and we just started working with nested styles.
    Is there a way we can search for the < b > tag and bold everything after it up until the < / b > tag? Sort of the way it does for html (the way it would do for this message if I took out the spaces). It'll be great if it could remove the tags as well, but if not, I know I could create a find/change script to do the removal afterwards.
    I appreciate any input.
    Thanks!

    You've not found yourself the easiest of tasks! You need GREP find/replace, not text. Do you have any experience with GREP? It's worth investigating, it's a powerful feature. The script below handles bold. For clarity, it doesn't do any error checking: it assumes that there's a document with text in it and that the document contains a character style called 'bold'.
    // talk to Indesign, nobody else
    #target indesign
    // reset the Find/Change dialog
    app.findGrepPreferences = app.changeGrepPreferences = null;
    // find everything between <b> and  (including these codes)
    app.findGrepPreferences.findWhat = '<b>.+?</b>';
    // add 'bold' style
    app.changeGrepPreferences.appliedCharacterStyle = 'bold';
    // make the changes
    app.activeDocument.changeGrep();
    // now delete the <b> and </b> codes
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = '</?b>';
    app.changeGrep();
    You can adapt it easily to handle other codes, and at a later stage you could generalise it so that you needn't repeat whole bunches of code.
    Good luck with your first forays. Again, it's not the easiest of tasks, but it's worth getting to grips with.
    Peter

  • Creating Styles.. and then nesting styles

    Seems simple enough:
    tell application "Adobe InDesign CS5.5"
    tell active document
      set myCharacterStyle to make character style with properties {name:"Year", size:26.0, fill color:"Paper", stroke color:"Black", stroke weight:0.75, font:"Helvetica", font style:"Black"}
      set myCharacterStyle to make character style with properties {name:"Years", size:18.0, fill color:"Black", stroke color:nothing, stroke weight:nothing, horizontal scale:80.0, vertical scale:80.0, font:"Helvetica", font style:"Black"}
      set myParagraphStyle to make paragraph style with properties {name:"Year"}
      set nested styles of myParagraphStyle to {{applied character style:"Year", repetition:1, inclusive:false, delimiter:any word}, {applied character style:"Years", repetition:2, inclusive:true, delimiter:any word}}
    end tell
    end tell
    The font and the point size do not come through when the style is created. The nested styles also do not come through.
    I tried applied font:"Helvetica" to get 'font family not available'. Also, font:font "Helvetica"...
    What I get right now I is no font defined or size. The rest works.
    So what am I doing wrong here?

    Hi lithodora,
    as Mary Posner wrote a character style doesn't have the property 'font', but 'applied font' and 'font style'.
    "... specified as either a font object or the name of font family."
    just look it up in the dictionary ...
    Try always to work with references.
    tell application "Adobe InDesign CS5.5"
        --you've got to set myHelvetica to your needs!
        set myHelveticas to (font family of every font whose name contains "Helvetica") --will return the helvetica font familiy names
        set myHelvetica to item 1 of myHelveticas --just randomly pick one for my example, hoping it's got a 'black' style ;-) ...
        tell active document
            set myCharacterStyle01 to make character style with properties {name:"test", size:26.0, fill color:"Paper", stroke color:"Black", stroke weight:0.75, applied font:myHelvetica, font style:"Black"}
            set myCharacterStyle02 to make character style with properties {name:"tests", size:18.0, fill color:"Black", stroke color:nothing, stroke weight:nothing, horizontal scale:80.0, vertical scale:80.0, applied font:myHelvetica, font style:"Black"}
            set myParagraphStyle to make paragraph style with properties {name:"nextTest"}
            tell myParagraphStyle
                make new nested style with properties {applied character style:myCharacterStyle01, repetition:1, inclusive:false, delimiter:any word}
                make new nested style with properties {applied character style:myCharacterStyle02, repetition:2, inclusive:true, delimiter:any word}
            end tell
        end tell
    end tell

  • Nested styles: I can't seem to make this work

    I can't seem to do this nested style: All Adobe Garamond. Headline: 24/25 centered. Return. Byline: 9/10 centered, stacked. "by" is italic with a .5, one inch wide  rule above. Return. Author's name is small caps with the same rule below. Return. Body text is 9/10 regular, first paragraph has a 3 line bold drop cap, the other paragraphs have a .25 indent.
    Nothing seems to work when I try to set this up. Rules everywhere...and I am supposed to have the document set up in 14 hours....help!

    Nested Styles are character styles added inside a paragraph style that  affect only certain parts of the text, based on trigger patterns that  you set up. Typically you would use a nested style to do somthing like make the first three words of a paragraph Italic, or make a price bold on a menu.
    It's probably technically possible to achieve your title using nested styles, forced line breaks as triggers, and paragraph rules above and below with the proper offsets, but what you want to do is not typically done with nested styles, but rather with a series of individual paragraph styles that are applied in rotation automatically using the "next style" attribute.
    Mikes example is using three paragraph styles for the heading. PStyle1 (just a place-holder name for a pragraph style here) is applied to the text Headline 2, and as part of that style defintion the "next style" is set to PStyle2. PStyle2 is applied to the By line, and its next style is set to PStyle3, which is applied to MW Design. Each of these lines is a separate paragraph (he should have shown you the non-printing characters so you could see the hard returns at the end of each line). PStyle3 should have its next style set to your style for the first paragraph of body text that includes the drop cap, and that one needs a next style set to the paragraph style for your other body text. This last body style should have the next style set to "same style."
    If you are typing directly in ID, for each story, set the style to PStyle1 and begin typing. When you hit Enter to move to the by line, the style will change automatically, and will change again each time you hit Enter until you are inthe second paragraph of the body copy, where it will keep the same style until you change it manually again.
    If you are working with imported text you can select an entire story froom the fiorst line of the title to the last last paragraph of body copy, then right click on the PStyle1 name in the Paragrapgh Styles panel and choose Apply PStyle1 and Next Style and the whole shebang will get the correct styles applied in one click.

  • Apply Nested Styles Script not working for me anymore

    //DESCRIPTION: Applies nested styles as directly applied character styles.         WARNING: This script will override any character styles which are directly applied to the text with the nested styles applied, and formatting might change!
    (function(){
         function IsValid (obj){
              var err;
              try{
                   if(!obj){return false}
                   if(kAppVersion>=6){
                        return obj.isValid;
                   var test = obj.parent;
                   return true;
              catch(err){return false;}
         function ResetFindPrefs(){
              if(kAppVersion<5){app.findPreferences = null;}
              else{app.findTextPreferences = null;ResetFindChangeOptions();}
         function ResetFindChangeOptions(){
              app.findChangeTextOptions.properties = {
                   includeLockedStoriesForFind:false,
                   includeLockedLayersForFind:false,
                   includeHiddenLayers:false,
                   includeMasterPages:false,
                   includeFootnotes:false,
                   wholeWord:false,
                   caseSensitive:false
         function GetTempColor(doc){
              for(var i=0;i<doc.swatches.length;i++){
                   if(doc.swatches[i].label == 'harbsTempColor'){return doc.swatches[i]}
              return doc.colors.add({label:'harbsTempColor'});
         function GetAppColor(colorName){
              for(var i=0;i<app.swatches.length;i++){
                   if(app.swatches[i].name==colorName){return app.swatches[i]}
              return null;
         if(app.documents.length==0){return}
         kAppVersion = parseFloat(app.version);
         var doc = app.documents[0];
         if(kAppVersion<5){
              var charStyles = doc.characterStyles;
         }else{
              var charStyles = doc.allCharacterStyles;
         var tempDocColor = GetTempColor(doc);
         var colorName = tempDocColor.name;
         var tempAppColor = GetAppColor(colorName);
         var removeAppColor=false;
         if(!tempAppColor){
              removeAppColor=true;
              tempAppColor=app.colors.add({name:colorName})
         for(var i=1;i<charStyles.length;i++){
              var savedColor = charStyles[i].underlineGapColor;
              var finds=undefined;
              var findsLength=0;
              do{
                   if(finds){findsLength=finds.length}
                   charStyles[i].underlineGapColor=tempDocColor;
                   ResetFindPrefs();
                   if(kAppVersion<5){
                        app.findPreferences.underlineGapColor = tempDocColor;
                        app.changePreferences.appliedCharacterStyle = charStyles[i];
                        doc.search("",false,false,'');
                        break;
                   }else{
                        if(kAppVersion<6){
                             app.findTextPreferences.underlineGapColor = tempAppColor;
                        }else{
                             app.findTextPreferences.underlineGapColor = tempDocColor;
                        app.changeTextPreferences.appliedCharacterStyle = charStyles[i];
                        finds = doc.changeText();
                        //alert(finds.length);
              }while(findsLength!=finds.length);
              charStyles[i].underlineGapColor=savedColor;
         tempDocColor.remove();
         if(removeAppColor){tempAppColor.remove()}
    This was a script to apply nested styles directly to the text as character styles.It was supplied to me by someone on this forum to help make a file adaptable to an epub doc. It has worked fine for many months but now it does not. I am wondering if the cause is that I have added two nested styles in the paragraphs, where before there was only one. The paras. are currently set up with nested styles as follows:[none] up to En Space, italic through 5 sentences.                  I am using 5 sentences because I can't figure how to use a para. end as a limiter. I know this is confused but any help will be appreciated. Thanks

    That looks like mine (and someone didn't follow my request on this page) :
    http://in-tools.com/scripts.html
    What doesn't work?
    You can PM me, and I'll try to figure out what's wrong...
    Harbs

Maybe you are looking for