SmokeWordStacks for InDesign

What is SmokeWordStacks?

SmokeWordStacks is a free script for Adobe InDesign that helps you identify and highlight word stacks in your documents.

Word stacks occur when identical words repeat vertically across lines of text, which can be distracting and visually unappealing in layout design.

This script helps designers quickly find and address these repetitions, ensuring a cleaner and more professional-looking document.

SmokeWordStacks is fully functional and free to use. However, it occasionally shows a donation reminder dialog. If you’d like to donate and suppress the dialog for a while, you can make a donation by using PluginInstaller.

Installing SmokeWordStacks

  1. Download PluginInstaller.
    If you’ve not done this before, download and install the free PluginInstaller from PluginInstaller.com. Make sure you have build #558 or higher installed (the build number is shown in the lower right-hand corner of the PluginInstaller windows).
  2. Create an Account.
    If this is your first time using PluginInstaller, you’ll need to create a new account and register it within PluginInstaller.
  3. Add a SmokeWordStacks Bookmark.
    Add a bookmark for SmokeWordStacks into PluginInstaller by clicking the following link:
    Add SmokeWordStacks Bookmark into PluginInstaller
    Alternatively, you can use the Browse the Store for Software window in PluginInstaller and find the SmokeWordStacks bookmark in the Rorohiko Catalog.
  4. Download and Install.
    Once the bookmark is listed in the Installing and Ordering window, select it and click the Download button.
    After the download, choose your InDesign version from the Install Target dropdown menu and click the Install button.
    SmokeWordStacks will appear in the InDesign Scripts panel under the User section.

Using the Sample File

The InDesign Scripts panel also includes an entry called Copy Sample File with Documentation to Desktop.jsx.

Double-click this to access a sample InDesign file containing a reusable sample configuration.

You can use this file to experiment with SmokeWordStacks and understand how it works.

Donating

The script is free and fully functional, but donations are encouraged. When you run the script, it will occasionally show a reminder dialog.

Go to the Installing and Ordering window, select the SmokeWordStacks bookmark, adjust the donation and order reference as desired, and click Purchase.

Activation may take some time to process; keep an eye on the Licenses, Activations, and Pending Orders window for updates. Activating after donating will suppress the occasional reminder dialog for a year.

Configuration

You can change the behavior of the script by modifying the configuration data in the text frame on the pasteboard.

INI configuration frame

The format is pretty self-explanatory; skip over this section if too much info.

The detailed TL;DR information for the formatting rules:

The text frame is formatted in a format similar to the old-style Windows INI format, with some additional flexibility built-in.

The advantages of this approach is that each document can ‘carry’ its own configuration and the configuration is plain for everyone to see, in a human-readable form, rather than being hidden away on some preferences dialog.

  • The information is spread over multiple paragraphs or lines.
  • There are two types of relevant lines: [SECTION] or name=value. Any lines that do not consist of either a name in square brackets or a name, an equal sign and a value are ignored.
  • The information within the square brackets (the SECTION) or information to the left of the equal signs should not be edited (the name).
  • The name to the left of the = are case-insensitive and only letters a-z and digits 0-9 are taken into account. Names like abca B c, or A'b'c are all interpreted as the same thing – abc
  • The information to the right of the equal signs can be freely edited
  • By default, leading and trailing spaces are ignored.
    someData =some Value
    someData=       some Value
          someData      =        some Value

    are all equivalent – they all mean someData="some Value"

  • Quotes can be used to express leading or trailing spaces. Curly quotes are seen as equivalent to regular quotes.
    someData = "  some Value  "
    someData= “  some Value  ”

    both indicate that someData="  some Value  " including the leading and trailing spaces.

  • Numeric values can have units and the script will auto-convert between units as needed. If the horizontal unit is cm and the label frame width is written as 1 inch, the width will automatically be interpreted as 2.54 cm

Description of the options

The INI data contains two or more sections. There is a section [main] which is a ‘template’ for the other sections.

Then there are one or more sections [profile: SomeProfileName] which are provided as options when the script is run.

Each of these sections starts out identical to [main]  but with some individual settings overridden.

horizontal position tolerance

How far to the left or the right can the text on the second line shift and still be recognized as a ‘stack’. Can include measurement unit in the setting (e.g. “30 pt”).

