wiki:syntax
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
wiki:syntax [2013/07/11 11:52] – matthias.zagermann | wiki:syntax [2013/07/23 14:02] – matthias.zagermann | ||
---|---|---|---|
Zeile 498: | Zeile 498: | ||
Die Syntax von DokuWiki kann durch [[doku> | Die Syntax von DokuWiki kann durch [[doku> | ||
- | ===== Doodle-Plugin ===== | + | ===== 8.1 Doodle Plugin ===== |
- | Dieses kann dir helfen, Termine mit anderen Leuten zu planen oder Entscheidungen herbeizuführen. Die Syntax sieht wie folgt aus: | + | Dieses |
<doodle [id]> | <doodle [id]> | ||
- | ^ [Auswahltext | + | ^ [Auswahltext] ^ [Auswahltext] ^ ... ^ |
</ | </ | ||
Du brauchst lediglich einen Tabellenkopf, | Du brauchst lediglich einen Tabellenkopf, | ||
- | ^ [id] | die ID des Doodle; muss eindeutig sein ((andernfalls werden Metadaten verschiedener Doodles mit der gleicher ID durcheinander gebracht, d.h. Antworten auf Entscheidungen | + | ^ [id] | die ID des Doodle; muss eindeutig sein ((andernfalls werden Metadaten verschiedener Doodles mit der gleicher ID durcheinander gebracht, d.h. einige |
- | ^ [choice] | an option for which users can tick a checkbox whether it's okay for them or not | obligatorisch | | + | ^ [Auswahltext] | eine Option für die Benutzer zum Ankreuzen |
- | You may also add more optional parameters... | + | Es könne noch weitere, optionale Parameter verwendet werden... |
<doodle [disable] [single] [login]| [id]> | <doodle [disable] [single] [login]| [id]> | ||
- | ^ [choice] ^ [choice] ^ ... ^ | + | ^ [Auswahltext] ^ [Auswahltext] ^ ... ^ |
</ | </ | ||
- | ^ [disable]| | + | ^ [disable]| |
- | ^ [single] | only can check one choice | + | ^ [single] | es kann nur eine Auswahl getroffen werden |
- | ^ [login] | + | ^ [login] |
- | You can see this plugin in action | + | Demo des Plugins: |
+ | |||
+ | ===== 8.2 AV Bar Chart Plugin ===== | ||
+ | Dieses Plugin stellt Daten als Balkendiagramm dar.\\ | ||
+ | < | ||
+ | 1000| | ||
+ | A:500, | ||
+ | B:50, | ||
+ | C:250, | ||
+ | D:1000 | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | 1000| | ||
+ | A:500, | ||
+ | B:50, | ||
+ | C:250, | ||
+ | D:1000 | ||
+ | </ | ||
+ | </ | ||
+ | * Der erste Wert ist der Maximalwert der Daten. | ||
+ | * Nach dem | folgt eine durch Komma separierte Liste mit Beschriftung: | ||
+ | |||
+ | ===== 8.3 Tablecalc Plugin ===== | ||
+ | To perform a calculation you need to insert XL-style formula into work sheet. Any expression must be started with '' | ||
+ | < | ||
+ | r0c4 | ||
+ | </ | ||
+ | Please note, that row ('' | ||
+ | < | ||
+ | c4r0 | ||
+ | </ | ||
+ | |||
+ | You can also reference to multiple cells in one range: | ||
+ | < | ||
+ | |r0c0: | ||
+ | </ | ||
+ | |||
+ | Furthermore you can use multiple ranges: | ||
+ | < | ||
+ | r0c0: | ||
+ | </ | ||
+ | |||
+ | There is a recommendation not to use references for non-existing cells. For example, this is not correct (though it will work, returning " | ||
+ | < | ||
+ | | 1 | | ||
+ | | 2 | | ||
+ | | ~~=sum(r0c0: | ||
+ | </ | ||
+ | |||
+ | Instead use constructions like this: | ||
+ | < | ||
+ | | 1 | | ||
+ | | 2 | | ||
+ | | ~~=sum(range(0, | ||
+ | </ | ||
+ | |||
+ | ==== Functions ==== | ||
+ | |||
+ | The following functions are implemented: | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Func | ||
+ | | cell(x, | ||
+ | | row() | Returns current row | | ||
+ | | col() | Returns current column | ||
+ | | range(x1, | ||
+ | | sum(range) | ||
+ | | count(range) | ||
+ | | round(number; | ||
+ | | label(string) | ||
+ | | average(range) | ||
+ | | min(range) | ||
+ | | max(range) | ||
+ | | check(condition; | ||
+ | | compare(a; | ||
+ | | calc() | ||
+ | |||
+ | Though you can use colon as delimiter in functions semi-colon is preferred and recommended. | ||
+ | |||
+ | |||
+ | ==== Operators ==== | ||
+ | |||
+ | Most of the standard Javascript arithmetic operators are supported but some ((The conflicting operators are: %%^ | ~%%)) conflict with the table markup so the following operators are available: | ||
+ | |||
+ | ^ Operator | ||
+ | | + | Addition and unary plus | | ||
+ | | - | Subtraction and unary negative | | ||
+ | | * | Multiplication | | ||
+ | | / | Division | | ||
+ | | % | Modulus (division remainder) | | ||
+ | | & | Logical AND | | ||
+ | | %%<< | ||
+ | | %%>> | ||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | === I === | ||
+ | |||
+ | < | ||
+ | | 1 | 2 | ~~=r0c0+r0c1~~ | ~~=10.2+1.5~~ | | ||
+ | </ | ||
+ | |||
+ | | 1 | 2 | 3 | 11.7 | | ||
+ | |||
+ | === II === | ||
+ | < | ||
+ | | 1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | | ~~=sum(r0c0: | ||
+ | </ | ||
+ | |||
+ | | 1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | | 10 || | ||
+ | |||
+ | |||
+ | |||
+ | === III === | ||
+ | < | ||
+ | | 1 | 2 | 3 | 4 | | ||
+ | | 5 | 6 | 7 | 8 | | ||
+ | | **~~=sum(r0c0: | ||
+ | </ | ||
+ | |||
+ | | 1 | 2 | 3 | 4 | | ||
+ | | 5 | 6 | 7 | 8 | | ||
+ | | **26** | ||
+ | |||
+ | |||
+ | === IV === | ||
+ | < | ||
+ | |1| | ||
+ | |2| | ||
+ | |3| | ||
+ | |4| | ||
+ | |5.74| | ||
+ | |6| | ||
+ | |7| | ||
+ | |8| | ||
+ | |9| | ||
+ | |10| | ||
+ | |11| | ||
+ | |~~=sum(range(col(), | ||
+ | </ | ||
+ | |||
+ | |1| | ||
+ | |2| | ||
+ | |3| | ||
+ | |4| | ||
+ | |5.74| | ||
+ | |6| | ||
+ | |7| | ||
+ | |8| | ||
+ | |9| | ||
+ | |10| | ||
+ | |11| | ||
+ | |65.74| | ||
+ | |||
+ | |||
+ | |||
+ | === V === | ||
+ | < | ||
+ | |1| | ||
+ | |2| | ||
+ | |3| | ||
+ | |4| | ||
+ | |5| | ||
+ | |6| | ||
+ | |7| | ||
+ | |8| | ||
+ | |9| | ||
+ | |10| | ||
+ | |~~=average(range(col(), | ||
+ | </ | ||
+ | |||
+ | |||
+ | |1| | ||
+ | |2| | ||
+ | |3| | ||
+ | |4| | ||
+ | |5| | ||
+ | |6| | ||
+ | |7| | ||
+ | |8| | ||
+ | |9| | ||
+ | |10| | ||
+ | |5.5| | ||
+ | |||
+ | === VI === | ||
+ | < | ||
+ | | ~~=label(ex6_1)~~1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | |||
+ | Sum: **~~=sum(ex6_1.c0r0: | ||
+ | </ | ||
+ | |||
+ | |||
+ | | 1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | |||
+ | Sum: **10** | ||
+ | |||
+ | === VII === | ||
+ | < | ||
+ | | **~~=label(ex7_1)~~11** | ~~=sum(ex7_2.c0r0: | ||
+ | | 13 | 14 | | ||
+ | |||
+ | | ~~=label(ex7_2)~~1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | |||
+ | Sum: **~~=sum(ex7_1.c0r0: | ||
+ | </ | ||
+ | |||
+ | |||
+ | | **11** | 10 | | ||
+ | | 13 | 14 | | ||
+ | |||
+ | | 1 | 2 | | ||
+ | | 3 | 4 | | ||
+ | |||
+ | Sum: **48** | ||
+ | |||
+ | === VIII === | ||
+ | < | ||
+ | | **~~=min(c0r1: | ||
+ | | 1 | 7 | | ||
+ | | 2 | 8 | | ||
+ | | 3 | 9 | | ||
+ | |||
+ | ~~=calc()~~ | ||
+ | </ | ||
+ | |||
+ | | **1** | **9** | | ||
+ | | 1 | 7 | | ||
+ | | 2 | 8 | | ||
+ | | 3 | 9 | | ||
+ | |||
+ | |||
+ | === IX === | ||
+ | < | ||
+ | | 1 | ~~=check(cell(0, | ||
+ | | 0 | ~~=check(cell(0, | ||
+ | | x | ~~=check(cell(0, | ||
+ | | | ~~=check(cell(0, | ||
+ | | **** | ~~=check(cell(0, | ||
+ | </ | ||
+ | |||
+ | | 1 | True | | ||
+ | | 0 | False | | ||
+ | | x | False | | ||
+ | | | False | | ||
+ | | | False | | ||
+ | |||
+ | |||
+ | === X === | ||
+ | < | ||
+ | | 1 | 2 | 1=2 | ~~=check(compare(cell(0, | ||
+ | | 3 | 3 | 3=3 | ~~=check(compare(cell(0, | ||
+ | | 4 | 5 | 4<5 | ~~=check(compare(cell(0, | ||
+ | | 6 | 7 | 6>7 | ~~=check(compare(cell(0, | ||
+ | | 8 | 9 | 8>9 | ~~=check(compare(cell(0, | ||
+ | | 10 | 10 | 10≥10 | ~~=check(compare(cell(0, | ||
+ | | 11 | 11 | 11≤11 | ~~=check(compare(cell(0, | ||
+ | | 12 | 12 | 12≠12 | ~~=check(compare(cell(0, | ||
+ | </ | ||
+ | |||
+ | | 1 | 2 | 1=2 | False | | ||
+ | | 3 | 3 | 3=3 | True | | ||
+ | | 4 | 5 | 4<5 | True | | ||
+ | | 6 | 7 | 6>7 | False | | ||
+ | | 8 | 9 | 8>9 | False | | ||
+ | | 10 | 10 | 10≥10 | True | | ||
+ | | 11 | 11 | 11≤11 | True | | ||
+ | | 12 | 12 | 12≠12 | False | | ||
+ | |||
+ | === XI === | ||
+ | |||
+ | ^ Operator | ||
+ | | + | %%~~= 3 + 2 ~~%% | 5 | | ||
+ | | - | %%~~= 3 - 2 ~~%% | 1 | | ||
+ | | * | %%~~= 3 * 2 ~~%% | 6 | | ||
+ | | / | %%~~= 6 / 2 ~~%% | 3 | | ||
+ | | % | %%~~= 7 % 2 ~~%% | 1 | | ||
+ | | unary + | %%~~= +2 ~~%% | ||
+ | | unary - | %%~~= -2 ~~%% | ||
+ | | & | %%~~= 3 & 2 ~~%% | 2 | | ||
+ | | %%<< | ||
+ | | %%>> | ||
+ | |||
+ | ===== 8.1 Sortablejs ===== | ||
+ | |||
+ | du brauchst nur die Tabelle in ''< | ||
+ | |||
+ | < | ||
+ | < | ||
+ | ^Col1^Col3^Col3^ | ||
+ | |1|one|25/ | ||
+ | |2|two|10/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Tabelle, automatisch nach erster Spalte aufsteigend sortiert | ||
+ | < | ||
+ | < | ||
+ | ^Col1^Col3^Col3^ | ||
+ | |1|one|25/ | ||
+ | |2|two|10/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Tabelle, automatisch nach erster Spalte absteigend sortiert | ||
+ | < | ||
+ | < | ||
+ | ^Col1^Col3^Col3^ | ||
+ | |1|one|25/ | ||
+ | |2|two|10/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Um nach einer Spalte sortieren zu lassen, musst du einfach nur auf den entsprechenden Spaltenkopf klicken. ein weiterer Klick dreht die Sortierung um. | ||
+ | |||
+ | ==== Optionen ==== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | < | ||
+ | ││ | ||
+ | ││ | ||
+ | ││ | ||
+ | ││ | ||
+ | │└automatische Sortierung nach Spalte 1 beim Laden der Seite | ||
+ | └automatische absteigende Sortierung | ||
+ | </ |
wiki/syntax.txt · Zuletzt geändert: 2024/02/28 15:32 von 127.0.0.1