Skip to main content
grif030
Participant
April 6, 2019
Question

Paragraph rules: fixed distance

  • April 6, 2019
  • 2 replies
  • 2862 views

Hi there… i couldn’t find the answer to this question in the forum, so…

I would like to create a rule above a heading that has always the same distance between the top of my heading and the paragraph rule above it. Independently the heading font size. Let me explain.

Say i have a heading font size of 72 pt and a heading rule above with an offset of 24 mm. When i change the heading font to example 36 pt the distance between the top of the heading and the heading rule increases, because the offset setting is still 24 mm. To keep the distance the same i need to change the heading rule offset. Is there a way or a work around to keep the distance always the same, independently the heading font size and without changing the heading rule offset manually every time?

Hope you understand what try to achieve! Thanks!

This topic has been closed for replies.

2 replies

rob day
Community Expert
Community Expert
April 6, 2019

When i change the heading font to example 36 pt the distance between the top of the heading and the heading rule increases, because the offset setting is still 24 mm.

How many variations of the headline are there? Can’t you make the adjustment in your header style sheets?

grif030
grif030Author
Participant
April 6, 2019

I want to to use this in a magazine design. So the size of the headings are changing constantly, depending on their length and the space there is on the page. So changing them manually is timefull and creating different paragraph styles is pointless.

rob day
Community Expert
Community Expert
April 7, 2019

Hi Rob,

calculating white space of text could be one of the functions of Adobe Sensei.

Currently build in with Content-Aware Fit.

Adobe is advertising Adobe Sensei in "What's New in InDesign" as very first item:

New and enhanced features | Latest release of InDesign

Regards,
Uwe


calculating white space of text could be one of the functions of Adobe Sensei.

Hi Uwe & Michel, It seems like the problem with a percentage amount is the percentage should be based on a before and after change, and not a font metric like cap height or ascent. Seems like Sensei works by knowing the actual starting size.

I’m wondering if the better scripting approach is using a dialog to capture the new text size and then apply the change as a percentage to the text. In that case the white space and rule thickness would be optically correct

This AppleScript asks for the desired point size change, and alters both the point size and rule thickness:

tell application "Adobe InDesign CC 2018"

    set myDialog to make dialog with properties {name:"Text Size"}

    tell myDialog

        tell (make dialog column)

            --Integer Edit

            tell (make dialog row)

                make static text with properties {static label:"Size"}

                set myRealEdit to make real editbox with properties ¬

                    {edit value:12.0, maximum value:1000, minimum value:0, small nudge:1, large nudge:10, min width:50}

            end tell

           

        end tell

        show

        set n to edit contents of myRealEdit as real

        destroy myDialog

    end tell

   

    tell active document

        set ov to properties of view preferences

        set properties of view preferences to {horizontal measurement units:points, vertical measurement units:points}

        set s to object reference of selection

       

        if class of s is text then

            set p to point size of s

            set pct to n / p

            set ra to rule above offset of s

            set rw to rule above line weight of s

            set point size of s to n

            set rule above offset of s to ra * pct

            set rule above line weight of s to rw * pct

        end if

        set properties of view preferences to ov

    end tell

end tell

Here I'm changing 44pt to 20pt

The result is an optical match

Steve Werner
Community Expert
Community Expert
April 6, 2019

It's not available in the InDesign interface. If you don't get an answer here, you might ask in the InDesign Scripting forum (if it's scriptable).

InDesign Scripting

grif030
grif030Author
Participant
April 6, 2019

Thanks. I will do that.

Community Expert
April 6, 2019

Hi grif030 ,

a wonderful example for a feature request:

Distance from Rule Above or Rule Below should be a percentage of the Point Size or even better, the Cap Height of the font used in a paragraph style.

Go to InDesign Uservoice, do a feature request, come back here to post the link to the request so that we can vote for it:

Adobe InDesign Feedback

Regards,
Uwe