Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Using GREP to create initial caps on bulleted lists

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #64667
      John Tierney
      Member

      I am trying to create an expression so that the first letter of each bullet point is always a capital letter. I am importing copy from different writers and some will treat bullets in the same manner as text following a colon or a semi-colon (i.e. beginning with a lower case letter). Our style guide calls for a capital for which I have created a character stylesheet. The expression I thought would be quite simple ^ (the first lower case letter at the beginning of a paragraph). The problem I am having is that when I use a soft return the first letter of the following line becomes a capital. Clearly ^ doesn’t distinguish between the end of paragraphs and forced returns. I also would like to exclude “http” and “www” from the taking the Capitals character style sheet where they appear at the beginning of a bulleted paragraph.

      I have had this expression ” (?<!)^ ” suggested as a solution but it doesn’t seem to work.

      Below is an example of what I am getting followed by how it is turning out with my solution followed by how I want it to be fixed (I have included the invisibles at the end of the lines)

      COPY AS IT ARRIVES

      • economic abuse – complete control of all monies, no access to bank accounts, providing only an inadequate ‘allowance’, using any wages earned by the victim for household expenses.^p
      http://www.legalaid.vic.gov.au^n
      Women’s Legal Service Victoria^n
      9642 0877 / 1800 133 302^p

      USING MY GREP SOLUTION

      • Economic abuse – complete control of all monies, ^n
      No access to bank accounts, providing only an inadequate ‘allowance’, using any wages earned by the victim for household expenses.^p
      http://Www.legalaid.vic.gov.au^n
      Women’s Legal Service Victoria^n
      9642 0877 / 1800 133 302^p

      HOW I WOULD LIKE GREP TO SORT IT OUT FOR ME

      • Economic abuse – complete control of all monies, ^n
      no access to bank accounts, providing only an inadequate ‘allowance’, using any wages earned by the victim for household expenses.^p
      http://www.legalaid.vic.gov.au^n
      Women’s Legal Service Victoria^n
      9642 0877 / 1800 133 302^p

      Thanks in advance.

    • #64692
      Justin Sligh
      Member

      John,

      Interesting that the aforementioned Grep Style did not work for you.

      Grep Style
      (?<!)^
      With an associated character style set to “All Caps”

      This will look for a lower case letter that occurs at the beginning of a paragraph but not immediately after a forced line break.

      It gave it a try and it works on my end. If you would like to provide a link to a sample indesign file, I can try to determine the problem.

      In regard to your second question, I believe you need to use a second grep style.

      Grep Style
      (www|http)
      With an associated character style with “Normal” set in regard to case.

      This Grep style should be after the previous one we discussed.

      Using these type Grep Styles we are capitalizing the first letter in each bullet and then the second style applies normal case to www and http.

      • #64709
        John Tierney
        Member

        Working perfectly now. Must have been doing something wrong with GREP order.

    • #64716
      Justin Sligh
      Member

      John,

      No worries. Im glad it worked for you.

      In addition, I was concentrating on a grep solution and did not offer the best solution. I like to ensure that I actually fix text problems in my documents vs hiding the problem with styles. This is because I need to frequently reuse content in other documents.

      An alternative would be to highlight the problem text and select Type > Change Case > Sentence Case

Viewing 2 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads