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

153

Likes

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

Adobe Community Professional , 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.

Likes

Translate

Translate
Adobe Community Professional ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

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

Likes

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
Adobe Community Professional ,
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 Professional Guide (Amazon)

Likes

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 😄

Likes

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

Likes

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
Adobe Community Professional ,
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.

Likes

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? 🙂 

Likes

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
Adobe Community Professional ,
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. 

Likes

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
Adobe Community Professional ,
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
        } 
    }  
}  

 

 

 

Likes

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