20130511 (Saturday, 11 May 2013)

No page breaks within tables

Solved the following user request:

  • jobs.Overview : Seitenwechsel zwischen die verschiedenen Kategorien (Majorés, Intern, usw.)

The solution was to simply have the table template function insert a table style with a may-break-between-rows property set to false. Only 3 lines of code:

table_style_name = str(ar.actor)
st = add_style(name=table_style_name, family="table",parentstylename="Default")
st.addElement(TableProperties(align="margins", maybreakbetweenrows="0"))

I might make this configurable per lino.core.tables.AbstractTable, but at the moment I don’t see any problem with having this for all (Lino-generated) tables.