<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity=60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
!Evolution
When I started this project I had been using and enjoying the D programming language. In my opinion D fixed most of what was wrong with C and C++. Unfortunately, while D claimed to have the goal of being a new systems language, all it's base libraries are built upon a garbage collector which makes it unusable by me when writing real-time systems. Also, while D can access libraries using the C ABI, it doesn't provide facilities for accessing D libraries from C is a way that uses the features D does better than C. 

Nevertheless, I started out to modify D to make it more compatible with actually replacing C. I made some progress, and then encountered D's implementation of operator overloading. Never satisfied with what's there, I noticed that while D allowed unicode identifiers, it didn't really allow unicode operators. 

Operator overloading, it C++ and other languages, is an interesting feature because it allows us to create expressions that are in a sense, a domain specific language. However the languages you can create are very limited because the number of operators you can overload are very limited. From this, I had the idea of moving away from a list of operators you could override and instead have a full alphabet that allowed composing whatever operators you needed.

After playing around with this idea, I noticed that if the grammar was defined in the right way, unlimited varieties of infix operators could be used. At this point I switched from trying to migrate D to a good replacement of C and began to design a completely new programming grammar. 
!Implementation
The core "new" idea in Cystems grammar is that operator functions are identified by a sequence of any of the characters in the operator alphabet. Because the operator alphabet is orthogonal to the identifier alphabet, we are able to lex them easily. A 3rd alphabet for creating programming structure, orthogonal to the other two, is also defined. 
A code block is a series of statements that will be executed. 

Statements within a codeblock are delimited by commas or newlines.
<code cys:nogutter:nocontrols>
{{
  statement1,statement2,statement3
  statement4
  statement5
}}
</code>
!!Bracketed sub-blocks
When a statement contains a bracketed sub-block, any amount of whitespace and newlines can surround the opening and closing brackets. 
<code cys:nogutter:nocontrols>
{{
  statement1, statement2
  if (expression) 

       { _ weird opening bracket location


  statement4, statement5 }
  statement6
  statement7

  _ A labeled sub-block
  symbol: {  
    statement8
    statement9
  } 

  _ An anonymous sub-block
  {
    statement10
    statement11
  }
}}
</code>
!!Indented sub-blocks
If a bracketed sub-block is expected, you can use indenting to indicate the block by not using brackets
<code cys:nogutter:nocontrols>
{{
  if (expression)
    statement1, statement2
    statement3
  
  statement4 _ not part of the "if" sub-block
}}
</code>
!!Line continuations
Finally, if you have an expression that you want to continue on another line, you can escape the newline by placing an underscore before it.
<code cys:nogutter:nocontrols>
{{
  a = b + c*(d + _
      e) + h
  a = b + _ Line comments need a terminating underscore _
      c
}}
</code>
(Note: the wiki syntax highlighter is not working correctly for the code above.)
Here are the core symbols of the grammar. Their definitions may not make much sense on their own, but we need to start somewhere. Later we describe how we create a grammar with them.

!Core elements
;Identifier Symbols (Identifiers)
:Names that refer to the elements we are programming to. Typed variables are the most familiar of these.
;Operator Symbols (Operators)
:Symbols that refer to expression functions. "+" is one example. 
;Structural Symbols (Structurals)
:Symbols used to impart structure to our programs.
Here's a detailed description of each: Ultimately we will use the entire unicode symbol set but we start with ASCII without limiting ourselves.
!Identifiers
Identifiers are symbols that match the following regular expression:
{{{
([a-zA-Z] | [a-zA-Z_][0-9A-Za-z_]+)
}}}
Examples:
<code cys:nogutter:nocontrols>
my_long_identifier
__ 
_9009
p
</code>
Of note is that a single underscore {{{_}}} is an invalid identifier because we use the underscore as a structural character.

