Search for end-of-paragraph before end of story? CS6

Hi,
Does anybody know of a way to search for a paragraph mark directly
before an end of story marker? I'd like to get rid of them, e.g., in
footnotes, where the last paragraph mark causes an unnecessary blank line.
Thanks,
Ariel

I found \z on Mike Witherell's great little chart at http://www.jetsetcom.net/useful-resources/indesign-cs6-resources.html
End of paragraph, at least in GREP is a location, not a character (the metacharacter is $) and can't be selected or replaced. Every paragraph has one. Paragraphs before the end of story also have a paragaph break, and that's what you are trying to remove at the end of your footnote story.
@David, Why bother withthe lookahead? \z is the location, so I would presume that the search would start at the end of story and look at the last character. That has to be faster than parsing every break in the paragraph to check for the end of story location after, and there's no possibility that you will actually delete the EOS since it can't actually be selected.

Similar Messages

  • Search for string in paragraph and apply a new character style?

    I'm searching for a way to find a specific string in a specific text frame and make it bold. so my thought was to search and then apply a character style from my template doc. I thought this would work, but I went wrong somewhere.
    newDoc is my document. 
    //something like
    var Bios = "Representative Biography:\r want to leave this text normal.";
    var myTextFrameBios = newDoc.pages.item(i).textFrames.add({geometricBounds:[4.5277, 2.36, 8.625, 5.375], contents:Bios});
    var myTextObjectBios = myTextFrameBios.parentStory.texts.item(0);
    // IS THIS CONFLICTING with my change below? Can I apply a character style within a par styled frame?
    myTextObjectBios.appliedParagraphStyle = newDoc.paragraphStyles.item("CompanyProfile");
                                                      //Clear the find/change preferences.
                                                    app.findGrepPreferences = NothingEnum.nothing;
                                                    app.changeGrepPreferences = NothingEnum.nothing;
                                                    app.findTextPreferences.findWhat = "Representative Biography:";
                                                    app.changeTextPreferences.changeTo = "Representative Biography:";
                                                    app.findGrepPreferences.appliedCharacterStyle = newDoc.characterStyles.item("BoldBioHead");
                                                    // Perform the operation
                                                    app.documents.item(0).changeGrep();
                                                    app.findGrepPreferences = NothingEnum.nothing;
                                                    app.changeGrepPreferences = NothingEnum.nothing;

    @caseyctg – If you want to apply a character style to a text object in a specific text frame, you could restrict the scope of your script to that specific text frame:
    Example with the variable "myTextFrame" you have to define before:
    myTextFrame.changeText();
    Btw.: you are doing a text search and clearing your GREP find/change preferences at the start of the snippet? Why is that?
    You could do a:
    app.changeTextPreferences = app.findTextPreferences = NothingEnum.nothing;
    or:
    app.changeTextPreferences = app.findTextPreferences = null;
    set before the search and after the change, if you want to be on the safe side…
    Uwe

  • Adobe Application Manager keeps searching for updates, but comes nowhere. Freshly installed CS6, so there must be updates

    Just reinstalled CS6 Design and Web Premium.
    It keeps searching for updates but doesn't find any.
    I desperately need the new version of Camera Raw for my new camera.
    Any advice?

    I don't know why you are getting these errors.  Try downloading & installing the updates manually from http://www.adobe.com/downloads/updates.html

  • Employee Termination after payperiod end dates and before end of the year

    I need a best possible senario at my current client one of the employees is going to be terminated *(resignation)on  Dec 29th 2010 and his last payroll for the year runs up to Dec 26th 2010 (12/13/2010-12/26/2010: Check Date 12/24/2010), and there will be a reminder of three more days because his termination on 12/29/2010. But the business is looking to not to carry his additional three working pay days for the next year and W2 and wanted to pay in regular check that will be 12/24/2010 as an additional payment.
    We dont do OCWB checks...can you please give us a best possible senario in SAP will be greatly appreciated

    Hi,
    A few things could be done here:
    1. Put the employee on unpaid leave for the extra three days and pay them out using a one time payment in the last pay period of the year.
    2. Terminate them at the end of the pay period and pay them out with a one time payment in the last pay period of the year.
    It really depends on a few factors.  You have to think about how end dating the employee on a different date them the actual termination date will effect other configuration/customization you my have and should the employee really get a year end tax form next year for those 3 days.
    thanks.
    JB

  • IMP: Read this WIKI and search for ESS MSS issues before posting any thread

    Here is the link to the new WIKI topic area ESS MSS
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/HCM+ESS
    and
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/HCM+MSS
    Feel free to add FAQs, Guidelines, Links and everything of interest for Human Capital Management into this WIKI. With your help this will become a valuable resource for the HCM community for ESS MSS
    I would appreciate if you search in the WIKI and earlier threads, before posting a  new thread
    For Beginners, Please refer the ESS/MSS customisation Guide here
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/108c31e7-b6a7-2d10-3692-c1a9f7a5c4dc?QuickLink=index&overridelayout=true
    Edited by: Siddharth Rajora on Dec 19, 2011 8:35 PM
    Edited by: Siddharth Rajora on Dec 19, 2011 8:36 PM

    teshlachris,
    iTunes, like other applications, will sometimes have issues trying to install from a different admin user than the one used to first install it.
    Did your son install iTunes with a different account? If so, your previous post did not include the fact your son had previously installed iTunes, or I would have suggested trying the install while logged in under his account.
    Hope this helps,
    Nathan C.

  • GREP search for single line paragraphs, CS3

    I need to find all single line paragraphs, apply a paragraph style to them and apply that style's "next style" to the next paragraph.
    Is there any way to do this using GREP?
    Thanks

    This script will do what you ask. Just change the name of the head paragraph to whatever yours is in line 11:
    //DESCRIPTION: Apply Head Style to single-line paras with Next Style in Selected Story
    (function() {
      if (app.documents.length > 0 &&
            app.selection.length == 1 &&
              app.selection[0].hasOwnProperty("baseline")) {
      var myStory = app.selection[0].parent;
      var myParas = myStory.paragraphs;
      for (var j = myParas.length - 1; j >= 0; j--) {
        if (myParas[j].lines.length == 1) {
          myParas[j].appliedParagraphStyle = "H1";
          try {
            myParas[j+1].appliedParagraphStyle = myParas[j].appliedParagraphStyle.nextStyle;
          } catch(e) {} // last para has one line, so ignore
    } else {
       // No document open
       alert("Please select some text and try again.");
    To use the script, copy it from here into an ExtendScript Toolkit document (you'll find that in the Adobe Utilities folder). Save the document into an appropriate folder and run the script from the Scripts panel with a live insertion point in the story.
    To work out where to save the script, open the Scripts panel and then use Reveal in Explorer to find the User Scripts Panel folder.
    If your heading style isn't at the top level in your Styles panel, temporarily move it there.
    Dave

  • GREP remove white space at start and end of paragraph

    Hi,
    Question for the GREP experts: I'd like to construct a GREP expression
    that will remove all white space at the start AND end of a paragraph in
    one go.
    What I've got so far works, but you have to run it twice to work:
    I'll try and post it at the bottom of this message, but since I'm
    posting via email it probably will come out scrambled, so I'll describe
    what I've got so far:
    Two expressions in parenthesis separated by the OR character (pipe). The
    first expression searches for one or more space, tab or white-space at
    the beginning of a paragraph.
    The second expression searches for the same at the end of the paragraph.
    Each expression is in parenthesis, and the two groups are separated, as
    I say, by an OR sign.
    However, this has to be run twice for it to work. For it removes all the
    spaces at the start of paragraphs, then when run again all the spaces at
    the end.
    Any ideas how to get it to work in one go?
    Thanks,
    Ariel
    The expression is:
    (^[ \ts]+)|([ \ts)+$)

    Arïel, your GREP appears a bit mashed up in the forum -- was it something like this?
    (^[\t\s]+)|([\t\s]+$)
    If so:
    1. "\s" is "any whitespace", so you would not need to include "\t" as well. But I would not recommend this, as a HUGE disadvantage of "\s" is it also includes hard and soft returns: double returns are seen as "any whitespace" (the first return) and then "end of line" (the second return), and the first is removed. ("Disadvantage" is subject to what you want to accomplish, by the way. I usually don't want this so I list each possible whitespace character that may be removed.)
    2. The parentheses around each 'section' of this GREP are not necessary. The OR operator is 'highest level' -- in this case, since you have an entire left part OR an entire right part, you can omit all parentheses.
    3. This works for me ...
    ^[\t ]+|[\t ]+$
    ... and despite Peter's not-too-shabby suggestion, I would still recommend using mine instead. It's easier on ID (since it only has to remove text, not "remove-and-then-insert-again" (which is exactly what using the $.. operators do), and, more importantly, there are limits to what $1 can 'pick up'. I can't recall the special circumstances, but I have had text attributes shift, and footnotes and anchored objects disappear/being mucked up/otherwise mangled.

  • How to search for runts, orphans, widows using GREP

    Hello,
    I've been trying to bust my brains on how to do a search by locating single words at the end of a paragraph and on a single line by themselves. Yes, you guessed it! I'm trying to hunt down those orphans, widows that are sometimes called runts. I just don't want to do it manually and you always seem to miss one or two of them. I'm already using the techniques detailed and discussed in length on how to deal with orphans and widows but we have to hunt them down first...
    Here's the closest GREP search I can get:
    (\w+)(.)\r^
    but this searches for all words at the end of a paragraph regardless of whether or not they are sitting on their own on a single line. I need to pin point on single words on a single line.
    Unless of course there's a much easier way than GREP, then by all means do tell..
    Using cs4.
    Any input would be much appreciated.

    Hi Peter
    I posted the following in the IndesignSecrets forum and Jongware kindly pointed me at this thread
    I'm laying up a 600-odd page book for a client who went to design school some years ago where it was drilled into her that "Thou shalt never ever have an orphan" (she means runt). She is insisting that every last runt in the book be exterminated irrespective of word or line length, rivers created or insane ragging. The book contains a lot of text-wrapped anchored boxes,diagrams, etc so of course, every time there's a copy change these move creating new runts. Instead of proofing for important things like correlation of diagrams with text, etc she is fixated on these runts.
    To prevent what little brain I have left from exploding I'd like to write the following Find/Change but have not been able to get the language correct:
    Find: Any word preceded by a space and followed by a paragraph mark
    Change: the space to a nonbreaking space
    Blatner Tools lets me find the runts but they still need changing manually so I've tried your below Find/Change Grep:
    Peter Spier wrote:
    I don't think it's possible to find only last words alone on the line (except maybe with Blatner Tools, which I've never used). My point was that if you don't want to have a single last word you could do something like find ( )(\w+[[:punct:]])$ (there's a space between the first set of parentheses) and replace with ~S$2 and that will replace the last space in EVERY paragraph with a non-breaking space ...
    Unfortunately,I can't quite get the GREP to run properly. It works for plain ordinary paragraphs but for some reason it only works randomly in bullet/numbered lists of which I unfortunately have quite a few. Also, if the last sentence of a paragraph contains a footnote marker (again many of these),  it changes the last word of the actual footnote but not the paragraph which contains the footnote marker.
    Are you able to help with a tweak please.
    Thanks n cheers, Gobit

  • Searching for text containing diacritics (accents)

    iTunes doesn't find titles when searching for texts containing diacritics (like "âàéêèëîïôöûùü", in french). Even when a song title is copied and pasted in the search field, it is still not found. I get the same problem when I call the search from AppleScript. When searching for only the part before or the part after the diacritic, then iTunes does find something. I think it is a bug. Is there someone that knows what to do?

    Too bad the problem is back with the new iTunes 8.0. It is quite annoying since I got a lot of entries with those diacritics...

  • After installing MountainLion I can't search for mails in Mail

    Hi all, after installing Mountain Lion this february I can't search for mails in mail before 2014! But the mails are all there, I can scroll down till 2011 ;-) Its only the search who killed himselfe after upgrading from Snow Leopard.
    When I search for a word via Spotlight, it finds all old emails!
    Whats wrong with my Mail.app?
    Thx

    After reading A LOT of postings about this topic, I found my personal solution Because this problem started after upgrading to a new OSX, I mentioned that it must be something with rights permission. So I went on
    User/Library/Mail right click -> Informations. Look down where you can see which groups has access, read/write. I went on the small wheel to change, set in my password, went on my user name, changed from "read&write" to "just read", switched back, marked "to all subfolders", then OSX asking if I really wanna do this -> yes. Waiting. Finished.
    Now I see all my mails when I search inside the Mail.app.
    Schnell und einfach ;-) Besten Dank

  • In Lr 3.6 how can I search for filenames ending with a # character ?

    The text search seems to treat the # character in some mysterious way so as to not select the files that have it in their name. I cannot find any explanation for this in the documentation. Is there some other character(s) that I have to put beside the # to make it register as a normal character ?
    My specific problem is that I need to locate a bunch of files in my catalog that have names ending with a # character. I want to rename those files in a way that removes the trailing # but not other # characters that separate key parts of the file names. If I can't do that then I want to select that group of files and produce .xmp files for them (I don't normally use .xmp files) so that I can rename the files outside Lr and import them again complete with all previous tweaks and metadata.
    I dare say that I would not choose to name files this way if I started again but I've got far too many to change now. 
    There are also too many for me to want to rename them individually in the Metadata panel if I can avoid it.
    I'm using Lr 3.6 on Mac OSX 10.6.8
    cheers,
    - Alan

    You guys beat me to the answer, which I discovered more by accident than good management.
    Firstly, I had used the # characters because they looked good in list views such as in Windows Explorer or the Mac Finder. That was from before I got into using Lr and I was trying and using several different programs to manage my photos. Then I found that trailing # characters prevented Lr from recognizing the number at the "end" of the file name and so I wanted to delete them.
    Secondly, I got into the Lr rename facility initially to replace what I did with Downloader Pro before switching from Windows to Mac and subsequently found that there is no way to delete a trailing character, but it helped establish in my mind that to Lr the "filename" was just the first part of the name before the full stop and the extension (e.g. .cr2 or .nef or .jpg). Try it - there is a "filename" token for setting up a naming structure that ignores the extension and its full stop.
    This was further reinforced in Library Grid View where the filename and the extension are separated and the extension is not displayed.
    So having used F2 (rename) before I got around to playing with the text search I was set up for failure. Looking for {filename ends with #} or {filename ends with #.} failed because it found nothing as none of my files had a # or #. after the filename extension, and looking for {filename contains #} also failed because it found all of my files instead of just those with the trailing #. I wrongly thought that Lr had trouble seeing a # in the text search.
    Now I have been able to find and select all files with a trailing # in the base part of the filename by looking for {filename contains #.} and generate current .xmp files for them. Then I went outside Lr and used a utility file renamer to get rid of the offending # for the image files and the .xmp files in bulk. Then I re-synchronized the folder(s) in Lr to import those renamed files back into Lr along with all of the metadata, and get rid of the old files from the catalog. Had those files been a part of a collection or stack then I suspect that membership of the collection or stack would have been lost but it kept the keywords, ratings, labels, and image tweaks. Then I got rid of the .xmp files again because I prefer to work without them (less clutter and less chance of other software separating them from the image files).
    So much easier than doing it the hard way
    Thanks for your help.
    - Alan

  • Help-ColdFusion - enabling a user to search for records in a database by entering a startand end date - (CREATEODBCDATE)

    I want to enable a user to enter a start and end date to
    define the period they want to search for records of members who
    joined on certain dates. Funny thing is...I've got it to work half
    of the time. For e.g. I have 4 records between 26/10/2005 and
    1/08/2006. When I enter 01/01/2005 as startDate and 31/08/2006 as
    endDate, I get the 4 records. However, if I alter the endDate to
    01/09/2006 I get every record in the database!!!??? Why's this? I
    can't get my head around it!
    Here's my code:
    First the code for the form the user input the search
    criteria on:
    <html>
    <body>
    <FORM action="memberJDateSearch.cfm" method="post">
    <p>Start Date: <input type="text"
    name="startDate">
    <br>End Date: <input type="text" name="endDate">
    <input type="reset" value="Clear">
    <input type="submit" value="Submit">
    </FORM>
    </body>
    </html>
    Simple enough. Now the code for the process and display page:
    <html>
    <body>
    <cfquery name="memberJDateSearch"
    datasource="jpkelle2-access">
    SELECT *
    From members
    WHERE ((joinDate BETWEEN #CreateODBCDate(startDate)# AND
    #CreateODBCDate(endDate)#))
    </cfquery>
    <table border=1 bgcolor="beige" cellpadding="3"
    cellspacing="0">
    <tr>
    <th>Member ID</th>
    <th>Name</th>
    <th>Sex</th>
    <th>Date of Birth</th>
    <th>Address</th>
    <th>Email</th>
    <th>Date Joined</th>
    </tr>
    <CFOUTPUT Query="memberJDateSearch">
    <tr>
    <td><center>#memberID#<center></td>
    <td width="15%">#forename# #initial#
    #surname#</td>
    <td>#sex#</td>
    <td width="10%">#disp('#dob#')#</td>
    <td>#address#, #town#, #county#, #postCode#</td>
    <td>#email#</td>
    <td width="10%">#disp('#joinDate#')#</td>
    </tr>
    </CFOUTPUT>
    </table>
    <hr><p>End of members list.</p>
    </body>
    </html>
    any ideas? please help me.

    Try formatting your dates first (before the CreateODBCDate
    call). I just tried this on my test page and it worked properly. I
    removed the DateFormat calls, keeping the dates in your format and
    it didn't work. See if something like the following will help:
    <cfset startDate =
    DateFormat("31/01/2006","dd/mm/yyyy")/>
    <cfset endDate =
    DateFormat("01/09/2007","dd/mm/yyyy")/>
    <cfquery name="memberJDateSearch"
    datasource="jpkelle2-access">
    SELECT *
    From members
    WHERE ((joinDate BETWEEN #CreateODBCDate(startDate)# AND
    #CreateODBCDate(endDate)#))
    </cfquery>

  • Insert End of Paragraph mark before any superscript number

    I am formatting a Bible for a client. The text was provided with verse numbers before each verse, but each chapter is one long paragraph. Now the client has decided they want each verse to begin a new paragraph. How can I globally insert an End of Paragraph mark before each superscrpt verse number?

    In case it helps, and for what it's worth, here's what I assumed:
    As in many bibles, the superscript verse number is simply mixed in the text, preceeding the first sentence of the verse. Could be anywhere, and there is no other special treatment involved. Like this:

  • Search for the end of each text frame?

    I'd like to insert some kind of marker at the end of each of my text frames in order to preserve where the page breaks occur, even after I've exported my file. The only function in InDesign that seems to recognize pages is the text variables that can pull the first/last instance of something on a page. Other than that, I can find no way of searching for the end of a page or end of a text frame.

    myFrames = app.activeDocument.textFrames;
    myCharStyle = app.activeDocument.characterStyles.itemByName("Marker");
    for (a=0; a<myFrames.length; a++){
         if (myFrames[a].characters.length>0){
              myFrames[a].characters[-1].appliedCharacterStyle = myCharStyle;
    The above script will apply a character style called Marker to the last character of all text frames in the document (prepare a character style called Marker [case-sensitive] before you run the script, or change the name in the second line.
    I guess a character style isn't an ideal solution, though, as it might override something else.
    Perhaps a strikethrough? In which case, change the 5th line to:
    myFrames[a].characters[-1].strikeThru = true;
    Does that help?
    Ariel
    www.FreelanceBookDesign.com
    Message was edited by: Arïel to correct syntax error.

  • I have an apple iphone 4gs... It is synced with my outlook exchange in the office. If I do a search for emails that also checks the server then all of a sudden I end up with various amounts unread email with the inbox saying "Inbox 71" ..which is not true

    I have an apple iphone 4gs... It is synced with my outlook exchange in the office. If I do a search for emails that also checks the server then all of a sudden I end up with various amounts unread email with the inbox saying "Inbox 71" ..which is not true. The only way to make the inbox on the iphone back to 0 is to delete the account then re install it.
    Anyone have any ideas

    We need to know more about your system, please download EtreCheck and run the report and please post it on your next reply. Then we can see how your system is configured, what apps are on it and look for anything obvious. We will look forward to seeing your report.

Maybe you are looking for

  • Problem with mySQL and Java

    I have a quite annoying problem.....! I use the getText() method to extract characters from a textfield pass them as a string and then using an INSERT store them in the database. When i am entering in the textfield something like the word - Java - ev

  • Error while binding node attribute to a  UI  element (table)

    Hi When I bind a node attribute to a table in a View... It gives a chain of exceptions..starting with java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDAbstractTableColumn      at java.lang.Class.getDeclaredCons

  • Display problem after apple repair

    Hello everyone, Few weeks ago had this problem with vertical lines on my iMac display, which apple told me it was a display problem and they needed to changed it. So far so good... despite the 300pounds i had to pay for a new screen but anyway.......

  • Document Title field is empty in Dreamweaver

    Suddenly ANY page (even old ones) i open in DW CS4 has an empty field in Document Title. Putting any text inside of it doesn't affect anything, however in Source Code and Page Properties there's a correct doc.title, and in the browser it shows as wel

  • Where do I find my old Adobe products to download

    My company has many legacy Adobe products, indesign, acrobat, illustrator, photoshop. These are version before the Cloud. I need to download these to a new computer I am setting up to replace an old computer, where do I find the link t my old product