# Enumerations

{% embed url="<https://vimeo.com/439189278>" %}

Enumerations (French: *énumération* / Dutch: *opsomming /* German: *Aufzähung*) are used to create lists of items. Depending on the applicable [styling settings for enumerations](https://help.clause9.com/styling/enumerations-styling) and the content of each item, those items will then be formatted either as an “inline” list of items, or as a bullet-list, as shown in the next example:

<figure><img src="https://1353649376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaTEDNbiFdDa6DW2eNG17%2Fuploads%2FXRvJPaiRcPZtw7cR2SV9%2Fimage.png?alt=media&#x26;token=c1c4b737-38b5-4459-8554-432866f14858" alt="" width="563"><figcaption></figcaption></figure>

## Why use enumerations? <a href="#why_use_enumerations" id="why_use_enumerations"></a>

You may wonder why you would want to use the special enumeration code, instead of manually typing in the items. The benefits of using the special codes include:

* **The formatting will be automatically determined**, through a combination of the length of each item and the applicable [styling settings for enumerations](https://help.clause9.com/styling/enumerations-styling). Without having to change legal content, you will be able to accommodate both users who want a traditional list of romanette items — *(i) … (ii) … (iii) …* — and users who want a more modern, bullet-style list.
* **You will never have to worry again about numbering**: Clause9 will automatically ensure that the right numbers are inserted, sequentially, without any gaps or duplicates. If a certain item is subjected to a condition that happens not to be fulfilled, then that item will not be shown, and all numbers following it will be adapted accordingly.
* **Suffixes are automatically inserted**: depending on the chosen [styling settings for enumerations](https://help.clause9.com/styling/enumerations-styling) and the type of list, a semicolon, full stop (.), &, “and”, “or”, or “and/or” will be inserted.

## Grammar <a href="#grammar" id="grammar"></a>

The basic structure of an enumeration is as follows:

`{ AND | item1 | item2 | item3 }`

### **Enumeration type**

Right after the opening accolade you have to choose the type of enumeration — ***AND*****,** ***OR*****,** ***AND/OR*** or ***LIST***. This will respectively result in a list that uses suffix “and”, suffix “or”, suffix “and/or”, or no suffix at all after the item(s).

{% hint style="info" %}
Whether this suffix is actually repeated after each item, or instead only after the penultimate item, depends on the [enumeration styling settings](https://help.clause9.com/styling/enumerations-styling).
{% endhint %}

### **Skipping the final suffix**

You can also choose **AND-SKIPFINAL**, **OR-SKIPFINAL**, **AND/OR-SKIPFINAL** or **LIST-SKIPFINAL** as the enumeration type. If the enumeration happens to get outputted as a bullet-list, then the final item will not get a suffix. The example above (if it would happen to get printed as a bullet-list) would then look as follows:

<figure><img src="https://1353649376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaTEDNbiFdDa6DW2eNG17%2Fuploads%2Fl4dbFLjfneXXnjOUZjoc%2Fimage.png?alt=media&#x26;token=40d4eb8d-e601-49aa-8a8a-24575f0f6b45" alt="" width="389"><figcaption></figcaption></figure>

### **Enforcing bullets**

In principle, whether an enumeration is printed inline or as bullets, depends on the applicable [styling settings for enumerations](https://help.clause9.com/styling/enumerations-styling). However, you can force an enumeration to always be printed as bullets — so irrespective of the layout-settings — by adding an exclamation-mark after the list type. For example:

`{ AND! | item1 | item2 | item3 }`

`{ AND-SKIPFINAL! | item1 | item2 | item3 }`

### **Item separators**

Each item should be separated by the pipe symbol ( | ).

### **Optional item number**

Right after the pipe symbol, you can optionally insert a number. If the enumeration then happens to get printed as an inline list, each item of the enumeration will be preceded by a sequential number. For example:

`{ OR | 1. alpha | 2. beta | 3. gamma }`

as an inline list, this will result in the following output (assuming that romanettes are chosen in the styling settings for enumerations):

*(i) alpha, (ii) beta; and (iii) gamma*

{% hint style="info" %}
Including the optional number will have no effect if the enumeration gets printed as a bullet-list.
{% endhint %}

{% hint style="info" %}
The actual numbers that are typed in, do not matter much — whether you nicely type in 1., 2. and 3., or instead a non-sensical sequence such as 45., 9. and 333., does not matter.\
In the future, Clause9 may use the actual number to allow you to cross-reference other items, but such functionality is not yet enabled.
{% endhint %}

### **Using conditionals**

If you subject the content of an item to a condition, then the item may get skipped, depending on whether the condition is fulfilled. Clause9 will automatically ensure that the right numbering is used. For example:

`{AND | 1. {#employee^gender = "male": alpha } | 2. beta | 3. gamma }`

If *#employee^gender* happens to be **false**, then the enumeration would be shown as follows (assuming that the styling settings allow for an inline list):

*(i) alpha; (ii) beta; and (iii) beta*

If, instead, *#employee^gender* happens to be **true**, then the enumeration would get printed as follows:

*(i) beta; and (ii) beta*

## Using special functions <a href="#using_special_functions" id="using_special_functions"></a>

Enumerations can also be created using one of the following special function calls:

* [@enumerate](https://help.clause9.com/special-functions/text-structure#enumerate) — taking as a parameter a list. Whether the enumeration is printed inline or as bullets, depends on the styling settings and the contents of the items.
* [@bullets](https://help.clause9.com/special-functions/text-structure#bullets) — like @enumerations, but always prints the enumeration as a bulleted list, similar to using an exclamation mark after the list type

Both special functions have some variations (see `@bullets-and,` `@enumerate-numbered`, etc.)— see the detailed explanations for both functions.

Using these special functions is most useful when the items you want to print, happen to be stored in a datafield. For example, if *#employee^items-to-return* is a datafield that contains a list of items to be returned, then [`@enumerate-numbered-and`](https://help.clause9.com/special-functions/text-structure#enumerate) would print such list as follows (assuming that inline printing applies per the styling settings):

*(i) key card; (ii) confidential documents; (iii) car; and (iv) car keys.*

## Forcing \* bullets into an enumerated list

If your clause should contain actual bullets (i.e. with asterisks), you can still [force the bullets into an enumerated list](https://help.clause9.com/clauses/clause-structure#forcing-enumeration-with-and-or-or) by inserting `* AND` or `* OR` as the very first bullet. For example:

```
1. This list will be shown with an "and" before the final item:

* AND

* apple

* banana

* cucumber
```