For words at the begin or end of the line we can optionally set a separate tolerance: the eye might pick these up easier than words in the middle of the line – see at end of line horizontal position tolerance and at begin of line horizontal position tolerance. Similar also for hyphenation horizontal position tolerance

at end of line horizontal position tolerance

Optional. Set a separate tolerance at the end of the line: the eye might pick these up easier than words in the middle of the line. Can include measurement unit in the setting (e.g. “30 pt”).

at begin of line horizontal position tolerance

Optional. Set a separate tolerance at the beginning of the line: the eye might pick these up easier than words in the middle of the line. Can include measurement unit in the setting (e.g. “30 pt”).

hyphenation horizontal position tolerance

Optional. Set a separate tolerance for hyphenation stacks. Can include measurement unit in the setting (e.g. “30 pt”).

check in middle of line

Check in the middle of the line. Type a Yes or a No here.

check at begin of line

Check at the beginning of the line. Type a Yes or a No here.

check at end of line

Check at the end of the line. Type a Yes or a No here.

check for hyphenation stacks

The script can check for ‘hyphenation stacks’ – i.e. consecutive lines that end in hyphens. Set this to Yes if you want to find such stacks.

case sensitive

The script will ignore case differences when you set this to No, e.g. “The” and “the” would be considered equivalent. Probably you want to leave this at Yes for most purposes.

ignore non letters

The script can ignore non-letters. Normally, you want this set to No for most purposes.

check whole words

Whether to only compare whole words vs. segments within words. Type a Yes or a No here.

num letters to overlap

Leave this empty, or set to 0, to check for whole words only. Set this to a value (e.g. 3) to check for overlap at the end or beginning of a word. E.g. numLettersToOverlap = 3 would consider ‘mondrian’ and ‘monday’ (mon…) as overlaps, as well as ‘overuse’ and ‘mouse’ (…use).

text stack char style name

Set this to the character style name you want the script to create so it can ‘mark’ the word stacks found by the script.

This character style can easily be deleted afterwards to remove all markings in one go.

Make sure to DEselect the Preserve Formatting checkbox when deleting the style.

text stack char style template name

Optionally set this to the pre-existing character style name you want to use as a template for the character style. By preparing this style ahead of time, you can decide the ‘look and feel’ of the marked bits of text.

A default style by the name set in text stack char style name will be created if you don’t have such a template character style in your document.

hyphenation stack char style name

Set this to the character style name you want the script to create so it can ‘mark’ the hyphenation stacks found by the script.

This character style can easily be deleted afterwards to remove all markings in one go.

Make sure to DEselect the Preserve Formatting checkbox when deleting the style.

hyphenation stack char style template name

Optionally set this to the pre-existing character style name you want to use as a template for the character style. By preparing this style ahead of time, you can decide the ‘look and feel’ of the marked bits of text.

A default style by the name set in hyphenation stack char style name will be created if you don’t have such a template character style in your document.

Style Creation Options

The following settings are only used if you don’t have a ready-made template style in your document.

default stack underline weight

Define how thick the underline is. Can include measurement unit in the setting (e.g. “2 pt”).

default stack underline offset

Define the underline offset from the baseline. Can include measurement unit in the setting (e.g. “2 pt”).

default text stack color name, default text stack RGB values

The default character style will consist of a colored underline. These are the name of the color swatch and the RGB color values assigned to it. Delete this swatch from the document and map it to [None] if you want to visually clean up the document.

The RGB values are between 0 and 255 and are comma-separated

default hyphenation stack color name, default hyphenation stack RGB values

The default character style will consist of a colored underline. These are the name of the color swatch and the RGB color values assigned to it. Delete this swatch from the document and map it to [None] if you want to visually clean up the document.

The RGB values are between 0 and 255 and are comma-separated

Version history

Version 2.0.1: June 1, 2024

  • Bug fix: an unspecified atEndOfLineHorizontalPositionTolerance, atBeginOfLineHorizontalPositionTolerancehyphenationHorizontalPositionTolerance did not automatically default to the value of horizontalPositionTolerance.

Version 2.0.0: May 30, 2024

  • Bug fix: if a particular word was repeated on a line, the stack detection could fail.
  • Converted to use PluginInstaller.