The office document template is a LibreOffice document written normally, except for the significant fact ;-) that it will contain computer code, allowing to display data from the context, to have conditions, to run loops, to incorporate sub-templates, etc.
When generating the document in a given context, the computer code present in the template is "interpreted" and replaced by data to produce the final document.
The computer syntax used is that of the appy framework library, whose "pod" module manages the generation of the document. The "gen" module of that library is not used.
It is possible to insert the computer code in several ways, all explained below. The presence of this computer code does not prevent formatting.