How to Manage Line Lengths in Published Data


You need to control the way your data breaks across two lines.

For example, let's say you are publishing an index or price list. Everything must fit neatly into the layout, maybe like this:

Any Company .................................P 90, 99, 101

This is fine as long as it all fits on one line.

But what if the company name is a bit too long? You want to avoid situations like this:

A Company That has a Very Long Name ...P 90,

99, 101

It would be much better like this:

A Company That has a Very

Long name .................................P 90, 99, 101


With CatBase, this can be managed in two ways: limiting the length a of a Paragraph, and using a Rule to insert a line break.

The difference between the two methods is:

Limiting the length of a Paragraph: CatBase builds the entire Paragraph first, and then processes the line breaking depending on the length of the complete Paragraph.

Using a Rule to insert a break: The line length is evaluated as the Paragraph is being built.

Limiting the Length of a Paragraph

Let's say you have a Paragraph that consists of three Elements:

  • Company name

  • A Tab

  • Page numbers

As in the example shown above, if the length of the whole Paragraph is more than (say) 35 characters, you want to break it up into two lines.

  1. Open up the Paragraph in question.

  2. Go to the Text Cleanup tab.

  3. You'll see a section labelled Line Length:

  1. Select the Limit the length of the line checkbox.

  2. Enter a number into the Maximum no. of characters field (eg 35).

  3. Select Insert a Soft Return.

  4. If necessary, select a Before break and/or After break option. For example, you might want to insert a Tab ccharacter on the first line (before the line break) or maybe at the beginning of the next line (after the line break).

  5. For more complex requirements, we can create Scripts to perform any special processing you need.

  6. Save the Paragraph.

  7. You might need to experiment a bit with different settings to get it to work just right.

Using a Rule to insert a line break

Sometimes you need more precise control over where a line break occurs. For example, maybe you don't want to break up certain fields. Let's consider this example:

Fred Bloggs / Jones & Co. .................P 99

This is fine as long as the person's name and company name both fit. But you don't want this sort of thing to happen:

Fred Bloggs / A Much Longer

Company Name..........................P 99

You'd prefer it like this:

Fred Bloggs /

A Much Longer Company Name ...P 99

In this case, you can add a Rule to your Paragraph, perhaps like this:

Experiment a bit to get the result you require!

Further Info

Learn more about Publishing Stylesheets.

Learn more about Rules.