Using V-Justify

V-Justify 1.6.2 UI


V-Justify is easy to use. Run it, and the screen above appears. Go through the relevant paragraph styles and assign your desired minimum and maximum values for the space-before and space-after settings for each paragraph style in turn. Choose the paragraph style from the displayed list of styles, or, in your InDesign document, place the text cursor in text styled with the appropriate paragraph style and adjust the min and max settings in the V-Justify window.

Select whether to run the script on the selected frame only, or any of the other scope options, and click the Justify button. V-Justify will go through each text frame in the selected scope and increase or decrease the space as needed and as allowed in order to justify the text in the frame vertically in the best possible way.

If you have already justified some frames, and would like to reset the values back to default, click the Reset button.

Note: Clicking the Reset button will reset to the “desired value” only paragraphs modified by V-Jusitfy.

The Options panel

There are 3 option checkboxes:

“Do not justify the last frame of a chapter” – V-Justify uses some basic rules to figure out if a given frame is the last frame of a chapter (it mainly checks to see whether the last character in the frame is a frame break or page break character or similar, or if the first paragraph in the next frame has been set to start on the next page, etc.). If you want V-Justify to ignore the last frames of chapters or sections in your document and not attempt to vertically justify them, check this box.

“Also use InDesign’s own vertical justification” – V-Justify does not use InDesign’s built-in vertical justification feature at all. However, for a few reasons, V-Justify may not be able to successfully justify your page. This is usually because the maximum values defined by the user are not sufficient to allow the last line of text to reach to the bottom of the text frame. Sometimes, though, with non-rectangular frames, or frames with objects that have text-wrap applied to them, V-Jusitfy may not be able to entirely justify the page (although it will normally always be pretty close; and usually, no matter how complicated the page, it succeeds). In these cases you may want to allow V-Jusitfy to resort to InDesign’s built-in vertical justification. If so, check this box.

“Enable no-UI mode” – Once you’ve finished setting up the min and max values of all the paragraph styles in the document, the V-Justify window is no longer really needed, it’s just a waste of screen space. If you check this option it makes it possible to run V-Justify without the UI appearing: Place you text cursor in some text (but do not actually select any text, just place the flashing cursor in it). Now run V-Justify and it will apply vertical justification to the frame the cursor is in without displaying the UI. To show the UI again, select nothing, or select some text or a text frame and run V-Justify.

The dropdown lets you choose between five different justification styles: Prefer Tight, Prefer Loose, Loosen Only, Tighten Only, and Minimum Change. These will be described next.

Prefer Loose: With “Prefer Loose” justification style selected, V-Justify will first attempt to justify the text frame by adding space between the permitted paragraphs. Only if that is not possible (because the user-defined parameters are too restrictive or there is simply not enough space for an additional line) will it resort to reducing space between paragraphs (according to the minimum specified values), pulling in an additional line from the next frame, and vertically justifying the frame that way (if possible).

Prefer Tight: With “Prefer Tight” justification style selected, V-Justify will first attempt to justify the text frame by reducing the space between permitted paragraphs. Only if that is not possible (because the user-defined parameters are too restrictive) will it resort to increasing space between paragraphs.

Loosen Only: This option tells V-Justify to increase the space between paragraphs only (according to the user-defined parameters specified in the “maximum” settings), never decrease. Thus it ignores all “minimum” settings.

Tighten Only: This option tells V-Justify to decrease the space between paragraphs only (according to the user-defined parameters specified in the “minimum” settings), never increase. Thus it ignores all “maximum” settings.

Minimum Change: V-Justify will attempt to justify the page first by decreasing the space, then by increasing the space. Whichever options results in the least change is the option that will be used. This is probably the best option to choose in most cases, but it is also a little slower, since for each page 2 measurements need to be made.

Having control of the justification style in these 5 ways is useful because sometimes a frame might look empty and you would prefer to add a line to justify it rather than adding even more space, and vice versa.

The Justification Target panel

The “justification target” is the location to which the column should be expanded downwards.

In the Justification Target panel, you have two options to determine how to calculate the justification target.

“As reported by InDesign’s own vertical justification” – In this mode, V-Justify temporarily applies InDesign’s own vertical justification to the text column in question, measures the vertical position of the bottom line, and then disables InDesign’s vertical justification. This measurement is then used as the justification target.

