Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Checking Punctuation

New Here ,
Jun 11, 2010 Jun 11, 2010

Hi friends

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

TOPICS
Scripting
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2010 Jun 12, 2010

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!

Peter

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 12, 2010 Jun 12, 2010

          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]

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 12, 2010 Jun 12, 2010

myPara.lines.everyItem().contents

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

Harbs

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 06, 2010 Aug 06, 2010

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.contents.substring(ln.contents.length - 1, ln.contents.length - 2) == "[[:punct:]]")

regards

Masthan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2017 Aug 04, 2017
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines