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 {color:[[ColorPalette::SecondaryDark]]; background:[[ColorPalette::PrimaryPale]];}

.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::TertiaryDark]]; border-top:1px solid [[ColorPalette::Foreground]];
	border-bottom:1px solid [[ColorPalette::Foreground]]; border-left:1px solid [[ColorPalette::Foreground]];}
.wizard h1 {color:[[ColorPalette::Foreground]];}
.wizard h2 {color:[[ColorPalette::Background]];}
.wizardStep {background:[[ColorPalette::TertiaryLight]]; color:[[ColorPalette::Foreground]];
	border-top:1px solid [[ColorPalette::Foreground]];
	border-bottom:1px solid [[ColorPalette::Foreground]]; border-left:1px solid [[ColorPalette::Foreground]];}
.wizardFooter {background:[[ColorPalette::TertiaryDark]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryMid]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryLight]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryLight]] [[ColorPalette::SecondaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryDark]]; background:[[ColorPalette::SecondaryMid]]; color:[[ColorPalette::PrimaryDark]];}
#messageArea .button {padding:0.2em 0.2em 0.2em 0.2em; color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::Background]];}

.popup {background:[[ColorPalette::PrimaryLight]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}

.listBreak div {border-bottom:1px solid [[ColorPalette::PrimaryDark]];}

.popup li.disabled {color:[[ColorPalette::PrimaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::TertiaryPale]]; border:none;}
.popup li a:hover {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]]; border:none;}

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

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

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

.toolbar {color:[[ColorPalette::PrimaryMid]];}

.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]];}

.cascade {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryMid]]; border:1px solid [[ColorPalette::TertiaryMid]];}

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

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

table {border:2px solid [[ColorPalette::TertiaryDark]];}
th, thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
td, 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]];}

.backstageSelTab {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]];}
#backstagePanel {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Background]]; opacity:0.5; filter:'alpha(opacity:50)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

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

h1,h2,h3,h4,h5 {font-weight:bold; text-decoration:none; padding-left:0.4em;}
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 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 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:0em 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 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

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

#messageArea {position:absolute; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:200;}
*[id='messageArea'] {position:fixed !important; z-index:200;}
.messageToolbar {display:block; text-align:right;}
#messageArea a {text-decoration:underline;}

.popup {z-index:100; font-size:.9em; padding:0.2em; list-style:none; margin:0;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}

.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.popup li.disabled {padding:0.2em;}
.popup li a {display:block; padding:0.2em;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 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 0em 14em;}

.toolbar {text-align:right; font-size:.9em; visibility:hidden;}
.selected .toolbar {visibility:visible;}

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

.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;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 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;}

table {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer 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 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

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

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

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

.cascade {font-size:1.1em; position:absolute; overflow:hidden;}

#backstage {position:absolute; z-index:100; width:100%;}
#backstageTabs {visibility:hidden; position:relative; margin:0.5em 3em 0.2em 3em; font-size:1.1em; background:none; text-align:right;}
#backstageTabs a {font-weight:bold; padding:0.2em 0.5em 0.2em 0.5em;}
#backstagePanel {display:none; position:relative; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:50; position:absolute; width:100%; height:100px;}
/*}}}*/
/***
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 use a logographic writing system and 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;}

.htmlarea .toolbarHA table {border:1px solid ButtonFace; margin:0em 0em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<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='storyDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler permalink references jump'></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 +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></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>
<!--}}}-->
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
<<option chkGenerateAnRssFeed>> GenerateAnRssFeed
<<option chkOpenInNewWindow>> OpenLinksInNewWindow
<<option chkSaveEmptyTemplate>> SaveEmptyTemplate
<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close
^^(override with Control or other modifier key)^^
<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP
<<option chkForceMinorUpdate>> Treat edits as MinorChanges by preserving date and time
^^(override with Shift key when clicking 'done' or by pressing Ctrl-Shift-Enter^^
<<option chkConfirmDelete>> ConfirmBeforeDeleting
Maximum number of lines in a tiddler edit box: <<option txtMaxEditRows>>
Folder name for backup files: <<option txtBackupFolder>>
<<option chkInsertTabs>> Use tab key to insert tab characters instead of jumping to next field
<<option txtFileSystemCharSet>> Character set to use for saving (Firefox/Mozilla only)
/***\n|Name|Plugin: arXiv Links|\n|Created by|BobMcElrath|\n|Email|my first name at my last name dot org|\n|Location|http://bob.mcelrath.org/tiddlyjsmath-2.0.3.html|\n|Version|1.0|\n|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] &ge; 2.0.3|\n!Description\nThis formatting plugin will render links to the [[arXiv|http://www.arxiv.org]] preprint system. If you type a paper reference such as hep-ph/0509024, it will be rendered as an external link to the abstract of that paper.\n!Installation\nAdd this tiddler to your tiddlywiki, and give it the {{{systemConfig}}} tag.\n!History\n* 1-Feb-06, version 1.0, Initial release\n!Code\n***/\n//{{{\nconfig.formatters.push({\n name: "arXivLinks",\n match: "\s\sb(?:astro-ph|cond-mat|hep-ph|hep-th|hep-lat|gr-qc|nucl-ex|nucl-th|quant-ph|(?:cs|math|nlin|physics|q-bio)(?:\s\s.[A-Z]{2})?)/[0-9]{7}\s\sb",\n element: "a",\n handler: function(w) {\n var e = createExternalLink(w.output, "http://arxiv.org/abs/"+w.matchText);\n e.target = "_blank"; // open in new window\n w.outputText(e,w.matchStart,w.nextMatch);\n }\n});\n//}}}\n\n
/***\n|Name|Plugin: jsMath|\n|Created by|BobMcElrath|\n|Email|my first name at my last name dot org|\n|Location|http://bob.mcelrath.org/tiddlyjsmath.html|\n|Version|1.5.1|\n|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] &ge; 2.0.3, [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] &ge; 3.0|\n!Description\nLaTeX is the world standard for specifying, typesetting, and communicating mathematics among scientists, engineers, and mathematicians. For more information about LaTeX itself, visit the [[LaTeX Project|http://www.latex-project.org/]]. This plugin typesets math using [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]], which is an implementation of the TeX math rules and typesetting in javascript, for your browser. Notice the small button in the lower right corner which opens its control panel.\n!Installation\nIn addition to this plugin, you must also [[install jsMath|http://www.math.union.edu/~dpvc/jsMath/download/jsMath.html]] on the same server as your TiddlyWiki html file. If you're using TiddlyWiki without a web server, then the jsMath directory must be placed in the same location as the TiddlyWiki html file.\n\nI also recommend modifying your StyleSheet use serif fonts that are slightly larger than normal, so that the math matches surrounding text, and \s\ssmall fonts are not unreadable (as in exponents and subscripts).\n{{{\n.viewer {\n line-height: 125%;\n font-family: serif;\n font-size: 12pt;\n}\n}}}\n\nIf you had used a previous version of [[Plugin: jsMath]], it is no longer necessary to edit the main tiddlywiki.html file to add the jsMath <script> tag. [[Plugin: jsMath]] now uses ajax to load jsMath.\n!History\n* 11-Nov-05, version 1.0, Initial release\n* 22-Jan-06, version 1.1, updated for ~TW2.0, tested with jsMath 3.1, editing tiddlywiki.html by hand is no longer necessary.\n* 24-Jan-06, version 1.2, fixes for Safari, Konqueror\n* 27-Jan-06, version 1.3, improved error handling, detect if ajax was already defined (used by ZiddlyWiki)\n* 12-Jul-06, version 1.4, fixed problem with not finding image fonts\n* 26-Feb-07, version 1.5, fixed problem with Mozilla "unterminated character class".\n* 27-Feb-07, version 1.5.1, Runs compatibly with TW 2.1.0+, by Bram Chen\n!Examples\n|!Source|!Output|h\n|{{{The variable $x$ is real.}}}|The variable $x$ is real.|\n|{{{The variable \s(y\s) is complex.}}}|The variable \s(y\s) is complex.|\n|{{{This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.}}}|This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.|\n|{{{This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.}}}|This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.|\n|{{{Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation} }}}|Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation}|\n|{{{Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} }}}|Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} |\n|{{{I spent \s$7.38 on lunch.}}}|I spent \s$7.38 on lunch.|\n|{{{I had to insert a backslash (\s\s) into my document}}}|I had to insert a backslash (\s\s) into my document|\n!Code\n***/\n//{{{\n\n// AJAX code adapted from http://timmorgan.org/mini\n// This is already loaded by ziddlywiki...\nif(typeof(window["ajax"]) == "undefined") {\n ajax = {\n x: function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}},\n gets: function(url){var x=ajax.x();x.open('GET',url,false);x.send(null);return x.responseText}\n }\n}\n\n// Load jsMath\njsMath = {\n Setup: {inited: 1}, // don't run jsMath.Setup.Body() yet\n Autoload: {root: new String(document.location).replace(/[^\s/]*$/,'jsMath/')} // URL to jsMath directory, change if necessary\n};\nvar jsMathstr;\ntry {\n jsMathstr = ajax.gets(jsMath.Autoload.root+"jsMath.js");\n} catch(e) {\n alert("jsMath was not found: you must place the 'jsMath' directory in the same place as this file. "\n +"The error was:\sn"+e.name+": "+e.message);\n throw(e); // abort eval\n}\ntry {\n window.eval(jsMathstr);\n} catch(e) {\n alert("jsMath failed to load. The error was:\sn"+e.name + ": " + e.message + " on line " + e.lineNumber);\n}\njsMath.Setup.inited=0; // allow jsMath.Setup.Body() to run again\n\n// Define wikifers for latex\nconfig.formatterHelpers.mathFormatHelper = function(w) {\n var e = document.createElement(this.element);\n e.className = this.className;\n var endRegExp = new RegExp(this.terminator, "mg");\n endRegExp.lastIndex = w.matchStart+w.matchLength;\n var matched = endRegExp.exec(w.source);\n if(matched) {\n var txt = w.source.substr(w.matchStart+w.matchLength, \n matched.index-w.matchStart-w.matchLength);\n if(this.keepdelim) {\n txt = w.source.substr(w.matchStart, matched.index+matched[0].length-w.matchStart);\n }\n e.appendChild(document.createTextNode(txt));\n w.output.appendChild(e);\n w.nextMatch = endRegExp.lastIndex;\n }\n}\n\nconfig.formatters.push({\n name: "displayMath1",\n match: "\s\s\s$\s\s\s$",\n terminator: "\s\s\s$\s\s\s$\s\sn?", // 2.0 compatibility\n termRegExp: "\s\s\s$\s\s\s$\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nconfig.formatters.push({\n name: "inlineMath1",\n match: "\s\s\s$", \n terminator: "\s\s\s$", // 2.0 compatibility\n termRegExp: "\s\s\s$",\n element: "span",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nvar backslashformatters = new Array(0);\n\nbackslashformatters.push({\n name: "inlineMath2",\n match: "\s\s\s\s\s\s\s(",\n terminator: "\s\s\s\s\s\s\s)", // 2.0 compatibility\n termRegExp: "\s\s\s\s\s\s\s)",\n element: "span",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nbackslashformatters.push({\n name: "displayMath2",\n match: "\s\s\s\s\s\s\s[",\n terminator: "\s\s\s\s\s\s\s]\s\sn?", // 2.0 compatibility\n termRegExp: "\s\s\s\s\s\s\s]\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nbackslashformatters.push({\n name: "displayMath3",\n match: "\s\s\s\sbegin\s\s{equation\s\s}",\n terminator: "\s\s\s\send\s\s{equation\s\s}\s\sn?", // 2.0 compatibility\n termRegExp: "\s\s\s\send\s\s{equation\s\s}\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\n// These can be nested. e.g. \sbegin{equation} \sbegin{array}{ccc} \sbegin{array}{ccc} ...\nbackslashformatters.push({\n name: "displayMath4",\n match: "\s\s\s\sbegin\s\s{eqnarray\s\s}",\n terminator: "\s\s\s\send\s\s{eqnarray\s\s}\s\sn?", // 2.0 compatibility\n termRegExp: "\s\s\s\send\s\s{eqnarray\s\s}\s\sn?",\n element: "div",\n className: "math",\n keepdelim: true,\n handler: config.formatterHelpers.mathFormatHelper\n});\n\n// The escape must come between backslash formatters and regular ones.\n// So any latex-like \scommands must be added to the beginning of\n// backslashformatters here.\nbackslashformatters.push({\n name: "escape",\n match: "\s\s\s\s.",\n handler: function(w) {\n w.output.appendChild(document.createTextNode(w.source.substr(w.matchStart+1,1)));\n w.nextMatch = w.matchStart+2;\n }\n});\n\nconfig.formatters=backslashformatters.concat(config.formatters);\n\nwindow.wikify = function(source,output,highlightRegExp,tiddler)\n{\n if(source && source != "") {\n if(version.major == 2 && version.minor > 0) {\n var wikifier = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);\n wikifier.subWikifyUnterm(output);\n } else {\n var wikifier = new Wikifier(source,formatter,highlightRegExp,tiddler);\n wikifier.subWikify(output,null);\n }\n jsMath.ProcessBeforeShowing();\n }\n}\n//}}}\n
/***\n|Name|Plugin: Scientific Notation|\n|Created by|BobMcElrath|\n|Email|my first name at my last name dot org|\n|Location|http://bob.mcelrath.org/tiddlyjsmath-2.0.3.html|\n|Version|1.0|\n|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] &ge; 2.0.3, [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] &ge; 3.0, [[Plugin: jsMath]]|\n!Description\nThis plugin will render numbers expressed in scientific notation, such as {{{3.5483e12}}} using the jsMath plugin to display it in an intuitive way such as 3.5483e12. You may customize the number of significant figures displayed, as well as "normalize" numbers so that {{{47392.387e9}}} is displayed as 47392.387e9.\n!Installation\nInstall the Requirements, above, add this tiddler to your tiddlywiki, and give it the {{{systemConfig}}} tag.\n!History\n* 1-Feb-06, version 1.0, Initial release\n!Code\n***/\n//{{{\nconfig.formatters.push({\n name: "scientificNotation",\n match: "\s\sb[0-9]+\s\s.[0-9]+[eE][+-]?[0-9]+\s\sb",\n element: "span",\n className: "math",\n normalize: true, // set to 'true' to convert numbers to X.XXX \stimes 10^{y}\n sigfigs: 3, // with this many digits in the mantissa\n handler: function(w) {\n var snRegExp = new RegExp("\s\sb([0-9]+(?:\s\s.[0-9]+)?)[eE]([-0-9+]+)\s\sb");\n var mymatch = snRegExp.exec(w.matchText);\n var mantissa = mymatch[1];\n var exponent = parseInt(mymatch[2]);\n // normalize the number.\n if(this.normalize) {\n mantissa = parseFloat(mantissa);\n while(mantissa > 10.0) {\n mantissa = mantissa / 10.0;\n exponent++; \n }\n while(mantissa < 1.0) {\n mantissa = mantissa * 10.0;\n exponent--;\n }\n var sigfigsleft = this.sigfigs;\n mantissa = parseInt(mantissa) + "." + (Math.round(Math.pow(10,this.sigfigs-1)*mantissa)+"").substr(1,this.sigfigs-1);\n }\n var e = document.createElement(this.element);\n e.className = this.className;\n if(exponent == 0) {\n e.appendChild(document.createTextNode(mantissa));\n } else {\n e.appendChild(document.createTextNode(mantissa + "\s\stimes 10^{" + exponent + "}"));\n }\n w.output.appendChild(e);\n }\n});\n//}}}\n
/***\n|''Name:''|Plugin: Syntaxify|\n|''Description:''|Performs syntax highlighting on CSS, JavaScript, and HTML/XML|\n|''Version:''|1.2|\n|''Date:''|January 27, 2007|\n|''Source:''|http://bob.mcelrath.org/syntaxify.html|\n|''Author:''|BobMcElrath|\n|''Email:''|my first name at my last name dot org|\n|''License:''|[[GPL open source license|http://www.gnu.org/licenses/gpl.html]]|\n|''~CoreVersion:''|2.0.0|\n!Description\nThis plugin will syntax highlight ("pretty-print") source code used by TiddlyWiki. To activate CSS markup, enclose the code in the CSS code in the delimiters \n<html><code>\n/&#42;{{{&#42;/<br/>\n/&#42; CSS code here &#42/<br/>\n/&#42;}}}&#42;/<br/>\n</code></html>\nTo activate XML markup, enclose your HTML/XML in the delimiters\n<html><code>\n&lt;!--{{{--&gt;<br/>\n&lt;!-- XML/HTML code here --&gt;<br/>\n&lt;!--}}}--&gt;<br/>\n</code></html>\nAnd to activate JavaScript markup, enclose your code in the delimiters\n<html><code>\n//{{{<br/>\n// JavaScript code here.<br/>\n//}}}<br/>\n</code></html>\n\nIn addition, all of the above languages can be syntaxified by using the custom class formatter\n<html><code>\n{{foo{<br/>\n code for language "foo" here<br/>\n}}}<br/>\n</code></html>\nwhere {{{foo}}} is the name of the language: {{{css}}}, {{{javascript}}}, or {{{xml}}}. This plugin can be extended with new languages by creating a data structure like those below (in {{{syntaxify.languages}}} and then calling {{{syntaxify.addLanguages}}}.\n!History\n* 1.2 Release\n** Now syntaxifies in-line style code (thanks [[Conal Elliott|http://conal.net]]).\n** Fix multi-line comments in CSS.\n** Consolidate customClassesHelper and monospacedByLineHelper which had lots of duplicated code.\n** Fix autoLinkWikiWords bug when using custom classes and the tag formatter.\n** Fix compatability problems between 2.1 and 2.0 (termRegExp vs. terminator)\n* 1.1 Release\n** Rewrite things to make it easier to add new languages.\n** Override customClasses to syntaxify when the class corresponds to a known language.\n** TiddlyWiki 2.1 beta compatibility\n* 1.0.2 Release\n** Don't use {{{class}}} as a variable name, dummy.\n* 1.0.1 Release\n** Simplified stylesheet and removed line numbering.\n** Fixed highlighting when <html><code>&#42;/</code></html> appeared at the beginning of a line.\n** Fixed blank lines not being shown if {{{list-style-type: none}}} was turned on.\n** Small speedups\n* 1.0.0 Initial Release\n!Code\n***/\n//{{{\nversion.extensions.Syntaxify = { major: 1, minor: 2, revision: 0, date: new Date("2007","01","27"),\n source: "http://bob.mcelrath.org/syntaxify.html"\n};\n\nvar syntaxify = {};\n\nsyntaxify.regexpSpace = new RegExp(" ", "mg");\nsyntaxify.regexpTab = new RegExp("\st", "mg");\nsyntaxify.regexpAmp = new RegExp("&","mg");\nsyntaxify.regexpLessThan = new RegExp("<","mg");\nsyntaxify.regexpGreaterThan = new RegExp(">","mg");\nsyntaxify.regexpQuote = new RegExp("\s"","mg");\nsyntaxify.regexpDoubleQuotedString = new RegExp("\s"(?:\s\s\s\s.|[^\s\s\s\s\s"])*?\s"", "mg");\nsyntaxify.regexpSingleQuotedString = new RegExp("'(?:\s\s\s\s.|[^\s\s\s\s'])*?'", "mg");\nsyntaxify.regexpCSingleLineComment = new RegExp('//.*$', "g");\nsyntaxify.regexpCMultiLineComment \n = new RegExp('/\s\s*(?:(?:.|(?:\s\sr)?\s\sn)(?!\s\s*/))*(?:.|(?:\s\sr)?\s\sn)?\s\s*/',"mg");\nString.prototype.htmlListMono = function() {\n return(this.replace(syntaxify.regexpAmp,"&amp;")\n .replace(syntaxify.regexpLessThan,"&lt;")\n .replace(syntaxify.regexpGreaterThan,"&gt;")\n .replace(syntaxify.regexpQuote,"&quot;")\n .replace(syntaxify.regexpSpace,"&nbsp;")\n .replace(syntaxify.regexpTab,"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"));\n}\n\nsyntaxify.handleSpanClass = function(w) {\n var match, lastPos=0;\n if(this.lookahead) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg"); \n lookaheadRegExp.lastIndex = w.matchStart; \n var lookaheadMatch = lookaheadRegExp.exec(w.source); \n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) { \n createTiddlyText(w.output, lookaheadMatch[1]);\n var e = createTiddlyElement(w.output, "span", null, this.name);\n e.innerHTML = this.hasSpaces?lookaheadMatch[2].htmlListMono():lookaheadMatch[2];\n }\n } else {\n while((match = regexpNewLine.exec(w.matchText)) != null) { // multi-line\n var alt = "";\n var e = createTiddlyElement(w.output, "span", null, this.name);\n e.innerHTML = this.hasSpaces?w.matchText.substr(lastPos,match.index-lastPos).htmlListMono()\n :w.matchText.substr(lastPos,match.index-lastPos);\n if(w.output.className != "alt") alt = "alt";\n w.output = createTiddlyElement(w.output.parentNode, "li", null, alt);\n lastPos = match.index;\n } \n var e = createTiddlyElement(w.output, "span", null, this.name);\n e.innerHTML = this.hasSpaces?w.matchText.substr(lastPos, w.matchText.length-lastPos).htmlListMono()\n :w.matchText.substr(lastPos, w.matchText.length-lastPos)\n }\n}\n\n/* This is a shadow tiddler. Do not edit it here. Instead, open the tiddler StyleSheetSyntaxify \n * and edit it instead. (go to the toolbar on the right and select "More"->"Shadowed") */\nconfig.shadowTiddlers.StyleSheetSyntaxify = "/*{{{*/\sn"\n+".viewer .syntaxify {\sn"\n+" font-family: monospace;\sn"\n+"}\sn"\n+".viewer div.syntaxify {\sn"\n+" background-color: #ffc;\sn"\n+" border: 1px solid #fe8;\sn"\n+" padding: 0.5em;\sn"\n+" margin: 0 0 1em 0.5em;\sn"\n+" font-size: 1.2em;\sn"\n+" overflow: auto;\sn"\n+"}\sn\sn"\n+".syntaxify ol {\sn"\n+" margin: 0;\sn"\n+" padding: 1px;\sn"\n+" color: #2B91AF;\sn"\n+"}\sn\sn"\n+".syntaxify ol li {\sn"\n+" background-color: #ffc;\sn"\n+" color: black;\sn"\n+" list-style-type: none;\sn"\n+"/* An alternate style to enable line numbering -- remove the line above and uncomment below if desired */\sn"\n+"/*\sn"\n+" list-style-type: 1;\sn"\n+" border-left: 3px solid #fe8;\sn"\n+" margin-left: 3.5em;\sn"\n+"*/\sn"\n+"}\sn\sn"\n+"/* To disable alternating lines having a different colors, comment out the following line. */\sn"\n+".syntaxify ol li.alt { background-color: #ffe; }\sn\sn"\n+".syntaxify ol li span { color: black; }\sn"\n+".syntaxify .singleLineComments { color: green; }\sn"\n+".syntaxify .multiLineComments { color: green; }\sn"\n+".syntaxify .multiLineComments1 { color: red; }\sn"\n+".syntaxify .tag { font-weight: bold; color: blue; }\sn"\n+".syntaxify .tagname { font-weight: bold; color: black; }\sn"\n+".syntaxify .attribute { color: rgb(127,0,85); }\sn"\n+".syntaxify .value { color: rgb(42,0,255); }\sn"\n+".syntaxify .keywords { color: #006699; }\sn"\n+".syntaxify .keywords1 { color: red; }\sn"\n+".syntaxify .delimiters { color: maroon; }\sn"\n+".syntaxify .delimiters1 { color: olive; }\sn"\n+".syntaxify .literals { color: maroon; }\sn"\n+".syntaxify .literals1 { color: blue; }\sn"\n+".syntaxify .literals2 { color: blue; }\sn"\n+".syntaxify .literals3 { color: #129; }\sn"\n+".syntaxify .identifiers { font-weight: bold; color: blue; }\sn"\n+".syntaxify .identifiers1 { font-weight: bold; color: black; }\sn"\n+"/*}}}*/";\n\nstore.addNotification("StyleSheetSyntaxify",refreshStyles);\nconfig.shadowTiddlers.ViewTemplate = "<!--{{{-->\sn"+config.shadowTiddlers.ViewTemplate+"\sn<!--}}}-->";\nconfig.shadowTiddlers.EditTemplate = "<!--{{{-->\sn"+config.shadowTiddlers.EditTemplate+"\sn<!--}}}-->";\nconfig.shadowTiddlers.PageTemplate = "<!--{{{-->\sn"+config.shadowTiddlers.PageTemplate+"\sn<!--}}}-->";\nconfig.shadowTiddlers.StyleSheetPrint = "/*{{{*/\sn"+config.shadowTiddlers.StyleSheetPrint+"\sn/*}}}*/";\n\nsyntaxify.commonFormatters = [\n{ name: "spaces",\n match: "[ \s\st]+",\n handler: function(w) {\n w.output.innerHTML += w.matchText.htmlListMono();\n }\n},{ name: "newline",\n match: "\s\sn",\n handler: function(w) {\n var alt = ""\n if(w.output.className != "alt") alt = "alt";\n if(!w.output.hasChildNodes()) w.output.innerHTML = "&nbsp;";\n w.output = createTiddlyElement(w.output.parentNode, "li", null, alt);\n }\n}];\n\nsyntaxify.xmlTagFormatters = syntaxify.commonFormatters;\nsyntaxify.xmlTagFormatters = syntaxify.xmlTagFormatters.concat([\n{ name: "tagname",\n match: '<[/\s\s?]?\s\ss*(?:[\s\sw-\s\s.]+)',\n lookahead: '(<[/\s\s?]?\s\ss*)([\s\sw-\s\s.]+)',\n handler: syntaxify.handleSpanClass\n},{\n name: "attribute-value",\n match: '[\s\sw-\s.]+(?:\s\ss*=\s\ss*"[^"]*?"|\s'[^\s']*?\s'|\s\sw+)?',\n lookahead: '([\s\sw-\s.]+)(?:(\s\ss*=\s\ss*)("[^"]*?"|\s'[^\s']*?\s'|\s\sw+))?',\n handler: function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg"); \n lookaheadRegExp.lastIndex = w.matchStart; \n var lookaheadMatch = lookaheadRegExp.exec(w.source); \n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) { \n var e = createTiddlyElement(w.output, "span", null, "attribute");\n e.innerHTML = lookaheadMatch[1];\n if(lookaheadMatch[2]) {\n var e = createTiddlyElement(w.output, "span");\n e.innerHTML = lookaheadMatch[2].htmlListMono();\n e = createTiddlyElement(w.output, "span", null, "value");\n e.innerHTML = lookaheadMatch[3].htmlListMono();\n }\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length; \n }\n}]);\n\n\n// A rather huge data structure to store languages. Add to it!\nsyntaxify.languages = {\njavascript: {\n singleLineComments: [[syntaxify.regexpCSingleLineComment.source]],\n multiLineComments: [[syntaxify.regexpCMultiLineComment.source]],\n keywords: [['abstract', 'boolean', 'break', 'byte', 'case', 'catch', 'char',\n 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do',\n 'double', 'else', 'enum', 'export', 'extends', 'false', 'final',\n 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements',\n 'import', 'in', 'instanceof', 'int', 'interface', 'long', 'native',\n 'new', 'null', 'package', 'private', 'protected', 'public', 'return',\n 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw',\n 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void',\n 'volatile', 'while', 'with']\n ],\n literals: [\n [syntaxify.regexpSingleQuotedString.source],\n [syntaxify.regexpDoubleQuotedString.source],\n ["\s\sb\s\sd+(?:\s\s.\s\sd+(?:[eE][\s\s+-]\s\sd+)?)?\s\sb"] // Numbers\n ],\n delimiters: [["[\s\s{\s\s}]"],["[\s\s(\s\s)]"],["[\s\s[\s\s]]"]]\n}, \ncss: {\n multiLineComments: [[syntaxify.regexpCMultiLineComment.source]],\n keywords: [\n // Keywords appearing on the LHS of expressions\n ['ascent', 'azimuth', 'background-attachment', 'background-color',\n 'background-image', 'background-position', 'background-repeat',\n 'background', 'baseline', 'bbox', 'border-collapse', 'border-color',\n 'border-spacing', 'border-style', 'border-top', 'border-right',\n 'border-bottom', 'border-left', 'border-top-color',\n 'border-right-color', 'border-bottom-color', 'border-left-color',\n 'border-top-style', 'border-right-style', 'border-bottom-style',\n 'border-left-style', 'border-top-width', 'border-right-width',\n 'border-bottom-width', 'border-left-width', 'border-width', 'border',\n 'bottom', 'cap-height', 'caption-side', 'centerline', 'clear', 'clip',\n 'color', 'content', 'counter-increment', 'counter-reset', 'cue-after',\n 'cue-before', 'cue', 'cursor', 'definition-src', 'descent',\n 'direction', 'display', 'elevation', 'empty-cells', 'float',\n 'font-size-adjust', 'font-family', 'font-size', 'font-stretch',\n 'font-style', 'font-variant', 'font-weight', 'font', 'height', 'left',\n 'letter-spacing', 'line-height', 'list-style-image',\n 'list-style-position', 'list-style-type', 'list-style', 'margin-top',\n 'margin-right', 'margin-bottom', 'margin-left', 'margin',\n 'marker-offset', 'marks', 'mathline', 'max-height', 'max-width',\n 'min-height', 'min-width', 'orphans', 'outline-color',\n 'outline-style', 'outline-width', 'outline', 'overflow', 'padding-top',\n 'padding-right', 'padding-bottom', 'padding-left', 'padding', 'page',\n 'page-break-after', 'page-break-before', 'page-break-inside', 'pause',\n 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'play-during',\n 'position', 'quotes', 'richness', 'right', 'size', 'slope', 'src',\n 'speak-header', 'speak-numeral', 'speak-punctuation', 'speak',\n 'speech-rate', 'stemh', 'stemv', 'stress', 'table-layout',\n 'text-align', 'text-decoration', 'text-indent', 'text-shadow',\n 'text-transform', 'unicode-bidi', 'unicode-range', 'units-per-em',\n 'vertical-align', 'visibility', 'voice-family', 'volume',\n 'white-space', 'widows', 'width', 'widths', 'word-spacing', 'x-height',\n 'z-index'],\n // Treat !important as a different kind of keyword\n ["important"]\n ],\n literals: [\n // Literals appearing on the RHS of expressions\n ['above', 'absolute', 'all', 'always', 'aqua', 'armenian', 'attr',\n 'aural', 'auto', 'avoid', 'baseline', 'behind', 'below',\n 'bidi-override', 'black', 'blink', 'block', 'blue', 'bold', 'bolder',\n 'both', 'bottom', 'braille', 'capitalize', 'caption', 'center',\n 'center-left', 'center-right', 'circle', 'close-quote', 'code',\n 'collapse', 'compact', 'condensed', 'continuous', 'counter',\n 'counters', 'crop', 'cross', 'crosshair', 'cursive', 'dashed',\n 'decimal', 'decimal-leading-zero', 'default', 'digits', 'disc',\n 'dotted', 'double', 'embed', 'embossed', 'e-resize', 'expanded',\n 'extra-condensed', 'extra-expanded', 'fantasy', 'far-left',\n 'far-right', 'fast', 'faster', 'fixed', 'format', 'fuchsia', 'gray',\n 'green', 'groove', 'handheld', 'hebrew', 'help', 'hidden', 'hide',\n 'high', 'higher', 'icon', 'inline-table', 'inline', 'inset', 'inside',\n 'invert', 'italic', 'justify', 'landscape', 'large', 'larger',\n 'left-side', 'left', 'leftwards', 'level', 'lighter', 'lime',\n 'line-through', 'list-item', 'local', 'loud', 'lower-alpha',\n 'lowercase', 'lower-greek', 'lower-latin', 'lower-roman', 'lower',\n 'low', 'ltr', 'marker', 'maroon', 'medium', 'message-box', 'middle',\n 'mix', 'move', 'narrower', 'navy', 'ne-resize', 'no-close-quote',\n 'none', 'no-open-quote', 'no-repeat', 'normal', 'nowrap', 'n-resize',\n 'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset',\n 'outside', 'overline', 'pointer', 'portrait', 'pre', 'print',\n 'projection', 'purple', 'red', 'relative', 'repeat', 'repeat-x',\n 'repeat-y', 'ridge', 'right', 'right-side', 'rightwards', 'rtl',\n 'run-in', 'screen', 'scroll', 'semi-condensed', 'semi-expanded',\n 'separate', 'se-resize', 'show', 'silent', 'silver', 'slower', 'slow',\n 'small', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid',\n 'speech', 'spell-out', 'square', 's-resize', 'static', 'status-bar',\n 'sub', 'super', 'sw-resize', 'table-caption', 'table-cell',\n 'table-column', 'table-column-group', 'table-footer-group',\n 'table-header-group', 'table-row', 'table-row-group', 'teal',\n 'text-bottom', 'text-top', 'thick', 'thin', 'top', 'transparent',\n 'tty', 'tv', 'ultra-condensed', 'ultra-expanded', 'underline',\n 'upper-alpha', 'uppercase', 'upper-latin', 'upper-roman', 'url',\n 'visible', 'wait', 'white', 'wider', 'w-resize', 'x-fast', 'x-high',\n 'x-large', 'x-loud', 'x-low', 'x-slow', 'x-small', 'x-soft',\n 'xx-large', 'xx-small', 'yellow'],\n // Font literals\n ['[mM]ono(?:space)?', '[tT]ahoma', '[vV]erdana', '[aA]rial',\n '[hH]elvetica', '[sS]ans(?:-serif)?', '[sS]erif', '[Cc]ourier'],\n // Measurement literals\n ["\s\sb\s\sd+(?:\s\s.\s\sd+)?(?:em|pt|px|cm|in|pc|mm)\s\sb"],\n // Color literals\n ['(?:\s\s#[a-fA-F0-9]{6}\s\sb|\s\s#[a-fA-F0-9]{3}\s\sb|rgb\s\s(\s\ss*\s\sd+\s\ss*,\s\ss*\s\sd+\s\ss*,\s\ss*\s\sd+\s\ss*\s\s))']\n ],\n identifiers: [["\s\s.[a-zA-Z_]\s\sw*"],["\s\s#[a-zA-Z_]\s\sw*"]],\n delimiters: [["[\s\s{\s\s}]"]]\n}, \nxml: {\n multiLineComments: [\n ["<[^!>]*!--\s\ss*(?:(?:.|(?:\s\sr)?\s\sn)(?!--))*?(?:(?:.|(?:\s\sr)?\s\sn)(?=--))?\s\ss*--[^>]*?>"],\n ['<\s\s!\s\s[[\s\sw\s\ss]*?\s\s[(?:(?:.|(?:\s\sr)?\s\sn)(?!\s\s]\s\s]>))*?(?:(?:.|(?:\s\sr)?\s\sn)(?=\s\s]\s\s]>))?\s\s]\s\s]>']\n ],\n customFormatters: [{\n name: "tag",\n match: "<[/\s\s?]?[^>]*?>",\n handler: function(w) {\n var formatter = new Formatter(syntaxify.xmlTagFormatters);\n var wikifier = new Wikifier(w.matchText, formatter, w.highlightRegExp, w.tiddler);\n wikifier.subWikify(w.output, null);\n }\n }]\n}};\n\nconfig.formatterHelpers.customClassesHelper = function(w) {\n var lookaheadRegExp = (typeof(this.lookaheadRegExp) == "undefined")?(new RegExp(this.lookahead,"mg")):this.lookaheadRegExp;\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source);\n var language = (typeof(this.language) == "undefined")?lookaheadMatch[1]:this.language;\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart)\n {\n var isByLine = (typeof(this.byLine) == "undefined")?(lookaheadMatch[2] == "\sn"):this.byLine;\n var p = createTiddlyElement(w.output,isByLine ? "div" : "span",null,language);\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n if(typeof(syntaxify.formatters[language]) != "undefined") {\n var d = createTiddlyElement(w.output,isByLine?"div":"span",\n null,"syntaxify "+language);\n var formatter = new Formatter(syntaxify.formatters[language]);\n if(typeof(this.termRegExp) == "undefined") {\n var text = lookaheadMatch[1]; \n } else {\n this.termRegExp.lastIndex = w.nextMatch;\n var terminatorMatch = this.termRegExp.exec(w.source);\n var text = w.source.substr(w.nextMatch, terminatorMatch.index-w.nextMatch);\n }\n if(config.browser.isIE) text = text.replace(/\sn/g,"\sr"); \n if (isByLine) {\n var l = createTiddlyElement(d,"ol");\n var li = createTiddlyElement(l,"li");\n var wikifier = new Wikifier(text, formatter, w.highlightRegExp, w.tiddler);\n wikifier.subWikify(li, null);\n if(!l.childNodes[l.childNodes.length-1].hasChildNodes())\n l.removeChild(l.childNodes[l.childNodes.length-1]);\n } else {\n var wikifier = new Wikifier(text,formatter,w.highlightRegExp,w.tiddler);\n wikifier.subWikify(d, null);\n }\n if(typeof(this.termRegExp) != "undefined")\n w.nextMatch = terminatorMatch.index + terminatorMatch[0].length;\n else\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length; \n } else {\n if(isByLine)\n var e = createTiddlyElement(w.output,"code",null,null,text); \n else\n var e = createTiddlyElement(w.output,"pre",null,null,text); \n }\n }\n}\n\nsyntaxify.formatters = {};\n\nsyntaxify.addLanguages = function(languages) {\n for(lang in languages) {\n syntaxify.formatters[lang] = new Array();\n for(var i=0;i<syntaxify.commonFormatters.length;i++)\n syntaxify.formatters[lang].push(syntaxify.commonFormatters[i]);\n var addSpanClass = function(rule, spaces, wordbreak) {\n if(typeof(languages[lang][rule]) != "undefined") {\n for(var j=0;j<languages[lang][rule].length;j++) {\n syntaxify.formatters[lang].push({\n name: rule+((j==0)?"":j),\n match: wordbreak?("(?:\s\sb"+languages[lang][rule][j].join("\s\sb|\s\sb")+"\s\sb)")\n :("(?:"+languages[lang][rule][j].join("|")+")"),\n hasSpaces: spaces,\n handler: syntaxify.handleSpanClass\n });\n }\n }\n };\n addSpanClass("singleLineComments", true, false);\n addSpanClass("multiLineComments", true, false);\n addSpanClass("keywords", false, true);\n addSpanClass("literals", true, false);\n addSpanClass("delimiters", false, false);\n addSpanClass("identifiers", false, false);\n if(typeof(languages[lang].customFormatters) != "undefined") \n syntaxify.formatters[lang] = syntaxify.formatters[lang].concat(languages[lang].customFormatters);\n }\n}\n\nsyntaxify.addLanguages(syntaxify.languages);\n\n// Override the several built-in TiddlyWiki language-specific <pre> formatters\nfor(var i=0;i<config.formatters.length;i++) { \n if(config.formatters[i].name == "monospacedByLineForPlugin") { \n config.formatters[i].language = "javascript";\n config.formatters[i].byLine = true;\n config.formatters[i].handler = config.formatterHelpers.customClassesHelper; \n } \n if(config.formatters[i].name == "monospacedByLineForCSS") { \n config.formatters[i].language = "css";\n config.formatters[i].byLine = true;\n config.formatters[i].handler = config.formatterHelpers.customClassesHelper; \n } \n if(config.formatters[i].name == "monospacedByLineForTemplate") { \n config.formatters[i].language = "xml";\n config.formatters[i].byLine = true;\n config.formatters[i].handler = config.formatterHelpers.customClassesHelper; \n } \n if(config.formatters[i].name == "customClasses") {\n config.formatters[i].handler = config.formatterHelpers.customClassesHelper; \n if(typeof(config.formatters[i].termRegExp) == "undefined")\n config.formatters[i].termRegExp = new RegExp(config.formatters[i].terminator, "mg");\n }\n}\n\n// make syntaxify reliably accessible from dependent plugins even under IE.\nconfig.macros.syntaxify = syntaxify;\n//}}}\n