To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit f71075d6 authored by vermeul's avatar vermeul
Browse files

Update README.md

parent a9b6624d
......@@ -18,13 +18,35 @@ We use this facility to define our own ParserFunctions to offer annotations:
Annotations come in different flavors:
- `{{#annot: comment}}` basic annotation with just a comment
- `{{#annot: comment | category}}` categorized annotation
- `{{#annot: comment | category1, category2 | id}}` annotation with more than one category, with an id to identify the proper end of it when nesting `{{#annotend: id}}`
- `{{#annot: | category | id }}` just specifiying the category a text belongs to, with no comment. The id is optional, could be ommited.
- `{{#annot: comment | cat_parent/cat_child}}` annotation with a specific category identified by a `cat_parent/cat_child` pair
- `{{#annot: comment | category1, category2}}` annotation with more than one category
- `{{#annot: comment | category | some_id}}` an id is used to identify the proper end of the annotation when nesting. Annotation end must contain the same id: `{{#annotend: some_id}}`
- `{{#annot: | category}}` just specifiying the category a text belongs to, with no comment
- `{{#annot: comment | | some_id}}` nested annotation with an id to identify its ending, without any category
- `{{#annotend: id}}` End-of-Annotation-Tag. The id must be present if the opening tag has one.
- for convenence, `{{annotend}}` or `{{#annotend}}` (without the colon) are allowed too.
- `{{annotend}}` or `{{#annotend}}` (without the colon) are allowed too.
## Annotation Categories
Annotations can be categorized, but don't have to be. The categories themselves are organized hierarchically.
If a category has no parent category, it is a top category. If a category has no child category, it is called a leaf.
Categories themselves don't have to be unique. In the example below, the category `examples` is not unique, one
belongs to its parent `written addition` and the other to `written sutraction`:
```
/addition
/written addition
/examples
/subtraction
/written subtraction
/examples
```
So if we want to annotate a written subtraction example, we simply write:
```
{{#annot: my comment | written subtraction/examples}}
```
Note: **the combination of parent_category/child_category must be unique**
## Nested or overlapping annotations: Examples
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment