Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleThe Solution

The solution is quite simple. Use the property Table Render Mode of the Display Table Macro to specify the Cascading Style Sheets (CSS) class to use and list the widths of the columns.

Image Modified

Code Block
languagetext
table=projectdoc-alternating[columns=220px,*,220px]

For this example we also choose the CSS class projectdoc-alternating to render the background of odd and even table rows differently.

The result is like this:

The option for specifying the width of the columns explicitly is a quick way to get the desired results for a single page. If you need to control tables on multiple pages you should consider to define a CSS class for these kind of tables.

Section
titleRoom for Enhancement

There are a few minor obstacles that may should be improved:

  • Editing the parameter value in the text field of the macro editor is a little cumbersome.
  • Once there is a new column added, the width has to be added manually.
  • There is no way to specify the widths for all tables on a page. Therefore you need to paste the same configuration line as the value for the Table Render Mode of each table. As a workaround you may specify a CSS class to be reused even on other pages.

...