Skip to main content
Klаus
Inspiring
February 23, 2017
Answered

Delete first line indents of page starting paragraphs

  • February 23, 2017
  • 3 replies
  • 5841 views

Hi there!

Could find no solution to that one:

Let’s assume all the paragraphs of my 350-pages document have a »First Line Left Indent«, all right. While this is perfectly fine with me in average cases, I don’t like it at all if a given paragraph starts at the top of a page (text frame).

In other words: If the beginning of a page (text frame) coincides with the beginning of its first paragraph, I would like to change that paragraph to have no First Line Left Indent.

How can that be fixed »automatically« within the whole document?

Thanks a lot for any hints with this!

    This topic has been closed for replies.
    Correct answer Obi-wan Kenobi

    Hi Rob,

    I've modified my approach (I didn't see you comment!)! 

    (^/)


    Maybe I'm wrong but, now, I think it would be better to make reference to the "index" of the character!

    var myDoc = app.activeDocument,   

    myChar0 = myDoc.textFrames.everyItem().characters[0].getElements(),   

    C = myChar0.length;   

    while (C--) if ( myChar0.index == myChar0.paragraphs[0].characters[0].index ) myChar0.paragraphs[0].firstLineIndent = 0;

    (^/) 

    3 replies

    Participant
    May 29, 2018

    I have the answer !! Go to PARAGRAPH STYLES and then select Basic Paragraph. It will undo all current presets but it takes away that first indent.

    jane-e
    Community Expert
    Community Expert
    February 23, 2017

    I am trying to think of a reason why not indenting a body text paragraph if it happens to fall at the top of a page would be a good idea in the first place.

    It's fun to figure out a solution, but does that make it something you want to actually do in a 350-page document?

    It is correct to not indent the first paragraph after a heading or a break. But please re-think about the top of the page! And please don't let it be something that will be making its way into my pile of things to read!

    Klаus
    KlаusAuthor
    Inspiring
    February 23, 2017

    The first line indent is something that disturbs the otherwise smooth top left shape of a paragraph, right? So why would you use it anyway? The only (very) good reason: to help the reader’s eye finding the beginning of a new paragraph after it finished reading the one just on top of it. It cuts a nice gap into the bleak »wall of words« on the left, to be a hint for the eye. That’s it.

    All that is not necessary if the given paragraph starts at the top of the page. No problem at all for the eye to find its beginning.

    Sandee Cohen
    Legend
    February 23, 2017

    The problem is not "finding" the beginning of the paragraph. It's knowing that the sentence starts a new paragraph.

    What you are trying to do is going to make it harder for the reader to understand if a sentence that starts on the top of a left-hand page is an actual continuation of the paragraph before it or not.

    You may not have any respect for the author's (writer's) wishes to designate a certain set of words as a new thought, but I assure you most authors and editors would not appreciate this bizarre way of formatting text.

    Of course it is very possible that you are the author of your own design. If so, I strongly encourage you to ask the designer to change the formatting.

    TᴀW
    Legend
    February 23, 2017

    It can't be done automatically -- there's no way of telling a paragraph style to behave differently if it falls at the top of a page.

    It could of course be scripted.

    But even then, you would need to rerun the script every time some reflow occurs.

    Ariel

    TᴀW
    Legend
    February 23, 2017

    Of course, in the simplest case where there is no risk of reflow, and everything is set up, something like this might work:

    app.activeDocument.textFrames.everyItem().paragraphs[0].firstLineIndent = 0;

    However, there are a lot of oversimplifications here (for instance, if a paragraph begins on the previous page and continues onto the next page...)

    Ariel

    Klаus
    KlаusAuthor
    Inspiring
    February 23, 2017

    Thanks, Ariel. I have very, very little knowledge (and even less any skills) with scripting. Well, it’s a scripting line you stated before, right?

    In the Paragraph-Style-Options-palette, I spotted something called GREP Style. Well, sounds promising ... Can that feature be of any help here?