Fine-Tune Paragraph Spacing
Six scripts, ideally triggered by keyboard shortcuts, to increase or decrease the selected paragraph's spacing by 1 point.
Oops, youโre not logged in!
Login or sign up for a free account.
This script is part of the Type and Text collection. See the full collection here.ย
To make and balance pagesโthat is, to make sure that the text fills the text area on a page precisely and that facing pages and/or columns are equally deepโthe space before certain defined paragraphs (headings, block quotes and other secondary material, etc.) can be varied a bit by adding or removing up to 3 points.
Another requirement could be to set half a line of white before or after certain text elements, but that space can’t be set in a paragraph style.
Space before and (less commonly) after can be manipulated in the Paragraph panel, but that’s cumbersome. When you’re making pages, what you want is to use the keyboard. We’ll show six scripts here which, when assigned to keyboard shortcuts, do just that.
The six scripts are in the linked zip file, below. They are in two groups: three scripts to change the space before the selected paragraph, and three others to target the selected paragraph’s space after.
- pspace-before-6.jsxโAdd half a line of white before the selected paragraph. The script calculates this on the basis of the selected paragraph’s leading. It handles paragraphs with fixed and with automatic leading.
- pspace-before-inc.jsxโIncrease the selected paragraph’s space-before by 1 point.
- pspace-before-dec.jsxโReduce the selected paragraph’s space-before by 1 point.
- pspace-after-6.jsxโAdd half a line of white after the selected paragraph.
- pspace-after-dec.jsxโReduce the selected paragraph’s space-after by 1 point.
- pspace-after-inc.jsxโIncrease the selected par’s space-after by 1 point.
Copy these six scripts to your Scripts folder, then set up keyboard shortcuts in the keyboard shortcuts editor (Edit > Keyboard shortcuts).
The way I set them up is as follows:
- pspace-before-6.jsxโF1
- pspace-before-inc.jsxโShift+F1
- pspace-before-dec.jsxโCrtl+F1
- pspace-after-6.jsxโF2
- pspace-after-inc.jsxโShift+F2
- pspace-after-dec.jsxโCtrl+F2
You can use any key combination you want, but the way I configured them allows me to press them with one hand.
Version history
These are fairly old scripts, but refreshed and first posted in June 2023.
Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com
Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.
This article was last modified on August 22, 2026
This article was first published on November 3, 2025
Commenting is easier and faster when you're logged in!
Recommended for you
Go to Page
Using InDesign's Go to Page tool you can go to another page in the active docume...
GREP Editor
InDesign's Find what field must be one of the smallest and unfriendliest places...
Drop Digits (Number-Span Elision)
Drop digits in number ranges (a.k.a. number-span elision; condensing inclusive n...
