Skip to main content

Set the Last Line Alignment for Tables (PDF)

With Paligo's Align text on the last line feature, you can make a centered paragraph break on to the next line for better alignment. It especially useful for centered text, as it helps to prevent a single word, or part of a single word, being on the last line.

Note

The Align text on the last line feature:

  • Only affects tables that have "center" or "justified" alignment set on the table columns or certain elements of the table structure. Those elements are: tbody, thead, tfoot, tr, td, th.

  • Is designed for center-aligned text. We recommend that you disable the feature for justified text and other alignments.

To learn how to set table alignment, see: Change Column Alignment and Change Cell Alignment.

To change the Align text on the last line setting:

  1. Select Layout in the top menu.

    Paligo editor. The Layout option in the header menu is highlighted.

    Paligo displays a list of Layouts. The list is empty if there are no custom Layouts in your Paligo instance.

  2. Select the PDF Layout you are going to use for publishing. Alternatively, create a new one (see Create a Layout).

  3. Select Tables in the sidebar. New_Layout.jpg

    Select_Tables_Layout_small.jpg
  4. Select the Table style that you want to change in the sidebar.

    There are 5 table styles that you can use. By default, tables will use the Tabstyle1 settings, but you can set them up to use any of the other four settings instead, see Apply a Table Style (PDF).

  5. Set Align text on the last line to:

    • Enable to turn the feature on.

      Paligo will balance centered text that is longer than one line by allowing the text to flow equally over two lines. This prevents a single word or partial word being displayed on its own on the last line.

    • Disable to turn the feature off.

      Paligo will try to fit the centered content on a single line in a table cell. It will run on to the next line if there is not enough space.

    • Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.

  6. Select Save.

Example 1. Effect of "Align text on the last line"

Let's say you have a table and you give a row (tr) the align attribute with a value of center.

In your PDF Layout, you have Align text on the last line disabled. When you publish, you get a cell like this:

A table cell with one long sentence inside it. The last word in the sentence is "obstructions". It breaks at "ob" so that "structions" appears on its own on the last line.

Here, the table cell has center alignment and it contains a single paragraph. Paligo centers the text, but the final word runs over on to the last line. There is a line-break inside the word and the remaining part of the word is on its own. It looks unusual as there is a partial-word centered.

You enable the Align text on the last line setting and publish again. This time, you get:

A table cell with centered content. It contains one long sentence. The sentence is positioned so that it is spread more evenly over the three lines. The last line has three words on it.

Notice how Paligo still positions the text centrally but breaks the lines at different points, so that the last line has more words. This gives the cell a better balance.