Using Appy POD templates

When a printable document (.pdf, .odt or .rtf) is being generated using a subclass of AppyBuildMethod, then you can provide a document as template in .odt format which you can edit using LibreOffice Writer.

This template document contains special instructions defined by the appy.pod library.


The Appy renderer installs additional functions to be used in do text|section|table from statements.


Render the template named template_name using Jinja. The template is supposed to produce HTML markup.

If template_name contains no dot, then the default filename extension .body.html is added.


Render a string s which contains reStructuredText markup.

The string is first passed to lino.utils.restify.restify() to convert it to XHTML, then to appy.pod's built-in xhtml() function. Without this, users would have to write each time something like:

do text
from xhtml(restify(self.body).encode('utf-8'))

Render a string that is in HTML (not XHTML).


Render an ElementTree node (generated using etgen.html) into this document. This is done by passing it to lino.utils.html2odf.

table(ar, column_names=None)`

Render an lino.core.tables.TableRequest as a table. Example:

do text
from table(ar.spawn('auth.UsersOverview'))