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

finding normal type followed by italics

Return to Member Forum

  • Author
    Posts
    • #57390
      Anonymous
      Inactive

      How can I find, anywhere on a line, a sequence of characteres in “normal type” followed by a sequence of characters in italics? If this is possible, it would be a very powerful feature.

    • #57393
      David Blatner
      Keymaster

      I don't think you can search for formatting like that in ID's find/change. But what if you exported the text as InDesign Tagged Text and then searched that txt file?

    • #57395
      Anonymous
      Inactive

      Thanks, this sounds very promising.

      Unfortunately, producing such tagged text files seems to be a very burdensome task: my documents contain hundreds of stories each, so I have to place my cursor in each of these stories and produce a tagged text. Or can I do this with just one click?

    • #57400

      At least a partial solution is “look for an italic text that's not preceded by italic text”.

      … (silence) …

      Well, I guess that describes what this GREP does ;)

      (?s)(?<!.).+

      — with “Italics” in the formatting. It'll happily find anything in italics, but you cannot specify the text before it must be “Regular”. It may be anything else, such as “Regular”, but also “Bold”, “Oblique”, or — the bane of many a search-and-replace operation — Adrian Frutiger's dreaded “46 Light Oblique”.

      It also finds italic text right at the start of a story, or right at the start of a table cell or footnote; and that's because, well, in those cases there also is no text in italics before that, is there? No point in arguing with a computer.

    • #57401

      (Major “Duh!” … Of course this is totally equal to just finding anything that's “Italics”! … I'm sure I had something else in mind when writing that GREP expression …)

    • #57404
      Anonymous
      Inactive

      Thanks.

      I suppose you cannot find, with GREP, “any character in a particular formatting” followed by “some other character in a different formatting”, right?

    • #57405

      No, because there is only one place where you can put the formatting — so it's All Italic or it's not.

      A Little GREP Gripe describes a similar problem. (Spoiler Warning: The “solution” I proposed was a cheat.)

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