wiki:documentation.patterns

Documentation Patterns

DocuWIKI Resources

<zbitfield bits=144, width=600, lanes=3>

  {"bits": 8, "name": "S", "type": 4},
  {"bits": 8, "name": "1", "type": 4, "attr": "type"},

  {"bits": 8, "name": "0", "attr": "count 0", "type": 5},
  {"bits": 8, "name": "C", "attr": "count 1", "type": 5},

  {"bits": 8, "attr": "addr0", "type": 1},
  {"bits": 8, "attr": "addr1", "type": 2},
  {"bits": 8, "attr": "addr2", "type": 3},
  {"bits": 8, "attr": "addr3", "type": 4},


  {"bits": 48, "name": "data", "type": 6},
  {"bits": 16, "name": "checksum", "type": 7},

  {"bits": 8, "name": "'\\r'", "type": 8},
  {"bits": 8, "name": "'\\n'"}
  
</zbitfield>

078151623243132394047S10Ctypecount 0count 1addr0addr1485556636495dataaddr2addr396111112127128135136143datachecksum'\r''\n'

<zbitfield bits=60, lanes=2, compact=false, height=80, width=600, invalid=true, hflip=true, vflip=true, cache=false>
    { "name": "IPO",   "bits": 8, "attr": "RO" },
    {                  "bits": 7 },
    { "name": "BRK",   "bits": 5, "attr": "RW", "type": 4 },
    { "name": "CPK",   "bits": 1 },
    { "name": "Clear", "bits": 3 },
    { "bits": 8 }
</zbitfield>

31307014819152023212924IPOBRKCPKClearRORW

<zbitfield bits=16, cache=false>
    {                  "bits": 7 },
    { "name": "BRK",   "bits": 5, "attr": "RW", "type": 4 },
    { "name": "CPK",   "bits": 1 },
    { "name": "Clear", "bits": 3 },
    { "bits": 8 }
</zbitfield>

067BRKRW811121315BRKCPKClearRW

 <zbitfield bits=60, cache=false>
     vfd 12/F1, 12/F2, 12/F3, 6/F4, 6/F5, 6/F7, 6/F8
 </zbitfield>

05611121718232429F8F7F5F4F3303536474859F3F2F1

<m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m> 

S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}

<m 8>delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }</m>

delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }

<m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m>

delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3

The Extended Backus–Naur form is used to document the syntax of command lines, .ini files and more. Some of the sample patterns are shown below:

%22INI+File%22+%7B+syntax+%3D+%22%5B%22+section_name+%22%5D%22+%7C+%5Bkey_value_pairs%5D+%7C+%22%3B%22+%5Bcomment%5D+.+key_value_pairs%3D+key+%22%3D%22+value+%7C+%7B+key+%22%3D%22+value+%7D.+%7D

<ebnf> "Arithmetic Expressions" {
expression = term  { ("+" | "-") term} .
term       = factor  { ("*"|"/") factor} .
factor     = constant | variable | "("  expression  ")" .
variable   = "x" | "y" | "z" .
constant   = digit {digit} .
digit      = "0" | "1" | "..." | "9" .
} </ebnf>

+%22Arithmetic+Expressions%22+%7B+expression+%3D+term+%7B+%28%22%2B%22+%7C+%22-%22%29+term%7D+.+term+%3D+factor+%7B+%28%22%2A%22%7C%22%2F%22%29+factor%7D+.+factor+%3D+constant+%7C+variable+%7C+%22%28%22+expression+%22%29%22+.+variable+%3D+%22x%22+%7C+%22y%22+%7C+%22z%22+.+constant+%3D+digit+%7Bdigit%7D+.+digit+%3D+%220%22+%7C+%221%22+%7C+%22...%22+%7C+%229%22+.+%7D+

See: Syntax Diagram

<ebnf> "Designator" {
  Designator = (ident | "this" | "super") {"." ident | "[" Expr "]"}.
} </ebnf>

+%22Designator%22+%7B+Designator+%3D+%28ident+%7C+%22this%22+%7C+%22super%22%29+%7B%22.%22+ident+%7C+%22%5B%22+Expr+%22%5D%22%7D.+%7D+

See: http://dotnet.jku.at/applications/Visualizer/#Simple

<ebnf> "Backus-Naur Form" {
  syntax         = rule [ syntax ] .
  rule           = opt-ws  identifier opt-ws "::=" opt-ws expression opt-ws EOL .
  expression     = list [ "|" expression ] .
  line-end       = opt-ws EOL | line-end line-end .
  list           = term [ WHITESPACE list ] .
  term           = literal | identifier .
  identifier     = "<" character {character} ">" .
  literal        = "'" {character} "'" | '"'  {character} '"' .
  opt-ws         = { WHITESPACE } .
  character      = lowercase-char | uppercase-char | digit | special-char .
  lowercase-char = "a" | "b" | "..." | "z" .
  uppercase-char = "A" | "B" | "..." | "Z" .
  digit          = "0" | "1" | "..." | "2" .
  special-char   = "-" | "_" .
} </ebnf>

+%22Backus-Naur+Form%22+%7B+syntax+%3D+rule+%5B+syntax+%5D+.+rule+%3D+opt-ws+identifier+opt-ws+%22%3A%3A%3D%22+opt-ws+expression+opt-ws+EOL+.+expression+%3D+list+%5B+%22%7C%22+expression+%5D+.+line-end+%3D+opt-ws+EOL+%7C+line-end+line-end+.+list+%3D+term+%5B+WHITESPACE+list+%5D+.+term+%3D+literal+%7C+identifier+.+identifier+%3D+%22%22+character+%7Bcharacter%7D+%22%22+.+literal+%3D+%22%27%22+%7Bcharacter%7D+%22%27%22+%7C+%27%22%27+%7Bcharacter%7D+%27%22%27+.+opt-ws+%3D+%7B+WHITESPACE+%7D+.+character+%3D+lowercase-char+%7C+uppercase-char+%7C+digit+%7C+special-char+.+lowercase-char+%3D+%22a%22+%7C+%22b%22+%7C+%22...%22+%7C+%22z%22+.+uppercase-char+%3D+%22A%22+%7C+%22B%22+%7C+%22...%22+%7C+%22Z%22+.+digit+%3D+%220%22+%7C+%221%22+%7C+%22...%22+%7C+%222%22+.+special-char+%3D+%22-%22+%7C+%22_%22+.+%7D+

This wiki supports the

Note

tag pair to start and end a note. The first parameter of the opening tag chooses the note style.

There are twelve styles available: 'abstract', 'bug', 'danger', 'example', 'failure', 'information', 'note', 'question', 'quote', 'achievement', 'tip', 'warning'

Abstract

Abstract

Bug

Bug

Danger

Danger

Example

Example

Error

Failure

Info

Information

Note

Note

Question

Question

Quote

Quote

Success

Achievement

Tip

Tip

Warning

Warning

You can replace the standard heading by adding your heading text as a third parameter in the

Note

tag:

<adm warning A very special warning>This is a warning

You can also omit the body of the note completely:

Will initiate self destruction if you click this

The default style is 'note', so

Note

is a valid note although it does not make much sense:

The default style will also be used if you mistype a style.

You can use almost every DokuWiki element inside a note body except headers.

  • wiki/documentation.patterns.txt
  • Last modified: 2026/01/24 18:47
  • by Site Administrator