Please, InDesign, Show Me a Sample of That Style!
March 23, 2023 | Snippets | en | fr
Trivial story: you just have reopened an old InDesign document — or even a fresh one — and dozens of obscure names populate the style panels. You do not remember what that pesky “TDM Sub2” style refers to, or what it looks like, or where it is used. So you'll have to run the F/C dialog, select a Find Format, etc. We have a faster solution: right-click the style and “Goto Sample”…
Yes, it's that dumb, we simply added a Goto Sample item to the style panel popup menu. The style doesn't even need to be actually selected, just right click on the name.
What happens then? The underlying script automatically does what you would have done by hand: it runs a Find query, gets a sample text (if any) and shows it to you. This way you can navigate very quickly from style to style, check the elements that interest you, give the style a more meaningful name, change its formatting attributes, and so on.
I've been waiting for this feature for years and still don't understand how InDesign developers never implemented it.
The Script “StyleListGotoSample”
The script StyleListGotoSample.jsx was designed as a “startup script”, so you will install the JSX file — or a shortcut to it — in a subfolder named startup scripts
(instead of Scripts Panel
). If such a subfolder does not exist in your current installation, just create it.
The last step is to restart InDesign, which makes the Goto Sample action available in your style panel popup menu. The feature applies to both the Paragraph Styles and Character Styles panel.