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.

Similar Messages

  • How do I access *load paragraph styles* from the styles pallet menu?

    Adobe help informs me that I can bring styles from other documents into an existing document by doing this:
    "To copy paragraph styles from one publication to another choose Load Paragraph Styles from the Paragraph Styles panel menu."
    I do not see any menu in the paragraph style menu. I am in CS5. What am I missing?

    I'm sorry, I found it. I had to go back to my G4 and the CS version to see what to do. I did not recognize the small feature on the window yielding the menu.

  • 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 do I apply a grep style to the plus (+) sign?

    I was able to apply a grep style to the minus and equal sign, but not the plus sign "+".  It appears the plus sign means 'apply to all' in the grep style box.  Can some assist me with this? Thanks in advance.

    Thank you. It worked perfectly.

  • Why not there a "Find/replace in Grep style" inside the Para style?

    Whenever I type a digit in my text, it should be colored red as per style. I do this by grep style inside the para style, but now I need to insert brackets before and after of the digit(s), i realize that there is no replace option in grep style in the para style. Why not it be there a "find/replace" instead "find" only as it now appears?

    Ya, this is simple, finding a specific para style with digit and change them, when the book in first pass. But while in the correction pass of the same book, whenever we are inserting more text into the document, there are chances to be unaware of the digit style that, it should be surrounded by brackets, and it happened earlier so I have a thought of it. Again, while paginating a book having more than 350 - 600 pages, and 3 to 4 guys working in it, I think this may work.
    Expecting your valuable comment on this.
    Thangaraj Mohan.

  • In FrameMaker 9.0.3 and 9.0.4, I cannot set tab stops for a style in the Paragraph Designer.

    In FrameMaker 9.0.3 and 9.0.4, I cannot set tab stops for a style in the paragraph designer. Here are the steps to dysfunction:
    1. In Paragraph Designer, for Tab Stops, click Edit. Edit Tab Stop dialog box opens, and the Paragraph Designer dialog box closes.
    2. Type value in New Position box.
    3. Click Continue. The Edit Tab Stop box closes.
    4. Open Paragraph Designer. No tabs are recorded.
    Discussion of a similar problem occured on this forum in June 2010. At that time, the resolution seemed to be to upgrade to 9.0.3. Has anyone else encountered this problem with these versions?
    Thanks.

    Hi, Arnis,
    Brilliant! Thanks so much. I only looked at the later discussions of that thread, which seemed to indicate the problem would be solved by an upgrade to 9.0.3.
    -Trish

  • Grep style: identify the letter l first in a paragraph

    Grep style: I want to add a character style to the letter l, but only if it is the first character in a paragraph and the next character is a single space. Basically, I would like to change the font to zapf dingbats, but only for the letter l when it is the first character  in a paragraph. This will generate a bullet character as first letter. has anyone any idea how this grep search should be? The query should look for the letter l and a single space first in a paragraph!

    The GREP for this would be:
    1. Start of paragraph: ^
    2. Followed by a single letter "l": l
    3. A positive lookahead for a single space: (?= )
    ^l(?= )
    Uwe

  • How to copy and paste web design styles from the web

    I am not doing so well with the web style templates provided in the latest versions of IWeb.
    Is there a way to copy and paste the html code from some site who's design I like then paste it into my Iweb and then put in my content to the style that was up?
    I used to be able to do do this about 10 years ago with a Claris Homepage program, don't see how to do it with IWeb.
    It's like I have to do everything from scratch, draw background boxes, don't see frames.
    Thanks everyone..
    Jack E.

    Welcome to the Apple Discussions. No you can't copy the code form a site and use it in an iWeb page. To use frames you would use an HTML snippet and this code:
    <IFRAME SRC = "URL OF PAGE YOU WANT TO FRAME" WIDTH="XXXpx" HEIGHT="XXpx" FRAMEBORDER="0" --if "0" no border, otherwise "1" with border MARGINWIDTH ="0px" MARGINHEIGHT="0px" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>
    You can get more info at this site:iFrame code.
    I've creates a demo site which describes many of the features and tricks I've learned from this forum. This iWeb FAQ site is a wealth of information on using iWeb and all of it's capabilities.
    OT

  • CS4: How to load GREP styles from CS3?

    I imagine there must be a way to get my many custom GREP searches into CS4, but I know not how. Anyone know?
    Thanks in advance,
    Aaron

    Go to your InDesign CS3 Preferences folder (in Home > Library > Preferences > Adobe InDesign > Version 5.0) and you'll find a folder called Find-Change Queries. In there will be a GREP folder with your saved custom searches. Each saved search is a small .xml file.
    Copy those XML files and then paste them into the same place for your CS4 Preferences: Home > Library > Preferences > Adobe InDesign > Version 6.0 > en_US > Find-Change Queries > GREP.
    You don't need to quit out of either program to do this, as soon as yo paste in the GREP files they'll appear as options in the Find/Change dialog box.
    AM

  • New styles from the TUMI Alpha Bravo Collection: now available at Best Buy

    If you’ve been reading the Best Buy Plug-In Blog for a while now, you’ll probably be familiar with TUMI. They do a lot of stylish, well-made, super functional luggage pieces … but this fall, they’re coming out with a collection that’ll change the way you look at TUMI for good.

    I was able to place an order for the new 3DS XL MM Edition via bestbuy.com. My order shows processing so all seems well. My question is in regards to when this will ship? I usually use amazon.com for online preorders as they are shipped so that they arrive on release day. Is this the same with bestbuy.com? If not, would it be possible to switch to in-store pickup so that I can get the item on release day? Thanks.

  • A GREP style not holding in CS4

    Hi,
    OK...I have been playing with a bunch of these GREP searches in CS4 where I can put them in as a stylesheet.
    I have a character style that is called superscript, that automatically makes a ® superscript when it is typed, and that is working fine.
    Then I added my lookahead for any TM or ® to add a 100 tracking in between the letter and the tm or ®. It does it if I have the type in the box and apply my style to the whole box. But, if I go in and make changes to the text, the ®-superscript automatically happens when I type a new one, but the tracking doesn't automatically happen. What's worse is, if I select the text and try to apply the style manually, it still doesn't not apply the 100 tracking. I have to make it a basic or none style and then re-apply the good one.
    If it is in the GREP style of the paragraph style, shouldn't it do it dynamically?
    Here is my image.
    thanks!!
    babs

    The only object I know of you can create an InDesign and specify whether it prints or not in the PDF is a button. That would definitely NOT work with character styles.

  • Nested Line Style affecting my GREP style

    Hello all.
    I'm formatting a large book at the moment and am trying out a "runt fixer" to prevent bad sentence breaks in columns. So far I have created a character style that only applies the "no-break" attribute, and have two GREP styles - one looking for a space and 8 characters or less before a full-stop, exclamation mark or question mark; and another looking for the 8 characters or less then a space after a full-stop, exclamation point or question mark. The codes are:
    \s.{1,8}[.!?]
    and
    (?<=[.?!]\s).{1,8}\s
    It works... nearly. It has issues when fullstops are used in numbers such as displaying currency, dates... but largely works for the text.
    The problem occurs when I go to the Drop Caps and Nested Styles feature, and use the "New Line Style" - in this instance it was used at the beginning of chapters to make the first line smallcaps. Instead, something strange happened to the second GREP style - it no longer worked.
    In case I'm not explaining myself properly, i've uploaded a sample of what is going on here: https://dl.dropboxusercontent.com/u/55743036/runt-issue.idml
    The first page is OK, but the second page displays the fault. I've colorised the GREPs so that it is clear what is not breaking at the end of a sentence and what is not breaking at the start of a sentence.
    Has anyone experienced this before or can tell me what is going on? it is my error or is it a bug?
    Colin

    @Colin – I thought, I could make it work, if I introduce another GREP Style BEFORE the one that is not working: A GREP Style, that is doing nothing (applying the character style "[None]" to a character like "§" that is simply not in the text. Did not work.
    Another attempt with InDesign CS5.5 OSX 10.6.8: I made a new paragraph style BASED ON the one that is not working. Changed nothing in that new one, just let it be based on the not working one.
    Now: THAT IS FINALLY WORKING! But in a different way I expected…
    "Will work" is based on "not working".
    Here all GREP Styles used in "Will work":
    Uwe

  • Apply grep style only once

    I can't get my brain around what is probably a very simple problem: I want a paragraph style that applies boldfacing to any character up to an including the first colon in a paragraph. If I used  a nested style "through 1 :" the whole graf is bold if there is no colon. So that's out.
    A grep style ".+: " seems to work in most cases, but if there's a second colon, the boldfacing is extended to that point. What I think I want is a grep style that works "zero or 1 times" but I cannot figure out how to use the ? to make that happen.

    @Jongware – I think Robert wants to limit the GREP style to the first line of a paragraph.
    But unfortunately GREP in InDesign does not know about line endings.
    In scripting we could do something like what he wants, but comes with some obstacles, because the GREP will apply a character style, that will probably change the line ending. A very dynamic situation…
    Example 1
    Basic situation:
    This is my text here comes the colon: and
    here another one: that Robert don't like
    to take into account using the GREP style.
    Formatted after  the GREP style is applied:
    This is my text here comes the colon: and
    here another one: that Robert don't like
    to take into account using the GREP style.
    As I understand it, in case that the first colon will leave line one, only the first line should be formatted like this:
    (Case 1)
    This is my text here comes the first
    colon: and here another one: that
    Robert don't like to take into account
    using the GREP style.
    Or should it be, that the style should only be applied, if it's in the first line?
    (Case 2):
    This is my text here comes the first
    colon: and here another one: that
    Robert don't like to take into account
    using the GREP style.
    But what, if the colon in the basic case is at the end of line 1 and will be shifted to line 2 after formatting?
    What should happen then?
    That is simply not possible to format automatically (dynamically) using GREP styles in InDesign.
    Uwe

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

  • CS5 - Grep style problems

    Where I work the treatment of the type is to reduce the size of all-caps, a string of numbers, or a combination of the two. For years they've been doing it by setting up a Character Style for each Paragraph Style (e.g., "Body smaller" for "Body), and then also alternate Character Styles if the text already has a Character Style applied to it ("Body Red Italic smaller" for "Body Red Italic"). You can imagine this quickly becomes a lot of styles.
    So I thought with CS5 Grep styles I could set this up in the Paragraph Styles. I want the Grep style to apply a Character Style that is nothing but a Horizontal and Vertical scale of 95%.
    The types of things I'm wanting Grep to find are below. But I'm only wanting to apply the style to the letters and numbers and not the punctuation.
    AAA
    B23
    33,333
    4,444,444
    U.S.A.
    (ABC-1)
    I went at writing this a piece at time, so it is not very elegant. Here's what I have:
    \d{2,}|\u{2,}|\u+\d+|\d+\u+|\d+[[:punct:]]\d+|\u+[[:punct:]]\u+|\u+[[:punct:]]\d+|\d+[[:pu nct:]]\u+
    This does a pretty good job, with a couple of problems.
    1) It is "catching" (applying the character style) to the first punctuation if there is a single character before it (e.g. the first piece of punctuation in 4,444,444 and U.S.A.)
    2) It is not always "catching" instances where there are more than three sets of numbers/caps in an item (e.g. U.S.A., it doesn't style the "A"). I know Grep is probably just doing what I'm telling it to do, but I can't see how to fix it.
    I would appreciate any help anyone could give me.
    Thanks.
    Tom

    You can't do all this in one GREP style. The one you came up with is already difficult to read, so you can imagine what happens to its readability by the time you get it to work. Apart from that I don't think it's possible to do what you want in one expression.
    So you really need to split up your task into several chunks, all of which you can then add to the same paragraph style. Your expressions may be more efficient, but they're much eaier to understand and maintain. Here goes.
    The easy ones are AAA, B23, and (ABC-1), all of which are captured by this expression:
    \(?\u[-\u\d]+\)?
    U.S.A. is more tricky, and it needs to be split in two itself. The first part captures series capital+period, but not the last one:
    \u(?=\.\u)
    Capturing the last capital+period is interesting in that it requires a negative lookahead embedded in a positive lookahead, which I wouldn't have thought was possible, but it works:
    (?<=\.)\u(?=\.(?!\u))
    For the numbers you's do something similar.
    Peter

Maybe you are looking for

  • Not able to install mac os x server 10.5.4

    Hello, I've inherited a MAC g5 from a previous sys admin. it had a number of issues so i decided to do a clean install. i've set in my os x 10.5.4 server and rebooted that didn't work. when i chose the dvd it just hanged there. so i installed a mac p

  • Dataschema in XML form builder

    Hi all i started doing one application on xml form builder .i created a project . when i click on name space i is showing an defeult value but when i right click on the dataschem it was not showing any values.i hane to add some structure to the data

  • Watch TV In which way?

    I wanna ask from all of you, that in which way, You like to Watch TV, If you wanna watch tv online or you still used to watch tv with the cable connection?

  • Anyone having problems changing iCloud Time Zone?

    Hi all. I've set up my iCloud services here in the UK and all seems fine so far. However, when I logged into iCloud.com for the first time it set my Time Zone as Cupertino (the number of times Apple do this I think I might have to move there just so

  • Oracle 7 SQL Reference Manual

    I am new with Oracle and require the reference manual to find out more about join conditions. I have some difficulty finding a document from the Oracle web on SQL reference.