1 Reply Latest reply on Jan 24, 2013 10:40 PM by Vamitul

    Inserting non-breaking spaces between specific word combinations

    sminchnz

      Hi all,

       

      I'm a bit of an InDesign novice, and need to work out an efficient way to automate a typesetting job. The story is that the work we're publishing is in the Maori language, and there are certain word combinations that are separated by spaces but need to be typeset so that they don't break across a line. When you import a doc file the line breaks can be anywhere, of course, and we've previously gone through and checked manually that all is well, with any changes that need to be made being done by hand (with changes cascading through the rest of the paragraph, of course). As you can imagine, this can be pretty time consuming, and it's all wasted if the client then asks for the font to be slightly larger etc.

       

      I'd like to help avoid this by running a script that finds and replaces the space between certain words with a non-breaking space. We're currently producing a list of the combinations where this will occur. Are you guys able to show me how to produce a script that will replace "word1[space]word2" with "word1[nbsp]word2", "word3[space]word4" with "word3[nbsp]word4"...?

       

      Thank you for any help you can offer!

       

      Stephen

        • 1. Re: Inserting non-breaking spaces between specific word combinations
          Vamitul Level 4

          simplest way: use findChageByList script provided by Adobe.

          the syntax for the list should be like this:

          text[tab here not space]{findWhat:"word_one word_two"}[tab here not space]{changeTo:"word_one^Sword_two"}[tab here not space]{includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:true, caseSensitive:true, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}

           

          add as many lines as needed and adjust preferenecs to your likings.