company logo

Creating a document templates

Document templates are Open Document Standard documents (typically created with LibreOffice). Document templates require a number of specific paragraph styles, which must be available in the document template. Several styles are used for marking different template elements:

  • OSICode - OSI code paragraphs
  • OSIComment - template comments
  • OSIEnd - end of an OSI template expression or block
  • OSIExpression - OSI function header not creating document text
  • OSITable - Table expression supporting row iteration
  • OSITableRow - Row expression for defining single rows in mixed tables
  • OSITemplate - Document template header
  • OSIVariables - Template variable section

The style specification does not matter, but style names have to be defined as such. Moreover, list and graphic styles have to be provided in order to display embedded graphics and lists, which might be part of Qt rich text data stored in large text fields:

  • ListDefaultBullet - display bullet lists
  • ListDefaultLowerCase - display lists with lower case items
  • ListDefaultUpperCase - display lists with upper case items
  • ListDefaultNumbering - display lists with numbered items
  • GraphifDefaultCenter - display centered graphics
  • GraphifDefaultLeft - display left float graphics
  • GraphifDefaultRight - display right float graphics

Template style specifications are provided in the SampleTemplate.odt , which might be copied, but also in the OSI-DocumentTemplate.ott file, which may be used directly for creating a new template. Style specifications might be changed as long as style names are not touched.

Notes:

Document templates have been tested using LibreOffice, only. It is suggested to create document templates with LibreOffice.