This is the documentation for 3.2.1 version, which is not the latest version. Consider upgrading to 4.3.0.

[3.2.1] - 2022-03-15


  • doc: adding the docker recipe from reinoldus to cook templates into a new docker image


  • ` with ` keyword for an assembly in eachz no longer matching if it appears as text in the assembly

[3.2.0] - 2022-01-22



  • #112: in French, "ainsi que à les" now contracts as "ainsi qu’aux"

[3.1.2] - 2022-01-04



  • doc: indexation will remain every 48 hours and automatic

[3.1.1] - 2022-01-04


  • doc: newer version of Algolia for search

  • doc: changelog cut in different parts for better indexation

[3.1.0] - 2021-12-28


  • support for PARTICIPLE_PRESENT and PARTICIPLE_PAST in English tenses (as requested in #84)

  • synonyms: {mode: 'once'} now avoids to trigger last triggered alternative after a reset (#110)

[3.0.4] - 2021-12-23


  • #103: value tag now accepts a mixin as first argument


  • dependencies update

[3.0.3] - 2021-12-04


  • bug #97: fixes spaces in tag name interpolation and attributes (thanks Mathias)

[3.0.2] - 2021-10-19


  • curl example is fixed

  • checking asm mode for 'paragraph' before throwing a paragraph error

[3.0.1] - 2021-07-25


  • pug_mixins documentation


  • tok var definition fix in tag function (thanks Mathias Winckel)

  • added the exception 'cama' (Spanish gender)

[3.0.0] - 2021-05-06

It is a major version because there are breaking changes.


  • you may use RosaeNLG without using templates, accessing directly the low level JavaScript API; support is experimental. See Usage without Pug templates

  • there are now some "universal tenses" defined, which work for multiple languages; see Universal tenses table


There are 3 breaking changes that affect existing templates.

ref and refexpr must be reference to mixins

ref and refexpr must now be reference to mixins (and no more strings), and they must be referenced after being declared.

Table 1. Change on ref and refexpr
- var PRODUCT = {};
- PRODUCT.ref = 'PRODUCT_ref';
mixin PRODUCT_ref(obj, params)

the ring …​.


- var PRODUCT = {};
mixin PRODUCT_ref(obj, params)

the ring - PRODUCT.ref = PRODUCT_ref; …​.

Your templates will probably fail at runtime if you don’t change them. To migrate:

  • search for .ref and .refexpr in your templates

  • put references instead of strings

  • move them after the referenced mixin declaration

when referencing a mixin, assembly separators properties must not use a string

Assembly separators (last_separator, begin_with_general, etc.) can either be a string or reference a mixin. When referencing a mixin, you must now put the mixin as a reference (no more as a string), and the mixin must have been defined before.

If you don’t migrate, your templates will not fail, but the text will be wrong: you will have the mixin name in the output.

To migrate, search for all assemblies (eachz and itemz) and change their properties if they reference mixins.

mixins and objects cannot have the same name

Mixins are now functions, which have a name; you cannot have mixins and objects having the same name, e.g.

mixin phone
  | bla bla
- var phone = {};

is now invalid.

Your templates will probably fail at runtime if you don’t change them. Rename conflicting mixins or objects.