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

full justify automatically text in a frame

Community Beginner ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Hi all,

 

I'm doing a book. Some of the left-justified paragraphs are so close to the right margin that I would prefer them to full-justify. I'm doing this manually, is there a tool/script/preference that I can use/activate to full justify text when over 95% of the text frame length?

 

Thank you a lot

TOPICS
Feature request , How to , Scripting , Type

Views

320

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Dec 20, 2021 Dec 20, 2021

If you mean that when the last line of a paragraph almost reaches the right-hand side of the text area, you want the paragraph the full align -- no, InDesign doesn't have a ready tool for this, you'd have to ask someone to write a script for you.

Votes

Translate

Translate
Community Expert ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

That's what paragraph styles are for. Are you not using them?

Votes

Translate

Translate

Report

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 ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

I think she's pretty clear on her request. If the body style is Justify, you get paragraphs where there's just a bit of left-end space. That may look ragged although it's not usually a composition flaw. Another style can make that paragraph Full Justify, but it would be tedious to keep doing so throughout a layout cycle.

 

Not sure if a GREP style could do this. Sounds like a job for Script-O-Man, who ain't me. 🙂


â•Ÿ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) â•¢

Votes

Translate

Translate

Report

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 Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Thank you.

I'll have to find a Script-O-Man 😄

Votes

Translate

Translate

Report

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 Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Yes, of course. But this doesn't come up in paragraph styles, nor anywhere in InDesign apparently 🙂

Thank you for replying

Votes

Translate

Translate

Report

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 ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

If you mean that when the last line of a paragraph almost reaches the right-hand side of the text area, you want the paragraph the full align -- no, InDesign doesn't have a ready tool for this, you'd have to ask someone to write a script for you.

Votes

Translate

Translate

Report

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 Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Thank you!

Any suggestion where I can ask that from someone? 🙂 

Votes

Translate

Translate

Report

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 ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Here in this forum there are people who write custom scripts, and if you offer to pay a fee you'll get more response, probably. 

Votes

Translate

Translate

Report

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 ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

LATEST

One problem with doing it manually is when the text reflows you might not want the fully justified paragraph anymore. You can try this script which will reset all of the document’s fully justified paragraphs to left justified, before fully justifying paragraphs where the last line is over 90% of the measure. You would have to rerun the script after any text edits:

 

 

 

 

//the justification zone as a percentage
var jzone = 90;
var p, eho, fr;

for(var i=0; i < app.activeDocument.stories.length; i++){  
    var s = app.activeDocument.stories.item(i);  
    for(var j=0; j < s.paragraphs.length; j++){  
        p=s.paragraphs.item(j);  
        //reset any fully justified paragraph to left justified
        if (p.justification == 1718971500) {
            p.justification = 1818915700
        } 
        eho = p.characters[-1].endHorizontalOffset; 
        fr = p.characters[-1].parentTextFrames[0].geometricBounds;
        if (eho/fr[3]*100 > jzone) {
            p.justification = 1718971500
        } 
    }  
}  

 

 

 

Votes

Translate

Translate

Report

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