GREP styles vs style sheets

I've got a lull at work and decided to work on my list and start to learn GREP so that I can use GREP styles.
The first one is a simple one:  [[A-Z][A-Z]\S+?] This finds anything inside the brackets that starts with two capital letters. I know it works because I can find "[MT2]" in Find/Change.
OK, so I try it in some ID cs5 text with my first GREP style. It's failing the vast majority of the time. So I try lots of different things to see if I can find a pattern of what works and what doesn't. I've tried just the local formatting of a lone 'graf. I've tried making character and 'graf style sheets that incorporate a GREP style with the new character style, say "change type color to green".
I've looked through the forums and don't see others with my problem so it must be something about me or my document. I've used other documents to eliminate that variable. I've gone through the tutorials and David Blatner's stuff and don't see anything I'm doing differently.
When I format some text with a character and 'graf style sheet, it fails. BUT when I change the character style sheet of the source text to "[None]" it works. I've tried starting with text that is '[None]' and a 'graf style sheet of Normal, it works.
But starting with text styled with '[None]' character and a formal 'graf style sheet with a GREP Style, it fails. But when I change the 'graf style sheet to ]'Basic Paragraph]' it works.
I'm trying to find a pattern here, so to speak, and the only thing that has a chance to succeed is setting the character style sheet to 'None.' I just don't see than anyone who uses GREP styles has any problems like I do.
What do you reckon I'm overlooking? I've spent today trying to find what works and doesn't. As it is, I can't recommend this to my co-workers.

Rule of thumb for applying styles is basic formats for the entire paragraph should be defined in the paragraph style. If some selected bit of text needs to be formatted differnently, then you apply a character style (or, if you must, a local formatting override). With Nested Styles and GREP styles, ID has very powerful tools for applying character styles to selected text WITHIN the confines of the paragraph style definition. Most programs don't have that capability.
Should you apply the character syle as a nested or GREP style, or perhaps through Find/Change, or just by manually selecting text and applying the style? The answer to that will depend on a few variables. Should the particular string ALWAYS have a particular set of attributes, no matter what? Find/Change or local selection is the way to go. Character styles applied that way will survive even if the underlying paragraph style is changed to match the character style, then changed again. If the style should be applied to a string in a particular position in a paragraph, even if that position might move around a bit, a nested style is probably the way to go. If you want to make changes to text that matches a particular pattern, wherever it falls, when the surrounding text is a particular style, a GREP style is the answer.
GREP styles are very powerful, but they also use far more in terms of resources than applying a character style using other methods. I've seen reoprts of ID getting bogged down by too many GREP styles.

Similar Messages

  • Right-indent tabs in GREP or nested styles

    How do you specify a right-indent tab (shift-tab) in GREP or nested styles?  Is it possible?  I could only find the regular tab character.
    Thanks, Phyllis

    In GREP it looks like
    ~y
    Mind you, I don't know if that will work for you - I just copied a right-indent-tab to the clipboard and pasted it into the GREP Find What field.

  • I copy text, paragraph styles, character styles & images from 1 document to another only text copies

    I have a few documents that have text and images that is frequently repeated through many chapters of an In Design book. (Printing, exporting etc.) I used to select all in the source document, Command + C to copy it, change to the target document, Command + V to paste it. It worked well for six months.
    About two weeks ago it stopped working (shortly after an update to In Design). I have text, paragraph styles, chacter styles and images in each document. Only the plain text copies over. This is the same for any document.
    I haven't changed Preferences in six months.
    I'm on a Mac 10.8.2, In Design CS6 version 8.0.1.
    It's driving me crazy! It's a lot of work to reformat each 2  to 10 pages after copying it in.
    Steven Hussey

    Source:
    Target:
    Here you go.
    Steve

  • CSS Questions :: Renaming Class Styles & Replacing Styles Globally

    1) Renaming Class Styles
    I have a large website that I redesigned over a year ago and now manage. I've been doing some housekeeping and attempting to rename some of the class styles I've applied to different parts of each page.
    Problem: When I change the name of a class style, the style no longer is applied to the text. I've tried this in both GoLive CS2 (8.01) and Dreamweaver CS3. It's the same with both. They both allow you to change the name, but then the text loses the connection to the class style.
    How can I rename the property (or style rule) without losing the connection to the text it is applied to? To go through and have to reassign the newly named styles to each section of each page would be an enormous undertaking.
    2) Replacing Styles Globally
    Is there an easy way to delete a style and chose a new one to take it's place globally?
    Thank you for any help you can offer!
    Linda

    Hi Nate,
    Thanks for the suggestions!
    > In CS2, The CSS tab on the left side of the site window is handy for that. For instance, if you want to change very instance of a class to a different name, find it in the classes list and rename from there, which should update any pages using the class, and update its name in any external CSS files. Really useful for global changes, but definitely one of those things worth making a back-up of the whole site first.
    For some reason when I do this it breaks the formatting style.
    > If you want to change any references to one class to references to another, go to the same place and just change the class name to the other class name (so, you'd temporarily have 2 items in the list with the same name). Then, if you refresh view, you'll see they've really been consolidated into references to the same class. If that makes sense.
    This does make sense.
    I'm still experimenting. I may need to resume this in the morning. I'll let you know how it goes.
    Linda

  • Paragraph style - next style

    Hi!
    I have a question about paragraph-styles.
    For designing a book I receive a lot of unformatted text from different people. Now, of cause I need styles for different cases. One of those is a question-answer-style (interview -> see image below). You normaly can create a paragraph-style with the option to have, after pushing RETURN, another style (I think in english it has to be „use next style“). Okay, my problem is it works ONLY when I start typing the text word by word in Indesign an push RETURN and going on typing... That´s not what I want. My idea was, to copy an paste the whole text from Word (or from wherever) to Indesign and give´em the style it needs.
    Doesn´t it work somehow? With „nested styles“ it works neither. You can only make a „soft break“ to use next style. So I must insert it one by one after each paragraph. Not so ...
    Nochmal auf Deutsch, falls es missverständlich war:
    Also, ich möchte ein Absatzformat erstellen für ein Interview. Da ich die Texte alle nicht selber schreibe ,sondern lediglich fertig geschrieben erhalte und dann am Stück einfüge, würde es Sinn machen, eine Formatvorlage zu erstellen, welche mir bestimmte Schritte automatisch abnimmt. Es gibt diese praktische Einstellung unter "Absatzformatoptionen" -> "Formatvorlagen" -> "Nächstes Format". Das scheint aber nur zu funktionieren, wenn man den Text buchstabenweise in das vorformatierte Feld eintippt. Dann erst bekommt der Absatz nach jedem Umbruch das ausgewählte Format. Wenn ich das aber bei einem komplett eingefügten Text probiere (nach der Frage "Eingabe" drücken), pasiert nichts. Wieso? Wie kann man das hinbekommen, evtl. alternativ?

    Ok, I understand both, German and English.
    Ok, ich versteh’ beides, deutsch und englisch.
    When you select several paragraphs you can go to first paraagraph style in the pargraph style panel and choose with the right mouse click in the context menu:
    You can apply:
    This selected style
    This selected style and delete Overrides and/or Character Styles
    This style then next style
    This style then next style and delete Overrides and/or Character Styles
    Wenn Du mehrere Absätze ausgewählt hast, kannst Du im Absatzformatbedienfeld mit der rechten Maustaste das Absatzformat für den ersten Absatz auswählen und mit der rechten Maustauste aus dem Kontextmenü aus den verschiedenen Varianten wählen. Siehe oben in der Abbildung.
    Die Menüvarianten mit nächsten Absatz und Zeichenformate und Überschreibungen (nicht in der Abbildung) sind nur dann im Menü vefügbar, wenn das Absatzformat erstens einen entsprechenden Nächsten Absatz definiert hat bzw. Vorkommnisse von Zeichenformaten und/oder Überschreibungen vorkommen.
    PS. Es existiert auch ein deutsches Adobe U2U-Forum.
    Addition / Ergänzung:
    If the text is in only one frame or in only one cell of a table there exists as well the function next paragraph style. When you apply such an objects style to a text frame or to a cell of a table all text is formated according the first paragraph style choosen in the object style or cell style and the following paragraphs are styled as defined in next paragraph,
    Wenn der Text nur in einem Textrahmen oder innerhalb einer Zelle einer Tabelle ist, dann besteht die Möglichkeit, dass im Objekt- bzw. Zellenformat unter Absatzformat erstens dieses aktiviert wird und zweitens, das nächste Absatzformat aktiviert wird. Dadurch werden bei Anwendung des Objekt- bzw. Zellformats der erste Absatz und die darauffolgenden entsprechen mit den definierten Absatzformaten und nächsten Absatzformaten formatiert.
    Message was edited by: Willi Adelberger

  • 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.

  • 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.

  • GREP find and Style

    It is some thing I get quite a bit of, I import text unstyled, into ID!
    I then do a search for a [A Head] leader to a para and change to "A Head"  para style!
    You get the drift I am sure But... what if get a [Bullet] para return, a list of text to be styled followed by [End Bullet]
    Can this be done with GREP?
    It could make a big difference to my make-up time
    Regards
    Lou

    I ws wondering If my question was a bit cryptic!
    What I am doing is importing authors text into the document, I am working on.
    The text is not styled but the required styles are flagged with [A Head], [Body Text] [C head], etc.
    What I then do is search for these flags, I search for eg.
    [AHead]Resources
    then change the hilited text to my style for A Headings, which makes the whole paragraph a A Heading. I do a "change all" and all the A headings in my document are styled.
    The problematic (for me at least) is when we come to eg. Bullet text this will be flagged so
    [bullets]
    Recall information
    Organise or reorganise knowledge
    Use information in a new way
    Critically evaluate scientific information
    [end bullets]
    Is there a way of searching for text between those flags and applying a style to it?
    Looking for help

  • GREP help "apply style before the ' – ' and add return"

    Hi,
    I'm a newbie to GREP and not good at code so I need some help.
    I think if I new the code to say " apply Heading Paragraph style to text before the ' – ' and add return.
    Then it would work.
    I'm OK with looping nested paragraph styles.
    This is what I have currently got:
    Nerang Community Respite Centre – 5578 1668
    Provides a podiatry service.
    www.nerangrespite.org.au
    Ozcare Allied Health Program – 5569 6200 / Fax 5578 1331 
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work.
    www.ozcare.org.au
    And this is how I need it formatted with styles applied
    Nerang Community Respite Centre (Heading Paragraph Style)
    5578 1668 (Phone Paragraph Style)
    Provides a podiatry service. (Descrip Paragraph Style)
    www.nerangrespite.org.au (URL Paragraph Style)
    Ozcare Allied Health Program (Heading Paragraph Sty
    5569 6200 / Fax 5578 1331  (Phone Paragraph Style)
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work. (Descrip Paragraph Style)
    www.ozcare.org.au (URL Paragraph Style)

    Thanks for the help so far. It's working but I still to iron some things out.
    Replacing the em dash with a paragraph space or return is straight forward. But getting the styles applied while doing that is not working.
    Also I want to split the phone and fax separated by the '/" onto separate lines.
    1. Not all the entries are the same see below example.
    This is what I have currently got
    ^p = paragraph
    Nerang Community Respite Centre – 5578 1668^p
    Provides a podiatry service.^p
    www.nerangrespite.org.au^p
    ^p
    Ozcare Allied Health Program – 5569 6200 / Fax 5578 1331^p
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work.
    www.ozcare.org.au^p
    Volunteering Gold Coast – 5591 8388^p
    Cerebral Palsy League of Queensland – 5532 2088 / Fax 5591 7725^p
    Provides community access to people with Cerebral Palsy and related disabilities.^p
    And this is how I need it formatted with styles applied
    Nerang Community Respite Centre (Heading Paragraph Style)
    5578 1668 (Phone Paragraph Style)
    Provides a podiatry service. (Descrip Paragraph Style)
    www.nerangrespite.org.au (URL Paragraph Style)
    Ozcare Allied Health Program (Heading Paragraph Style)
    5569 6200 (Phone Paragraph Style)
    Fax 5578 1331  (Fax Paragraph Style)
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work. (Descrip Paragraph Style)
    www.ozcare.org.au (URL Paragraph Style)
    Volunteering Gold Coast (Heading Paragraph Style)
    5591 8388 (Phone Paragraph Style)
    Cerebral Palsy League of Queensland
    5532 2088 (Phone Paragraph Style)
    Fax 5591 7725 (Fax Paragraph Style)
    Provides community access to people with Cerebral Palsy and related disabilities. (Descrip Paragraph Style)

  • Indesign Styles - Linking Styles to a master document like Cross references

    Appologies if this has been asked before. If it has, if y ou could provide a link, that would be very much appreciated.
    So...
    What im asking is, is it possible to link a styles attributes ( e.g BULLETS) to a document that has a master BULLETS style.
    What would happen when I change the master files BULLETS style, is it would update all the documents in the book to meet the master docs BULLET style.
    I've done this by creating a template doc (.indt) and using that (but its only works for new docs), but a bunch of styles have changed and its a pain in the bum to go back and import styles, and "replace with incoming style" for EVERY chapter/doc.
    Is there a way to update styles much like cross references or page numbers?

    Two different ways: using a Book you can synchronize your styles across documents (always all of them), and you can always load all or a selection of your styles from another document, from the Paragraph (or Character) Style panel mennu.
    Both ways are manual; ID don't update them automatically (and boy! am I glad it doesn't).

  • Missing Font  issue - Delete styles in styles drawer?

    Every time I launch Pages (v. 2.0.2) I get a drop down type of message: The Following errors occurred while trying to open this document: Missing Font TimesNewRomanMS.
    I don't get it. Times New Roman shows up in the fonts in Pages. It is also in my Font Book. Does anyone have any suggestions as to why this is happening?
    Second: I create a newsletter for our church. I have created a template that works well for the information I need to put in it. Would you recommend deleting some of the items in the styles drawer that I will not use? Just wondering...Thanks in advance....Karen

    Karen,
    Times New Roman isn't the same as Times New Roman MS. The "MS" stands for Microsoft, and the document you're trying to open may have been created with that version of Times New Roman. The fact that you get that error message probably indicates that the document was created on a computer that had Office installed. You can probably fix this by highlighting all the text with the MS version, then changing it to the Times NR you have on your computer.
    No need to delete styles, unless their very presence bugs you. They don't add any extra baggage to the document.
    -Dennis

  • Layer Style - Stroke Style

    I have done this a thousand times before and have never had an issue.  That is until I upgraded to CS4.  When I try to apply a Stoke Style to a marquee box w/ an inside position, the entire box fills.  It never used to do this.  It doesn't matter what size stroke I use, it still fills entire box.  Any thoughts?  Thanks.

    That's what I was trying to do.  Again, it's worked before, but not now.  Here are the steps.  Maybe you can see something that I'm doing wrong.
    1.  Create fixed size marquee box on a new layer
    2.  Fill the box w/ a color (usually #999999)
    3.  Add image layer above the box
    4.  Clip mask it to the box
    I tried to add the stroke before an after clipping the image to the box and it still fills w/ a solid color.  Thanks for the advice.

  • Character Styles/Paragraph Styles in Cs5?

    I was under the impression that Photoshop CS5 included new Character Style and Paragraph Style panels, but they are not listed under the Windows menu (as was displayed in a tutorial I was watching). I purchased the extended version of the Creative Suite at the Education discount... I doubt they'd remove this feature (if it exists) for students, but who knows.
    Anyone else know anything about this?!?

    Not quite a "style" palette, but you can set a Tool Preset (upper left of options bar) to a style you want to re-use. I have a couple basic ones in there.
    Type a line of text and style it how you want with the text tool. Then, in that Tool Preset dropdown, hit New Tool Preset (this would be a text preset, in the same list as other tool presets). After you have a couple in there, the next time you want a certain text style, you click the preset name, THEN start typing.
    Again, not really a real text-style machine, but it saves you scrolling huge font lists and re-tracking and re-coloring and etc.

  • How do I make a style specification /style apply to just a single region?

    I have an HTML design that I am copying from an external website, and it is in the form of a <style>style</style> specification.
    When I put it in the HTML header of the page it makes my tabs and other buttons look funny.
    I want to make this style apply to one region only.
    How can I do this?

    Hello,
    It sounds like you having css conflicts between the two different style sets, which can be expected when your trying to clone a site UI by just shoving code in the page.
    Try this add two regions set to No Template surrounding the region you want to style. In the one before the the region you want to style add &lt;div id="cloneme"> and in the one after put &lt;/div>
    In the style declaration of the site your trying to clone put #clone in front of all the style declarations. That probably won't fix everything but it should keep the page in total from changing.
    Take a second to read through this page http://www.w3schools.com/css/css_syntax.asp 15 min will save you hours in the long run.
    Carl

  • Deleting styles in Style Drawer

    Here is some info I have deduced.
    If you start from a blank document you can delete all the paragraph styles except for the following:
    Free Form
    Body
    Heading 1
    Heading 2
    It's not intuitive to me why Heading1 and Heading2 are "required".
    As soon as you insert a table into the document, you will get style: Heading 3 added to the style drawer. You cannot delete Heading 3. If you remove the table, then Heading 3 will disappear.
    There is no amount of tinkering you can do in the table inspector to make Heading 3 disappear. As long as you have a table, you will have Heading 3. Even if it is a 1x1 table with no text entered into it, you will still have Heading 3.
    If you click "Define Default Table Style", you will be punished by having Heading 3 made permanent even if you delete the table.
    Hope this info helps.

    This subject was treated several times.
    These styles are defined for the TOC.
    You can't remove them by standard means.
    You may apply surgery on the Index.xml file but I will not push you on this track.
    Yvan KOENIG (from FRANCE mercredi 22 juillet 2009 17:53:22)

Maybe you are looking for

  • Local testing server root and web url

    I would like to know if I have correctly set up my local testing server for the root folders. Very new to this. Local site folder is at C:\xampp\htdocs\NIF\. Test server folder is C:\xampp\htdocs\NIF\ Web URL is http://localhost/NIF/ Links are relati

  • Help with LTE and Internet Sharing for BUIlD Lumia...

    Nokia, I received the Lumia 920 when I was at BUILD 2 weeks ago. I followed the instructions and the phone mostly works on AT&T. I had a 900 so I assumed my LTE and Internet Sharing plan would easily transfer. Unfortunately that does not seem to be t

  • Help with Canon MX870 - scanner stopped working

    Hi, I bought a Canon Pixma MX870 printer/scanner a month or so ago and it was working fine up till this week. I had installed the Canon software and ran the OS X Software updpate when setting it up. All of a sudden last week I couldn't print. It kept

  • Itunes freezes and stops responding after about 1 minute of being open

    This problem has been happening only recently. It just freezes, I logged onto my computer yesterday and it did the same thing. And it's doing it again today!! its really frustrating! I just re-installed itunes, the latest version for windows. My comp

  • Premiere Pro CC freezes when processing some .mov files

    I'm new to Premiere. I just got some .mov files to be edited.  I'm not sure how they were created. When I try to do anything with them Premiere freezes and I have to force it closed and then manually kill Adobe QT32 Sever.exe in order to restart Prem