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

Need GREP for superscript interchange

  • This topic has 4 replies, 2 voices, and was last updated 7 years ago by Anonymous.

Return to Member Forum

  • Author
    Posts
    • #113664
      Anonymous
      Inactive

      I want a grep to change online dot with superscript to Superscript with online dot

    • #113666
      Peter Kahrel
      Participant

      What is an online dot? Better show a screenshot that shows what you have now and how you would like it to be.

      P.

    • #113668
      Anonymous
      Inactive

      Online dot means period in online for example (.12) 12 will be in superscript. I want to interchange both superscript and period (12.) 12 will be remaining in superscript

      Note: How to attach screenshot?

    • #113673
      Peter Kahrel
      Participant

      Aha, ok. So if a period on the baseline is followed by a superscripted number, the period and the number need to be swapped. If that’s what you want, then that’s not possible just like that because in InDesign you can’t search for two items with different formatting. So if you search for (\.)(\d+) you can’t specify that the dot should be normal and the number in superscript. You can use a three-step approach for this: expose the superscript as a text tag, do the change, and revert the superscript code. As follows:

      1. Find what: (\d+)
      Change to: %sup%$1
      Find format: position superscript
      Change format: position normal

      .12 is now changed to .%sup%12
      You can use any text tag you like.

      2. Find what: \.(%sup%\d+)
      Change to: $1.
      (Blank the Find format and Change format panels)

      3. Find what: %sup%(\d+)
      Change to: $1
      Find format: leave blank
      Change format: position superscript.

      P.

    • #113696
      Anonymous
      Inactive

      Thanks. It is working

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