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 1a862d0c authored by vermeul's avatar vermeul
Browse files

Add new file

parent ca7567a2
# YATA - Yet Another Text Annotation
## Introduction
## Annotation Syntax
MediaWiki has the concept of ParserFunctions and offers the possibility to implement your own:
```
{{#myOwnParserFunction:}}
```
We want to use this facility to define our own ParserFunctions which offer annotations. We generally need to define two tags:
- opening tag, which marks the beginning of an annotation: `{{#annot:}}`
- closing tag, which marks the end of an annotation: `{{#annotend:}}`
Annotations should 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.
- `{{#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.
## Nested or overlapping annotations: Examples
The vertical bars are used to supply a number of different arguments. Because annotations can be even nested or overlapping,
we need to add an identifier to be sure the start and endings are connected together correctly. For example:
```
Here is some {{#annot: comment1 | category1 | a}} more text
which has even {{#annot: comment2 | category2 | b}} overlapping
comments{{#annotend: a}}, which means we need {{#annotend: b}} to
connect start and ending of every comment.
```
Annotation (a) then contains:
```
more text
which has even overlapping
comments
```
while annotation (b) will contain this part of the WikiText:
```
overlapping
comments, which means we need
```
\ No newline at end of file
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