Skip to content

Custom templates

Temario generates presentations by injecting content into a LibreOffice Impress (ODP) template. You can use any ODP as the base — with your own colours, typography and logos.

The ODP template is a normal .odp file. Temario extracts its slides as XML fragments and reuses them for each slide type (cover, bullets, code, etc.). The original text is replaced with your YAML content; the visual design is preserved.

Your template must have at least these slides (in any order, as indices are configured in template.yaml):

SlideUse
CoverCourse title, unit and level
ObjectivesList of objectives (bullet points)
IndexList of sections
Intro / textFree text slide / section intro
ContentBullets, code, terminal, etc.
ConclusionList of conclusions
ReferencesList of references with URLs
ContactCopied without modification
LicenseCopied without modification

Design it directly in LibreOffice Impress. The only requirement is that text styles have identifiable names (e.g. T1, T10, L4).

Place the .odp in courses/<your-course>/template/ and run:

Terminal window
./temario import courses/my-course/template/my-template.odp

Temario analyses the ODP and generates courses/my-course/template/template.yaml with the detected slide indices and style names.

meta:
nombre: my-template
fichero: my-template.odp
diapositivas: # 0-based indices in the ODP
portada: 0
objetivos: 1
indice: 2
intro: 3
contenido: 10
conclusion: 19
referencias: 20
contacto: 21
licencia: 22
estilos: # style names in the ODP
portada_titulo: T1
portada_unidad: T2
titulo: T10
lista_obj: L3
lista_contenido: L4
span_contenido: T6

Edit the indices manually if auto-detection is not correct — open the ODP in LibreOffice and identify the (0-based) number of each slide.

From that point ./temario build will use your template automatically. No need to specify it explicitly:

Terminal window
./temario build courses/my-course

Sharing a template between courses

Section titled "Sharing a template between courses"

If you want multiple courses to use the same template, copy the ODP and template.yaml to each of them, or create a base course and copy its template/ to the others.