Grep in Paragraph Style

This is beyond me, but possible.
I have several documents (newsletters and business card files) where the professional designation CFP occurs.
Without fail, the office managers who ask for materials never mention the Reg bullet, but after producing the work, the person with the CFP title can bounce the job.
The CFP designation should always include the Reg. Tradmark symbol.
Can I nest a GREP style whereas if the CFP ever occurs, include the Registered Trademark symbol with Superscript Character style applied?
Can somebody write this invaluable GREP and show me how to include it in the Par Style?
example shown

[Jongware] wrote:
Here is an odd-ball idea. Create a single character "P" in the font you are using *with the (R) attached*. Then apply this font, using a GREP style, to just the letter "P" which is preceded by "CF".
For which you will want <drumroll....> Adobe Community: [Ann] IndyFont Demo: make your own (1 character) font
Not that this isn't one of you signature clever ideas, but you need to be sure that the P isn't already followed by the registered mark as well.

Similar Messages

  • [AS] How to change a paragraph style within any folder in Find Grep?

    I want to change both text and paragraph style
    I do that job very easily until I put paragraph styles in a folder
    How to express the paragraph style "passage" within the folder "1st" in AppleScript?
    In line 18 below, "1st:passage" may be wrong... so I've tried and search for an hour, but I can't get the answer..
    sorry for bad english
    my main()
    on main()
      mySnippet_test()
      myTeardown()
    end main
    on mySnippet_test()
              tell application "Adobe InDesign CS5.5"
                        set myDocument to document 1
                        set find grep preferences to nothing
                        set change grep preferences to nothing
                        set include footnotes of find change grep options to false
                        set include hidden layers of find change grep options to false
                        set include locked layers for find of find change grep options to false
                        set include locked stories for find of find change grep options to false
                        set include master pages of find change grep options to false
                        set find what of find grep preferences to "\\n"
                        set change to of change grep preferences to "\\r"
                        set applied paragraph style of change grep preferences to "1st:passage"
                        tell myDocument
      change grep
                        end tell
      --Clear the find/change preferences after the search.
                        set find grep preferences to nothing
                        set change grep preferences to nothing
              end tell
    end mySnippet_test
    on myTeardown()
    end myTeardown

    Replace the red line with… Replacing name strings to yours…
    set myStyle to paragraph style "Style A" of paragraph style group "Style Group 1" of myDocument
    set applied paragraph style of change grep preferences to myStyle

  • GREP for changing paragraph style?

    Okay folks, I have another one for all you smart people out there. I think GREP can be used to change formatting in the following instance, but I have no idea how to set it up.
    I have a very long document, essentially a phone book-type listing of names, phone numbers, addresses, well over 150 pages' worth. The paragraph styles are fairly simple, only two per listing. The name/phone number is bold with a right hand tab with leader dots to a phone number that is flush to the right side of the column. The following lines are flush left, not bold, but indented 6pts. I've placed the text file and assigned the entire thing the NameListing paragraph style. I'd like to use GREP to find the address lines and change them to the NameListingAddress paragraph style.
    Here's a screen shot to give you an idea. The left column is formatted correctly with both styles, the right column is "raw", all paragraphs formatted with the NameListing paragraph style.
    Is this an appropriate application for GREP? If so, how do I set it up to only change the paragraphs that "don't have tabs"? It would save me a crapload of time.
    THANKS again! --Dina

    If your intent here is to use the character style to trigger a variable, as I belive it is based on your other thread, you MUST apply the character style up to the first tab to pick up the text at the start of the paragraph. There are two approaches to automating the formatting after that, but it may be too late for you to be much help.
    In cases where every listing has the same number of lines it makes sense to use a unique paragraph style name (not necessarily format -- base on on another) for each lline and make it its own paragraph. Set up "next styles" to rotate through the list so each line is assigned the correct style based on the style of its predecessor. You get the rotation to sart over by making the first line style the next style for the last line. This works for manual entry and can be applied to an entire block of placed text in a single operation by selecting the text, then right-clicking the name of the first style to be applied and choose Apply <stylename>, Then Next Style.This ONLY works if you have exactly the same number of paragraphs in each listing.
    The other option is to use forced line breaks instread of paragraphs and use one style for the entire listing. Set a left indent and negative first line indent, create a character style for the part of the first line that you want to appear in your header and apply it Up To ^t^n (that's a little-known trick -- if you enter more than one character in the trigger for a nested style it will activate on the first instance of any of the characters listed that occurs, so for example if you enter the word cat, your style will end on the first, c, a or t that appears inthe paragraph. ^t is the metacharacter for tab, and ^n is for forced line break) so that the style will end at either the tab, if present, or the forced line break if there is no tab (if you use a right-indent tab instead of a regualr right aligned tab [tricky to do a leader, but that's another discussion] substitute ^y for the ^t), then add a nested Line Style for one line. That line style should use a second character style that is based on the first character style you created for the name text and has no other attributes if you want the line to be the same from end to end. Sounds more complex than it is, and will work for listings with variable lenghths. The trick is to repalce your paragraph returns with forced line breaks, and will require a little thinking.
    If using separate paragraph styles for each line, you'd use the same technique of a nested style up to a tab for the first line, but there is no need to get fancier since it will apply to the whole line if there is no tab. The paragraph style, in this case, would carry all of the bold and size formatting (and no need for any indents), and the character style would be nothing more than a name that will allow you to use it in the variable.

  • Grep script that looks for paragraph style A followed by paragraph style B

    Hello,
    I am fairly new to scripting in Indesign and I have run across something I want to script that I don't know how to do. Two of the paragraph styles that are in our files are Normal and Song. I need to add an extra paragraph return between all instances of Normal followed by a Song. I tried to search the forums to see if this was already on here somewhere and if it is I didn't come across it. I would like to set it up as a grep script but if anyone has an alternative way to do this I would like to know also.
    Thanks in advance

    Hi,
    So you could use a script.
    I assume a text frame with proper story is selected and whole story is in one frame or linked frames.
    myStory = app.selection[0].parentStory;
    if (myStory.constructor.name !== "Story")
         alert ("Select a destination text frame, pls\rand try again");
         exit();
    myNormal = app.activeDocument.paragraphStyles.item("Normal");
    mySong = app.activeDocument.paragraphStyles.item("Song");
    app.findTextPreferences = null;
    app.findTextPreferences.appliedParagraphStyle = mySong;
    mFound = myStory.findText();
    len = mFound.length - 1;
    if (len >= 0)
         while (len--)
         currPara = mFound[len].paragraphs[0];
              if (myStory.paragraphs.previousItem(currPara).appliedParagraphStyle == myNormal)
              currPara.insertionPoints[0].contents = "\r";
    rgds

  • Change paragraph style of empty row using GREP

    Hello again ... another GREP query if anyone can assist!
    How can I change a completely empty paragraph line (like those found between verses in a poem, for example) to a different paragraph style so I can control the space better using GREP?

    Fair point ... but if I demonstrate:
    Text line here
    Text line here
    Text line here
    Text line here
    Text line here
    Text line here
    The empty row (4) between the two blocks is in the same paragraph style as the rest of the text. Indeed if lines 3 or 5 were in different styles I could remove the empty row and create a space using before/after spacing. But it is all in the same style. I was wondering if there was a way using GREP to change the para style of an empty row ie 4.

  • Is it possible to have an anchored object linked to a paragraph style?

    I want to link an anchored object to a paragraph style, so that whenever a paragraph that has a particular style is created, an anchored object is created at the same time. The particular application is to label the associate text with the anchored object. is this possible?

    Here an example for a GREP search/replace:
    Search for the beginning of every paragraph + the first character:
    ^(.)
    Replace with the formatted contents of the clipboard + the found character:
    ~C$1
    Uwe

  • How can you create a paragraph style that removes all spaces and forces everything to lower case?

    Hi,
    Is there anyway of using GREP (or some other magical wizardry) to create a paragraph style that automatically removes all spaces and forces words into lower case?
    Strange request i know....I'm wanting to use it for datamerged email addresses.
    Thanks

    so doing it through InDesign is a work around I'm exploring.
    Excel has the 'LOWER' function and the ability to record macros for a quick find/replace on the spaces - so that's definitely a good option if it can't be solved purely in InDesign.
    You can change case via scripting in InDesign. This AppleScript (OSX only) will set the case of the selected paragraph style to lower. It would be possible to add some code that would strip spaces as well:
    tell application "Adobe InDesign CS6"
        activate
            set StyleList to name of every paragraph style of active document
        set myDialog to make dialog with properties {name:"Document Paragraph Styles"}
        tell myDialog
            tell (make dialog column)
                tell (make border panel)
                    tell (make dialog column)
                        make static text with properties {static label:"Choose a Style", min width:150}
                    end tell
                    tell (make dialog column)
                        set myPresetsDropdown to make dropdown with properties {string list:StyleList, selected index:0, min width:150}
                    end tell
                end tell
            end tell
        end tell
        set myResult to show myDialog
        if myResult = true then
            --+1 gets the correct name because list starts at 0
            set myStyle to item ((selected index of myPresetsDropdown) + 1) of StyleList
        else
            return
        end if
        destroy myDialog
        tell active document
            set myStyle to paragraph style myStyle
            repeat with j from 1 to (count stories)
                repeat with i from 1 to (count paragraphs in story j)
                    if applied paragraph style of paragraph i of story j is myStyle then
                        --defines a variable to replace the generic this_text parameter in the handler
                        set SCText to the contents of paragraph i of story j
                        set contents of paragraph i of story j to my change_case_of(SCText)
                    end if
                end repeat
            end repeat
        end tell
    end tell
    on change_case_of(this_text)
        set the_comparison_string to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        set the_source_string to "abcdefghijklmnopqrstuvwxyz"
        set the_new_text to ""
        repeat with thisChar in this_text
            set x to the offset of thisChar in the_comparison_string
            if x is not 0 then
                set the_new_text to (the_new_text & character x of the_source_string) as string
            else
                set the_new_text to (the_new_text & thisChar) as string
            end if
        end repeat
        return the_new_text
    end change_case_of

  • How to apply multiple paragraph styles to one sentence?

    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you

    pchinique wrote:
    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you
    As Diane King mentioned, nested character styles may work for your need. Her example was an initial dropped capital (multi-line first one or several letters of a paragraph.) Dropped caps are a specific type of nested style - always the first one or more characters in a paragraph, two or more lines high.
    To use the general kind of nested style, you need to be able to identify the word or words within the paragraph that gets the nested character style. For example, the third word, or the first two words after the first semi-colon. If there is no pattern of word(s) that can be identified by position or sequence, it's possible that a GREP style can be used to find a common pattern of characters and apply a character style to it, for example a telephone number, date, or currency amount that's identified by a dollar sign, pound, or yuan.
    Search InDesign Help and Google for "InDesign nested style," "InDesign grep style," and similar terms (without quotes) for details. There have been many discussions of GREP on this forum.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Need to add a carriage return in Paragraph styles

    Hi. I am in a muddle. I have a large amount of data from an xml source. I need to quickly add carriage returns appropriately throughout it so that the paragraph styles can be differentiated.I am using tags manually mapped to styles to do this.
    In order to carriage returns am I right in thinking that I can add a GREP style to each para style, and that it will sense the end of the para through the end marker position of each tag? If this is so, what would the GREP expressionlook like to that I can automate locating the end of a tag/para style so that I can add ~b to it?
    Gratefully!

    Hi @chantal_diva arts,
    It seems to be difficult, because you have much more invinsible character than only the xml markers in your document.
    I think one good way could be @obi-wan Kenobis way.
    Perhaps you can upload an example idml on a file hoster of your choise (e.g. xup.in).
    Regardless, you can try the following:
    1. text search:
    <FEFF>
    replace with:
    2. grep search:
    (?<=\b##)(.)
    replace with:
    \r$1
    3. clean document
    grep search:
    #+
    replace with:
    (nothing)  an empty replace field
    Have fun

  • Anchoring Object to a Paragraph Style? Objects behind text

    Hello,
    I am trying to anchor an graphic object to a paragraph style that is a numbered paragraph.  I have set up my numbering and I want a single graphic to be anchored to the number so it appears behind the number each time I choose that paragrah style.
    Is this possible to do?
    Or perhaps I should ask how other people put graphics behind bullets or numbers and have them anchor to the text...
    I sure could use soem help with this; it seems like it should be easy...
    Dave.

    I found this intriguing, so I thought I'd see what I could come up with.
    I made a numbered paragraph style, to start. Then I made a Cyan filled ellipse, which I anchored in front of the first word in one of the paragraphs, and changed the positioning to custom and made sure it was relative to the anchor, and turned off keep within frame boundaries, to allow me to position it "behind" the number. As emmanuel points out, anchored objects are actually in front of the text, so so far it's not working.
    I selected the ellipse and changed it's blend mode to multiply. This will not change it's color where it is over white, but it will darken wherever it is on top of another color, creating a rich black number, for example, if you used black text. Looks pretty good now.
    Select the ellipse and create a new object style based on it. This will by default include the blend mode and anchored object parameters, and be sure the style is applied to the selected ellipse. Now cut the ellipse and paste it on the pastboard out of the way so you don't lose it.
    As long as the object is on the clipboard you can use it for a find/change operation, so you can do that now, or later, just by copying it again when it's convenient. The find/change needs to be a GREP search for ^(.) which means find any character at the beginning of a paragraph, and replace with ~c$1 which means replace with the formatted contents of the clipboard and the found character. Be sure to set the find formatting options to the numbered paragraph style.
    Because you gave the object an object style that includes the blend mode and positioning, and you pasted it as a formatted object, those attributes are preserved and the graphic will be positioned correctly for each paragraph.
    Peter

  • FIND/CHANGE - Applying Paragraph Style

    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.

    graphicsoc wrote:
    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.
    If I understand your request correctly:
    If your paragraph style uses a numbered list to create the "A." and the remainder of the paragraph consists of only "# 70712" that you type in manually (or place from an existing file), I believe that you you don't need GREP. You can format the auto-numbered list differently from the remainder of its paragraph, by specifying a character style for the number portion.
    To extract only the non-numbered portion of an auto-numbered paragraph, for a TOC, in the Table of Contents dialog box, open the bottom part by clicking More Options if necessary, and in the Numbered Paragraphs pull-down menu, select Exclude Numbers.
    Read more about Table of Contents in Help, and/or with a Google search for terms like "InDesign table of contents numbered list exclude numbers" without quotes.
    If you need additional special formatting "tricks" in the source paragraphs, or in the TOC entry paragraphs, look into Nested Styles and GREP
    Styles in Help or Google searches.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Find.text Then apply Paragraph.Style

    Hi Everyone,
    Is that possible we find the text then apply the paragraph style every find text.
    We find [CN] then apply paragraph style "Chap_Num", Find next  [CT] apply PS "Chap_TTL" Find next [COX1] apply PS "Chap_Para".
    Any trick find and apply para style one time.
    Thank you! I appreciate your help and explanation Adv.

    @s_ashok – you'll find the right methods and properties in the CHM file for InDesign CS2 at:
    http://www.jongware.com/idjshelp.html
    Just a few hints:
    InDesign CS2 does not support GREP search/replace, so every line in your code that points to GREP does not work.
    Further: "app.findTextPreferences" and "app.changeTextPreferences" were "app.findPreferences" and "app.changePreferences" in InDesign CS2. And then there were no "findChangeTextOptions" or any counterpart for that in CS2…
    That should get you running…
    I have no InDesign CS2 installed to debug, so this is all I can say…
    Uwe

  • Multiple record data merge into paragraph styles-applies the wrong style

    Hi, I've been working on this project for sometime and everytime I manage to get one part of the workflow to work another seems to break. My agency publishes catalogs in multiple formats: large-print, audio, braille, and HTML. I've been trying to redesing our work process so that the catalogs will be laid out from merged data out of comma-separated file. The data merges have worked fairly well in Word, but InDesign is a challenge. I'm merging multiple records on a page, like a mailing label. The paragraphs need to be formatted and I'm trying to apply a paragraph style to them. After much work, I think I've finally got the data merge to work correctly, but the wrong paragraph styles are applied. I'm going to apply a new master page to the data once the data is merge that uses the paragraph styles for text variable running headers and I need to build a table of contents based on the paragraph styles so I need this to work. Attached are some screenshots.
    Master page set up for data merge with paragraph styles:
    Here is the merged document with the wrong paragraph styles applied:
    I have only a few weeks to get this process ironed out to keep to our rigorous production schedule. If anyone can help I would really appreciate it.
    thanks,
    Lina

    I don't remember this happening in past versions. But I mainly use XML. And a quicky test converting your file to XML worked fine (and besides, it ends up all in continuous text frames...).
    I don't do much GREP. But you can do this via a Find/Replace.
    First, in your main document, you can delete the tags--but do this on a second copy of your working file!
    Change your Content Placement options to not remove blank lines (these are in the Datamerge panel).
    Then after the merge, change the format of the two blank lines at the beginning of the records without the two lines of data:
    Note the Change Format style is changing those two paragraphs to Title.
    Then rerun the find to remove the two blank paragraphs.
    I suspect this can be done easier. I am sitting awaiting an appointment and cannot go much further than this for now, sorry.

  • Get UID of Paragraph Style that is edited in Paragraph Style Options dialog

    Paragraph styles can be edited in the "Paragraph Style Options" selectable dialog. I am adding an addition style option panel to this dialog. How can I retrieve the UID of the paragraph style that is currently being displayed in this "Paragraph Style Options" dialog? Can this be obtained in the dialog controller of the additional style option panel (I need to obtain this UID to display and store additional style data)?

    Thanks Dirk
    One more thing, continuing on the previous theme. I got the paragraph or character style using something like this (thanks to you)
    InterfacePtr<IWidgetParent> iWidgetParent(this, IID_IWIDGETPARENT);
    if (!iWidgetParent) break;
    InterfacePtr<ISelectableDialogSwitcher> iSelectableDialog((ISelectableDialogSwitcher*)iWidgetParent->QueryParentFor(IID_ISELECTABLEDIALOGSWITCHER));
    if (!iSelectableDialog) break;
    InterfacePtr<IUIDData> iData(iSelectableDialog, IID_IUIDDATA);
    if(iData->GetItemUID()==0) break;
    InterfacePtr<ITextAttributes> textAttributes(iData->GetItemUID(),iData->GetItemDataBase(),IID_ITEXTATTRIBUTES);
    if(!textAttributes) break;
    However when I am trying to get text attributes for Find Change dialog, the IID_IUIDDATA == 0 and therefor returns nothing when trying to get attributes.
    Now if I try this code
    InterfacePtr<ITextAttributes> textAttributes((ITextAttributes*)iWidgetParent->QueryParentFor(IID_ISAVEDTEXTATTRIBUTES));
    then I get the attributes for the find text or change text even when I am using grep dialog.
    Theoretically I could get attributes from IFindChangeOptions interface, and I could figure if grep or text is enabled using GetGrepFlag function, but how do I know if I'm in find or change. It should be easy since they are different bosses like you mentioned previously, but I cant figure how to find that info in dialog.
    Thanks

  • Howto always clear paragraph style overrides?

    Using Indesign Cs5. 
    I'm going to import loads of incopy-text that has already ben placed on other layouts. The problem is that these texts contains some paragraph styles overrides that I do not want to include in the new document. 
    Question: is there some way to tell indesign to automatically clear paragraph style overrides?

    Reading through that article, it appears that added styles will be ignored with certain exceptions that in turn are overrideable in ID. But I am working in the blind here.
    I know there are GREP routines you can use to set chosen paragraph styles to any other and it is fast to do. Search the forum for these.
    Because I work by myself and don't receive anything but funky Word or text documents that I fully set in ID, I haven't faced what you are.
    Hopefully someone who does use IC will come along to actually help you.
    Mike

Maybe you are looking for

  • How can I make mac except capture from my canon xlh1?

    How can I make my imac recognize my canon XL1 Camcorder in Final Cut Express

  • Garageband Loops Not There - Please Help!

    Hi there, About a month ago I had to replace the hard drive on my macbook. On opening Garageband today I found that the loops were all greyed out and when I clicked on them I was given the option of: Downloading them (basically a Software Update and

  • Issues with OCI connection..

    I've been working on this for over a day, with infinite variations on the theme; but I cannot get a basic query to give back data. I've got the following code: <? $orcl = <<<OUT (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT

  • Satelite C660 refuses to shut down

    Hi all, hope someone can help, my laptop is refusing to shut down and I've no idea why. Anyone have any suggestions? Thanks

  • "nested folders" error message

    When I use Disk Utility to "Verify Disk" (my iMac's internal hard drive), it says in red: "nesting of folders has exceeded the recommended limit of 100" . At the bottom it says in green "Volume passed verification," but under that in red it says "Vol