This option is useful for complicated layouts, such as those with split or spanned columns or footnotes, where V-Justify cannot calculate the justification target.

The disadvantage, though, is that certain InDesign bugs prevent InDesign from being able to calculate the justification target. This is famously the case with a text column containing inline objects. But there are other strange instances where InDesign fails to properly vertically justify a text column, even though it clearly simply needs to extend to the bottom of the text frame.

For such cases, and indeed for any layout where the justification target is simply the bottom of the text frame, the best option to use would be:

“The bottom of the text frame.” If this option works for your layout, it should be selected, as it bypasses any InDesign bugs and is also quicker.

Power Tips

POWER TIP #1: Hold down the Shift key on the keyboard when clicking on the Justify button to enable extreme mode. Extreme mode allows V-Justify to override the user-defined maximum and minimum parameters on a temporary basis. Why is this useful? Sometimes your maximum or minimum settings are not quite generous enough to make it possible to justify a frame.  Extreme mode provides V-Justify the extra leeway needed to successfully justify the frame on a one-off basis, without changing your max and min settings and having to set them back again.

If you find yourself using “extreme” mode all the time, though, this is probably a sign that the assigned minimum and maximum settings are not generous enough and should be increased. Extreme mode is intended to be the exception, not the rule!

POWER TIP #2: Hold down the Ctrl key on the keyboard (Cmd on the Mac) when clicking on the Justify button to enable at-least-you-tried mode. Normally, if V-Justify is unable to successfully justify a frame, it will reset the paragraph spacing to the default values. With at-least-you-tried mode enabled (if used in conjunction with the “loosen only” justification mode), it will not reset the values to default, but leave them at their user-defined maximum. Why is this useful? Sometimes, you might prefer to space out the paragraphs in a column as much as possible, according to the max values entered, even if this does not result in a fully-justified column. It is also useful as a visual cue of how much extra space would be needed to achieve full justification. At-least-you-tried mode also works with the “tighten only” justification mode, in which case it will leave the spacing at its user-defined minimum. (Available from version 1.6.2 onwards.)

Known Limitations

Sometimes V-Justify does not manage to justify a text frame. This can be very frustrating, especially when the minimum and maximum values have clearly been set sufficiently generously and there is no reason for the frame not to be justified.

Here’s a checklist of things that can prevent V-Justify from working correctly on a specific text frame:

  • Have the minimum and maximum values been set generously enough to allow justifying the frame? Pressing Shift while clicking the Justify button makes it easy to check whether too-restrictive settings are the reason V-Justify is not succeeding (see Power Tip above).
  • If this is a multi-column frame, has InDesign’s “Balance columns” been used? Disable it! Balancing columns can cause lines to jump from one column to another, so while V-Justify is trying to apply the correct spacing between paragraphs, the column-length changes, making a successful vertical justification impossible.
  • Does any text in the frame use “Align to baseline grid”? If text is aligning itself to the baseline, the small adjustments V-Justify makes are ignored. Switch off “Align to baseline grid”!
  • If your frame is a multi-column text frame, and you have set some of the text (for subheads, etc.) to use the “Span columns” feature, results can vary. But this can often be a cause of failure for V-Justify. This is currently a known limitation.

Finally, sometimes, despite everything seeming fine, V-Justify still does not manage to correctly justify a frame. My estimate is that this can happen to about 5% of frames. There are different reasons for this, some of which include subtle InDesign bugs. Feel free to report any such instances to us in the Forum or by email, and hopefully we can keep making V-Justify better.

TIP: If V-Justify succeeds in justifying a frame, and the V-Justify window is showing, it will give a little “nod” (it jumps up and down). If it thinks it has failed to correctly justify a frame, it will give a little shake!

Free Demo Download

Not sure if V-Justify will work with your document? Fill in the form below to get an instant download link to a free trial of V-Justify.

The trial will open a copy of your document in InDesign. The text in this duplicate document will be turned into gibberish. The test document is otherwise identical to the original and should give you a good feeling of how the licensed version of V-Justify works.


Questions? Comments?

For any questions or comments you may have regarding V-Justify, please use the Id-Extras.com forum, and I will do my best to answer promptly!