The module system in Ampersand is currently being developed. It isn't yet in the main branch. This page is being created as work progresses.
An Ampersand specification consists of a CONTEXT file and a set of Modules. A module in Ampersand serves the dual purpose of controlling name-spaces and ordering definitions in multiple files.
MODULE <name> <language>? <markup>? <import>* <module element>* MODULE
To tell Ampersand what language your module is in, you can append a language directive to your module. Currently English and Dutch are supported. To do so, directly following the name of your context, you can specify
Directly following the optional language definition, you can optionally specify the format of texts in your
MEANINGblocks. This allows you to use your favourite markup language within Ampersand, as long as it is one of
MARKDOWN. If you specify one of these words in your
CONTEXTdefinition, that value will be the default markup of all purposes and meanings in your context.
An IMPORT statement contains a reference to another module and contains information of what definitions are imported from that module together with information about possible name-changes.
A module may contain different types of statements. The order of statements in a context is irrelevant for the software that Ampersand generates. However, the order is maintained when documentation is generated.
a block of code that represents rules on a single and specific topic, at the user's discretion
a statement that makes a role responsible for satisfying a rule
a statement for presenting facts in a readable sentence
a unit of code that can be run independently and specifies interaction with a user or a computer
a statement to describe the purpose of a context or a context element
a statement that sums up the initial population of a relation