Step One: Set up a Publishing Style Sheet
Publishing Style Sheets tell CatBase:
- What data to publish
- How to sort it
- How to format it
The Publishing Style Sheet we are using for this project is called Telephone Directory (to view or edit Publishing Style Sheets, click on the Style Sheets button on the main window and choose Publishing Style Sheets from the pop-up menu). It looks like this:
Perhaps the most important thing here is the list of Paragraphs. This is where we specify exactly what data is going to be published and how it will be formatted. In this example, we've set up one Paragraph for each different formatting style. When the data is transferred to InDesign, CatBase will decide how to format each photographer's details depending upon which Listing Level they have selected (Plain, Bold, Boxed, or Extended).
Elements are the building block of Paragraphs; each Paragraph can contain any number of Elements. There are seven Element types:
- Data from a field in the database (First Name, for example)
- Static text (such as "Specialty: ")
- A formula. Formulas are a very versatile tool which enable you to tell CatBase how to make decisions about what to include - or leave out - and optionally, how to format it.
- Punctuation (such as a tab character)
- A calculation (for example, you could discount all prices by 15% for a sale catalogue)
- A picture
- A relation (relations enable you to include information from a related table. In our example, the Pictures table is related to the Photographers table so when we are publishing Pictures, we can easily include information about the photographer who owns each picture, and vice versa).
A quick look at the Plain Entry paragraph (double-click on it in the list of Paragraphs) shows us that it is comprised of six elements:
As you can see, the first Element is a Formula which reads "If Listing Level equals Basic then Include this Paragraph otherwise don't include this paragraph". Each Paragraph in this Publishing Style Sheet contains a similar Element, and this is what controls how each photographer's entry will be formatted. The Formulas are created using a simple point-and-click interface - this is how the one shown here looks:
.
The detailed workings of Publishing Style Sheets are covered in a separate Tutorial.
Step Two: Select the data you want to publish
We're going to include all the Photographers in this directory, so we've created a Set called All Photographers.
Step Three: Create a Publishing Project
Publishing Projects help to automate the publishing process. A Publishing Project tells CatBase which set of data to use, which Publishing Style Sheet, and where to save the data when it's published. We've set up a Publishing Project called Telephone Directory - InDesign .
Step Four: Transfer the data
Click on the Publish Data button on the main window and choose Telephone DIrectory - InDesign from the pop-up menu. CatBase publishes the data and lets you know when it's done. It tells you the name of the file it has created and where it has been saved; if you haven't changed any of the settings in the Demo Database, it will have created a file called Tel Directory and saved it into a folder called Data Exports on your desktop.
Step Five: Import the transfer file into your InDesign template
Note: We use the Xtags Xtension for importing the file into an InDesign document, as this facilitates the creation of text and picture boxes. We have included a demo version of Xtags with our demo (you'll find it in the 3rd Party Demos folder). Install the appropriate version of Xtags into the Plug-ins folder in your InDesign application folder.
Open up your InDesign template, or create a new two-column document. We have included a simple template in the Goodies folder with the CatBase demo.
Now for the fun part ...
- With your InDesign document open, make sure that the insertion point is in the first text box.
- Choose Get Text with Xtags ... from the File menu (if it isn't there, that means you haven't installed Xtags in your InDesign Plug-ins folder!)
- Select the file you just created.
- Make sure that the Include style sheets check box is checked
- Click on the Open button
Watch in amazement as the directory is created before your very eyes! It should look like this:
Mohammed, John, and Mike have paid for a Bold listing.
Ferdinand and Kate have a plain listing.
Sheila has paid for a Boxed listing.
Jenny has an Extended listing.
... and it was all formatted automatically!
It really is that simple!




.