5 Replies Latest reply on Aug 4, 2017 9:28 AM by shawalaahmed

    Checking Punctuation

    Oviya... Level 1

      Hi friends

                     Can we check punctuation marks in every end of the line in Indesign document.

        • 1. Re: Checking Punctuation
          Peter Kahrel Adobe Community Professional & MVP

          Check in what way?


          - "Line" as in end of line or end of paragraph?

          - Check whether there is a punctuation mark or whether there isn't?

          - Check for which kind of punctuation?

          - Just one punctuation mark or more?

          - In which version of InDesign?

          - Which platform?

          - Which script language?


          There's a start!



          • 2. Re: Checking Punctuation
            Oviya... Level 1

                      1. Start & End of the Line in every paragraph. Not end of the paragraph.

                      2. All the punctuation marks we have to check, and it dont want to appear more than 2 times in end of the line in a paragraph.

                      3. If its appered more than 2 times in the paragraph ie start or end of the line we have to identify tat paragraph.

                      4. I need to find this Punctuation marks in Indesign file using InDesign Scripting [Indesign CS4]

            • 3. Re: Checking Punctuation
              Harbs. Level 6



              This will give you an array of the contents of each line. You can loop through that and figure out what you'd like...



              • 4. Re: Checking Punctuation
                SB Masthan Level 1

                Hi All,


                I am also expecting the answer for this discussion. How can we compare the punctuation elements with the content. I have tried with below command but couldn't get the result. If any solution to compare the content with puntuations globally, it will be really helpful for us.


                                if (ln[i].contents.substring(ln[i].contents.length - 1, ln[i].contents.length - 2) == "[[:punct:]]")




                • 5. Re: Checking Punctuation

                  Why not? Here I brought a useful punctuation checker. I hope this one will helpful for you.