!Operators
Operators are symbols that match the following regular expression:
{{{
([`~!@#$%^&*<>'?+|-/=\\]+)
}}}
Examples:
<code cys:nogutter:nocontrols>
*
|-|
~!@#$%
+/-
</code>
Again, we are restricting ourselves to ASCII but to switch to unicode we simply choose a set of symbols orthogonal to the other two (identifiers and structurals).
One thing to note is that because operators are allowed to be any number of operator characters, two operators in sequence need to be separated by a space. In C, {{{a+-b}}} is acceptable. in Cystem, you must insert a space if they are indeed two operators. {{{a + -b}}}
!Structurals
Structurals are the following symbols
{{{
( ) [ ] { } . , : 
<Newline> <Space>
}}}
Plus the following two symbols added for syntactic sugar:
{{{
 ; "
}}}
OverView
/***
| Name:|''dropTagging''|
| Created by:|SaqImtiaz|
| Location:|http://tw.lewcid.org/|
| Version:|0.1 (06-Apr-2006)|
| Requires:|~TW2.07|

!About
*provides a drop down list of tiddlers tagged with the specified tag, a replacement for the core tagging macro.

!Demonstration
*<<dropTagging Saq>>
''I recommend using either TaggerPlugin or monkeyTagger, with dropTags and dropTagging in the toolbar:''


!Usage
{{{<<dropTagging>>}}} for tiddlers tagged by current tiddler/tag
{{{<<dropTagging 'Saq'>>}}} for tiddlers tagged by the tag 'Saq' <<dropTagging 'Saq'>>
{{{<<dropTagging 'Saq' 'custom label'>>}}} for tiddlers tagged by the tag 'Saq' with a custom label. <<dropTagging 'Saq' 'custom label'>>

!Installation:
*Copy this tiddler to your TW with the systemConfig tag
* copy the following to your ViewTemplate:
#either {{{<div class='tagging' macro='dropTagging'></div>}}} to add next to or replace tagging macro, or
#{{{<div class='toolbar' >
<span style="padding-right:1.75em;" macro='dropTagging''></span>
<span macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></span>
</div>}}}(adjust padding to taste)

!To Do
*tweak popup css to optimize placement and colors.
*''optimize code to use core onClickTag function, can cut code size by half!''

!Code
***/
//{{{
config.macros.dropTagging={};
config.macros.dropTagging.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE
config.macros.dropTagging.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
 var arrow=': '+ config.macros.dropTagging.dropdownchar;
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);



 var droptagginglabel= (params[1] && params[1] !='.')? params[1]: 'tagging'+arrow;
 var droptaggingtooltip="tiddlers tagged with '"+tiddler.title+"'";
 
 if(params[0] && store.tiddlerExists(params[0]))
 tiddler = store.getTiddler(params[0]);
 var tagged = store.getTaggedTiddlers(tiddler.title);

 if(tagged.length==0)
 return false; 
 
 var droptagging = function(e)
 { if (!e) var e = window.event;
 var popup = Popup.create(this);
 


 for(var t=0; t<tagged.length; t++)
 createTiddlyLink(createTiddlyElement(popup,"li"),tagged[t].title,true);

 Popup.show(popup,false);
 e.cancelBubble = true;
 if (e.stopPropagation)
 e.stopPropagation();
 return(false);
 };
 
var createdropperButton = function(place){
var sp = createTiddlyElement(place,"span",null,"taggingdropbutton");
var theDropDownBtn = createTiddlyButton(sp,droptagginglabel,droptaggingtooltip,droptagging);
 };
createdropperButton(place);
};

setStylesheet(
 ".toolbar .taggingdropbutton {margin-right:0em; border:0px solid #eee; padding:0px; padding-right:0px; padding-left:0px; }\n"+
 ".taggingdropbutton a.button {padding:2px; padding-left:2px; padding-right:2px;}\n"+
// ".taggingdropbutton {font-size:150%;}\n"+
".popup .highlight{background: #fe8; color:#000;}\n"+
 "",
"DropTaggingStyles");

//}}}
/***
|''Name:''|''dropTags''|
|''Version:''|0.5 (12-May-2006)|
|''Created by:''|SaqImtiaz|
|''Location:''|http://tw.lewcid.org/#DropTagsMacro|
|''Description:''|provides a drop down list of tags in the current tiddler,<<br>> a replacement for the core tags macro.|
|''Documentation:''|DropTagsMacroDocumentation |
|''Source Code:''|[[DropTagsMacroSource|DropTagsMacroDocumentation]] |
|''Requires:''|~TW2.07|

***/
// /%
config.macros.dropTags={};config.macros.dropTags.dropdownchar=(document.all?"▼":"▾");config.macros.dropTags.handler=function(_1,_2,_3,_4,_5,_6){var _7=config.macros.dropTags.dropdownchar;var _8=(_3[0]&&_3[0]!=".")?_3[0]+_7:"tags"+_7;var _9="current tags for this tiddler";var _a=function(e){if(!e){var e=window.event;}var _d=Popup.create(this);var _e=config.views.wikified.tag;if(_6.tags.length==0){createTiddlyElement(_d,"li",null,"listTitle",_e.labelNoTags);}else{for(var t=0;t<_6.tags.length;t++){createTagButton(createTiddlyElement(_d,"li"),_6.tags[t],_6.title);}}if(version.extensions.IntelliTaggerPlugin){createTiddlyElement(createTiddlyElement(_d,"li"),"hr");abego.IntelliTagger.createEditTagsButton(_6,createTiddlyElement(_d,"li"),"[IntelliEdit]","Edit tags with Intellitagger");}Popup.show(_d,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};createTiddlyButton(_1,_8,_8,_a,"button","dropTagBtn");};setStylesheet(".popup .highlight{background: #fe8; color:#000;}\n"+"#nestedtagger {background:#2E5ADF; border: 1px solid #0331BF;}\n"+"","DropTagsStyles");if(!config.macros.tagger){window.onClickTag=function(e){if(!e){var e=window.event;}var _12=resolveTarget(e);var _13=(!isNested(_12));if((Popup.stack.length>1)&&(_13==true)){Popup.removeFrom(1);}else{if(Popup.stack.length>0&&_13==false){Popup.removeFrom(0);}}var _14=(_13==false)?"popup":"nestedtagger";var _15=createTiddlyElement(document.body,"ol",_14,"popup",null);Popup.stack.push({root:this,popup:_15});var tag=this.getAttribute("tag");var _17=this.getAttribute("tiddler");if(_15&&tag){var _18=store.getTaggedTiddlers(tag);var _19=[];var li,r;for(r=0;r<_18.length;r++){if(_18[r].title!=_17){_19.push(_18[r].title);}}var _1b=config.views.wikified.tag;if(_19.length>0){var _1c=createTiddlyButton(createTiddlyElement(_15,"li"),_1b.openAllText.format([tag]),_1b.openAllTooltip,onClickTagOpenAll);_1c.setAttribute("tag",tag);createTiddlyElement(createTiddlyElement(_15,"li"),"hr");for(r=0;r<_19.length;r++){createTiddlyLink(createTiddlyElement(_15,"li"),_19[r],true);}}else{createTiddlyText(createTiddlyElement(_15,"li",null,"disabled"),_1b.popupNone.format([tag]));}createTiddlyElement(createTiddlyElement(_15,"li"),"hr");var h=createTiddlyLink(createTiddlyElement(_15,"li"),tag,false);createTiddlyText(h,_1b.openTag.format([tag]));}Popup.show(_15,false);e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}return (false);};}if(!window.isNested){window.isNested=function(e){while(e!=null){var _1f=document.getElementById("contentWrapper");if(_1f==e){return true;}e=e.parentNode;}return false;};};config.shadowTiddlers.DropTagsMacroDocumentation="The documentation is available [[here.|http://tw.lewcid.org/#DropTagsMacroDocumentation]]";config.shadowTiddlers.DropTagsMacroSource="The documentation is available [[here.|http://tw.lewcid.org/#DropTagsMacroDocumentation]]";
// %/
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
The following is a small snippet of code in C 

<code cpp:nocontrols:nogutter>
void swap(int* x, int* y)
{
  int tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
}
int main(){
  int a = 0;
  int b = 1;
  
  swap(&a,&b);
  printf("a: %d, b: %d \n",a,b);
}
</code>
and the corresponding Cystem code

<code cys:nocontrols:nogutter>
swap(x:.int,y:.int):void
{
  tmp: int
  tmp = x.
  x. = y.
  y. = tmp
}
{{
  a: int(0)
  b: int(1)
  
  swap(.a,.b)
  printf("a: %d, b: %d \n",a,b)
}}
</code>
[[for the impatient we have some examples]]
[[Example 1]]
[[Systems C vs Cystem]]
An expression is any combination of function calls, operators and sub-expressions. For an expression to be valid, operators and functions whose parameters match the types in the expression must be defined. 

In expressions, parenthesis {{{(}}} and {{{)}}} are used to establish a sub expression.

The following is a possible expression:
<code cys:nogutter:nocontrols>
|a| * b + c*c*d^(a+b)!
</code>
With the power of having arbitrary operators, comes a couple rules:
#Two adjacent operators must be separated by a space.
#Prefix and postfix operators cannot have a space between them and their operand

On final characteristic of expressions in Cystem is that two operands adjacent to each other will be matched to a <space> operator if one is available. So the following could be a valid expression
<code cys:nogutter:nocontrols>
a 2 c
</code>
!!Compiler Warnings
Since we have a whole alphabet of operators now, we get warnings from the compiler that are similar to identifier warnings. //Operator *&* is not defined for (int,double)// could be an example. 
Now that operators are a part of our language, we need to be more concious of the ways we call functions. First, here's some terminology:

;operand
:An identifier or sub-expression
;Identifier prefix functions (identifier functions)
:Like C, an identifier followed by a parameter list: {{{myfunction(arg1,arg2)}}}
;prefix function
:Also like C, an operator followed by a single identifier or expression
:{{{ -a }}} or {{{ -(a+myfunc()) }}}
;postfix function
:Also like C, a single identifier or expression followed by an operator
:{{{ a++ }}} or {{{ (a+myfunc())++ }}}
;infix function
:Again, like C, an operator with an operand on either side.
:{{{a + b}}} or {{{ (a*b)+cat(x) }}}
;outfix function
:Not used in C, this is two symbols bracketing an operand. For instance, if for a certain type we define {{{`}}} and {{{'}}} as a bracket pair, then we can have the following expression:
:{{{a = `b'}}}
:The characters can be the same if desired....

Each operator has a precedence that establishes what order operators on the same level are evaluated. Additionally operators are defined to be evaluated from the left, or from the right.

So given operator {{{+}}} with precedence {{{[priority: 500, arity: right]}}} and operator {{{*}}} with precedence {{{[priority: 1000,arity: left]}}} we expect the following expression to be evaluated as such:
{{{
a + b + c*d*e
}}}
In the following order, replacing evaluated sub expressions with captial letters
{{{
a + b + A*e   <=(c*d)
a + b + B     <=(A*e)
a + C         <=(b+B)
D             <=(a+C)
}}}




|Nome|Fórmula molecular|Fórmula de estrutura condensada|h
|Met''ano''|$CH_4$|$CH_4$|
|Et''ano''|$C_2H_6$|$CH_3-CH_3$|
|Prop''ano''|$C_3H_8$|$CH_3-CH_2-CH_3$|
|But''ano''|$C_4H_{10}$|$CH_3-CH_2-CH_2 CH_3$|
|Pent''ano''|$C_5H_{12}$|$CH_3-CH_2-CH_2-CH_2-CH_3$|
|...|...|$\ldots$|

$$f(x) = \left\{\begin{array}{l l}
x^2 \sin \frac1x, & \textrm{if } x \ne 0, \\
0, & \textrm{if } x = 0 .
\end{array}\right.$$
$$\begin{eqnarray} x & = & \frac{-7 \pm \sqrt{49 - 24}}{6} \\
& = & -2 \textrm{ or } -\frac13. \end{eqnarray}$$
OverView
#[[Quick Intro|User defined operators in Cystem]]
#[[Background]]
#[[Core Lexing]]
#[[Source Files]]
#[[Function Calls]]
#[[Expressions]]
#[[Code Blocks]]
#[[Meta-types]]
#[[Examples]]
/***
|''Name:''|MathSVGPlugin|
|''Description:''|This plugin translates a subset of the LaTeX math notation to MathML with a customisable  image fallback when MathML is not supported. It also provides an easy way to produce mathematical SVG graphics with dynamical features and animation.|
|''Version:''|1.1|
|''Date:''|2009-05-05|
|''Source:''|http://www.math.ist.utl.pt/~psoares/mathsvg.html|
|''Author:''|Paulo Soares|
|''License:''|[[GNU Lesser General Public License|http://www.gnu.org/licences/lgpl.html]]|
|''~CoreVersion:''|2.5.0|
!Original copyright notice
{{{
ASCIIMathML.js
==============
Version 2.1 Oct 8, 2008, (c) Peter Jipsen http://www.chapman.edu/~jipsen
This version extends ASCIIMathML.js with LaTeXMathML.js and ASCIIsvg.js.
Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js
If you use it on a webpage, please send the URL to jipsen@chapman.edu

The LaTeXMathML modifications were made by Douglas Woodall, June 2006.
(for details see header on the LaTeXMathML part in middle of file)
Extensive clean-up and improvements by Paulo Soares, Oct 2007.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 
(at http://www.gnu.org/licences/lgpl.html) for more details.
}}}
!~MathSVG code (minified)
***/
//{{{
Math.sec=function(a){return 1/Math.cos(a)};Math.csc=function(a){return 1/Math.sin(a)};Math.cot=function(a){return 1/Math.tan(a)};Math.asec=function(a){return Math.acos(1/a)};Math.acsc=function(a){return Math.asin(1/a)};Math.acot=function(a){return Math.atan(1/a)};Math.sinh=function(a){return(Math.exp(a)-Math.exp(-a))/2};Math.cosh=function(a){return(Math.exp(a)+Math.exp(-a))/2};Math.tanh=function(a){return(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))};Math.sech=function(a){return 1/Math.cosh(a)};Math.csch=function(a){return 1/Math.sinh(a)};Math.coth=function(a){return 1/Math.tanh(a)};Math.asinh=function(a){return Math.log(a+Math.sqrt(a*a+1))};Math.acosh=function(a){return Math.log(a+Math.sqrt(a*a-1))};Math.atanh=function(a){return Math.log((1+a)/(1-a))/2};Math.sech=function(a){return 1/Math.cosh(a)};Math.csch=function(a){return 1/Math.sinh(a)};Math.coth=function(a){return 1/Math.tanh(a)};Math.asech=function(a){return Math.acosh(1/a)};Math.acsch=function(a){return Math.asinh(1/a)};Math.acoth=function(a){return Math.atanh(1/a)};Math.sign=function(a){return(a===0?0:(a<0?-1:1))};Math.step=function(a,c,b){return(a<0?(b?b:0):(c?c:1))};Math.root=function(a,b){return Math.pow(a,1/b)};Math.factorial=function(b){if(b===0){return 1}if(b<0){if((b%1)===0){return}if(b>-1){return Math.factorial(b+1)/(b+1)}return -Math.PI/(Math.factorial(-1-b)*Math.sin(Math.PI*b))}var a=b;if((b%1)===0){while(b>1){b=b-1;a=a*b}}else{a=Math.exp((b+0.5)*Math.log(b+1)-b-b*(0.1121105+b*0.08106103)/(1.452342+b*(2.410858+b)))}return a};Math.Gamma=function(a){return Math.factorial(a-1)};Math.Beta=function(a,b){return Math.Gamma(a)*Math.Gamma(b)/Math.Gamma(a+b)};Math.C=function(a,b){var c=1/((a+1)*Math.Beta(b+1,a-b+1));return c};Math.truncate=function(a,c){var b=c||0;return Math.floor(a*Math.pow(10,b))/Math.pow(10,b)};Math.randomString=function(b,d){var c,e="";var a=b.length-1;for(c=0;c<d;c++){e+=b.substr(Math.runif(0,a),1)}return e};Math.runif=function(d,c,f){var e=f||0;return Math.truncate((c+Math.pow(10,-e)-d)*Math.random()+d,e)};Math.rnormal=function(a,b){a=a||0;b=b||1;var d=0,c=0;while(d*c===0){d=Math.random();c=Math.random()}return b*(Math.sqrt(-2*Math.log(d))*Math.cos(2*Math.PI*c))+a};Math.range=function(e,a,d){if((a-e)*d<=0){return}var c,b=[];for(c=e;c<=a;c+=d){b[b.length]=c}return b};var MSVG=function(m){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var t=["\uD835\uDC9C","\u212C","\uD835\uDC9E","\uD835\uDC9F","\u2130","\u2131","\uD835\uDCA2","\u210B","\u2110","\uD835\uDCA5","\uD835\uDCA6","\u2112","\u2133","\uD835\uDCA9","\uD835\uDCAA","\uD835\uDCAB","\uD835\uDCAC","\u211B","\uD835\uDCAE","\uD835\uDCAF","\uD835\uDCB0","\uD835\uDCB1","\uD835\uDCB2","\uD835\uDCB3","\uD835\uDCB4","\uD835\uDCB5","\uD835\uDCB6","\uD835\uDCB7","\uD835\uDCB8","\uD835\uDCB9","\u212F","\uD835\uDCBB","\u210A","\uD835\uDCBD","\uD835\uDCBE","\uD835\uDCBF","\uD835\uDCC0","\uD835\uDCC1","\uD835\uDCC2","\uD835\uDCC3","\u2134","\uD835\uDCC5","\uD835\uDCC6","\uD835\uDCC7","\uD835\uDCC8","\uD835\uDCC9","\uD835\uDCCA","\uD835\uDCCB","\uD835\uDCCC","\uD835\uDCCD","\uD835\uDCCE","\uD835\uDCCF"];var D=["\uD835\uDD04","\uD835\uDD05","\u212D","\uD835\uDD07","\uD835\uDD08","\uD835\uDD09","\uD835\uDD0A","\u210C","\u2111","\uD835\uDD0D","\uD835\uDD0E","\uD835\uDD0F","\uD835\uDD10","\uD835\uDD11","\uD835\uDD12","\uD835\uDD13","\uD835\uDD14","\u211C","\uD835\uDD16","\uD835\uDD17","\uD835\uDD18","\uD835\uDD19","\uD835\uDD1A","\uD835\uDD1B","\uD835\uDD1C","\u2128","\uD835\uDD1E","\uD835\uDD1F","\uD835\uDD20","\uD835\uDD21","\uD835\uDD22","\uD835\uDD23","\uD835\uDD24","\uD835\uDD25","\uD835\uDD26","\uD835\uDD27","\uD835\uDD28","\uD835\uDD29","\uD835\uDD2A","\uD835\uDD2B","\uD835\uDD2C","\uD835\uDD2D","\uD835\uDD2E","\uD835\uDD2F","\uD835\uDD30","\uD835\uDD31","\uD835\uDD32","\uD835\uDD33","\uD835\uDD34","\uD835\uDD35","\uD835\uDD36","\uD835\uDD37"];var s=["\uD835\uDD38","\uD835\uDD39","\u2102","\uD835\uDD3B","\uD835\uDD3C","\uD835\uDD3D","\uD835\uDD3E","\u210D","\uD835\uDD40","\uD835\uDD41","\uD835\uDD42","\uD835\uDD43","\uD835\uDD44","\u2115","\uD835\uDD46","\u2119","\u211A","\u211D","\uD835\uDD4A","\uD835\uDD4B","\uD835\uDD4C","\uD835\uDD4D","\uD835\uDD4E","\uD835\uDD4F","\uD835\uDD50","\u2124","\uD835\uDD52","\uD835\uDD53","\uD835\uDD54","\uD835\uDD55","\uD835\uDD56","\uD835\uDD57","\uD835\uDD58","\uD835\uDD59","\uD835\uDD5A","\uD835\uDD5B","\uD835\uDD5C","\uD835\uDD5D","\uD835\uDD5E","\uD835\uDD5F","\uD835\uDD60","\uD835\uDD61","\uD835\uDD62","\uD835\uDD63","\uD835\uDD64","\uD835\uDD65","\uD835\uDD66","\uD835\uDD67","\uD835\uDD68","\uD835\uDD69","\uD835\uDD6A","\uD835\uDD6B"];var z=0,b=1,d=2,p=3,x=4,e=5,q=6,r=7,o=8,f=9,B=10,A=11,c=12,j=13,l=14;var a=[{input:"\\varepsilon",tag:"mi",output:"\u025B",ttype:z},{input:"\\varsigma",tag:"mi",output:"\u03C2",ttype:z},{input:"\\vartheta",tag:"mi",output:"\u03D1",ttype:z},{input:"\\varphi",tag:"mi",output:"\u03D5",ttype:z},{input:"\\varpi",tag:"mi",output:"\u03D6",ttype:z},{input:"\\varrho",tag:"mi",output:"\u03F1",ttype:z},{input:"\\alpha",tag:"mi",output:"\u03B1",ttype:z},{input:"\\beta",tag:"mi",output:"\u03B2",ttype:z},{input:"\\gamma",tag:"mi",output:"\u03B3",ttype:z},{input:"\\delta",tag:"mi",output:"\u03B4",ttype:z},{input:"\\epsilon",tag:"mi",output:"\u03B5",ttype:z},{input:"\\zeta",tag:"mi",output:"\u03B6",ttype:z},{input:"\\eta",tag:"mi",output:"\u03B7",ttype:z},{input:"\\theta",tag:"mi",output:"\u03B8",ttype:z},{input:"\\iota",tag:"mi",output:"\u03B9",ttype:z},{input:"\\kappa",tag:"mi",output:"\u03BA",ttype:z},{input:"\\lambda",tag:"mi",output:"\u03BB",ttype:z},{input:"\\mu",tag:"mi",output:"\u03BC",ttype:z},{input:"\\nu",tag:"mi",output:"\u03BD",ttype:z},{input:"\\xi",tag:"mi",output:"\u03BE",ttype:z},{input:"\\omicron",tag:"mi",output:"\u03BF",ttype:z},{input:"\\pi",tag:"mi",output:"\u03C0",ttype:z},{input:"\\rho",tag:"mi",output:"\u03C1",ttype:z},{input:"\\sigma",tag:"mi",output:"\u03C3",ttype:z},{input:"\\tau",tag:"mi",output:"\u03C4",ttype:z},{input:"\\upsilon",tag:"mi",output:"\u03C5",ttype:z},{input:"\\phi",tag:"mi",output:"\u03C6",ttype:z},{input:"\\chi",tag:"mi",output:"\u03C7",ttype:z},{input:"\\psi",tag:"mi",output:"\u03C8",ttype:z},{input:"\\omega",tag:"mi",output:"\u03C9",ttype:z},{input:"\\Alpha",tag:"mo",output:"\u0391",ttype:z},{input:"\\Beta",tag:"mo",output:"\u0392",ttype:z},{input:"\\Gamma",tag:"mo",output:"\u0393",ttype:z},{input:"\\Delta",tag:"mo",output:"\u0394",ttype:z},{input:"\\Epsilon",tag:"mo",output:"\u0395",ttype:z},{input:"\\Zeta",tag:"mo",output:"\u0396",ttype:z},{input:"\\Eta",tag:"mo",output:"\u0397",ttype:z},{input:"\\Theta",tag:"mo",output:"\u0398",ttype:z},{input:"\\Iota",tag:"mo",output:"\u0399",ttype:z},{input:"\\Kappa",tag:"mo",output:"\u039A",ttype:z},{input:"\\Lambda",tag:"mo",output:"\u039B",ttype:z},{input:"\\Mu",tag:"mo",output:"\u039C",ttype:z},{input:"\\Nu",tag:"mo",output:"\u039D",ttype:z},{input:"\\Xi",tag:"mo",output:"\u039E",ttype:z},{input:"\\Omicron",tag:"mo",output:"\u039F",ttype:z},{input:"\\Pi",tag:"mo",output:"\u03A0",ttype:z},{input:"\\Rho",tag:"mo",output:"\u03A1",ttype:z},{input:"\\Sigma",tag:"mo",output:"\u03A3",ttype:z},{input:"\\Tau",tag:"mo",output:"\u03A4",ttype:z},{input:"\\Upsilon",tag:"mo",output:"\u03A5",ttype:z},{input:"\\Phi",tag:"mo",output:"\u03A6",ttype:z},{input:"\\Chi",tag:"mo",output:"\u03A7",ttype:z},{input:"\\Psi",tag:"mo",output:"\u03A8",ttype:z},{input:"\\Omega",tag:"mo",output:"\u03A9",ttype:z},{input:"\\frac12",tag:"mo",output:"\u00BD",ttype:z},{input:"\\frac14",tag:"mo",output:"\u00BC",ttype:z},{input:"\\frac34",tag:"mo",output:"\u00BE",ttype:z},{input:"\\frac13",tag:"mo",output:"\u2153",ttype:z},{input:"\\frac23",tag:"mo",output:"\u2154",ttype:z},{input:"\\frac15",tag:"mo",output:"\u2155",ttype:z},{input:"\\frac25",tag:"mo",output:"\u2156",ttype:z},{input:"\\frac35",tag:"mo",output:"\u2157",ttype:z},{input:"\\frac45",tag:"mo",output:"\u2158",ttype:z},{input:"\\frac16",tag:"mo",output:"\u2159",ttype:z},{input:"\\frac56",tag:"mo",output:"\u215A",ttype:z},{input:"\\frac18",tag:"mo",output:"\u215B",ttype:z},{input:"\\frac38",tag:"mo",output:"\u215C",ttype:z},{input:"\\frac58",tag:"mo",output:"\u215D",ttype:z},{input:"\\frac78",tag:"mo",output:"\u215E",ttype:z},{input:"\\pm",tag:"mo",output:"\u00B1",ttype:z},{input:"\\mp",tag:"mo",output:"\u2213",ttype:z},{input:"\\triangleleft",tag:"mo",output:"\u22B2",ttype:z},{input:"\\triangleright",tag:"mo",output:"\u22B3",ttype:z},{input:"\\cdot",tag:"mo",output:"\u22C5",ttype:z},{input:"\\star",tag:"mo",output:"\u22C6",ttype:z},{input:"\\ast",tag:"mo",output:"\u002A",ttype:z},{input:"\\times",tag:"mo",output:"\u00D7",ttype:z},{input:"\\div",tag:"mo",output:"\u00F7",ttype:z},{input:"\\circ",tag:"mo",output:"\u2218",ttype:z},{input:"\\bullet",tag:"mo",output:"\u2022",ttype:z},{input:"\\oplus",tag:"mo",output:"\u2295",ttype:z},{input:"\\ominus",tag:"mo",output:"\u2296",ttype:z},{input:"\\otimes",tag:"mo",output:"\u2297",ttype:z},{input:"\\bigcirc",tag:"mo",output:"\u25CB",ttype:z},{input:"\\oslash",tag:"mo",output:"\u2298",ttype:z},{input:"\\odot",tag:"mo",output:"\u2299",ttype:z},{input:"\\land",tag:"mo",output:"\u2227",ttype:z},{input:"\\wedge",tag:"mo",output:"\u2227",ttype:z},{input:"\\lor",tag:"mo",output:"\u2228",ttype:z},{input:"\\vee",tag:"mo",output:"\u2228",ttype:z},{input:"\\cap",tag:"mo",output:"\u2229",ttype:z},{input:"\\cup",tag:"mo",output:"\u222A",ttype:z},{input:"\\sqcap",tag:"mo",output:"\u2293",ttype:z},{input:"\\sqcup",tag:"mo",output:"\u2294",ttype:z},{input:"\\uplus",tag:"mo",output:"\u228E",ttype:z},{input:"\\amalg",tag:"mo",output:"\u2210",ttype:z},{input:"\\bigtriangleup",tag:"mo",output:"\u25B3",ttype:z},{input:"\\bigtriangledown",tag:"mo",output:"\u25BD",ttype:z},{input:"\\dag",tag:"mo",output:"\u2020",ttype:z},{input:"\\dagger",tag:"mo",output:"\u2020",ttype:z},{input:"\\ddag",tag:"mo",output:"\u2021",ttype:z},{input:"\\ddagger",tag:"mo",output:"\u2021",ttype:z},{input:"\\lhd",tag:"mo",output:"\u22B2",ttype:z},{input:"\\rhd",tag:"mo",output:"\u22B3",ttype:z},{input:"\\unlhd",tag:"mo",output:"\u22B4",ttype:z},{input:"\\unrhd",tag:"mo",output:"\u22B5",ttype:z},{input:"\\sum",tag:"mo",output:"\u2211",ttype:r},{input:"\\prod",tag:"mo",output:"\u220F",ttype:r},{input:"\\bigcap",tag:"mo",output:"\u22C2",ttype:r},{input:"\\bigcup",tag:"mo",output:"\u22C3",ttype:r},{input:"\\bigwedge",tag:"mo",output:"\u22C0",ttype:r},{input:"\\bigvee",tag:"mo",output:"\u22C1",ttype:r},{input:"\\bigsqcap",tag:"mo",output:"\u2A05",ttype:r},{input:"\\bigsqcup",tag:"mo",output:"\u2A06",ttype:r},{input:"\\coprod",tag:"mo",output:"\u2210",ttype:r},{input:"\\bigoplus",tag:"mo",output:"\u2A01",ttype:r},{input:"\\bigotimes",tag:"mo",output:"\u2A02",ttype:r},{input:"\\bigodot",tag:"mo",output:"\u2A00",ttype:r},{input:"\\biguplus",tag:"mo",output:"\u2A04",ttype:r},{input:"\\int",tag:"mo",output:"\u222B",ttype:z},{input:"\\oint",tag:"mo",output:"\u222E",ttype:z},{input:":=",tag:"mo",output:":=",ttype:z},{input:"\\lt",tag:"mo",output:"<",ttype:z},{input:"\\gt",tag:"mo",output:">",ttype:z},{input:"\\ne",tag:"mo",output:"\u2260",ttype:z},{input:"\\neq",tag:"mo",output:"\u2260",ttype:z},{input:"\\le",tag:"mo",output:"\u2264",ttype:z},{input:"\\leq",tag:"mo",output:"\u2264",ttype:z},{input:"\\leqslant",tag:"mo",output:"\u2264",ttype:z},{input:"\\ge",tag:"mo",output:"\u2265",ttype:z},{input:"\\geq",tag:"mo",output:"\u2265",ttype:z},{input:"\\geqslant",tag:"mo",output:"\u2265",ttype:z},{input:"\\equiv",tag:"mo",output:"\u2261",ttype:z},{input:"\\ll",tag:"mo",output:"\u226A",ttype:z},{input:"\\gg",tag:"mo",output:"\u226B",ttype:z},{input:"\\doteq",tag:"mo",output:"\u2250",ttype:z},{input:"\\prec",tag:"mo",output:"\u227A",ttype:z},{input:"\\succ",tag:"mo",output:"\u227B",ttype:z},{input:"\\preceq",tag:"mo",output:"\u227C",ttype:z},{input:"\\succeq",tag:"mo",output:"\u227D",ttype:z},{input:"\\subset",tag:"mo",output:"\u2282",ttype:z},{input:"\\supset",tag:"mo",output:"\u2283",ttype:z},{input:"\\subseteq",tag:"mo",output:"\u2286",ttype:z},{input:"\\supseteq",tag:"mo",output:"\u2287",ttype:z},{input:"\\sqsubset",tag:"mo",output:"\u228F",ttype:z},{input:"\\sqsupset",tag:"mo",output:"\u2290",ttype:z},{input:"\\sqsubseteq",tag:"mo",output:"\u2291",ttype:z},{input:"\\sqsupseteq",tag:"mo",output:"\u2292",ttype:z},{input:"\\sim",tag:"mo",output:"\u223C",ttype:z},{input:"\\simeq",tag:"mo",output:"\u2243",ttype:z},{input:"\\approx",tag:"mo",output:"\u2248",ttype:z},{input:"\\cong",tag:"mo",output:"\u2245",ttype:z},{input:"\\Join",tag:"mo",output:"\u22C8",ttype:z},{input:"\\bowtie",tag:"mo",output:"\u22C8",ttype:z},{input:"\\in",tag:"mo",output:"\u2208",ttype:z},{input:"\\ni",tag:"mo",output:"\u220B",ttype:z},{input:"\\owns",tag:"mo",output:"\u220B",ttype:z},{input:"\\propto",tag:"mo",output:"\u221D",ttype:z},{input:"\\vdash",tag:"mo",output:"\u22A2",ttype:z},{input:"\\dashv",tag:"mo",output:"\u22A3",ttype:z},{input:"\\models",tag:"mo",output:"\u22A8",ttype:z},{input:"\\perp",tag:"mo",output:"\u22A5",ttype:z},{input:"\\smile",tag:"mo",output:"\u2323",ttype:z},{input:"\\frown",tag:"mo",output:"\u2322",ttype:z},{input:"\\asymp",tag:"mo",output:"\u224D",ttype:z},{input:"\\notin",tag:"mo",output:"\u2209",ttype:z},{input:"\\begin{eqnarray}",output:"X",ttype:l,invisible:true},{input:"\\begin{array}",output:"X",ttype:l,invisible:true},{input:"\\\\",output:"}&{",ttype:o},{input:"\\end{eqnarray}",output:"}}",ttype:o},{input:"\\end{array}",output:"}}",ttype:o},{input:"\\big",tag:"mo",output:"X",atval:"1.2",ttype:A},{input:"\\Big",tag:"mo",output:"X",atval:"1.6",ttype:A},{input:"\\bigg",tag:"mo",output:"X",atval:"2.2",ttype:A},{input:"\\Bigg",tag:"mo",output:"X",atval:"2.9",ttype:A},{input:"\\left",tag:"mo",output:"X",ttype:x},{input:"\\right",tag:"mo",output:"X",ttype:e},{input:"{",output:"{",ttype:x,invisible:true},{input:"}",output:"}",ttype:e,invisible:true},{input:"(",tag:"mo",output:"(",atval:"1",ttype:j},{input:"[",tag:"mo",output:"[",atval:"1",ttype:j},{input:"\\lbrack",tag:"mo",output:"[",atval:"1",ttype:j},{input:"\\{",tag:"mo",output:"{",atval:"1",ttype:j},{input:"\\lbrace",tag:"mo",output:"{",atval:"1",ttype:j},{input:"\\langle",tag:"mo",output:"\u2329",atval:"1",ttype:j},{input:"\\lfloor",tag:"mo",output:"\u230A",atval:"1",ttype:j},{input:"\\lceil",tag:"mo",output:"\u2308",atval:"1",ttype:j},{input:")",tag:"mo",output:")",rtag:"mi",atval:"1",ttype:j},{input:"]",tag:"mo",output:"]",rtag:"mi",atval:"1",ttype:j},{input:"\\rbrack",tag:"mo",output:"]",rtag:"mi",atval:"1",ttype:j},{input:"\\}",tag:"mo",output:"}",rtag:"mi",atval:"1",ttype:j},{input:"\\rbrace",tag:"mo",output:"}",rtag:"mi",atval:"1",ttype:j},{input:"\\rangle",tag:"mo",output:"\u232A",rtag:"mi",atval:"1",ttype:j},{input:"\\rfloor",tag:"mo",output:"\u230B",rtag:"mi",atval:"1",ttype:j},{input:"\\rceil",tag:"mo",output:"\u2309",rtag:"mi",atval:"1",ttype:j},{input:"|",tag:"mo",output:"\u2223",atval:"1",ttype:j},{input:"\\|",tag:"mo",output:"\u2225",atval:"1",ttype:j},{input:"\\vert",tag:"mo",output:"\u2223",atval:"1",ttype:j},{input:"\\Vert",tag:"mo",output:"\u2225",atval:"1",ttype:j},{input:"\\mid",tag:"mo",output:"\u2223",atval:"1",ttype:j},{input:"\\parallel",tag:"mo",output:"\u2225",atval:"1",ttype:j},{input:"/",tag:"mo",output:"/",atval:"1.01",ttype:j},{input:"\\backslash",tag:"mo",output:"\u2216",atval:"1",ttype:j},{input:"\\setminus",tag:"mo",output:"\\",ttype:z},{input:"\\!",tag:"mspace",atname:"width",atval:"-0.167em",ttype:q},{input:"\\,",tag:"mspace",atname:"width",atval:"0.167em",ttype:q},{input:"\\>",tag:"mspace",atname:"width",atval:"0.222em",ttype:q},{input:"\\:",tag:"mspace",atname:"width",atval:"0.222em",ttype:q},{input:"\\;",tag:"mspace",atname:"width",atval:"0.278em",ttype:q},{input:"~",tag:"mspace",atname:"width",atval:"0.333em",ttype:q},{input:"\\quad",tag:"mspace",atname:"width",atval:"1em",ttype:q},{input:"\\qquad",tag:"mspace",atname:"width",atval:"2em",ttype:q},{input:"\\prime",tag:"mo",output:"\u2032",ttype:z},{input:"'",tag:"mo",output:"\u02B9",ttype:z},{input:"''",tag:"mo",output:"\u02BA",ttype:z},{input:"'''",tag:"mo",output:"\u2034",ttype:z},{input:"''''",tag:"mo",output:"\u2057",ttype:z},{input:"\\ldots",tag:"mo",output:"\u2026",ttype:z},{input:"\\cdots",tag:"mo",output:"\u22EF",ttype:z},{input:"\\vdots",tag:"mo",output:"\u22EE",ttype:z},{input:"\\ddots",tag:"mo",output:"\u22F1",ttype:z},{input:"\\forall",tag:"mo",output:"\u2200",ttype:z},{input:"\\exists",tag:"mo",output:"\u2203",ttype:z},{input:"\\Re",tag:"mo",output:"\u211C",ttype:z},{input:"\\Im",tag:"mo",output:"\u2111",ttype:z},{input:"\\aleph",tag:"mo",output:"\u2135",ttype:z},{input:"\\hbar",tag:"mo",output:"\u210F",ttype:z},{input:"\\ell",tag:"mo",output:"\u2113",ttype:z},{input:"\\wp",tag:"mo",output:"\u2118",ttype:z},{input:"\\emptyset",tag:"mo",output:"\u2205",ttype:z},{input:"\\infty",tag:"mo",output:"\u221E",ttype:z},{input:"\\surd",tag:"mo",output:"\\sqrt{}",ttype:o},{input:"\\partial",tag:"mo",output:"\u2202",ttype:z},{input:"\\nabla",tag:"mo",output:"\u2207",ttype:z},{input:"\\triangle",tag:"mo",output:"\u25B3",ttype:z},{input:"\\therefore",tag:"mo",output:"\u2234",ttype:z},{input:"\\angle",tag:"mo",output:"\u2220",ttype:z},{input:"\\diamond",tag:"mo",output:"\u22C4",ttype:z},{input:"\\Diamond",tag:"mo",output:"\u25C7",ttype:z},{input:"\\neg",tag:"mo",output:"\u00AC",ttype:z},{input:"\\lnot",tag:"mo",output:"\u00AC",ttype:z},{input:"\\bot",tag:"mo",output:"\u22A5",ttype:z},{input:"\\top",tag:"mo",output:"\u22A4",ttype:z},{input:"\\square",tag:"mo",output:"\u25AB",ttype:z},{input:"\\Box",tag:"mo",output:"\u25A1",ttype:z},{input:"\\wr",tag:"mo",output:"\u2240",ttype:z},{input:"\\arccos",tag:"mi",output:"arccos",ttype:b,func:true},{input:"\\arcsin",tag:"mi",output:"arcsin",ttype:b,func:true},{input:"\\arctan",tag:"mi",output:"arctan",ttype:b,func:true},{input:"\\arg",tag:"mi",output:"arg",ttype:b,func:true},{input:"\\cos",tag:"mi",output:"cos",ttype:b,func:true},{input:"\\cosh",tag:"mi",output:"cosh",ttype:b,func:true},{input:"\\cot",tag:"mi",output:"cot",ttype:b,func:true},{input:"\\coth",tag:"mi",output:"coth",ttype:b,func:true},{input:"\\csc",tag:"mi",output:"csc",ttype:b,func:true},{input:"\\deg",tag:"mi",output:"deg",ttype:b,func:true},{input:"\\det",tag:"mi",output:"det",ttype:b,func:true},{input:"\\dim",tag:"mi",output:"dim",ttype:b,func:true},{input:"\\exp",tag:"mi",output:"exp",ttype:b,func:true},{input:"\\gcd",tag:"mi",output:"gcd",ttype:b,func:true},{input:"\\hom",tag:"mi",output:"hom",ttype:b,func:true},{input:"\\inf",tag:"mo",output:"inf",ttype:r},{input:"\\ker",tag:"mi",output:"ker",ttype:b,func:true},{input:"\\lg",tag:"mi",output:"lg",ttype:b,func:true},{input:"\\lim",tag:"mo",output:"lim",ttype:r},{input:"\\liminf",tag:"mo",output:"liminf",ttype:r},{input:"\\limsup",tag:"mo",output:"limsup",ttype:r},{input:"\\ln",tag:"mi",output:"ln",ttype:b,func:true},{input:"\\log",tag:"mi",output:"log",ttype:b,func:true},{input:"\\max",tag:"mo",output:"max",ttype:r},{input:"\\min",tag:"mo",output:"min",ttype:r},{input:"\\Pr",tag:"mi",output:"Pr",ttype:b,func:true},{input:"\\sec",tag:"mi",output:"sec",ttype:b,func:true},{input:"\\sin",tag:"mi",output:"sin",ttype:b,func:true},{input:"\\sinh",tag:"mi",output:"sinh",ttype:b,func:true},{input:"\\sup",tag:"mo",output:"sup",ttype:r},{input:"\\tan",tag:"mi",output:"tan",ttype:b,func:true},{input:"\\tanh",tag:"mi",output:"tanh",ttype:b,func:true},{input:"\\gets",tag:"mo",output:"\u2190",ttype:z},{input:"\\leftarrow",tag:"mo",output:"\u2190",ttype:z},{input:"\\to",tag:"mo",output:"\u2192",ttype:z},{input:"\\rightarrow",tag:"mo",output:"\u2192",ttype:z},{input:"\\leftrightarrow",tag:"mo",output:"\u2194",ttype:z},{input:"\\uparrow",tag:"mo",output:"\u2191",ttype:z},{input:"\\downarrow",tag:"mo",output:"\u2193",ttype:z},{input:"\\updownarrow",tag:"mo",output:"\u2195",ttype:z},{input:"\\Leftarrow",tag:"mo",output:"\u21D0",ttype:z},{input:"\\Rightarrow",tag:"mo",output:"\u21D2",ttype:z},{input:"\\Leftrightarrow",tag:"mo",output:"\u21D4",ttype:z},{input:"\\iff",tag:"mo",output:"~\\Longleftrightarrow~",ttype:o},{input:"\\Uparrow",tag:"mo",output:"\u21D1",ttype:z},{input:"\\Downarrow",tag:"mo",output:"\u21D3",ttype:z},{input:"\\Updownarrow",tag:"mo",output:"\u21D5",ttype:z},{input:"\\mapsto",tag:"mo",output:"\u21A6",ttype:z},{input:"\\longleftarrow",tag:"mo",output:"\u2190",ttype:c},{input:"\\longrightarrow",tag:"mo",output:"\u2192",ttype:c},{input:"\\longleftrightarrow",tag:"mo",output:"\u2194",ttype:c},{input:"\\Longleftarrow",tag:"mo",output:"\u21D0",ttype:c},{input:"\\Longrightarrow",tag:"mo",output:"\u21D2",ttype:c},{input:"\\implies",tag:"mo",output:"\u21D2",ttype:c},{input:"\\Longleftrightarrow",tag:"mo",output:"\u21D4",ttype:c},{input:"\\longmapsto",tag:"mo",output:"\u21A6",ttype:z},{input:"\\sqrt",tag:"msqrt",output:"sqrt",ttype:b},{input:"\\root",tag:"mroot",output:"root",ttype:d},{input:"\\frac",tag:"mfrac",output:"/",ttype:d},{input:"\\stackrel",tag:"mover",output:"stackrel",ttype:d},{input:"\\atop",tag:"mfrac",output:"",ttype:p},{input:"\\choose",tag:"mfrac",output:"",ttype:p},{input:"_",tag:"msub",output:"_",ttype:p},{input:"^",tag:"msup",output:"^",ttype:p},{input:"\\mbox",tag:"mtext",output:"mbox",ttype:B},{input:"\\acute",tag:"mover",output:"\u00B4",ttype:b,acc:true},{input:"\\grave",tag:"mover",output:"\u0060",ttype:b,acc:true},{input:"\\breve",tag:"mover",output:"\u02D8",ttype:b,acc:true},{input:"\\check",tag:"mover",output:"\u02C7",ttype:b,acc:true},{input:"\\dot",tag:"mover",output:".",ttype:b,acc:true},{input:"\\ddot",tag:"mover",output:"..",ttype:b,acc:true},{input:"\\mathring",tag:"mover",output:"\u00B0",ttype:b,acc:true},{input:"\\vec",tag:"mover",output:"\u20D7",ttype:b,acc:true},{input:"\\overrightarrow",tag:"mover",output:"\u20D7",ttype:b,acc:true},{input:"\\overleftarrow",tag:"mover",output:"\u20D6",ttype:b,acc:true},{input:"\\hat",tag:"mover",output:"\u005E",ttype:b,acc:true},{input:"\\widehat",tag:"mover",output:"\u0302",ttype:b,acc:true},{input:"\\tilde",tag:"mover",output:"~",ttype:b,acc:true},{input:"\\widetilde",tag:"mover",output:"\u02DC",ttype:b,acc:true},{input:"\\bar",tag:"mover",output:"\u203E",ttype:b,acc:true},{input:"\\overbrace",tag:"mover",output:"\u23B4",ttype:b,acc:true},{input:"\\overline",tag:"mover",output:"\u00AF",ttype:b,acc:true},{input:"\\underbrace",tag:"munder",output:"\u23B5",ttype:b,acc:true},{input:"\\underline",tag:"munder",output:"\u00AF",ttype:b,acc:true},{input:"\\displaystyle",tag:"mstyle",atname:"displaystyle",atval:"true",ttype:b},{input:"\\textstyle",tag:"mstyle",atname:"displaystyle",atval:"false",ttype:b},{input:"\\scriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"1",ttype:b},{input:"\\scriptscriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"2",ttype:b},{input:"\\mathrm",tag:"mtext",output:"text",ttype:B},{input:"\\textrm",tag:"mtext",output:"text",ttype:B},{input:"\\mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",ttype:b,codes:h},{input:"\\textbf",tag:"mstyle",atname:"mathvariant",atval:"bold",ttype:b,codes:h},{input:"\\mathit",tag:"mstyle",atname:"mathvariant",atval:"italic",ttype:b},{input:"\\textit",tag:"mstyle",atname:"mathvariant",atval:"italic",ttype:b},{input:"\\mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",ttype:b},{input:"\\texttt",tag:"mstyle",atname:"mathvariant",atval:"monospace",ttype:b},{input:"\\mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",ttype:b},{input:"\\mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",ttype:b,codes:s},{input:"\\mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",ttype:b,codes:t},{input:"\\mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",ttype:b,codes:D}];var u=[];function n(){if(m.browser.mozilla||m.browser.opera){return true}else{return false}}function G(H,I){if(H.input>I.input){return 1}else{return -1}}function w(){var H=a.length;a.sort(G);for(var I=0;I<H;I++){u[I]=a[I].input}}function y(H,I){return m.trim(H.slice(I))}function E(I,L,M){if(M===0){var K,H;M=-1;K=I.length;while(M+1<K){H=(M+K)>>1;if(I[H]<L){M=H}else{K=H}}return K}else{for(var J=M;J<I.length&&I[J]<L;J++){}}return J}function v(O){var H=0;var I=0;var K;var Q;var P;var L="";var N=true;var M=O.length;for(var J=1;J<=M&&N;J++){Q=O.slice(0,J);I=H;H=E(u,Q,I);if(H<u.length&&O.slice(0,u[H].length)==u[H]){L=u[H];K=H;J=L.length}N=H<u.length&&O.slice(0,u[H].length)>=u[H]}if(L!==""){return a[K]}H=1;Q=O.slice(0,1);if("0"<=Q&&Q<="9"){P="mn"}else{P=(("A">Q||Q>"Z")&&("a">Q||Q>"z")?"mo":"mi")}return{input:Q,tag:P,output:Q,ttype:z}}function g(P){var K,I,U,J,M,S,O=document.createDocumentFragment();P=m.trim(P);K=v(P);if(K===null||K.ttype==e){return[null,P,null]}if(K.ttype==o){P=K.output+y(P,K.input.length);K=v(P);if(K===null||K.ttype==e){return[null,P,null]}}P=y(P,K.input.length);switch(K.ttype){case q:I=C(K.tag);I.setAttribute(K.atname,K.atval);return[I,P,K.tag];case r:return[C(K.tag,document.createTextNode(K.output)),P,K.tag];case z:I=C(K.tag,document.createTextNode(K.output));return[I,P,K.tag];case c:I=C(K.tag,document.createTextNode(K.output));I.setAttribute("minsize","1.5");I.setAttribute("maxsize","1.5");I=C("mover",I);I.appendChild(C("mspace"));return[I,P,K.tag];case j:I=C(K.tag,document.createTextNode(K.output));if(K.input=="|"||K.input=="\\vert"||K.input=="\\|"||K.input=="\\Vert"){I.setAttribute("lspace","0em");I.setAttribute("rspace","0em")}I.setAttribute("maxsize",K.atval);if(K.rtag!==null){return[I,P,K.rtag]}else{return[I,P,K.tag]}break;case A:var N=K.atval;K=v(P);if(K===null){return[null,P,null]}P=y(P,K.input.length);I=C(K.tag,document.createTextNode(K.output));I.setAttribute("minsize",N);I.setAttribute("maxsize",N);return[I,P,K.tag];case x:if(K.input=="\\left"){K=v(P);if(K!==null){if(K.input=="."){K.invisible=true}P=y(P,K.input.length)}}U=k(P,true,false);if(K===null||(typeof K.invisible=="boolean"&&K.invisible)){I=C("mrow",U[0])}else{I=C("mo",document.createTextNode(K.output));I=C("mrow",I);I.appendChild(U[0])}return[I,U[1],U[2]];case l:if(K.input=="\\begin{array}"){var T="";K=v(P);P=m.trim(P);if(K===null){T="l"}else{P=y(P,K.input.length);if(K.input!="{"){T="l"}else{do{K=v(P);if(K!==null){P=y(P,K.input.length);if(K.input!="}"){T=T+K.input}}}while(K!==null&&K.input!==""&&K.input!="}")}}U=k("{"+P,true,true);I=C("mtable",U[0]);T=T.replace(/l/g,"left ");T=T.replace(/r/g,"right ");T=T.replace(/c/g,"center ");I.setAttribute("columnalign",T);I.setAttribute("displaystyle","false");return[I,U[1],null]}else{U=k("{"+P,true,true);I=C("mtable",U[0]);I.setAttribute("columnspacing","0.167em");I.setAttribute("columnalign","right center left");I.setAttribute("displaystyle","true");I=C("mrow",I);return[I,U[1],null]}break;case B:if(P.charAt(0)=="{"){M=P.indexOf("}")}else{M=0}if(M==-1){M=P.length}S=P.slice(1,M);O.appendChild(C(K.tag,document.createTextNode(S)));P=y(P,M+1);return[C("mrow",O),P,null];case b:U=g(P);if(U[0]===null){return[C(K.tag,document.createTextNode(K.output)),P]}if(typeof K.func=="boolean"&&K.func){S=P.charAt(0);if(S=="^"||S=="_"||S==","){return[C(K.tag,document.createTextNode(K.output)),P,K.tag]}else{I=C("mrow",C(K.tag,document.createTextNode(K.output)));I.appendChild(U[0]);return[I,U[1],K.tag]}}if(K.input=="\\sqrt"){return[C(K.tag,U[0]),U[1],K.tag]}else{if(typeof K.acc=="boolean"&&K.acc){I=C(K.tag,U[0]);var H=K.output;var R=C("mo",document.createTextNode(H));if(K.input=="\\vec"||K.input=="\\check"){R.setAttribute("maxsize","1.2")}if(K.input=="\\underbrace"||K.input=="\\underline"){R.setAttribute("accentunder","true")}else{R.setAttribute("accent","true")}I.appendChild(R);if(K.input=="\\overbrace"||K.input=="\\underbrace"){I.ttype=r}return[I,U[1],K.tag]}else{if(typeof K.codes!="undefined"){for(M=0;M<U[0].childNodes.length;M++){if(U[0].childNodes[M].nodeName=="mi"||U[0].nodeName=="mi"){S=(U[0].nodeName=="mi"?U[0].firstChild.nodeValue:U[0].childNodes[M].firstChild.nodeValue);var Q=[];for(var L=0;L<S.length;L++){if(S.charCodeAt(L)>64&&S.charCodeAt(L)<91){Q=Q+K.codes[S.charCodeAt(L)-65]}else{if(S.charCodeAt(L)>96&&S.charCodeAt(L)<123){Q=Q+K.codes[S.charCodeAt(L)-71]}}}if(U[0].nodeName=="mi"){U[0]=C("mo").appendChild(document.createTextNode(Q))}else{U[0].replaceChild(C("mo").appendChild(document.createTextNode(Q)),U[0].childNodes[M])}}}}I=C(K.tag,U[0]);I.setAttribute(K.atname,K.atval);if(K.input=="\\scriptstyle"||K.input=="\\scriptscriptstyle"){I.setAttribute("displaystyle","false")}return[I,U[1],K.tag]}}break;case d:U=g(P);if(U[0]===null){return[C("mo",document.createTextNode(K.input)),P,null]}J=g(U[1]);if(J[0]===null){return[C("mo",document.createTextNode(K.input)),P,null]}if(K.input=="\\root"||K.input=="\\stackrel"){O.appendChild(J[0])}O.appendChild(U[0]);if(K.input=="\\frac"){O.appendChild(J[0])}return[C(K.tag,O),J[1],K.tag];case p:P=y(P,K.input.length);return[C("mo",document.createTextNode(K.output)),P,K.tag];default:return[C(K.tag,document.createTextNode(K.output)),P,K.tag]}}function F(M){var L,J,I,K,O,P,N;M=m.trim(M);J=v(M);O=g(M);K=O[0];M=O[1];P=O[2];L=v(M);if(L.ttype==p){M=y(M,L.input.length);O=g(M);if(O[0]===null){O[0]=C("mo",document.createTextNode("\u25A1"))}M=O[1];P=O[2];if(L.input=="_"||L.input=="^"){I=v(M);P=null;N=((J.ttype==r)||(K.ttype==r));if(L.input=="_"&&I.input=="^"){M=y(M,I.input.length);var H=g(M);M=H[1];P=H[2];K=C((N?"munderover":"msubsup"),K);K.appendChild(O[0]);K.appendChild(H[0])}else{if(L.input=="_"){K=C((N?"munder":"msub"),K);K.appendChild(O[0])}else{K=C((N?"mover":"msup"),K);K.appendChild(O[0])}}K=C("mrow",K)}else{K=C(L.tag,K);if(L.input=="\\atop"||L.input=="\\choose"){K.setAttribute("linethickness","0ex")}K.appendChild(O[0]);if(L.input=="\\choose"){K=C("mfenced",K)}}}return[K,M,P]}function k(O,N,T){var S,P,K,V,Z,L=document.createDocumentFragment();do{O=m.trim(O);K=F(O);P=K[0];O=K[1];Z=K[2];S=v(O);if(P!=undefined){if((Z=="mn"||Z=="mi")&&S!==null&&typeof S.func=="boolean"&&S.func){var Y=C("mspace");Y.setAttribute("width","0.167em");P=C("mrow",P);P.appendChild(Y)}L.appendChild(P)}}while((S.ttype!=e)&&S!==null&&S.output!="");Z=null;if(S.ttype==e){if(S.input=="\\right"){O=y(O,S.input.length);S=v(O);if(S!==null&&S.input=="."){S.invisible=true}if(S!==null){Z=S.rtag}}if(S!==null){O=y(O,S.input.length)}var W=L.childNodes.length;if(T&&W>0&&L.childNodes[W-1].nodeName=="mrow"&&W>1&&L.childNodes[W-2].nodeName=="mo"&&L.childNodes[W-2].firstChild.nodeValue=="&"){var I=[];var Q=L.childNodes.length;for(V=0;T&&V<Q;V=V+2){I[V]=[];P=L.childNodes[V];for(var U=0;U<P.childNodes.length;U++){if(P.childNodes[U].firstChild.nodeValue=="&"){I[V][I[V].length]=U}}}var J,H,M,R,X=document.createDocumentFragment();for(V=0;V<Q;V=V+2){J=document.createDocumentFragment();H=document.createDocumentFragment();P=L.firstChild;M=P.childNodes.length;R=0;for(U=0;U<M;U++){if(typeof I[V][R]!="undefined"&&U==I[V][R]){P.removeChild(P.firstChild);J.appendChild(C("mtd",H));R++}else{H.appendChild(P.firstChild)}}J.appendChild(C("mtd",H));if(L.childNodes.length>2){L.removeChild(L.firstChild);L.removeChild(L.firstChild)}X.appendChild(C("mtr",J))}return[X,O]}if(typeof S.invisible!="boolean"||!S.invisible){P=C("mo",document.createTextNode(S.output));L.appendChild(P)}}return[L,O,Z]}if(!document.createElementNS){document.createElementNS=function(I,H){return this.createElement(H)}}function C(H,J){var I=document.createElementNS("http://www.w3.org/1998/Math/MathML",H);if(J){m(I).append(J)}return I}return{showFormulaOnMouseOver:false,latexImages:false,latexConverter:"http://www.forkosh.dreamhost.com/mimetex.cgi?",mathColor:"black",mathFontSize:"",mathFontFamily:"",createElementXHTML:function(H,I,K){var J=document.createElementNS("http://www.w3.org/1999/xhtml",H);if(I){J.id=I}if(K){J.className=K}return J},define:function(J,K){if(MSVG.latexImages){return}if((typeof J)=="string"){J=[J];K=[K]}var I,H=J.length;if(H!=K.length){return}for(I=0;I<H;I++){a=a.concat([{input:"\\"+J[I],tag:"mo",output:K[I],ttype:o}])}w()},parseMath:function(L,K,I,H){if(L===null){return null}var M=k(L.replace(/^\s+/g,""),false,false)[0];var J=(M.firstChild.nodeName=="mstyle")?M.firstChild:C("mstyle",M);if(K){m(J).attr({displaystyle:"true"})}m(J).attr({mathcolor:H||MSVG.mathColor,fontsize:I||MSVG.mathFontSize,fontfamily:MSVG.mathFontFamily});J=C("math",J);if(MSVG.showFormulaOnMouseOver){m(J).attr({title:L.replace(/\s+/g," ")})}return J},parseMathExternal:function(M,L,I,H){if(M===null){return null}var K=MSVG.createElementXHTML("img");var J=MSVG.latexConverter+M;m(K).attr({src:J});if(MSVG.showFormulaOnMouseOver){m(K).attr({title:M.replace(/\s+/g," ")})}return K},generic:function(){if(MSVG.latexImages||!n()){MSVG.parseMath=MSVG.parseMathExternal}else{w()}if(!(window.SVGElement||m.browser.opera||m.browser.safari)){ASVG.drawPictures=ASVG.removePictures}}}}(jQuery);var ASVG=function($){var SVG;var collection=[];var chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var markerChars="o*sSx+<>|";function createSVGElement(elType){return document.createElementNS("http://www.w3.org/2000/svg",elType)}function getSVGElement(id,el){var node,res={node:null,newEl:false};if(id){id=SVG.id+"_"+id;res.node=$("#"+id)[0]}if(!res.node){res.node=createSVGElement(el);if(id){res.node.id=id}res.newEl=true}return res}function appendSVG(elmt){if(elmt.newEl){$(SVG.canvas).append(elmt.node)}}function setButton(text,title,func){var node=MSVG.createElementXHTML("span",null,"svgButton");node.title=title;node.onclick=func;$(node).append(text);$(node).css({paddingRight:"0.5em",paddingLeft:"0.5em",fontSize:"1em",fontFamily:"monospace",background:"blue",color:"yellow",cursor:"pointer"});$(node).mouseover(function(){$(this).css({background:"yellow",color:"blue"})});$(node).mouseout(function(){$(this).css({background:"blue",color:"yellow"})});node.setAttribute("owner",SVG.id);return node}function pictureAttributes(){this.stroke="blue";this.strokewidth=1;this.strokeopacity=1;this.strokedasharray="none";this.fill="none";this.fillopacity=1;this.fontstyle="normal";this.fontfamily="serif";this.fontweight="normal";this.fontsize=12;this.fontstroke="none";this.fontfill="black";this.largearc=0;this.sweep=0;this.rx=0;this.ry=0;this.closed=false;this.curve="";this.marker="o";this.markerstrokewidth=1;this.markerstroke="blue";this.markerfill=null;this.markersize=8;this.markeropacity=1;this.direction=[1,0];this.ticklabels="";this.pos="";this.points=200;this.axesstroke="black";this.axesstrokewidth=0.5;this.gridstroke="grey";this.gridstrokewidth=0.25;this.backgroundcolor="white";this.backgroundopacity=1}function pictureObject(){this.id=null;this.src="";this.borderstroke="black";this.borderwidth=0;this.canvas=null;this.width=300;this.height=200;this.factor=1;this.xmin=-5;this.xmax=5;this.ymin=null;this.ymax=null;this.xunitlength=null;this.yunitlength=null;this.origin=[0,0];this.coords="cartesian";this.mouse=[null,null];this.drag=null;this.pan=true;this.attr=new pictureAttributes()}function refresh(){translateAndEval(SVG.id)}function translateAndEval(id){var errstr;var src=SVG.src;$("#"+SVG.id+"Canvas").empty();$("#"+SVG.id+"mml").empty();ASVG.dynamic[id]={};src=src.replace(/dynamic\./g,"ASVG.dynamic."+id+".");SVG.attr=new pictureAttributes();try{with(Math){eval(src)}}catch(err){if(typeof err=="object"){errstr=err.name+" "+err.message+" "+err.number+" "+err.description}else{errstr=err}alert(errstr+"\n"+src)}collection[SVG.id]=SVG}function setOptions(atr){for(i in atr){SVG.attr[i]=atr[i]}}function getOption(opt,options){return(opt in options)?options[opt]:SVG.attr[opt]}function setAction(evt,fn,id){if(!$.isFunction(fn)){return}var node=(id)?$("#"+SVG.id+"_"+id):$("#"+SVG.id);$(node).bind(evt,fn)}function getPosition(evt){var obj=evt.currentTarget;var posX=(evt.pageX-obj.parentNode.offsetLeft-SVG.origin[0])/SVG.xunitlength;var posY=(SVG.height-SVG.origin[1]-(evt.pageY-obj.parentNode.offsetTop))/SVG.yunitlength;return[posX,posY]}function getAngle(p){p=p||[0,0];var res=Math.atan2(SVG.mouse[1]-p[1],SVG.mouse[0]-p[0]);res=(res<0)?res+2*Math.PI:res;return res}function getDistance(p){p=p||[0,0];return Math.sqrt(Math.pow(SVG.mouse[0]-p[0],2)+Math.pow(SVG.mouse[1]-p[1],2))}function updateButton(obj){var id=$(obj).attr("owner");var node=$("#"+id+"src");if(obj.firstChild.nodeValue=="Edit"){obj.firstChild.nodeValue="Update";obj.title="Update picture";node.val(SVG.src).css("display","block");return}else{SVG.src=node.val();translateAndEval(id)}}function switchTo(evt){var name=evt.currentTarget.id;if(SVG.id==name){return}SVG=collection[name]}function onWheel(evt){evt=evt||window.event;var factor=1;if(evt.wheelDelta){factor=(evt.wheelDelta>0)?0.8:1.25}else{if(evt.detail){factor=(evt.detail<0)?0.8:1.25}}if(evt.shiftKey){changeSize(factor)}else{changeScales(factor)}evt.preventDefault();evt.stopPropagation();return false}function onClick(evt){if(evt.button===0){if(evt.shiftKey){$("#"+SVG.id+"toolbar").slideToggle();$("#"+SVG.id+"src").val(SVG.src);evt.stopImmediatePropagation()}else{if(SVG.pan){SVG.drag=[evt.clientX,evt.clientY]}}}return false}function onDrop(evt){if(SVG.drag==null){return false}var xlen=(SVG.drag[0]-evt.clientX)/SVG.xunitlength;var ylen=(-SVG.drag[1]+evt.clientY)/SVG.yunitlength;SVG.drag=null;if(xlen==0&&ylen==0){return false}changeScales(1,[SVG.xmin+xlen,SVG.xmax+xlen,SVG.ymin+ylen,SVG.ymax+ylen]);return false}function setScales(){SVG.xunitlength=SVG.width/(SVG.xmax-SVG.xmin);SVG.yunitlength=SVG.height/(SVG.ymax-SVG.ymin);SVG.origin=[-SVG.xmin*SVG.xunitlength,-SVG.ymin*SVG.yunitlength]}function setSize(){var picture=$("#"+SVG.id)[0];picture.setAttribute("width",SVG.width);picture.setAttribute("height",SVG.height);picture.parentNode.style.width=SVG.width+"px";picture.parentNode.style.height=SVG.height+"px";var border=SVG.borderwidth*0.5;var node=$("#"+SVG.id+"ClipPath")[0];node.firstChild.setAttribute("d","M"+border+","+border+" "+(SVG.width-border)+","+border+" "+(SVG.width-border)+","+(SVG.height-border)+" "+border+","+(SVG.height-border));node=$("#"+SVG.id+"Coords")[0];if(node){node.setAttribute("x",SVG.width-border-2);node.setAttribute("y",SVG.height-border-5)}}function changeSize(factor){SVG.factor*=factor;SVG.width/=factor;SVG.height/=factor;setSize();setScales();translateAndEval(SVG.id)}function changeScales(factor,trans){trans=trans||[SVG.xmin,SVG.xmax,SVG.ymin,SVG.ymax];SVG.factor*=factor;var dx=(SVG.xmax-SVG.xmin)*(1-factor)*0.5;var dy=(SVG.ymax-SVG.ymin)*(1-factor)*0.5;SVG.xmin=trans[0]+dx;SVG.xmax=trans[1]-dx;SVG.ymin=trans[2]+dy;SVG.ymax=trans[3]-dy;setScales();translateAndEval(SVG.id)}function updateCoord(evt){if($.browser.opera){switchTo(evt)}SVG.mouse=getPosition(evt);if(SVG.coords!="none"){var coords;if(SVG.coords=="cartesian"){coords="C: ("+SVG.mouse[0].toFixed(2)+", "+SVG.mouse[1].toFixed(2)+")"}else{coords="P: ("+getDistance().toFixed(2)+", "+getAngle().toFixed(2)+")"}$("#"+SVG.id+"Coords").text(coords)}return false}function removeCoord(){$("#"+SVG.id+"Coords").text("")}function exportSVG(obj){var name=$(obj).attr("owner");var pic=$("#"+name)[0].parentNode.innerHTML;var pos=pic.indexOf("</svg")+6;pic=pic.substr(0,pos);var svg="<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";if(pic.indexOf("svgCoords")>-1){pos=pic.lastIndexOf("<text");svg+=pic.substr(0,pos);pos=pic.lastIndexOf("</text")+7;svg+=pic.substr(pos)}else{svg+=pic}svg=svg.replace(/&nbsp;/g,"");svg=svg.replace(/><(?!\/)/g,">\n<");obj.previousSibling.firstChild.nodeValue="Edit";$("#"+name+"src").val(svg).css("display","block")}function toSVG(p){var x=p[0]*SVG.xunitlength+SVG.origin[0];var y=SVG.height-p[1]*SVG.yunitlength-SVG.origin[1];return[x,y]}function toSVGPair(p){p=toSVG(p);return p[0]+" "+p[1]}function setStrokeAndFill(node,options){node.setAttribute("stroke",getOption("stroke",options));node.setAttribute("stroke-width",getOption("strokewidth",options)/SVG.factor);node.setAttribute("stroke-dasharray",getOption("strokedasharray",options));node.setAttribute("stroke-opacity",getOption("strokeopacity",options));node.setAttribute("fill",getOption("fill",options));node.setAttribute("fill-opacity",getOption("fillopacity",options))}function setText(st,id){$("#"+id).text(st)}function setMarkers(obj,options){if(!options.marker){return}var markersize=getOption("markersize",options)/SVG.factor;var markerstroke=getOption("markerstroke",options);var markeropacity=getOption("markeropacity",options);var markerfill=getOption("markerfill",options);if(!markerfill){markerfill=SVG.attr.backgroundcolor}var markerstrokewidth=getOption("markerstrokewidth",options)/SVG.factor;var node,node2,i,id,pos=["marker-start","marker-mid","marker-end"];var lim=options.marker.length;for(i=0;i<lim;i++){var type=options.marker.charAt(i);if(type=="-"){continue}id=((options.id)?options.id+"_":"")+"Marker_"+markerChars.indexOf(type);node=$("#"+SVG.id+"_"+id)[0];if(!node){node=getSVGElement(id,"marker").node;node.setAttribute("viewBox","0 0 10 10");node.setAttribute("refX",5);node.setAttribute("refY",5);node.setAttribute("orient","auto");node.setAttribute("stroke",markerstroke);node.setAttribute("stroke-width",markerstrokewidth);node.setAttribute("fill",markerfill);node.setAttribute("stroke-opacity",markeropacity);node.setAttribute("fill-opacity",markeropacity);switch(type){case"*":node.setAttribute("fill",markerstroke);case"o":node2=createSVGElement("circle");node2.setAttribute("cx",5);node2.setAttribute("cy",5);node2.setAttribute("r",4);break;case">":node2=createSVGElement("path");node2.setAttribute("d","M 0 0 L 10 5 L 0 10 z");node.setAttribute("fill",markerstroke);node.setAttribute("refX",10);break;case"<":node2=createSVGElement("path");node2.setAttribute("d","M 10 0 L 10 10 L 0 5 z");node.setAttribute("fill",markerstroke);node.setAttribute("refX",0);break;case"x":node2=createSVGElement("path");node2.setAttribute("d","M 0 0 L 10 10 M 0 10 L 10 0");break;case"+":node2=createSVGElement("path");node2.setAttribute("d","M 5 0 L 5 10 M 0 5 L 10 5");break;case"|":node2=createSVGElement("path");node2.setAttribute("d","M 5 0 L 5 10");break;case"S":node.setAttribute("fill",markerstroke);case"s":node2=createSVGElement("rect");node2.setAttribute("x",0);node2.setAttribute("y",0);node2.setAttribute("width",10);node2.setAttribute("height",10)}$(node).append(node2);$("#"+SVG.id+"_Defs:first").append(node)}node.setAttribute("markerWidth",markersize);node.setAttribute("markerHeight",markersize);obj.setAttribute(pos[i],"url(#"+SVG.id+"_"+id+")")}}function setLabels(p,options){if(!options.label){return}var i,point,pos;var label=(typeof options.label=="string")?[options.label]:options.label;var labelpos=getOption("pos",options);labelpos=(typeof labelpos=="string")?[labelpos]:labelpos;var poslen=labelpos.length;var markersize=getOption("markersize",options)/SVG.factor;var dx=(0.5*markersize/SVG.xunitlength)/SVG.factor;var dy=(0.5*markersize/SVG.yunitlength)/SVG.factor;for(i=0;i<label.length;i++){options.isLabel="_label"+i;point=p[i];pos=(poslen>i)?labelpos[i].toUpperCase():pos;if(/E/.test(pos)){point[0]+=dx}if(/W/.test(pos)){point[0]-=dx}if(/N/.test(pos)){point[1]+=dy}if(/S/.test(pos)){point[1]-=dy}options.pos=pos;text(point,label[i],options)}}function line(p,q,options){options=options||{};options.closed=false;options.curve="";path([p,q],options)}function dot(p,options){options=options||{};var direction=getOption("direction",options);var q=[p[0]+direction[0]/SVG.xunitlength,p[1]+direction[1]/SVG.yunitlength];options.marker=getOption("marker",options).charAt(0);var elmt=getSVGElement(options.id,"path");var st="M"+toSVGPair(p)+" "+toSVGPair(q);elmt.node.setAttribute("d",st);elmt.node.setAttribute("stroke","none");setMarkers(elmt.node,options);setLabels([p,q],options);appendSVG(elmt)}function path(list,options){options=options||{};var st,i,elmt=getSVGElement(options.id,"path");var curve=getOption("curve",options);var closed=getOption("closed",options);if(typeof plist=="string"){st=list}else{var len=list.length;if(len===0){return}st="M"+toSVGPair(list[0])+" "+curve;for(i=1;i<len;i++){st+=toSVGPair(list[i])+" "}if(closed){st+="Z"}}elmt.node.setAttribute("d",st);setStrokeAndFill(elmt.node,options);setMarkers(elmt.node,options);setLabels(list,options);appendSVG(elmt)}function rotate(id,angle,options){if(!id||!angle){return}var node=$("#"+SVG.id+"_"+id)[0];if(node){options=options||{};var center=options.center?toSVG(options.center):SVG.origin;angle=-angle*180/Math.PI;var transform=node.getAttribute("transform")||"";transform="rotate("+angle+" "+center+") "+(options.replace?"":transform);node.setAttribute("transform",transform)}}function translate(id,delta,options){if(!id||!delta){return}var node=$("#"+SVG.id+"_"+id)[0];if(node){options=options||{};delta=toSVG(delta);var transform=node.getAttribute("transform")||"";transform="translate("+(delta[0]-SVG.origin[0])+"  "+(SVG.origin[1]+delta[1]-SVG.height)+") "+(options.replace?"":transform);node.setAttribute("transform",transform)}}function curve(list,options){options=options||{};options.curve=options.curve||"T";path(list,options)}function circle(center,radius,options){ellipse(center,radius,radius,options)}function loop(p,options){options=options||{};var d=options.direction||[1,0];options.curve="C";options.closed=false;path([p,[p[0]+d[0],p[1]+d[1]],[p[0]-d[1],p[1]+d[0]],p],options)}function arc(options){options=options||{};var start=options.start;var end=options.end;var center=options.center;var startangle=options.startangle;var endangle=options.endangle;var st="M",elmt=getSVGElement(options.id,"path");var largearc=getOption("largearc",options);var sweep=getOption("sweep",options);var closed=getOption("closed",options);var radius=options.radius;if(center!=null&&startangle!=null&&endangle!=null&&radius!=null){end=[radius*Math.cos(startangle)+center[0],radius*Math.sin(startangle)+center[1]];start=[radius*Math.cos(endangle)+center[0],radius*Math.sin(endangle)+center[1]]}if(start==null||end==null){return}if(!radius){var v=[end[0]-start[0],end[1]-start[1]];radius=Math.sqrt(v[0]*v[0]+v[1]*v[1])}if(closed&&center!=null){st+=toSVGPair(center)+" "}st+=toSVGPair(start)+" A"+radius*SVG.xunitlength+","+radius*SVG.yunitlength+" 0 "+largearc+","+sweep+" "+toSVGPair(end);if(closed&&center!=null){st+=" z"}elmt.node.setAttribute("d",st);setStrokeAndFill(elmt.node,options);setMarkers(elmt.node,options);setLabels([start,end],options);appendSVG(elmt)}function ellipse(center,rx,ry,options){options=options||{};var elmt=getSVGElement(options.id,"ellipse");center=toSVG(center);elmt.node.setAttribute("cx",center[0]);elmt.node.setAttribute("cy",center[1]);elmt.node.setAttribute("rx",rx*SVG.xunitlength);elmt.node.setAttribute("ry",ry*SVG.yunitlength);setStrokeAndFill(elmt.node,options);appendSVG(elmt)}function polygon(list,options){options=options||{};options.closed=true;path(list,options)}function rect(p,q,options){options=options||{};var elmt=getSVGElement(options.id,"rect");elmt.node.setAttribute("x",toSVG(p)[0]);elmt.node.setAttribute("y",toSVG(q)[1]);elmt.node.setAttribute("width",(q[0]-p[0])*SVG.xunitlength);elmt.node.setAttribute("height",(q[1]-p[1])*SVG.yunitlength);elmt.node.setAttribute("rx",getOption("rx",options)*SVG.xunitlength);elmt.node.setAttribute("ry",getOption("ry",options)*SVG.yunitlength);setStrokeAndFill(elmt.node,options);appendSVG(elmt)}function text(p,st,options){options=options||{};options.fill=options.fill||SVG.attr.fontfill;var id=options.id;var factor=(options.fixed)?1:SVG.factor;if(id&&options.isLabel){id+=options.isLabel}var pos=getOption("pos",options).toUpperCase();var fontsize=getOption("fontsize",options)/factor;var node,dx=0,dy=0,str=st.toString();var q=toSVG(p);if(/\$/.test(str)){var dnode=$("#"+SVG.id+"mml:first");if(id){node=$("#"+id)[0]}if(!node){node=MSVG.createElementXHTML("div",id);node.style.position="absolute";dnode.append(node)}else{$(node).empty()}str=$.trim(str);str=str.substr(1,str.length-2);$(node).append(MSVG.parseMath(str,true,fontsize+"px",options.fill));dx=-node.offsetWidth/2;dy=-node.offsetHeight/2;if(/N/.test(pos)){dy=-node.offsetHeight}if(/S/.test(pos)){dy=0}if(/E/.test(pos)){dx=0}if(/W/.test(pos)){dx=-node.offsetWidth}node.style.left=(q[0]+dx)+"px";node.style.top=(q[1]+dy)+"px"}else{var baseline="middle",textanchor="middle";if(/E/.test(pos)){textanchor="start"}if(/W/.test(pos)){textanchor="end"}if(/N/.test(pos)){baseline="text-after-edge"}if(/S/.test(pos)){baseline="text-before-edge"}var elmt=getSVGElement(id,"text");$(elmt.node).empty().text(str);elmt.node.setAttribute("x",q[0]);elmt.node.setAttribute("y",q[1]);elmt.node.setAttribute("font-style",getOption("fontstyle",options));elmt.node.setAttribute("font-family",getOption("fontfamily",options));elmt.node.setAttribute("font-weight",getOption("fontweight",options));elmt.node.setAttribute("font-size",fontsize);elmt.node.setAttribute("text-anchor",textanchor);elmt.node.setAttribute("dominant-baseline",baseline);options.stroke=getOption("fontstroke",options);setStrokeAndFill(elmt.node,options);appendSVG(elmt)}}function image(url,options){options=options||{};var elmt=getSVGElement(options.id,"image");var height=options.height||SVG.height;var width=options.width||SVG.width;var point=toSVG(options.point||[SVG.xmin,SVG.ymin]);var pos=(options.pos||"").toUpperCase();var x=point[0]-width*0.5;var y=point[1]-height*0.5;if(/N/.test(pos)){y-=height*0.5}if(/S/.test(pos)){y+=height*0.5}if(/E/.test(pos)){x+=width*0.5}if(/W/.test(pos)){x-=width*0.5}elmt.node.setAttribute("x",x);elmt.node.setAttribute("y",y);elmt.node.setAttribute("width",width);elmt.node.setAttribute("height",height);elmt.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",url);appendSVG(elmt)}function grid(options){options=options||{};var dx,dy,x,y,k,st="",start,stop,limit;var stroke=options.stroke||SVG.attr.gridstroke;var strokewidth=(options.strokewidth||SVG.attr.gridstrokewidth)/SVG.factor;var strokedasharray=getOption("strokedasharray",options);var strokeopacity=getOption("strokeopacity",options);if(SVG.coords=="polar"){dx=options.dx||1;dy=options.dy||3;var lim=Math.max(Math.abs(SVG.xmax),Math.abs(SVG.xmin),Math.abs(SVG.ymax),Math.abs(SVG.ymin));for(x=dx;x<lim;x+=dx){circle([0,0],x,{stroke:stroke,strokewidth:strokewidth,strokedasharray:strokedasharray,strokeopacity:strokeopacity})}if(dy>1){for(y=1;y<dy;y++){k=Math.tan(y*Math.PI/(2*dy));line([SVG.xmin,SVG.xmin*k],[SVG.xmax,SVG.xmax*k],{stroke:stroke,strokewidth:strokewidth,strokedasharray:strokedasharray,strokeopacity:strokeopacity});line([SVG.xmin,-SVG.xmin*k],[SVG.xmax,-SVG.xmax*k],{stroke:stroke,strokewidth:strokewidth,strokedasharray:strokedasharray,strokeopacity:strokeopacity})}}}else{dx=options.dx||1;dy=options.dy||dx;var gdx=dx*SVG.xunitlength;var gdy=dy*SVG.yunitlength;var border=SVG.borderwidth*0.5;var node=createSVGElement("path");node.setAttribute("class","svgGrid");start=SVG.origin[0];stop=SVG.width-border;limit=SVG.height-border;for(x=start;x<stop;x+=gdx){st+=" M"+x+","+border+" "+x+","+limit}start=SVG.origin[0]-gdx;for(x=start;x>border;x-=gdx){st+=" M"+x+","+border+" "+x+","+limit}start=SVG.height-SVG.origin[1];stop=SVG.height-border;limit=SVG.width-border;for(y=start;y<stop;y+=gdy){st+=" M"+border+","+y+" "+limit+","+y}start=SVG.height-SVG.origin[1]-gdy;for(y=start;y>border;y-=gdy){st+=" M"+border+","+y+" "+limit+","+y}node.setAttribute("d",st);node.setAttribute("stroke-width",strokewidth);node.setAttribute("stroke",stroke);node.setAttribute("stroke-dasharray",strokedasharray);node.setAttribute("stroke-opacity",strokeopacity);$(SVG.canvas).append(node)}}function axes(options){options=options||{};var x,y,start,stop;var orig=options.origin||[0,0];var origin=toSVG(orig);var dx=options.dx||1;var dy=options.dy||dx;var fontsize=getOption("fontsize",options);var border=SVG.borderwidth*0.5;var ddx=Math.max(0,Math.floor(-Math.log(dx+1e-9)/Math.log(10))+1);var ddy=Math.max(0,Math.floor(-Math.log(dy+1e-9)/Math.log(10))+1);options.marker="-|"+(options.marker||"-");options.strokewidth=(options.strokewidth||SVG.attr.axesstrokewidth)/SVG.factor;options.stroke=options.stroke||SVG.attr.axesstroke;var temp=options.stroke;options.markerstroke=options.stroke;options.markersize=fontsize*SVG.factor;var list1=[],label1=[];start=orig[0]+dx;stop=SVG.xmax-0.25*dx;for(x=start;x<stop;x+=dx){list1.push([x,orig[1]]);label1.push(String(x.toFixed(ddx)))}list1.push([SVG.xmax-border/SVG.xunitlength,orig[1]]);label1.push("");var list2=[],label2=[];start=orig[0]-dx;stop=SVG.xmin+0.25*dx;for(x=start;x>stop;x-=dx){list2.push([x,orig[1]]);label2.push(String(x.toFixed(ddx)))}list2.push([SVG.xmin+border/SVG.xunitlength,orig[1]]);label2.push("");list2.reverse();list2=list2.concat(list1);if(options.ticklabels!=false){label2.reverse();options.label=label2.concat(label1);options.pos=(SVG.height-origin[1]>2*fontsize)?"S":"N"}var group=getSVGElement("Axes","g");$(group.node).empty();var tempNode=SVG.canvas;SVG.canvas=group.node;path(list2,options);list1=[],label1=[];start=orig[1]+dy;stop=SVG.ymax-0.25*dy;for(y=start;y<stop;y+=dy){list1.push([orig[0],y]);label1.push(String(y.toFixed(ddy)))}list1.push([orig[0],SVG.ymax-border/SVG.yunitlength]);label1.push("");list2=[];label2=[];start=orig[1]-dy;stop=SVG.ymin+0.25*dy;for(y=start;y>stop;y-=dy){list2.push([orig[0],y]);label2.push(String(y.toFixed(ddy)))}list2.push([orig[0],SVG.ymin+border/SVG.yunitlength]);label2.push("");list2.reverse();list2=list2.concat(list1);if(options.ticklabels!=false){label2.reverse();options.label=label2.concat(label1);options.pos=(origin[0]>2*fontsize)?"W":"E"}options.stroke=temp;path(list2,options);SVG.canvas=tempNode;appendSVG(group)}function list(fun,tmin,tmax,points){var inc=(tmax-tmin)/points;if(inc<=0||fun.length==0){return}var t,pth,g=[],xt,yt;for(t=1;t>=0;t--){if($.isFunction(fun[t])){g[t]=fun[t]}else{if(typeof fun[t]=="string"){with(Math){eval("g["+t+"] = function(x){return "+fun[t]+"}")}}else{return}}}if(g.length<2){return}pth=[];for(t=tmin;t<=tmax;t+=inc){xt=g[0](t);yt=g[1](t);if(isFinite(xt)&&isFinite(yt)){pth[pth.length]=[xt,yt]}}return pth}function plot(fun,options){options=options||{};var i,steps=options.steps||[];var leftMarkers=options.leftMarkers||"-";var rightMarkers=options.rightMarkers||"-";if(steps.length===0){plotter(fun,options)}else{var n_steps=steps.length-1;options.max=steps[0];options.marker="--"+leftMarkers.charAt(0);plotter(fun,options);for(i=0;i<n_steps;i++){options.max=steps[i+1];options.min=steps[i];options.marker=rightMarkers.charAt((rightMarkers.length>i)?i:0)+"-"+leftMarkers.charAt((leftMarkers.length>i+1)?i+1:0);plotter(fun,options)}options.max=null;options.min=steps[n_steps];options.marker=rightMarkers.charAt((rightMarkers.length==n_steps)?n_steps-1:0)+"--";plotter(fun,options)}}function plotter(fun,options){options=options||{};options.closed=false;options.curve="";var xmin=(options.min==null)?SVG.xmin:options.min;var xmax=(options.max==null)?SVG.xmax:options.max;var points=getOption("points",options);var pth=list(["x",fun],xmin,xmax,points);if(pth){path(pth,options)}}function area(fun1,fun2,options){options=options||{};options.curve="";options.closed=true;var xmin=(options.min==null)?SVG.xmin:options.min;var xmax=(options.max==null)?SVG.xmax:options.max;var points=getOption("points",options);var pth1=list(["x",fun1],xmin,xmax,points);var pth2=list(["x",fun2],xmin,xmax,points);if(pth1&&pth2){pth2.reverse();pth1=pth1.concat(pth2);path(pth1,options)}}function polarPlot(fun,options){var g1,g2;if(typeof fun=="string"){with(Math){eval("g1 = function(x){return ("+fun+")*cos(x)}");eval("g2 = function(x){return ("+fun+")*sin(x)}")}}else{if($.isFunction(fun)){with(Math){eval("g1 = function(x){return fun(x)*cos(x)}");eval("g2 = function(x){return fun(x)*sin(x)}")}}}parametricPlot(g1,g2,options)}function parametricPlot(fun1,fun2,options){options=options||{};options.closed=false;options.curve="";var xmin=(options.min==null)?0:options.min;var xmax=(options.max==null)?2*Math.PI:options.max;var points=getOption("points",options);var pth=list([fun1,fun2],xmin,xmax,points);if(pth){path(pth,options)}}function slopeField(fun,options){options=options||{};var g=fun;if(typeof fun=="string"){with(Math){eval("g = function(x,y){return "+fun+"}")}}var gxy,x,y,u,v,dz;var dx=(options.dx==null)?1:options.dx;var dy=(options.dy==null)?1:options.dy;dz=Math.sqrt(dx*dx+dy*dy)/6;var xmin=Math.ceil(SVG.xmin/dx);var ymin=Math.ceil(SVG.ymin/dy);for(x=xmin;x<=SVG.xmax;x+=dx){for(y=ymin;y<=SVG.ymax;y+=dy){gxy=g(x,y);if(!isNaN(gxy)){if(Math.abs(gxy)=="Infinity"){u=0;v=dz}else{u=dz/Math.sqrt(1+gxy*gxy);v=gxy*u}line([x-u,y-v],[x+u,y+v],options)}}}}return{dynamic:{},removePictures:function(obj){var pictures=obj?[obj]:$(".svgGraph");$(pictures).each(function(){var target=this.parentNode;$(this).remove();$(target).css({color:"red",background:"yellow"});$(target).text("Missing picture: your  browser does not support inline SVG");window.setTimeout(function(){$(target).remove()},10000)})},drawPictures:function(obj){var options,xmin,xmax,ymin,ymax;var pictures=obj?[obj]:$(".svgGraph");$(pictures).each(function(){SVG=new pictureObject();options=this.getAttribute("options");if(options!=""){with(Math){eval("options="+options)}setOptions(options)}else{options={}}SVG.width=options.width||SVG.width;SVG.height=options.height||SVG.height;SVG.coords=options.coords||SVG.coords;SVG.borderwidth=options.borderwidth||SVG.borderwidth;SVG.borderstroke=options.borderstroke||SVG.borderstroke;if(options.pan==false){SVG.pan=false}SVG.src=this.getAttribute("script");var container=this.parentNode;container.removeChild(this);options.scales=options.scales||[];switch(options.scales.length){case 0:xmin=SVG.xmin;xmax=SVG.xmax;ymin=null;ymax=null;break;case 2:xmin=options.scales[0];xmax=options.scales[1];ymin=null;ymax=null;break;case 4:xmin=options.scales[0];xmax=options.scales[1];ymin=options.scales[2];ymax=options.scales[3];break;default:return}if(xmin>=xmax){throw"Incorrect values: xmax<=xmin."}var xunitlength=SVG.width/(xmax-xmin);if(typeof ymin!="number"){ymin=-SVG.height/(2*xunitlength);ymax=-ymin}if(ymin>=ymax){throw"Incorrect values: ymax<=ymin."}SVG.xmin=xmin;SVG.xmax=xmax;SVG.ymin=ymin;SVG.ymax=ymax;setScales();SVG.id=Math.randomString(chars,20);var qnode=createSVGElement("svg");qnode.id=SVG.id;qnode.setAttribute("xmlns","http://www.w3.org/2000/svg");var node=createSVGElement("clipPath");node.id=SVG.id+"ClipPath";var node2=createSVGElement("path");$(node).append(node2);node2=createSVGElement("defs");node2.id=SVG.id+"_Defs";$(node2).append(node);$(qnode).append(node2);node=createSVGElement("rect");node.setAttribute("class","svgBackground");node.setAttribute("x","0");node.setAttribute("y","0");node.setAttribute("width","100%");node.setAttribute("height","100%");node.setAttribute("stroke",SVG.borderstroke);node.setAttribute("stroke-width",SVG.borderwidth);node.setAttribute("fill",SVG.attr.backgroundcolor);node.setAttribute("fill-opacity",SVG.attr.backgroundopacity);$(qnode).append(node);node=createSVGElement("g");node.id=SVG.id+"Canvas";node.setAttribute("clip-path","url(#"+SVG.id+"ClipPath)");SVG.canvas=node;$(qnode).append(node);if(SVG.coords!="none"){node=createSVGElement("text");node.id=SVG.id+"Coords";node.setAttribute("class","svgCoords");node.setAttribute("text-anchor","end");node.setAttribute("font-size",(SVG.attr.fontsize*0.8));$(qnode).append(node)}$(container).append(qnode);container.style.position="relative";node=MSVG.createElementXHTML("span",SVG.id+"mml");$(container).append(node);node=MSVG.createElementXHTML("span",SVG.id+"toolbar");node.style.position="absolute";node.style.textAlign="left";node.style.zIndex=10;node2=setButton("Update","Edit script",function(){updateButton(this)});$(node).append(node2);node2=setButton("SVG","View SVG code",function(){exportSVG(this)});$(node).append(node2);node2=setButton("-","Zoom out",function(){changeScales(1.25)});$(node).append(node2);node2=setButton("+","Zoom in",function(){changeScales(0.8)});$(node).append(node2);node2=setButton("\u2191","Enlarge picture",function(){changeSize(0.8)});$(node).append(node2);node2=setButton("\u2193","Reduce picture",function(){changeSize(1.25)});$(node).append(node2);$(node).append("<br />");node2=MSVG.createElementXHTML("textarea",SVG.id+"src");$(node2).attr({rows:8,cols:80});$(node).append(node2);$(node).hide();$(container).append(node);setAction("mousemove",updateCoord);setAction("mouseout",removeCoord);setAction("mouseover",switchTo);setAction("mousedown",onClick);if(SVG.pan){setAction("mouseup",onDrop)}if(window.addEventListener){var evt=$.browser.mozilla?"DOMMouseScroll":"mousewheel";qnode.addEventListener(evt,onWheel,false)}setSize();translateAndEval(SVG.id)})}}}(jQuery);
//}}}
/***
!~TiddlyWiki formatters
***/
//{{{
if(!version.extensions.MathSVGPlugin) { //# ensure that the plugin is only installed once
version.extensions.MathSVGPlugin = {installed: true};
MSVG.generic();

config.formatterHelpers.MathSVGHelper = function(w) {
  this.lookaheadRegExp.lastIndex = w.matchStart;
  var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
  if(lookaheadMatch){
    var eq = MSVG.parseMath(lookaheadMatch[1],this.displaystyle);
    if(this.displaystyle){
      var node = createTiddlyElement(w.output,"div");
      node.style.textAlign='center';
      node.appendChild(eq);
      w.output.appendChild(node);
    } else {w.output.appendChild(eq);}
    w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
  }
}

config.formatters.push( {
  name: "clatex",
  match: "\\$\\$",
  lookaheadRegExp: /\$\$((?:.|\n)*?)\$\$/mg,
  displaystyle: true,
  handler: config.formatterHelpers.MathSVGHelper
})

config.formatters.push( {
  name: "clatex2",
  match: "\\\\\\\[",
  lookaheadRegExp: /\\\[\s*(.*?)\s*\\\]/mg,
  displaystyle: true,
  handler: config.formatterHelpers.MathSVGHelper
})

config.formatters.push( {
  name: "latex",
  match: "\\$",
  lookaheadRegExp: /\$((?:.|\n)*?)\$/mg,
  displaystyle: false,
  handler: config.formatterHelpers.MathSVGHelper
})

config.formatters.push( {
  name: "graph",
  match: "\\(:graph",
  lookaheadRegExp: /\(:graph(\((.*?),?\s?(\{.+\})?\))?[\s]+((?:.|\n)*?)[\s]+:\)/mg,
  handler: function(w){
  this.lookaheadRegExp.lastIndex = w.matchStart;
  var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
  if(lookaheadMatch){
    var element = (lookaheadMatch[2] == "inline") ? "span" : "div";
    var eq = createTiddlyElement(w.output,element);
    switch(lookaheadMatch[2]){
    case "center":
      eq.style.marginLeft = "auto";
      eq.style.marginRight = "auto";
      break;
    case "left":
      eq.style.cssFloat = "left";
      break;
    case "right":
      eq.style.cssFloat = "right";
    }
    var svg = createTiddlyElement(eq,"embed");
    svg.className="svgGraph";
    svg.setAttribute('options',lookaheadMatch[3]||"");
    svg.setAttribute('script',lookaheadMatch[4]);
    ASVG.drawPictures(svg);
    w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
  }
  }
})
}
//}}}
/***
The script should not be edited. All available options can be set by the following variables:
***/
//{{{
//MSVG.showFormulaOnMouseOver = false; //show LaTeX code on mouse over the equation
//MSVG.latexImages = false; //set to true to force the use of an external converter
//MSVG.latexConverter = "http://www.yourequations.com/eq.latex?"; //link to external converter
//MSVG.mathColor = "green"; //font color
//MSVG.mathFontSize = ""; //font size
//MSVG.mathFontFamily = ""; //font family
//}}}
/***
New symbols or commands can be defined here:
***/
//{{{
 var commands = ["nle","R","diagup","varnothing","ind","DD"];
 var symbols = ["\u2270","\u211D","\u2571","\u2205","\u2AEB","\\frac{d}{dr}"];
 MSVG.define(commands,symbols);
//}}}
rm $\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
rm $\mathrm{abcdefghijklmnopqrstuvwxyz}$

it $\mathit{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
it $\mathit{abcdefghijklmnopqrstuvwxyz}$

sf $\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ @@fails@@
sf $\mathsf{abcdefghijklmnopqrstuvwxyz}$

tt $\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ @@fails@@
tt $\mathtt{abcdefghijklmnopqrstuvwxyz}$

bf $\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
bf $\mathbf{abcdefghijklmnopqrstuvwxyz}$

bb $\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
bb $\mathbb{abcdefghijklmnopqrstuvwxyz}$

frak $\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
frak $\mathfrak{abcdefghijklmnopqrstuvwxyz}$

cal $\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
cal $\mathcal{abcdefghijklmnopqrstuvwxyz}$
!Symbols
!Lists
The concept of a list is fundamental to the language. Functions and operators can be defined to accept either individual parameters or lists.

Lists are tuples. They have a finite number of elements and the elements are ordered.

List are enclosed in parenthesis and list items are delimited by commas.
<code cys:nogutter:nocontrols>
  (this, is, a, list)
</code>

List elements are allowed labels.
<code cys:nogutter:nocontrols>
  (name:"bubba",age: 24)
</code>
Access to list elements is by index or label or indirection
<code cys:nogutter:nocontrols>
  alist:(name:"bubba",age:24,sex:"Yes please")
  Name = alist[0]
  Age = alist[age:]
  Sex = alist.sex
</code>

Lists can be nested  and/or empty
<code cys:nogutter:nocontrols>
alist:(1,2,(3,4),())
</code>

One quirk of lists is that to differentiate them from expression precidence parenthesis we need a few rules:
# Parenthesis enclosing an expression and bracketed by commas creates a single element list.
# To create a 1 element list within an expression, add a null label.

<code cys:nogutter:nocontrols>
(a+b)+c   _ +(+(a,b),c)
(:a+b)+c  _ +((a+b),c)    first parameter is a 1 element list
</code>
!!Prototypes
If the first element of a list only contains labels, then it is removed and those labels are applied to all subsequent items
<code cys:nogutter:nocontrols>
alist:((x:,y:),(1,2),(2,3))
alist[0].x _ 1
alist[1].y _ 3
</code>

!!To be determined.
List operators: how to add elements to an existing list, and remove elements from an existing list. 
$\diagup X\ind Y \tilde{A} \varnothing$

$A = \left(\begin{array}{c c c}
1-x & 0 & 0 \\ 0 & 1-x & 0 \\ 0 & 0 & 1-x \end{array}\right)$

$\sum a_i + \sum_{i=0}^{+\infty} b_i$

$f(x) = \left\{\begin{array}{l l}
x^2 \sin \frac1x & \textrm{if } x \ne 0, \\
0 & \textrm{if } x = 0 .
\end{array}\right.$

$\displaystyle{ \lim_{x\to\infty} f(x) = k \choose r + \frac ab \sum_{n=1}^{+\infty} a_n + \left\{ \frac{1}{13} \sum_{n=1}^{+\infty} b_n \right\} }$
<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]
----
Also see [[AdvancedOptions]]
This document describes a base grammar upon which to build a couple new programming languages. Planned are Cystem and Rope. Cystem is meant to be a systems programming language to replace C. Rope is an interpreted language meant to replace python & ruby. 

To have good understanding why this is not just another programming language, we need to build up a picture of the whole thing in layers. However, [[for the impatient we have some examples]].

This document does not discuss the "features" of the Cystem language, such as cool objects, message passing, etc. Rather we are describing a new type of grammar that gives a new level of power and functionality to the programmer. It is over the top of this powerful new approach that we can layer language features taylored to systems development, in the case of Cystem, or rapid applications development, in the case of Rope. As such, features specific to these languages will be discussed in another document.

Read the sections in the order numbered on the left.

If you want to dive strait into the things that are really interesting read about [[Function Calls]] and [[Meta-types]]
<!--{{{-->
<div class='header' >
<div class='titleLine'>
<span class='searchBar' macro='search'></span>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>

<div id='mainMenu' >
<!--<span id='menuHeader' refresh='content' tiddler='MainMenuHeader'></span>-->
<span refresh='content' tiddler='MainMenu'></span>
</div>

<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='TEHSideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>

<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>

</div>

<!--<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>-->
<!--}}}-->
<<closeAll>><<newTiddler>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
The foundations of a new programming language
Cystem
http://www.cystem.info/index.html
Source files in Cystem are similar to those of other languages. 

One key difference from C type languages is that the syntax at the top level is different that that within the definitions. So the syntax of defining types and functions, which can only happen at the top level, is different than the syntax of actual code.

Each file contains:
;Comments
:Same concept as any other programming language. The delimiters are different than languages deriving from C
;Global Code
:Each module executes global code on startup and on exit./%TBD%/ {{{ Details TBD }}} Global code is bracketed by {{{ {{ }}} and {{{ }} }}} with an optional label.
;Type Definitions
:Types can only be defined at the top level. 
;Function Definitions
:Functions can only be defined at the top level and within type definitions. However, lambda functions can be defined within code blocks.
;Code Blocks
:Code that actually does stuff is contained inside function definitions or global code brackets. Information on how expressions and statements are delimited is located in the [[Code Blocks]] section.

!Multiple syntax's 
At the top level we have one syntax for defining types, functions, and module-global code. Within type definitions we have another syntax. Within function definitions, and the global code definitions, we have yet another syntax. 

Don't let this scare you, it just means that we don't need lot's of "struct, class, def" keywords cluttering up your code. The main concept is that we bracket global code with {{{ {{ }}} and {{{ }} }}}. If you can remember this, there are no differences to you the programmer in the 3 syntaxs. 
<code cys:nogutter:nocontrols>
_* this is a typedef at the top level *_
mytype: { 
  a: int 
  memberfunc():int {return a}
}
_* this is a function definition    *_
myfunction():int 
{
  myvar: { a:int }   _ this is a labeled code block, typedefs
                      _ are not allowed inside function definitions
}
_ this is global code... 
_ symbol declarations and function calls are allowed.
{{
  globalvar: 40
  b = myfunction()
}}
</code>
!Top Level Syntax
Syntax at the top level is delimited by curly brackets. Whitespace and newlines are ignored, brackets of all types {{{ ( ) , [ ] , { } }}} must be nested with a matching closing bracket.
<code cys:nogutter:nocontrols>
TypeDefinition: { _* Typedef details *_}
FunctionDefinition():type { _* Code blocks *_}
{{
_* Global Code *_
}}
</code>
!Comments
<code cys:nogutter:nocontrols>
_* A multi line comment 
 * Is started by <underscore><star>
 * and terminated by <star><underscore>
 * It is a nesting.
 *_

_ A single line comment is started 
_ with <underscore><space> and
_ runs until the end of the line
</code>
Additionally, a hash comment is allowed on the first line.
<code cys:nogutter:nocontrols>
#!/bin/cystem
_* A hash comment is allowed on the first line 
 *   in deference to unix shell scripts
 *_
</code>
!Type Definitions
<code cys:nogutter:nocontrols>
mytype:
{
  myidentifier1: some+initialization+expression()
  myidentifier2: some+other+initialization+expressio()

  _* type functions do not have an implied this pointer *_
  type_function.():retType {_*some code*_}

  _* instance functions do have an implied this pointer. *_
  instance_function():retType {_*some code*_}

  _* Operator functions don't have an implied this pointer.*_
  +(a:mytype,b:mytype):mytype {_*some Code*_}
}
_ type and member functions can be defined on the top level
mytype.another_type_function.():retType { _* some code *_}
mytype.instance_func_2():retType { _* some code *_ }
</code>
!Function Definitions
<code cys:nogutter:nocontrols>

</code>
[[StyleSheetSyntaxHighlighter]]
/*{{{*/
.twocolumns { display:block; -moz-column-count:2; -moz-column-gap:1em; -moz-column-
width:50%;}

.header {
 background: [[ColorPalette::PrimaryMid]]; 
 margin: 0em 0em 0  0;
 padding:0 12px;
}

.viewer{
  border: 1px solid [[ColorPalette::TertiaryMid]];
  padding: 1em
}

h1 {text-align:center; border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
h3 {border:none}

#sidebar {position:absolute; display:block;right:3px; width:16em; font-size:.9em;}

.titleLine{
 margin: 0em 0em 0em 0em;
margin-left:1em;
margin-bottom: 0em;
 padding: 0;
 text-align: left;
 color:[[ColorPalette::Background]];
}
.titleLine a {border-bottom: 1px dotted #FF9900;}
.titleLine a:hover {border-bottom: 1px dotted #fff;}

.siteTitle {
	font-size: 3em;
        //font-weight: bold;
        color: [[ColorPalette::Background]];
}

.siteTitle a, .siteSubtitle a{
 color:[[ColorPalette::PrimaryLight]];
}

.siteSubtitle {
	font-size: 1.5em;
        //display: block;
        margin: .5em auto 1em 2em;
        color: [[ColorPalette::Background]];
}

.searchBar {float:right; font-size:1em;padding:1em 2em}
.searchBar .button {display:block; border:none; color:[[ColorPalette::Background]]; }
.searchBar .button:hover{border:none; color:#eee;}
.searchBar input{
 border: 1px inset #000; background:[[ColorPalette::PrimaryPale]]; width:10em; margin:0;
}
.searchBar input:focus {
 border: 1px inset #000; background:[[ColorPalette::Background]];
}
.searchBar a {
  border-bottom: 1px [[ColorPalette::Background]];
  color: [[ColorPalette::Background]];
}
.searchBar a:hover {
border-bottom: 1px [[ColorPalette::PrimaryPale]];
color: [[ColorPalette::PrimaryPale]];
}

*html .titleLine {margin-right:1.3em;}
*html .searchBar .button {margin-left:1.7em;}

.toolbar {text-align:right; font-size:.9em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:.5em 0.5em 0.5em 0.5em; font-size:1.1em;}



#contentFooter {
 text-align: center;
 clear: both;
 color:[[ColorPalette::Background]];
 background:  [[ColorPalette::PrimaryMid]];
 padding: 1em 2em;
//font-weight:bold;
}

#menuHeader {
font-size: 0.5em; 
color:#eee; 
position:relative;
display: block;
background:#fff; 
//clear: both; 
text-align: left;

}
/*}}}*/
[[StyleSheetSyntaxHighlighter]]
/***
StyleSheet for ~SyntaxHighlighter
***/

/*{{{*/
.dp-highlighter
{
	font-family: "Consolas", "Courier New", Courier, mono, serif;
	font-size: 12px;
	background-color: #E7E5DC; 
	width: 99%;
	overflow: auto;
	margin: 18px 0 18px 0 !important;
	padding-top: 1px; /* adds a little border on top when controls are hidden */
}

/* clear styles */
.dp-highlighter ol,
.dp-highlighter ol li,
.dp-highlighter ol li span 
{
	margin: 0;
	padding: 0;
	border: none;
}

.dp-highlighter a,
.dp-highlighter a:hover
{
	background: none;
	border: none;
	padding: 0;
	margin: 0;
}

.dp-highlighter .bar
{
	padding-left: 45px;
}

.dp-highlighter.collapsed .bar,
.dp-highlighter.nogutter .bar
{
	padding-left: 0px;
}

.dp-highlighter ol
{
	list-style: decimal; /* for ie */
	background-color: #fff
	margin: 0px 0px 1px 45px !important; /* 1px bottom margin seems to fix occasional Firefox scrolling */
	padding: 0px;
	color: #5C5C5C;
}

.dp-highlighter.nogutter ol,
.dp-highlighter.nogutter ol li
{
	list-style: none !important;
	margin-left: 0px !important;
}

.dp-highlighter ol li,
.dp-highlighter .columns div
{
	list-style: decimal-leading-zero; /* better look for others, override cascade from OL */
	list-style-position: outside !important;
	border-left: 3px solid #6CE26C;
	background-color: #F8F8F8;/* #fff;  #F8F8F8;*/
	color: #5C5C5C;
	padding: 0 3px 0 10px !important;
	margin: 0 !important;
	line-height: 14px;
}

.dp-highlighter.nogutter ol li,
.dp-highlighter.nogutter .columns div
{
	border: 0;
}

.dp-highlighter .columns
{
	background-color: #F8F8F8;
	color: gray;
	overflow: hidden;
	width: 100%;
}

.dp-highlighter .columns div
{
	padding-bottom: 5px;
}

.dp-highlighter ol li.alt
{
	background-color: #F8F8F8;/*#FFF;*/
	color: inherit;
}

.dp-highlighter ol li span
{
	color: black;
	background-color: inherit;
}

/* Adjust some properties when collapsed */

.dp-highlighter.collapsed ol
{
	margin: 0px;
}

.dp-highlighter.collapsed ol li
{
	display: none;
}

/* Additional modifications when in print-view */

.dp-highlighter.printing
{
	border: none;
}

.dp-highlighter.printing .tools
{
	display: none !important;
}

.dp-highlighter.printing li
{
	display: list-item !important;
}

/* Styles for the tools */

.dp-highlighter .tools
{
	padding: 3px 8px 3px 10px;
	font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif;
	color: silver;
	background-color: #f8f8f8;
	padding-bottom: 10px;
	border-left: 3px solid #6CE26C;
}

.dp-highlighter.nogutter .tools
{
	border-left: 0;
}

.dp-highlighter.collapsed .tools
{
	border-bottom: 0;
}

.dp-highlighter .tools a
{
	font-size: 9px;
	color: #a0a0a0;
	background-color: inherit;
	text-decoration: none;
	margin-right: 10px;
}

.dp-highlighter .tools a:hover
{
	color: red;
	background-color: inherit;
	text-decoration: underline;
}

/* About dialog styles */

.dp-about { background-color: #fff; color: #333; margin: 0px; padding: 0px; }
.dp-about table { width: 100%; height: 100%; font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; }
.dp-about td { padding: 10px; vertical-align: top; }
.dp-about .copy { border-bottom: 1px solid #ACA899; height: 95%; }
.dp-about .title { color: red; background-color: inherit; font-weight: bold; }
.dp-about .para { margin: 0 0 4px 0; }
.dp-about .footer { background-color: #ECEADB; color: #333; border-top: 1px solid #fff; text-align: right; }
.dp-about .close { font-size: 11px; font-family: Tahoma, Verdana, Arial, sans-serif !important; background-color: #ECEADB; color: #333; width: 60px; height: 22px; }

/* Language specific styles */

.dp-highlighter .comment, .dp-highlighter .comments { color: #608060; background-color: inherit; }
.dp-highlighter .string { color: blue; background-color: inherit; }
.dp-highlighter .keyword { color: #069; font-weight: bold; background-color: inherit; }
.dp-highlighter .preprocessor { color: gray; background-color: inherit; }
.dp-highlighter .label {color: #909;background-color: inherit; }
.dp-highlighter .operatur {color: #666;background-color: inherit; }

/*}}}*/
/***
!Metadata:
|''Name:''|SyntaxHighlighterPlugin|
|''Description:''|Code Syntax Highlighter Plugin for TiddlyWiki.|
|''Version:''|1.1.3|
|''Date:''|Oct 24, 2008|
|''Source:''|http://www.coolcode.cn/show-310-1.html|
|''Author:''|Ma Bingyao (andot (at) ujn (dot) edu (dot) cn)|
|''License:''|[[GNU Lesser General Public License|http://www.gnu.org/licenses/lgpl.txt]]|
|''~CoreVersion:''|2.4.1|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0; Safari; Opera; Chrome; etc.|

!Syntax:
<code cys:nocontrols:nogutter>
<code options>
codes
</code>
</code>

!Examples:

<code java>
public class HelloWorld {
    public static void main(String args[]) {
        System.out.println("HelloWorld!");
    }
}
</code>


!Revision History:
|''Version''|''Date''|''Note''|
|1.1.2|Oct 15, 2008|Optimize Highlight|
|1.0.0|Oct 13, 2008|Initial release|

!Code section:
***/
//{{{
var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:"<html><head><title>About...</title></head><body class=\"dp-about\"><table cellspacing=\"0\"><tr><td class=\"copy\"><p class=\"title\">dp.SyntaxHighlighter</div><div class=\"para\">Version: {V}</p><p><a href=\"http://www.dreamprojections.com/syntaxhighlighter/?ref=about\" target=\"_blank\">http://www.dreamprojections.com/syntaxhighlighter</a></p>&copy;2004-2007 Alex Gorbatchev.</td></tr><tr><td class=\"footer\"><input type=\"button\" class=\"close\" value=\"OK\" onClick=\"window.close()\"/></td></tr></table></body></html>"},ClipboardSwf:null,Version:"1.5.1"}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function($){return $.collapse},func:function($,_){$.parentNode.removeChild($);_.div.className=_.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function($,_){var A=dp.sh.Utils.FixForBlogger(_.originalCode).replace(/</g,"&lt;"),B=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");B.document.write("<textarea style=\"width:99%;height:99%\">"+A+"</textarea>");B.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null},func:function($,A){var B=dp.sh.Utils.FixForBlogger(A.originalCode).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");if(window.clipboardData)window.clipboardData.setData("text",B);else if(dp.sh.ClipboardSwf!=null){var _=A.flashCopier;if(_==null){_=document.createElement("div");A.flashCopier=_;A.div.appendChild(_)}_.innerHTML="<embed src=\""+dp.sh.ClipboardSwf+"\" FlashVars=\"clipboard="+encodeURIComponent(B)+"\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>"}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function($,B){var _=document.createElement("IFRAME"),A=null;_.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(_);A=_.contentWindow.document;dp.sh.Utils.CopyStyles(A,window.document);A.write("<div class=\""+B.div.className.replace("collapsed","")+" printing\">"+B.div.innerHTML+"</div>");A.close();_.contentWindow.focus();_.contentWindow.print();alert("Printing...");document.body.removeChild(_)}},About:{label:"?",func:function(_){var A=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),$=A.document;dp.sh.Utils.CopyStyles($,window.document);$.write(dp.sh.Strings.AboutDialog.replace("{V}",dp.sh.Version));$.close();A.focus()}}};dp.sh.Toolbar.Create=function(B){var A=document.createElement("DIV");A.className="tools";for(var _ in dp.sh.Toolbar.Commands){var $=dp.sh.Toolbar.Commands[_];if($.check!=null&&!$.check(B))continue;A.innerHTML+="<a href=\"#\" onclick=\"dp.sh.Toolbar.Command('"+_+"',this);return false;\">"+$.label+"</a>"}return A};dp.sh.Toolbar.Command=function(_,$){var A=$;while(A!=null&&A.className.indexOf("dp-highlighter")==-1)A=A.parentNode;if(A!=null)dp.sh.Toolbar.Commands[_].func($,A.highlighter)};dp.sh.Utils.CopyStyles=function(A,_){var $=_.getElementsByTagName("link");for(var B=0;B<$.length;B++)if($[B].rel.toLowerCase()=="stylesheet")A.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+$[B].href+"\"></link>")};dp.sh.Utils.FixForBlogger=function($){return(dp.sh.isBloggerMode==true)?$.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,"\n"):$};dp.sh.RegexLib={MultiLineCysComments:new RegExp("_\\*[\\s\\S]*?\\*_","gm"),SingleLineCysComments:new RegExp("_\\s.*$","gm"),MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp("\"(?:\\.|(\\\\\\\")|[^\\\"\"\\n])*\"","g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};dp.sh.Match=function(_,$,A){this.value=_;this.index=$;this.length=_.length;this.css=A};dp.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};dp.sh.Highlighter.SortCallback=function($,_){if($.index<_.index)return-1;else if($.index>_.index)return 1;else if($.length<_.length)return-1;else if($.length>_.length)return 1;return 0};dp.sh.Highlighter.prototype.CreateElement=function(_){var $=document.createElement(_);$.highlighter=this;return $};dp.sh.Highlighter.prototype.GetMatches=function(_,B){var $=0,A=null;while((A=_.exec(this.code))!=null)this.matches[this.matches.length]=new dp.sh.Match(A[0],A.index,B)};dp.sh.Highlighter.prototype.AddBit=function($,A){if($==null||$.length==0)return;var C=this.CreateElement("SPAN");$=$.replace(/ /g,"&nbsp;");$=$.replace(/</g,"&lt;");$=$.replace(/\n/gm,"&nbsp;<br>");if(A!=null){if((/br/gi).test($)){var _=$.split("&nbsp;<br>");for(var B=0;B<_.length;B++){C=this.CreateElement("SPAN");C.className=A;C.innerHTML=_[B];this.div.appendChild(C);if(B+1<_.length)this.div.appendChild(this.CreateElement("BR"))}}else{C.className=A;C.innerHTML=$;this.div.appendChild(C)}}else{C.innerHTML=$;this.div.appendChild(C)}};dp.sh.Highlighter.prototype.IsInside=function(_){if(_==null||_.length==0)return false;for(var A=0;A<this.matches.length;A++){var $=this.matches[A];if($==null)continue;if((_.index>$.index)&&(_.index<$.index+$.length))return true}return false};dp.sh.Highlighter.prototype.ProcessRegexList=function(){for(var $=0;$<this.regexList.length;$++)this.GetMatches(this.regexList[$].regex,this.regexList[$].css)};dp.sh.Highlighter.prototype.ProcessSmartTabs=function(E){var B=E.split("\n"),$="",D=4,A="\t";function _(A,E,_){var B=A.substr(0,E),C=A.substr(E+1,A.length),$="";for(var D=0;D<_;D++)$+=" ";return B+$+C}function C(B,C){if(B.indexOf(A)==-1)return B;var D=0;while((D=B.indexOf(A))!=-1){var $=C-D%C;B=_(B,D,$)}return B}for(var F=0;F<B.length;F++)$+=C(B[F],D)+"\n";return $};dp.sh.Highlighter.prototype.SwitchToList=function(){var C=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n"),B=C.split("\n");if(this.addControls==true)this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns){var A=this.CreateElement("div"),_=this.CreateElement("div"),E=10,G=1;while(G<=150)if(G%E==0){A.innerHTML+=G;G+=(G+"").length}else{A.innerHTML+="&middot;";G++}_.className="columns";_.appendChild(A);this.bar.appendChild(_)}for(var G=0,D=this.firstLine;G<B.length-1;G++,D++){var $=this.CreateElement("LI"),F=this.CreateElement("SPAN");$.className=(G%2==0)?"alt":"";F.innerHTML=B[G]+"&nbsp;";$.appendChild(F);this.ol.appendChild($)}this.div.innerHTML=""};dp.sh.Highlighter.prototype.Highlight=function(C){function A($){return $.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function $($){return $.replace(/\n*$/,"").replace(/^\n*/,"")}function _(B){var E=dp.sh.Utils.FixForBlogger(B).split("\n"),C=new Array(),D=new RegExp("^\\s*","g"),$=1000;for(var F=0;F<E.length&&$>0;F++){if(A(E[F]).length==0)continue;var _=D.exec(E[F]);if(_!=null&&_.length>0)$=Math.min(_[0].length,$)}if($>0)for(F=0;F<E.length;F++)E[F]=E[F].substr($);return E.join("\n")}function D(A,$,_){return A.substr($,_-$)}var F=0;if(C==null)C="";this.originalCode=C;this.code=$(_(C));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");this.ol=this.CreateElement("OL");this.matches=new Array();this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0){this.AddBit(this.code,null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);return}this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var E=0;E<this.matches.length;E++)if(this.IsInside(this.matches[E]))this.matches[E]=null;for(E=0;E<this.matches.length;E++){var B=this.matches[E];if(B==null||B.length==0)continue;this.AddBit(D(this.code,F,B.index),null);this.AddBit(B.value,B.css);F=B.index+B.length}this.AddBit(this.code.substr(F),null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};dp.sh.Highlighter.prototype.GetKeywords=function($){return"\\b"+$.replace(/ /g,"\\b|\\b")+"\\b"};dp.sh.BloggerMode=function(){dp.sh.isBloggerMode=true};dp.sh.HighlightAll=function(N,B,K,I,O,E){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function J($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function L(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}function C(B,A,_){var $=document.getElementsByTagName(_);for(var C=0;C<$.length;C++)if($[C].getAttribute("name")==A)B.push($[C])}var T=[],P=null,M={},$="innerHTML";C(T,N,"pre");C(T,N,"textarea");if(T.length==0)return;for(var R in dp.sh.Brushes){var F=dp.sh.Brushes[R].Aliases;if(F==null)continue;for(var G=0;G<F.length;G++)M[F[G]]=R}for(G=0;G<T.length;G++){var _=T[G],U=A(_.attributes["class"],_.className,_.attributes["language"],_.language),Q="";if(U==null)continue;U=U.split(":");Q=U[0].toLowerCase();if(M[Q]==null)continue;P=new dp.sh.Brushes[M[Q]]();_.style.display="none";P.noGutter=(B==null)?J("nogutter",U):!B;P.addControls=(K==null)?!J("nocontrols",U):K;P.collapse=(I==null)?J("collapse",U):I;P.showColumns=(E==null)?J("showcolumns",U):E;var D=document.getElementsByTagName("head")[0];if(P.Style&&D){var S=document.createElement("style");S.setAttribute("type","text/css");if(S.styleSheet)S.styleSheet.cssText=P.Style;else{var H=document.createTextNode(P.Style);S.appendChild(H)}D.appendChild(S)}P.firstLine=(O==null)?parseInt(L("firstline",U,1)):O;P.Highlight(_[$]);P.source=_;_.parentNode.insertBefore(P.div,_)}};version.extensions.SyntaxHighLighterPlugin={major:1,minor:1,revision:3,date:new Date(2008,10,24)};dp.sh.ClipboardSwf="clipboard.swf";dp.sh.Highlight=function(_,Q,B,J,H,M,D){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function I($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function K(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}var N=null,$="innerHTML";if(this.registered==undefined){var L={};for(var O in dp.sh.Brushes){var E=dp.sh.Brushes[O].Aliases;if(E==null)continue;for(var F=0;F<E.length;F++)L[E[F]]=O}this.registered=L}Q=Q.split(":");language=Q[0].toLowerCase();if(this.registered[language]==null)return;N=new dp.sh.Brushes[this.registered[language]]();_.style.display="none";N.noGutter=(B==null)?I("nogutter",Q):!B;N.addControls=(J==null)?!I("nocontrols",Q):J;N.collapse=(H==null)?I("collapse",Q):H;N.showColumns=(D==null)?I("showcolumns",Q):D;var C=document.getElementsByTagName("head")[0],P=document.getElementById(N.CssClass);if(N.Style&&C&&!P){P=document.createElement("style");P.setAttribute("id",N.CssClass);P.setAttribute("type","text/css");if(P.styleSheet)P.styleSheet.cssText=N.Style;else{var G=document.createTextNode(N.Style);P.appendChild(G)}C.appendChild(P)}N.firstLine=(M==null)?parseInt(K("firstline",Q,1)):M;N.Highlight(_[$]);N.source=_;_.parentNode.insertBefore(N.div,_)};config.formatters.push({name:"SyntaxHighlighter",match:"^<code[\\s]+[^>]+>\\n",element:"pre",handler:function(_){this.lookaheadRegExp=/<code[\s]+([^>]+)>\n((?:^[^\n]*\n)+?)(^<\/code>$\n?)/mg;this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var C=$[1],B=$[2];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);dp.sh.Highlight(A,C);_.nextMatch=$.index+$[0].length}}});config.formatterHelpers.enclosedTextHelper=function(_){this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var B=$[1];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);switch(_.matchText){case"/*{{{*/\n":dp.sh.Highlight(A,"css");break;case"//{{{\n":dp.sh.Highlight(A,"js");break;case"<!--{{{-->\n":dp.sh.Highlight(A,"xml");break}_.nextMatch=$.index+$[0].length}};dp.sh.Brushes.Cys=function(){var   _="int double void",  $="break case catch class const __finally __exception __try "+"const_cast continue private public protected __declspec "+"default delete deprecated dllexport dllimport do dynamic_cast "+"else enum explicit extern if for friend goto inline "+"mutable naked namespace new noinline noreturn nothrow "+"register reinterpret_cast return selectany "+"sizeof static static_cast struct switch template this "+"thread throw true false try typedef typeid typename union "+"using uuid virtual volatile whcar_t while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCysComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCysComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("[a-zA-Z]:|[a-zA-Z_][0-9a-zA-Z_]+:","gm"),css:"label"},{regex:new RegExp("[-`~!@#$%^&*<>|+?=/\\\\]+","gm"),css:"operatur"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-cys";this.Style=".dp-cys .datatypes { color: #2E8B57; font-weight: bold; }"};dp.sh.Brushes.Cys.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cys.Aliases=["cys","cystem"];dp.sh.Brushes.Cpp=function(){var _="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR "+"DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH "+"HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP "+"HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY "+"HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT "+"HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE "+"LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF "+"LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR "+"LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR "+"PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT "+"PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 "+"POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR "+"PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 "+"PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT "+"SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG "+"ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM "+"char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t "+"clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS "+"FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t "+"__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t "+"jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler "+"sig_atomic_t size_t _stat __stat64 _stati64 terminate_function "+"time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf "+"va_list wchar_t wctrans_t wctype_t wint_t signed",$="break case catch class const __finally __exception __try "+"const_cast continue private public protected __declspec "+"default delete deprecated dllexport dllimport do dynamic_cast "+"else enum explicit extern if for friend goto inline "+"mutable naked namespace new noinline noreturn nothrow "+"register reinterpret_cast return selectany "+"sizeof static static_cast struct switch template this "+"thread throw true false try typedef typeid typename union "+"using uuid virtual void volatile whcar_t while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-cpp";this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"};dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cpp.Aliases=["cpp","c","c++"];dp.sh.Brushes.CSharp=function(){var $="abstract as base bool break byte case catch char checked class const "+"continue decimal default delegate do double else enum event explicit "+"extern false finally fixed float for foreach get goto if implicit in int "+"interface internal is lock long namespace new null object operator out "+"override params private protected public readonly ref return sbyte sealed set "+"short sizeof stackalloc static string struct switch this throw true try "+"typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c";this.Style=".dp-c .vars { color: #d00; }"};dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"];dp.sh.Brushes.CSS=function(){var _="ascent azimuth background-attachment background-color background-image background-position "+"background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top "+"border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color "+"border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width "+"border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color "+"content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display "+"elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font "+"height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top "+"margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans "+"outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page "+"page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position "+"quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress "+"table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em "+"vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",$="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder "+"both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed "+"continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double "+"embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia "+"gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic "+"justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha "+"lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower "+"navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset "+"outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side "+"rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow "+"small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize "+"table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal "+"text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin "+"upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",A="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(_),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS($),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(A),"g"),css:"value"}];this.CssClass="dp-css";this.Style=".dp-css .value { color: black; }"+".dp-css .important { color: red; }"};dp.sh.Highlighter.prototype.GetKeywordsCSS=function($){return"\\b([a-z_]|)"+$.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"};dp.sh.Highlighter.prototype.GetValuesCSS=function($){return"\\b"+$.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"};dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=["css"];dp.sh.Brushes.Delphi=function(){var $="abs addr and ansichar ansistring array as asm begin boolean byte cardinal "+"case char class comp const constructor currency destructor div do double "+"downto else end except exports extended false file finalization finally "+"for function goto if implementation in inherited int64 initialization "+"integer interface is label library longint longword mod nil not object "+"of on or packed pansichar pansistring pchar pcurrency pdatetime pextended "+"pint64 pointer private procedure program property pshortstring pstring "+"pvariant pwidechar pwidestring protected public published raise real real48 "+"record repeat set shl shortint shortstring shr single smallint string then "+"threadvar to true try type unit until uses val var varirnt while widechar "+"widestring with word write writeln xor";this.regexList=[{regex:new RegExp("\\(\\*[\\s\\S]*?\\*\\)","gm"),css:"comment"},{regex:new RegExp("{(?!\\$)[\\s\\S]*?}","gm"),css:"comment"},{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\{\\$[a-zA-Z]+ .+\\}","g"),css:"directive"},{regex:new RegExp("\\b[\\d\\.]+\\b","g"),css:"number"},{regex:new RegExp("\\$[a-zA-Z0-9]+\\b","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-delphi";this.Style=".dp-delphi .number { color: blue; }"+".dp-delphi .directive { color: #008284; }"+".dp-delphi .vars { color: #000; }"};dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Delphi.Aliases=["delphi","pascal"];dp.sh.Brushes.Java=function(){var $="abstract assert boolean break byte case catch char class const "+"continue default do double else enum extends "+"false final finally float for goto if implements import "+"instanceof int interface long native new null "+"package private protected public return "+"short static strictfp super switch synchronized this throw throws true "+"transient try void volatile while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-j";this.Style=".dp-j .annotation { color: #646464; }"+".dp-j .number { color: #C00000; }"};dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Java.Aliases=["java"];dp.sh.Brushes.JScript=function(){var $="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];dp.sh.Brushes.Lua=function(){var $="break do end else elseif function if local nil not or repeat return and then until while this",_="math\\.\\w+ string\\.\\w+ os\\.\\w+ debug\\.\\w+ io\\.\\w+ error fopen dofile coroutine\\.\\w+ arg getmetatable ipairs loadfile loadlib loadstring longjmp print rawget rawset seek setmetatable assert tonumber tostring";this.regexList=[{regex:new RegExp("--\\[\\[[\\s\\S]*\\]\\]--","gm"),css:"comment"},{regex:new RegExp("--[^\\[]{2}.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"func"},];this.CssClass="dp-lua"};dp.sh.Brushes.Lua.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Lua.Aliases=["lua"];dp.sh.Brushes.Mxml=function(){this.CssClass="dp-mxml";this.Style=".dp-mxml .cdata { color: #000000; }"+".dp-mxml .tag { color : #0000ff; }"+".dp-mxml .tag-name { color: #0000ff; }"+".dp-mxml .script { color: green; }"+".dp-mxml .metadata { color: green; }"+".dp-mxml .attribute { color: #000000; }"+".dp-mxml .attribute-value { color: #990000; }"+".dp-mxml .trace { color: #cc6666; }"+".dp-mxml .var { color: #6699cc; }"+".dp-mxml .comment { color: #009900; }"+".dp-mxml .string { color: #990000; }"+".dp-mxml .keyword { color: blue; }"};dp.sh.Brushes.Mxml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Mxml.Aliases=["mxml"];dp.sh.Brushes.Mxml.prototype.ProcessRegexList=function(){function H(_,$){_[_.length]=$}function B(B,_){var A=0,$=false;for(A=0;A<B.length;A++)if(_.index>B[A].firstIndex&&_.index<B[A].lastIndex)$=true;return $}var $=0,F=null,D=null,A=null,C="",E=new Array(),_="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with",G=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("trace"),"gm"),css:"trace"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"keyword"}];A=new RegExp("&lt;\\!\\[CDATA\\[(.|\\s)*?\\]\\]&gt;","gm");while((F=A.exec(this.code))!=null){C=F[0].substr(0,12);H(this.matches,new dp.sh.Match(C,F.index,"cdata"));C=F[0].substr(12,F[0].length-12-6);for(var I=0;I<G.length;I++)while((D=G[I].regex.exec(C))!=null)H(this.matches,new dp.sh.Match(D[0],F.index+12+D.index,G[I].css));C=F[0].substr(F[0].length-6,6);H(this.matches,new dp.sh.Match(C,F.index+F[0].length-6,"cdata"));E.push({firstIndex:F.index,lastIndex:F.index+F[0].length-1})}this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"comments");A=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((F=A.exec(this.code))!=null){if(F[1]==null)continue;if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[1],F.index,"attribute"));if(F[2]!=undefined)H(this.matches,new dp.sh.Match(F[2],F.index+F[0].indexOf(F[2]),"attribute-value"))}A=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;C=F[0].substr(4,F[0].length-4);switch(C){case"mx:Script":case"/mx:Script":H(this.matches,new dp.sh.Match(F[0]+"&gt;",F.index,"script"));break;case"mx:Metadata":case"/mx:Metadata":H(this.matches,new dp.sh.Match(F[0]+"&gt;",F.index,"metadata"));break;default:H(this.matches,new dp.sh.Match(F[0],F.index,"tag-name"));break}}A=new RegExp("\\?&gt;|&gt;|/&gt;","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[0],F.index,"tag"))}};dp.sh.Brushes.Perl=function(){var _="abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen defined delete dump each endgrent endhostent endnetent endprotoent endpwent endservent eof exec exists exp fcntl fileno flock fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime grep hex import index int ioctl join keys kill lc lcfirst length link listen localtime lock log lstat m map mkdir msgctl msgget msgrcv msgsnd no oct open opendir ord pack pipe pop pos print printf prototype push q qq quotemeta qw qx rand read readdir readline readlink readpipe recv ref rename reset reverse rewinddir rindex rmdir scalar seek seekdir semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unlink unpack unshift untie utime values vec waitpid wantarray warn write qr",$="s select goto die do package redo require return continue for foreach last next wait while use if else elsif eval exit unless switch case",A="my our local";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("(\\$|@|%)\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(A),"gm"),css:"declarations"}];this.CssClass="dp-perl"};dp.sh.Brushes.Perl.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Perl.Aliases=["perl"];dp.sh.Brushes.Php=function(){var _="abs acos acosh addcslashes addslashes "+"array_change_key_case array_chunk array_combine array_count_values array_diff "+"array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill "+"array_filter array_flip array_intersect array_intersect_assoc array_intersect_key "+"array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map "+"array_merge array_merge_recursive array_multisort array_pad array_pop array_product "+"array_push array_rand array_reduce array_reverse array_search array_shift "+"array_slice array_splice array_sum array_udiff array_udiff_assoc "+"array_udiff_uassoc array_uintersect array_uintersect_assoc "+"array_uintersect_uassoc array_unique array_unshift array_values array_walk "+"array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert "+"basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress "+"bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir "+"checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists "+"closedir closelog copy cos cosh count count_chars date decbin dechex decoct "+"deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log "+"error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded "+"feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents "+"fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype "+"floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf "+"fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname "+"gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt "+"getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext "+"gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set "+"interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double "+"is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long "+"is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault "+"is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br "+"parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir "+"round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split "+"str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes "+"stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk "+"strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime "+"strtoupper strtr strval substr substr_compare",$="and or xor __FILE__ __LINE__ array as break case "+"cfunction class const continue declare default die do else "+"elseif empty enddeclare endfor endforeach endif endswitch endwhile "+"extends for foreach function include include_once global if "+"new old_function return static switch use require require_once "+"var while __FUNCTION__ __CLASS__ "+"__METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=["php"];dp.sh.Brushes.Python=function(){var $="and assert break class continue def del elif else "+"except exec finally for from global if import in is "+"lambda not or pass print raise return try yield while",_="None True False self cls class_";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1","gm"),css:"comment"},{regex:new RegExp("\"(?!\")(?:\\.|\\\\\\\"|[^\\\"\"\\n\\r])*\"","gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"special"}];this.CssClass="dp-py";this.Style=".dp-py .builtins { color: #ff1493; }"+".dp-py .magicmethods { color: #808080; }"+".dp-py .exceptions { color: brown; }"+".dp-py .types { color: brown; font-style: italic; }"+".dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"};dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Python.Aliases=["py","python"];dp.sh.Brushes.Ruby=function(){var $="alias and BEGIN begin break case class def define_method defined do each else elsif "+"END end ensure false for if in module new next nil not or raise redo rescue retry return "+"self super then throw true undef unless until when while yield",_="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload "+"Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol "+"ThreadGroup Thread Time TrueClass";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"}];this.CssClass="dp-rb";this.Style=".dp-rb .symbol { color: #a70; }"+".dp-rb .variable { color: #a70; font-weight: bold; }"};dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"];dp.sh.Brushes.Sql=function(){var _="abs avg case cast coalesce convert count current_timestamp "+"current_user day isnull left lower month nullif replace right "+"session_user space substring sum system_user upper user year",$="absolute action add after alter as asc at authorization begin bigint "+"binary bit by cascade char character check checkpoint close collate "+"column commit committed connect connection constraint contains continue "+"create cube current current_date current_time cursor database date "+"deallocate dec decimal declare default delete desc distinct double drop "+"dynamic else end end-exec escape except exec execute false fetch first "+"float for force foreign forward free from full function global goto grant "+"group grouping having hour ignore index inner insensitive insert instead "+"int integer intersect into is isolation key last level load local max min "+"minute modify move name national nchar next no numeric of off on only "+"open option order out output partial password precision prepare primary "+"prior privileges procedure public read real references relative repeatable "+"restrict return returns revoke rollback rollup rows rule schema scroll "+"second section select sequence serializable set size smallint static "+"statistics table temp temporary then time timestamp to top transaction "+"translation trigger true truncate uncommitted union unique update values "+"varchar varying view when where with work",A="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(A),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords($),"gmi"),css:"keyword"}];this.CssClass="dp-sql";this.Style=".dp-sql .func { color: #ff1493; }"+".dp-sql .op { color: #808080; }"};dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Sql.Aliases=["sql"];dp.sh.Brushes.Vb=function(){var $="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto "+"Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate "+"CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType "+"Date Decimal Declare Default Delegate Dim DirectCast Do Double Each "+"Else ElseIf End Enum Erase Error Event Exit False Finally For Friend "+"Function Get GetType GoSub GoTo Handles If Implements Imports In "+"Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module "+"MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing "+"NotInheritable NotOverridable Object On Option Optional Or OrElse "+"Overloads Overridable Overrides ParamArray Preserve Private Property "+"Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume "+"Return Select Set Shadows Shared Short Single Static Step Stop String "+"Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until "+"Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-vb"};dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Vb.Aliases=["vb","vb.net"];dp.sh.Brushes.Xml=function(){this.CssClass="dp-xml";this.Style=".dp-xml .cdata { color: #ff1493; }"+".dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }"+".dp-xml .attribute { color: red; }"+".dp-xml .attribute-value { color: blue; }"};dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function B(_,$){_[_.length]=$}var $=0,A=null,_=null;this.GetMatches(new RegExp("(&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](&gt;|>)","gm"),"cdata");this.GetMatches(new RegExp("(&lt;|<)!--\\s*.*?\\s*--(&gt;|>)","gm"),"comments");_=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((A=_.exec(this.code))!=null){if(A[1]==null)continue;B(this.matches,new dp.sh.Match(A[1],A.index,"attribute"));if(A[2]!=undefined)B(this.matches,new dp.sh.Match(A[2],A.index+A[0].indexOf(A[2]),"attribute-value"))}this.GetMatches(new RegExp("(&lt;|<)/*\\?*(?!\\!)|/*\\?*(&gt;|>)","gm"),"tag");_=new RegExp("(?:&lt;|<)/*\\?*\\s*([:\\w-.]+)","gm");while((A=_.exec(this.code))!=null)B(this.matches,new dp.sh.Match(A[1],A.index+A[0].indexOf(A[1]),"tag-name"))}
//}}}
!C vs Cystem
An exerpt of stereotypical systems C code: from the git SCM project, strbuf.c. This is a 1:1 translation, using the same idioms and variable names.
{{twocolumns{ 
<code cpp:nogutter:nocontrols>
/*
 * Used as the default ->buf value, so that people can always assume
 * buf is non NULL and ->buf is NUL terminated even for a freshly
 * initialized strbuf.
 */
char strbuf_slopbuf[1];

struct strbuf {
  size_t alloc;
  size_t len;
  char *buf;
};

void strbuf_init(struct strbuf *sb, size_t hint)
{
  sb->alloc = sb->len = 0;
  sb->buf = strbuf_slopbuf;
  if (hint)
    strbuf_grow(sb, hint);
}

void strbuf_release(struct strbuf *sb)
{
  if (sb->alloc) {
    free(sb->buf);
    strbuf_init(sb, 0);
  }
}

char *strbuf_detach(struct strbuf *sb, size_t *sz)
{
  char *res = sb->alloc ? sb->buf : NULL;
  if (sz)
    *sz = sb->len;
  strbuf_init(sb, 0);
  return res;
}

void strbuf_attach(struct strbuf *sb, void *buf, size_t len, size_t alloc)
{
  strbuf_release(sb);
  sb->buf   = buf;
  sb->len   = len;
  sb->alloc = alloc;
  strbuf_grow(sb, 0);
  sb->buf[sb->len] = '\0';
}

void strbuf_grow(struct strbuf *sb, size_t extra)
{
  if (sb->len + extra + 1 <= sb->len)
    die("you want to use way too much memory");
  if (!sb->alloc)
    sb->buf = NULL;
  ALLOC_GROW(sb->buf, sb->len + extra + 1, sb->alloc);
}

void strbuf_trim(struct strbuf *sb)
{
  char *b = sb->buf;
  while (sb->len > 0 && isspace((unsigned char)sb->buf[sb->len - 1]))
    sb->len--;
  while (sb->len > 0 && isspace(*b)) {
    b++;
    sb->len--;
  }
  memmove(sb->buf, b, sb->len);
  sb->buf[sb->len] = '\0';
}

</code>

<code cys:nogutter:nocontrols>

_*
 * Used as the default ->buf value, so that people can always assume
 * buf is non NULL and ->buf is NUL terminated even for a freshly
 * initialized strbuf.
 *_
{{ strbuf.slopbuf: char[1]  }}

strbuf: {
  alloc: size_t
  len: size_t
  buf: .char

  init(hint: size_t):void
  {
    alloc = 0, len = 0
    buf = slopbuf
    if (hint)
      grow(hint)
  }

  release():void
  {
    if (alloc) {
      free(buf)
      init(0)
    }
  }

  detach(sz: .size_t):.char
  {
    res: .char(NULL)
    if (alloc) { res = buf } 

    if (sz)
      sz. = len
    init( 0)
    return res
  }

  attach(buffer: .void , length: size_t, allocated: size_t):void
  {
    release()
    buf   = buffer
    len   = length
    alloc = allocated
    grow(sb, 0)
    buf[len] = 0x0
  }

  grow(extra: size_t ):void
  {
    if (len + extra + 1 <= len)
      die("you want to use way too much memory")
    if (!alloc)
      buf = NULL
    ALLOC_GROW(buf, len + extra + 1, alloc)
  }

  trim():void
  {
    b: .char,  b = buf
    while (len > 0 && isspace(uchar(buf[len - 1])))
      len--
    while (len > 0 && isspace(b.)) {
      b++
      len--
    }
    memmove(buf, b, len);
    buf[len] = 0x0
  }
}
</code>
}}}
!Things to note:
*Variable declarations are clean, stand out, and are easily highlighted by a simple syntax highlighter. 
*Similarly, function names are a little easier for the eye to pick up (and are less repetitive). 
*Defining functions as member functions creates much cleaner code. A similar affect would be seen in C++ or D
{{{
config.commands.closeTiddler.text= "x";
config.commands.closeOthers.text= "X";
config.commands.editTiddler.text = "!";
config.macros.toolbar.moreLabel = ">";
config.messages.backstage = {
	open: {text: " ", tooltip: "Open the backstage tools."},
	close: {text: " ", tooltip: "Close the backstage area"},
	prompt: "backstage: ",
	decal: {
		edit: {text: "edit", tooltip: "Edit the tiddler '%0'"}
	}
};

}}}
<<closeAll>><<newTiddler>><<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
The whole point of having types is so that you can create new collections of data and ways of operating on that data. 
This is a brief introduction to user defined operators in Cystem. User defined operators are what makes Cystem most different than other languages. The goal of user defined operators is to provide programmers with a grammar that is more expressive, allowing types and expressions to be developed together into a concise but clear language for expressing solutions specific to that type.
!Syntax
At this point we will not discuss Cystem syntax in much detail, except for the syntax of function calls and expressions. The examples should be easy enough to figure out but here's a couple hints: 
C is the main language of comparison, as such we borrow many of it's conventions. 
<code cys:nogutter:nocontrols>
_ identifier declarations are denoted with ':'
myvar: int    
_ multiple statements are separated by ','
a: double, b: int 
_ numeric constants follow C
c: 23, d: 4.5, e: 0x4F5

_ int and double are the same as their C counterparts.
_ new line = new statement/expression
</code>
!The power of user defined operators
One of Cystems core capabilities is allowing the programmer to create operators for new types as needed. A regex of valid operators in ASCII is: {{{[-`~!@#$%^&*<>|+?=/\\]+}}} Some possible user types are illustrated below.
<code cys:nogutter:nocontrols>
_* Matrix computations *_

(x,b,c): Vector(4)
(A,B): Matrix(4)
(m,n): Float

A = (1,3,2,4; 6,5,9,7; 1,2,1,1; 0,2,2,0)
b = (3.4,4.5,5.6,6.7)
x = A\b
B = x**b _ cross product
m = x*b _ dot product
n = |x|    _ 2-norm
c = x *! b _ element-wise product.
</code>

<code cys:nogutter:nocontrols>
_* Collections *_
A: Map( "cat",34; "dag",76; "egg",98 )
B: Map( "zed",89; "yak",55 )
C: Map()
D: MapSlice()
b: int

b = A[2] _ 98
b = A["dag"] _ 76
b = #A _ Num elements = 3
A += ("fog",78)  _ add one to the left
A =+ ("gab",88) _ and one to the right
A -= "cat"    _ remove one element 
C = A - "egg" _ remove another element 
b = $A _ Sum elements = 252
C = A & B _ union
D = @A   _ A slice of all of A
D = A[1..2] _ A slice of the first two elements
b = D-?      _ Move right-extent left one and return right element
b = ?-D     _ Move left extent right one and return right element.
</code>
!Functions
Each function definition in a program must have a unique signature. The signature of a function consists of its name, a list of parameter types, and a return type. If only some of these components match, then they are different functions. For instance, here are two different functions declared in Cystem syntax.
<code cys:nogutter:nocontrols>
myfunction(a: int, b: int):int { _* some code *_ }
myfunction(a: int, b: double):int { _* other code *_ }
</code>
Using them might look like:
<code cys:nogutter:nocontrols>
x: int, y: int
x = myfunction(1,2)
y = myfunction(2,2.0)
</code>

If we viewed this from a traditional perspective, we might say that the "myfunction" identifier was overloaded. Of note is that there is no automatic type conversion. The appropriate signature is called instead.

We call functions of this type "identifier prefix" functions.
!Operators
In cystem, operators are defined rather than overloaded. The signature for an operator function is the same as for an identifier prefix function.
<code cys:nogutter:nocontrols>
+(a: int, b: int):int   _ add two integers
+(a: int, b: double):int _ add a double to an int
</code>
Using them might look like:
<code cys:nogutter:nocontrols>
x: int
y: int
x = 1 + 2
y = 2 + 3.4
</code>
!!Valid operators
An operator can be any sequence of operator characters. So the following could be an operator:
<code cys:nogutter:nocontrols>
+!(a: int, b: int):int  _ do something much more exciting than add two ints
</code>
<code cys:nogutter:nocontrols>
x: int
x = 2 +! 3 _ exciting addition of  2 and 3
</code>
!!Operator function types
Operators can be used as infix functions, prefix functions, postfix function, or outfix (bracketing) functions.
<code cys:nogutter:nocontrols>
a + b _ simple infix operator:  +(a,b)
-c _ simple prefix operator  -.(c)
d! _ simple postfix operator .!(d)
|e| _ simple outfix operator |.|(e)
</code>
As indicated in the comments, specifying what *fix a function is, is done using the dot symbol, which is not available as an operator symbol by itself. 
<code cys:nogutter:nocontrols>
+(a:int,b:int):int 
-.(c:int):int
.!(d:int):int
|.|(e:int):int
</code>
!!Precedence
To work out which order to call operator functions in, each function has a 32 bit precedence. Functions are called in order of their precedence, highest first. Parenthesis are used to create a sub expression, which will be evaluated in full before being applied to any operators outside the parenthesis. Parenthesis can be nested. Also operators of the same precedence are evaluated in order from left to right by default but may be declared to be right-to-left. 
<code cys:nogutter:nocontrols>
+(a:int,b:int):int [Prec:0x7F00,Dir:"R2L"] 
{ 
  _* code *_
}
*(a:int,b:int):int [Prec:0x8F00,Dir:"R2L"]
 {   _* code *_ }
</code>

!Expressions
In cystem, an expression contains at least one operand and possibly one or more operators. 
Rules:
#Adjacent operands or adjacent operators must be separated by a space.
#Adjacent operands are tested against the space operator _(params)

 A valid expression is one for which function declarations exist.
<!--{{{-->

<div class='toolbar' > </span> <span macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span><span macro='dropTags "tags"+config.macros.dropTags.dropdownchar}}'> </div>
<div class='title' macro='view title'></div>
<div class='tagging' macro='tagging'></div>
<!--<div class='tagged' macro='tags'></div>-->
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
/***
!Code
***/
//{{{
if (readOnly) setStylesheet("#sidebar { display:none !important; } #displayArea { margin-right:1em !important; }","webSideStory");
//}}}
!Operator Functions
Here's a simple, incomplete type with operator functions defined. 
<code cys:nogutter:nocontrols>
_ Single line comments start with "_ " (underscore + space) and

_ Global code is delimited by {{...}} and is executed in sequence.
{{                        
  pi: 3.1415962
}}
Point: {                   _ type definition
  x: double, y: double
  Point.(_x:double,_y:double)
  {
    ret: Point(), ret.x = _x, ret.y = _y 
  }
  +(a:Point,b:Point):Point      _ infix function def
    {
      ret: Point()
      ret.x = a.x + b.x
      ret.y = a.y + b.y
      return ret
    }
  |.|(a: Point):double                     _ outfix function def
     { return sqrt(a.x^2+a.y^2) }
  =(a: Point.,b: Point):Point  _ var. indicates a reference parameter
    { a.x = b.x, a.y = b.y, return a}        
  =(a: Point., b:(x:double,y:double)):Point    _ A = (x,y)
    { a.x = b.x, a.y = b.y, return a}
}
{{  
  (A,B): Point()
  M: double
  
  A = (1,2), B = (3,4)
  
  M = |A + B|         _ sum two points and calc the magnitude
}}
</code>