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

Delete strikethrough from space at the end of a line?

Tagged: 

Return to Member Forum

  • Author
    Posts
    • #14328449
      Katherine Morgan
      Participant

      Hello friends, this is my first time posting in the forum and looking forward to hearing from you!
      I’m working on election materials and the legal text for the propositions has to be reproduced exactly as provided. There are places where whole paragraphs of the text are struck through (strikethroughed?) When I apply strikethrough in InDesign, the strike continues in the space at the end of each line. The text is flush left ragged right.
      Example:
      (Imagine this entire line was struck through)
      What InDesign does:
      1. The bill was for emergency services, including under circumstances described by section 20-2083, subsection A and health-
      What I need it to do:
      1. The bill was for emergency services, including under circumstances described by section 20-2083, subsection A and health
      Because the original provided text does not have the strikethrough in the space at the end of the line, I’m having to individually select each space and delete the strikethrough. This concerns me for a couple of reasons: huge potential for error if the text has to reflow and of course, it’s super time-consuming.
      I’ve searched and searched for a preference, style, etc. that will automatically do this. Any ideas?

    • #126311
      David Blatner
      Keymaster

      Hi Katherine, This is a fascinating question… the problem is that features such as grep styles cannot see where on a line text is… for example, you cannot say “find all the spaces at the end of a line.”
      However, scripting allows this. A number of years ago the scripture Jongware wrote a script to remove all the underlines at the end of lines. Very similar problem. You can see that thread here.
      So I took that script and edited it slightly to remove strikethroughs. You can download the RemoveStrikethroughs.jsx script here by right-clicking the link and saving the .jsx file to disk. (If it gets saved with .txt at the end, then remove that… so it ends with .jsx.) You can learn how and where to install the script here:
      https://indesignsecrets.com/resources/faq#145
      Once it’s installed: Select the text you want to apply it to (with the Text tool), then run the script from the Scripts panel. All the spaces at the end of lines will have a character style applied to them… and that style (called “NoStrikethru”) will remove the strikeout formatting.
      If the text reflows, you may find those spaces in the middle of paragraphs (with no strike through). So you may have to reapply the strikethrough to those, and then run the script again.

    • #126312
      Katherine Morgan
      Participant

      Thank you, David, for perfectly understanding my long-winded explanation and responding so quickly! I really appreciate you going the extra mile to edit and provide the script along with excellent instructions on how to use it. I’m going to give it a shot and will report back. :-)

    • #14331434
      David Blatner
      Keymaster

      Anything to help a free and fair electoral process! :-)

    • #126532
      Katherine Morgan
      Participant

      DAVID! I just had a chance to install and run this script, it is AMAZING! Thank you again for saving me hours of work.
      Do you know if there’s a way to further modify the script to not include the strikethrough in the space before a tab indent?
      Example:
      –––––1.–A–bunch–of–strikethrough–legal–text–
      Needs to be:
      ( blank )1.–A–bunch–of–strikethrough–legal–text–

    • #126542
      David Blatner
      Keymaster

      So glad that worked for you, Katherine.
      I’m sure the script to be modified to do that, but I’m not a good enough scripter to do it. But another way you can do this is by searching for all the space characters at the beginning of a paragraph with Find/Change and then removing the strikethrough.
      For example, open Find/Change and click the GREP tab. Search for ^+ (that means “all the spaces at the beginning of every paragraph, whether it’s a space or a tab or whatever)
      Leave the Change to Blank. But click in the Change Format section, then click the Strikethrough area and set the checkbox to off (blank).
      When you Change All, it will remove the strikethrough formatting from the spaces at the beginning of paragraphs.

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