Site logo

Apply alternating fills to pseudo-tables

Script for InDesign. Written by Kasyan.

By pseudo-table, I mean a piece of text that only looks like a table but, in reality, is not. The table appearance is imitated by tabs and several GREP styles defined in the paragraph style. Here’s an example of such a pseudo-table that you can download and examine how it’s made.

The advantage of this approach is that such tables work much faster. It’s crucial, for example, for creating hyperlinks on a mass scale (in thousands) by script like here.

How it works

Select a text frame and run the script. A dialog box appears. Here, in my test file, the rows are formatted with the Text paragraph style so I select it in the ‘Apply to’ dropdown list. For ‘Odd’ rows, I leave the same style, but for ‘Even’, I chose Tinted Text which is a little darker.

After running the script, I get alternating fills like so:

If you select a text frame or place the cursor into the text, the whole story will be processed.

But if you select some text, …

… only the selected text will be processed.

You can Undo-Redo the script.


If you found my scripts useful and want me to develop more free scripts, consider supporting me by donating via PayPal directly to my e-mail: askoldich [at] yahoo [dot] com. (Due to PayPal's restrictions for Ukraine, I can't have a Donate button on my site.)


Here are the script and the before and after test files with the pseudo-table on the screenshot above.

See also Apply alternating pattern to quasi-tables