Exploring Additional features
In this section, you will learn how to add a unique number to each message for more detailed descriptions in the surrounding documentation. If you read on, you will also learn how to highlight parts of a sequence diagram with a background color of your choice. Let's start with the autonumbering feature.
Displaying Sequence Numbers
Mermaid allows the numbering of messages in sequence diagrams. Each message passed from one actor to another could be assigned a unique number. This is useful when you want to create a reference to a particular message in the surrounding documentation, in cases where that message might warrant a more detailed description.
This feature can be turned on by having the autonumber
keyword placed anywhere in the diagram or by configuring it to be turned on. You can read about how to turn autonumbering on using configuration in Chapter 4, Modifying Configurations with or without Directives. The configuration option you...