From the course: InDesign Secrets
264 Use a script to set the table subhead row style - InDesign Tutorial
From the course: InDesign Secrets
264 Use a script to set the table subhead row style
- [Instructor] I use computers because I'm basically lazy, and I want them to do the work for me, at least the boring drudge work, right? And there are few things as boring as formatting tables that have a bunch of different kinds of rows, like various headings, subheadings, and so on. For example, here's a table that I've imported, and I need to format this fast. So, normally I would go grab the Type tool, and then I would start applying cell styles, like I'll select this row here, and I'll come over here and say that's a Planet row. And then this next one down here is going to be a Detail row, and so on. And you can see that this would take a long time and be really boring. So, wouldn't it be cool if I could automate this, applying all of the cell styles in one go? Well, thanks to Chuck Weger and Deb Haines, you can. Chuck and Deb were both attendees at a recent PePcon conference. That's the Print and e-Publishing Conference that Anne-Marie Concepcion and I host each year. And Chuck and Deb were talking, and Deb was explaining this problem, and Chuck, who has been developing software for decades, went back to his hotel room and wrote a script. A simple, but brilliant little script that solves this problem. And he told me I can just give it away for free. To show you how it works, I'm going to jump to the next page of this document with shift + page down, and you can see that I have this same table with one difference, I have a new column along the left edge. And this column tells the script which cell style should be applied to each row. So, for example, here it says Planet, so that means apply the Planet cell style to the entire row. Here's one for the Sub-Subhead, here's one for Subhead, and so on. And the script does one other thing. If the heading, for example this planet called Mercury, if that is followed by a bunch of blank cells, then the script is smart enough to know to merge all of those cells together. Let's go see it in action. I'm going to grab the Selection tool and select the entire text frame, and then I need to run the script from the Scripts panel, and I can find that by going to the Window menu, coming down to Utilities, and then choosing Scripts. We've talked about how to install scripts into your Scripts panel in earlier videos, so I'm not going to get into that now. But you can see that I've installed the Deb-o-Matic script inside my User folder. I'll open it up and you can see it. There's Deb-o-Matic.jsx, that's the script file. Now, why is it called Deb-o-Matic? Well, because it was written for Deb Haines, right? Deb works for a great company called XMPie, which does database publishing tools. Anyway, Chuck has a very funny sense of humor, so he called it Deb-o-Matic. To run this, all I need to do is double click on the script inside the panel. As soon as I do that, you can see it jumps into action, and boom, it's done. All of those cell styles were applied, and you can see that here, this entire row was merged into a single cell. Finally, when the script was done, it removed that first column because, of course, we don't need that anymore. Now, this script is not for everyone. After all, you still have to get all those style names into that first column, and that takes time. But if you have tables with tons of subheads and stuff, this could really save you far more time, especially if you have lots and lots of tables to format. Now, where can you find this script? You can find it on our site at InDesignSecrets.com. Just go to our page on free plugins and scripts. It's in the section on scripts that we mentioned in our videos. And if you find you really like this script, go check out Chuck's website at elara.com. Send him a note and tell him what you think.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
161 Keeping page numbers on top of master items3m 55s
-
162 Adding automatic currency symbols in a table cell or before text3m 50s
-
163 Make a pop-up footnote for your ebook3m 48s
-
164 Deleting tabs at the beginning of paragraphs and applying a paragraph style3m 10s
-
165 Five InDesign Presentation tips6m 28s
-
-
-
089 Three great Object Styles for any designer8m 1s
-
090 Choosing alpha channel image transparency2m 25s
-
091 Adding and reading metadata for InDesign files3m 25s
-
092 Adding ALT tags to your images6m 59s
-
093 How to Place & Link a text frame's text but not its formatting7m 4s
-
094 Setting the baseline position of a caption2m 39s
-
-
-
051 Five things that should be in every new file5m 19s
-
052 Forcing EPUB page breaks with invisible objects6m 21s
-
053 Understanding component information6m 39s
-
054 Creating running heads using section markers4m 16s
-
055 Making a font with InDesign using the IndyFont script5m 20s
-
056 Finding where that color is used7m 17s
-
-
-
037 Updating a linked table without losing formatting5m 18s
-
038 Creating electronic sticky notes4m 49s
-
039 Moving master page items to the top layer for visibility2m 48s
-
040 Five guide tricks that will impress your coworkers6m 18s
-
041 Letting InDesign add the diacritics4m 21s
-
042 Using single-cell table cells for custom paragraph formatting6m 2s
-