<!--{{{-->
<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]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#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>>
Here you can find my small contributions to the TiddlyWiki community.

First, there are a few [[Plugins]]. Since I use almost exclusively the [[Mozilla Firefox|http://www.mozilla.com]] browser, there is no way I can assure that these plugins will work with any other browser. I suspect that some of them won't, particularly with the pathetic Internet Explorer. However, patches on this are welcome.

There is also a PortugueseTranslation for TiddlyWiki. It may be incomplete so any comments will be appreciated.

You can contact me at <<linkTo email ? psoares at math dot ist.utl.pt>>.
----
This work is licensed under a [[Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]].
/***
|''Name:''|BibTeXPlugin|
|''Description:''|Very incomplete BibTeX implementation to work with bibliographic references|
|''Author:''|Paulo Soares|
|''Version:''|1.5|
|''Date:''|2010-11-11|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Overrides''|Story.prototype.refreshTiddler|
|''Documentation:''|[[BibTeXPlugin Documentation|BibTeXPluginDoc]]|
|''License:''|[[Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.5.0|
***/
//{{{
if(!version.extensions.BibTeXPlugin) { //# ensure that the plugin is only installed once
version.extensions.BibTeXPlugin = {installed: true};

(function($) {
config.macros.cite = {
  noReference: "(??)",
  refreshTiddler: Story.prototype.refreshTiddler
};

config.macros.cite.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
  var pos, cmb = config.macros.bibliography;
  if(params.length==0) return;
  var entry = params[0];
  var args = paramString.parseParams(null,null,false);
  var title = getParam(args,"bibliography",null);
  if(title) {
    this.biblioTiddler = title;
  } else {title = this.biblioTiddler;}
  title = getParam(args,"thisBibliography",title);
  var format = getParam(args,"format",null);
  if(format) {
    this.format = format;
  } else {format = this.format;}
  format = getParam(args,"thisFormat",format);
  var argsArray = paramString.readMacroParams();
  var showAll = ($.inArray('showAll',argsArray) > -1);
  if(title && store.tiddlerExists(title)) var bib = cmb.extractEntry(title, entry);
  if(bib.content) {
    var entries = this.entries;
    if($.inArray(entry, entries)==-1) this.entries.push(entry);
    entries = this.entries;
    pos = $.inArray(entry, entries)+1;
    var author = cmb.processNames(bib.content.extract("author"), showAll);
    var year = bib.content.extract("year");
    var citation = format.replace("author", author);
    citation = citation.replace("year", year);
    citation = citation.replace("number", pos);
    wikify(citation, place);
  } else {
    wikify(this.noReference, place);
  }
}

Story.prototype.refreshTiddler = function(title,template,force){
  config.macros.cite.biblioTiddler = null;
  config.macros.cite.format = "author (year)";
  config.macros.cite.entries = [];
  var tiddler = config.macros.cite.refreshTiddler.apply(this,arguments);
  return tiddler;
}

config.macros.bibliography = {
   article: {fields: ["author", "year", "title", "journal", "volume", "pages"], format: "author (year). title. //journal// ''volume'', pages."},
   book: {fields: ["author", "year", "title", "publisher"], format: "author (year). //title//. publisher."},
   inproceedings: {fields: ["author", "year", "title", "editor", "booktitle", "pages", "publisher"], format: "author (year). title. In editor //booktitle//, pages. publisher."},
   incollection: {fields: ["author", "year", "title", "editor", "booktitle", "pages", "publisher"], format: "author (year). title. In editor //booktitle//, pages. publisher."},
   techreport: {fields: ["author", "year", "title", "institution"], format: "author (year). title. Technical report, institution."},
   manual: {fields: ["author", "year", "title", "organization"], format: "author (year). //title//. organization."},
   unpublished: {fields: ["author", "year", "title"], format: "author (year). //title//. Unpublished."}
};

config.macros.bibliography.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
        var cmc = config.macros.cite;
	var title = (cmc.biblioTiddler) ? cmc.biblioTiddler : params[0];
	if(!title || !store.tiddlerExists(title)) return;
        var argsArray = paramString.readMacroParams();
	var i, entryText;
	var entries = [];
	if($.inArray('showAll',argsArray) > -1) {
		entryText = this.extractAllEntries(title);
		for(i=0; i<entryText.length; i++) {
			entries[entries.length] = this.processEntry(entryText[i], i);
		}
	} else {
		for(i=0; i<cmc.entries.length; i++){
			entryText = this.extractEntry(title, cmc.entries[i]);
			if(entryText) {
                                entries[entries.length] = this.processEntry(entryText, i);
			}
		}
	}
	entries.sort();
        wikify(entries[0] , place);
	for (i=1; i < entries.length; i++) {
		wikify("\n\n" + entries[i] , place);
	}
	return true;
}

config.macros.bibliography.processNames = function(names, showAll) {
	var i, authors = names.split(" and ");
	var entry = authors[0];
	var numAuthors = authors.length;
	var fullEntry = entry;
	if (numAuthors==2) {
		entry += " and " + authors[1];
		fullEntry = entry;
	}
	if (numAuthors>2) {
		fullEntry = entry;
		for (i=1; i < numAuthors; i++) {
			if (i==numAuthors-1) {fullEntry += " and "} else {fullEntry += ", "};
			fullEntry += authors[i];
		}
		if(showAll) {entry = fullEntry;} else {entry += " et al.";}
	}
	return entry;
}

config.macros.bibliography.processEntry = function(entry, pos) {
  var field, text=entry.content;
  var fields={};
  fields.number = pos+1;
  var type = this[entry.type];
  var output = type.format;
  for(var i=0; i<type.fields.length; i++){
    field = type.fields[i];
    switch(field){
    case "author":
      fields.author = this.processNames(text.extract("author"), true);
      break;
    case "title":
      var url = text.extract("url");
      fields.title = text.extract("title");
      fields.title = (url=='') ? fields.title : "[[" + fields.title + "|" + url + "]]";
      break;
    case "editor":
      var editor = text.extract("editor");
      fields.editor = (editor=='') ? editor : this.processNames(editor,true) + " (Eds.), ";
      break;
    default:
      fields[field] = text.extract(field);
    }
    output = output.replace(field, fields[field]);
  }
  return output;
}

config.macros.bibliography.extractEntry = function(title,entry) {
    var bib = {type: null, content: null};
    var text = store.getTiddlerText(title);
    var re = new RegExp('\\s*@(\\w+?)\\{\\s*' + entry + '\\s*,\\s*(.[^@]+)\\}','mi');
    var field = text.match(re);
    if(field) {
        bib.type = field[1].toLowerCase();
        bib.content = field[2];
    }
    return bib;
}

config.macros.bibliography.extractAllEntries = function(title) {
    var bib, field, entries = [];
    var text = store.getTiddlerText(title);
    var bibs = text.match(/\s*@(\w+?)\{\s*(.[^@]+)\}/mgi);
    for(var i=0; i<bibs.length; i++){
        field=bibs[i].match(/\s*@(\w+?)\{\s*(.[^@]+)\}/mi);
        bib = {type: null, content: null};
        if(field) {
            bib.type = field[1].toLowerCase();
            bib.content = field[2];
            if(bib.type!='string' && bib.type!='preamble' && bib.type!='comment') entries.push(bib);
        }
    }
    return entries;
}

config.macros.bibliography.extractField = function(field) {
    var text = "";
    var re = new RegExp('\\s*'+field+'\\s*=\\s*[\\{|"]\\s*(.+?)\\s*[\\}|"]','mi');
    var fieldText = this.match(re);
    if(fieldText){
        text = fieldText[1].replace(/\{|\}/g,'');
        if(field!='url') text = text.replace(/-+/g,"—");
    }
    return text;
}

String.prototype.extract = config.macros.bibliography.extractField;

config.shadowTiddlers.BibTeXPluginDoc="The documentation is available [[here.|http://www.math.ist.utl.pt/~psoares/addons.html#BibTeXPluginDoc]]";
})(jQuery)
}
//}}}
!Description
Very incomplete (and personal) ~BibTeX implementation to work with bibliographic references.
!Usage
First of all, you need to dump your ~BibTeX entries in a tiddler, lets say [[Bibliography]]. The first macro that this plugin provides is {{{cite}}}. As the name suggests it is used to cite a reference such as {{{<<cite Nea:03>>}}} where {{{Nea:03}}} is a ~BibTeX key for a reference. By default it produces this: <<cite Nea:03 bibliography:Bibliography>>.

However, as this was the first citation in this tiddler you must include the name of the tiddler that contains the ~BibTeX entries like this {{{<<cite Nea:03 bibliography:Bibliography>>}}}.

The {{{cite}}} macro produces a full reference if there are at most two authors, otherwise it is abbreviated like this: <<cite Coda:97>>. If you want to force a full reference then you can use  the {{{showAll}}} parameter as in {{{<<cite Coda:97 showAll>>}}} which produces this: <<cite Coda:97 showAll>>.

You can also change the way references are displayed with the {{{format}}} parameter. A string can be passed to this parameter where {{{number}}} represents the order of the citation {{{author}}} stands for the authors and {{{year}}} represents the year of publication. So, for example, including {{{format:"([number] author, year)"}}} in a citation would produce citations formatted as <<cite Nea:03 format:"([number] author, year)">>. The format string can even include Tiddlywiki notation such as {{{format:"@@author@@, ''year''"}}} leading to <<cite Nea:03 format:"@@author@@, ''year''">>.

The {{{bibliography}}} and {{{format}}} parameters affect the reference in which they are used and all the following ones. If you need to restrict the scope to a single reference you can use the {{{thisBibliography}}} and {{{thisFormat}}} variants.
 
The production of a list of cited references is done with the {{{bibliography}}} macro. If you want to make a list of all your ~BibTeX entries then use {{{<<bibliography Bibliography showAll>>}}}.

<<bibliography>>
{{{
@TECHREPORT{AgaGel:03,
  author = {Agarwal, D. K. and Gelfand, A. E.},
  title = "Slice Gibbs sampling for simulation based fitting of spatial data models",
  institution = {University of Connecticut},
  year = {2003},
}

@ARTICLE{Ait:91,
  author = {Aitkin, M.},
  title = {Posterior Bayes factors},
  journal = {Journal of the Royal Statistical Society B},
  year = {1991},
  volume = {53},
  pages = {111-142},
}

@ARTICLE{AlbChi:93,
  author = {Albert, J. H. and Chib, S.},
  title = {Bayesian Analysis of Binary and Polychotomous Response Data},
  journal = {Journal of the American Statistical Association},
  year = {1993},
  volume = {88},
  number = {422},
  pages = {669-679},
}

@ARTICLE{BerChe:93,
  author = {Berger, J. O. and Chen, M.- H.},
  title = {Predicting retirement patterns: prediction for a multinomial distribution with constrained parameter space},
  journal = {The Statistician},
  year = {1993},
  volume = {42},
  pages = {427-443},
}

@ARTICLE{BesGre:93,
  author = {Besag, J. and Green, P. J.},
  title = {Spatial Statistics and Bayesian Computation},
  journal = {Journal of the Royal Statistical Society B},
  year = {1993},
  volume = {55},
  number = {1},
  pages = {25-37},
}

@MANUAL{Coda:97,
  title = {CODA - Convergence Diagnosis and Output Analysis software for Gibbs sampling output: Version 0.4},
  author = {Best, N. and Cowles, M. K. and Vines, K.},
  organization = {MRC Biostatistics Unit},
  address = {Cambrigde},
  year = {1997},
}

@TECHREPORT{Bro.R:95,
  author = {Brooks, S. and Roberts, G.},
  title = {Assessing convergence of Markov chain Monte Carlo algorithms},
  institution = {Department of Pure Mathematics and Mathematical Statistics, University of Cambridge},
  year = {1995},
  number = {12},
}

@ARTICLE{Car.C:95,
  author = {Carlin, B. P. and Chib, S.},
  title = {Bayesian model choice via Markov chain Monte Carlo methods},
  journal = {Journal of the Royal Statistical Society B},
  year = {1995},
  volume = {57},
  pages = {473-484},
}

@ARTICLE{Cas.G:92,
  author = {Casella, G. and George, E. I.},
  title = {Explaining the Gibbs Sampler},
  journal = {The American Statistician},
  year = {1992},
  volume = {46},
  number = {3},
  pages = {167--174},
}

@ARTICLE{CasLAvRob:01,
  author = {Casella, G. and Lavine, M. and Robert, C. P.},
  title = {Explaining the Perfect Sampler},
  journal = {The American Statistician},
  year = {2001},
  volume = {55},
  number = {4},
  pages = {299-305},
}

@ARTICLE{ChaVan:01,
  author = {Chauveau, D. and Vandekerkhove, P.},
  title = {Improving convergence of the Hastings-Metropolis Algorithm with a learning proposal},
  journal = {Scandinavian Journal of Statistics},
  year = {2001},
  volume = {29},
  number = {1},
  pages = {13-29},
}

@TECHREPORT{Che,
  author = {Chen, M.-H.},
  title = {Markov Chain Monte Carlo Sampling for Evaluating Multidimensional Integrals With Application to Bayesian Computation},
  institution = {Dept of Mathematical Sciences, WPI},
}

@ARTICLE{Chi.G:95,
  author = {Chib, S. and Greenberg, E.},
  title = {Understanding the Metropolis-Hastings algorithm},
  journal = {The American Statistician},
  year = {1995},
  volume = {49},
  number = {4},
  pages = {327-335},
}

@ARTICLE{Coo.B:95,
  author = {Cook, P. and Broemeling, L.D.},
  title = {Bayesian statistics using Mathematica},
  journal = {The American Statistician},
  year = {1995},
  volume = {49},
  pages = {70-76},
}

@ARTICLE{Cow.C:96,
  author = {Cowles, M. K. and Carlin, B. P.},
  title = {Markov chain Monte Carlo convergence diagnostics: a comparative review},
  journal = {Journal of the American Statistical Association},
  year = {1996},
  volume = {91},
  pages = {883-904},
}

@ARTICLE{DamWakWal:99,
  author = {Damien, P. and Wakefield, J. and Walker, S.},
  title = {Gibbs sampling for Bayesian non-conjugate and hierarchical models by using auxiliary variables},
  journal = {Journal of the Royal Statistical Society B},
  year = {1999},
  volume = {61},
  number = {Part 2},
  pages = {331-344},
}

@TECHREPORT{DouGodRob,
  author = {Doucet, A. and Godsill, S. J. and Robert, C. P.},
  title = {Marginal Maximum A Posteriori Estimation using Markov Chain Monte Carlo},
  institution = {Signal Processing Group, University of Cambridge},
}

@ARTICLE{Gel.S:90,
  author = {Gelfand, A. E. and Smith, A. F. M.},
  title = {Sampling-based approaches to calculating marginal densities},
  journal = {Journal of the American Statistical Association},
  year = {1990},
  volume = {85},
  number = {410},
  pages = {398-409},
}

@ARTICLE{GelSmiLee:92,
  author = {Gelfand, A. E. and Smith, A. F. M. and Lee, T.-M.},
  title = {Bayesian Analysis of Constrained Parameter and Truncated Data Problems Using Gibbs Sampling},
  journal = {Journal of the American Statistical Association},
  year = {1992},
  volume = {87},
  number = {418},
  pages = {523-532},
}

@ARTICLE{Gel.D:94,
  author = {Gelfand, A. E. G. and Dey, D. K.},
  title = {Bayesian model choice: asymptotics and exact calculations},
  journal = {Journal of the Royal Statistical Society B},
  year = {1994},
  volume = {56},
  pages = {501-514},
}

@ARTICLE{Gel.H.R.S:90,
  author = {Gelfand, A. E. G. and Hills, S. E. and Racine-Poon, A. and Smith, A. F. M.},
  title = {Illustration of Bayesian inference in normal data models using Gibbs sampling},
  journal = {Journal of the American Statistical Association},
  year = {1990},
  volume = {85},
  pages = {972-985},
}

@INCOLLECTION{GelMen:96,
  author = {Gelman, A. and Meng, X.-L.},
  booktitle = {Markov Chain Monte Carlo in Practice},
  title = {Model checking and model improvement},
  publisher = {Chapman and Hall, London},
  year = {1996},
  editor = {Gilks, W. R. and Richardson, S. and Spiegelhalter, D. J.},
  pages = {189-202},
}

@ARTICLE{Gem.G:84,
  author = {Geman, S. and Geman, D.},
  title = {Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {1984},
  volume = {6},
  pages = {721-741},
}

@INPROCEEDINGS{Gew:92,
  author = {Geweke, J.},
  title = {Evaluating the accuracy of sampling-based approaches to calculating posterior moments},
  booktitle = {Bayesian Statistics 4},
  year = {1992},
  editor = {Bernardo, J. M. and Berger, J. O. and Dawid, A. P. and Smith, A. F. M.},
  pages = {169-193},
  address = {Oxford},
  publisher = {University Press},
}

@ARTICLE{Gey:92,
  author = {Geyer, C. J.},
  title = {Pratical Markov Chain Monte Carlo},
  journal = {Statistical Science},
  year = {1992},
  volume = {7},
  number = {4},
  pages = {473-511},
}

@ARTICLE{Gil.C.S.B.M.S.K:93,
  author = {Gilks, W. R. and Clayton, D. G. and Spiegelhalter, D. J. and Best, N. G. and McNeil, A. J. and Sharples, L. D. and Kirby, A. J.},
  title = {Modelling complexity: applications of Gibbs sampling in medicine},
  journal = {Journal of the Royal Statistical Society B},
  year = {1993},
  volume = {55},
  pages = {39-52},
}

@ARTICLE{GilTS:94,
  author = {Gilks, W. R. and Thomas, A. and Spiegelhalter, D. J.},
  title = {A language and program for complex Bayesian modelling},
  journal = {The Statistician},
  year = {1994},
  volume = {43},
  pages = {169-178},
}

@ARTICLE{Gil.B.T:95,
  author = {Gilks, W.R. and Best, N.G. and Tan, K.K.C.},
  title = {Adaptive rejection Metropolis sampling within Gibbs sampling},
  journal = {Applied Statistics},
  year = {1995},
  volume = {44},
  pages = {455-472},
}

@ARTICLE{Gil.W:92,
  author = {Gilks, W.R. and Wild, P.},
  title = {Adaptive rejection sampling for Gibbs sampling},
  journal = {Applied Statistics},
  year = {1992},
  volume = {41},
  pages = {337-348},
}

@TECHREPORT{GreMir,
  author = {Green, P. J. and Mira, A.},
  title = {Delayed Rejection in Reversible Jump Metropolis-Hastings},
}

@ARTICLE{HanCar:01,
  author = {Han, C. and Carlin, B. R.},
  title = {Markov Chain Monte Carlo Methods for Computing Bayes Factors: A Comparative Review},
  journal = {Journal of the American Statistical Association},
  year = {2001},
  volume = {96},
  number = {455},
  pages = {1122-1132},
}

@ARTICLE{Has:70,
  author = {Hastings, W.K.},
  title = {Monte Carlo sampling methods using Markov chains and their applications},
  journal = {Biometrika},
  year = {1970},
  volume = {57},
  pages = {97-109},
}

@ARTICLE{Hei.W:83,
  author = {Heidelberger, P. and Welch, P.},
  title = {Simulation run length control in the presence of an initial transient},
  journal = {Operations Research},
  year = {1983},
  volume = {31},
  pages = {1109-1144},
}

@TECHREPORT{Hig:96,
  author = {Higdon, D. M.},
  title = {Auxiliary Variable Methods for Markov Chain Monte Carlo with Applications},
  institution = {Jasa},
  year = {1996},
  journal = {Jasa Theory and Methods},
}

@INPROCEEDINGS{Hil.S:92,
  author = {Hills, S.E. and Smith, A.F.M.},
  title = {Parameterization issues in Bayesian inference},
  booktitle = {Bayesian Statistics 4},
  year = {1992},
  editor = {Bernardo, J.M. and Berger, J.O. and Dawid, A.P. and Smith, A.F.M.},
  pages = {227-246},
  publisher = {Oxford University Press},
}

@ARTICLE{IhaGen:96,
  author = {Ihaka, R. and Gentleman, R.},
  title = {R: A Language for Data Analysis and Graphics},
  journal = {Journal of Computational and Graphical Statistics},
  year = {1996},
  volume = {5},
  number = {3},
  pages = {299-314},
}

@ARTICLE{Ing:94,
  author = {Ingrassia, S.},
  title = {On the rate of convergence of the Metropolis algorithm and Gibbs sampler by geometric bounds},
  journal = {The Annals of Applied Probability},
  year = {1994},
  volume = {31},
  pages = {347-389},
}

@ARTICLE{JonHob:01,
  author = {Jones, G. L. and Hobert, J. P.},
  title = {Honest Exploration of Intractable Probability Distributions via Markov Chain Monte Carlo},
  journal = {Statistical Science},
  year = {2001},
  volume = {16},
  number = {4},
  pages = {312-334},
}

@ARTICLE{KasRaf:95,
  author = {Kass, R. E. and Raftery, A.E.},
  title = {Bayes Factors},
  journal = {Journal of the American Statistical Association},
  year = {1995},
  volume = {90},
  number = {430},
  pages = {773-795},
}

@ARTICLE{Kas.C.G.N:98,
  author = {Kass, R.E. and Carlin, B.P. and Gelman, A. and Neal, R.M.},
  title = {Markov chain Monte Carlo in practice: a roundtable discussion},
  journal = {The American Statistician},
  year = {1998},
  volume = {52},
  pages = {93-100},
}

@INPROCEEDINGS{Key.P.S:98,
  author = {Key, J.T. and Pericchi, L.R. and Smith, A.F.M.},
  title = {Bayesian model choice: what and why?},
  booktitle = {Bayesian Statistics 6},
  year = {1998},
  editor = {Bernardo, J.M. and Berger, J.O. and Dawid, A.P. and Smith, A.F.M.},
  pages = {0-0},
  publisher = {Oxford University Press},
}

@ARTICLE{Leo:78,
  author = {Leonard, T.},
  title = {Density estimation, stochastic processes and prior information},
  journal = {Journal of the Royal Statistical Society B},
  year = {1978},
  volume = {40},
  pages = {113-146},
}

@TECHREPORT{Liu,
  author = {Liu, J. S.},
  title = {Metropolized Independent Sampling with Comparisons to Rejection Sampling and Importance Sampling},
  institution = {Department of Statistics, Stanford University},
}

@TECHREPORT{Liu2,
  author = {Liu, J. S.},
  title = {Markov Chain Monte Carlo and Related Topics},
  institution = {Department of Statistics, Stanford University},
}

@TECHREPORT{MacPer:96,
  author = {MacEachern, S. N. and Peruggia, M.},
  title = {Subsampling the Gibbs Sampler: Variance Reduction},
  institution = {Department of Statistics, The Ohio State University},
  year = {1996},
}

@ARTICLE{Mac.B:94,
  author = {MacEachern, S.N. and Berliner, L.M.},
  title = {Subsampling the Gibbs sampler},
  journal = {The American Statistician},
  year = {1994},
  volume = {48},
  pages = {188-190},
}

@MANUAL{Splus:98,
  title = {S-Plus: Version 4.5},
  author = {MathSoft},
  organization = {Data Analysis Products Division, MathSoft, Inc.},
  address = {Seatle},
  year = {1998},
}

@TECHREPORT{WWW,
  author = {Mengersen, K.L. and Robert, C.P. and Guihenneuc-Jouyaux},
  title = {MCMC convergence diagnostics: a Rclassification},
  institution = {Laboratoire de Statistique, CREST, INSEE, Paris},
  year = {1998},
  number = {16},
}

@ARTICLE{Met:87,
  author = {Metropolis, N.},
  title = {The beginning of the Monte Carlo method},
  journal = {Los Alamos Science},
  year = {1987},
  number = {Special issue},
  pages = {125-130},
}

@ARTICLE{Met.R.R.T.T:53,
  author = {Metropolis, N. and Rosenbluth, A.W. and Rosenbluth, M.N. and Teller, A.H. and Teller, E.},
  title = {Equations of state calculations by fast computing machine},
  journal = {J. Chem. Phys.},
  year = {1953},
  volume = {21},
  pages = {1087-1091},
}

@ARTICLE{MirTie,
  author = {Mira, A. and Tierney, L.},
  title = {Efficiency and Convergence Properties of Slice Samplers},
  journal = {Scand. J. Statist.},
  year = {2002},
  volume = {29},
  pages = {1-12},
  institution = {School of Statistics, University of Minnesota},
}

@ARTICLE{Nea:03,
  author = {Neal, R. M.},
  title = {Slice Sampling},
  journal = {The Annals of Statistics},
  year = {2003},
  volume = {31},
  number = {3},
  pages = {705-767},
}

@ARTICLE{Nea:01,
  author = {Neal, R. M.},
  title = {Annealed importance sampling},
  journal = {Statistics and Computing},
  year = {2001},
  volume = {11},
  pages = {125-139},
}

@TECHREPORT{Nea:93,
  author = {Neal, R. M.},
  title = {Probabilistic Inference Using Markov Chain Monte Carlo Methods},
  institution = {Department of Computer Science, University of Toronto},
  year = {1993},
}

@ARTICLE{NeaSam:97,
  author = {Neath, A. A. and Samaniego, F. J.},
  title = {On the Efficacy of Bayesian Inference for Nonidentifiable Models},
  journal = {The American Statistician},
  year = {1997},
  volume = {51},
  number = {3},
  pages = {225-232},
}

@MANUAL{Fbayes:96,
  title = {First Bayes: Version 1.3},
  author = {O'Hagan, A.},
  organization = {Data Analysis Products Division, MathSoft, Inc.},
  address = {Nottingham},
  year = {1996},
}

@ARTICLE{PauPer:94,
  author = {Paulino, C. D. M. and Pereira, C. A. B.},
  title = {On Identifiability of Parametric Statistical Models},
  journal = {Journal of the Italian Statistical Society},
  year = {1994},
  volume = {3},
  number = {1},
  pages = {125-151},
}

@ARTICLE{Pes:73,
  author = {Peskun, P. H.},
  title = {Optimum Monte-Carlo sampling using Markov chains},
  journal = {Biometrika},
  year = {1973},
  volume = {60},
  number = {3},
  pages = {607},
}

@INPROCEEDINGS{Raf.L:92,
  author = {Raftery, A.L. and Lewis, S.},
  title = {How many iterations in the Gibbs sampler?},
  booktitle = {Bayesian Statistics 4},
  year = {1992},
  editor = {Bernardo, J.M. and Berger,J.O. and Dawid, A.P. and Smith, A.F.M.},
  pages = {763-774},
  address = {Oxford},
  publisher = {University Press},
}

@ARTICLE{Rit.T:92,
  author = {Ritter, C. and Tanner, M.A.},
  title = {Facilitating the Gibbs sampler: the Gibbs stopper and the Griddy-Gibbs sampler},
  journal = {Journal of the American Statistical Association},
  year = {1992},
  volume = {87},
  pages = {861-868},
}

@ARTICLE{Rob:92,
  author = {Roberts, G. O.},
  title = {Convergence Diagnostics of the Gibbs Sampler},
  journal = {Bayesian Statistics},
  year = {1992},
  volume = {4},
  pages = {775-782},
}

@ARTICLE{RobRos:99,
  author = {Roberts, G. O. and Rosenthal, J. S.},
  title = {Convergence of slice sampler Markov chains},
  journal = {Journal of the Royal Statistical Society B},
  year = {1999},
  volume = {61},
  pages = {643-660},
}

@ARTICLE{RobSmi:94,
  author = {Roberts, G. O. and Smith, A. F. M.},
  title = {Simple conditions for the convergence of the Gibbs sampler and Metropolis-Hastings algorithms},
  journal = {Stochastic Processes and their Applications},
  year = {1994},
  volume = {49},
  pages = {207-216},
}

@ARTICLE{Rob.P:94,
  author = {Roberts, G.O. and Polson, N.G.},
  title = {On the geometric convergence of the Gibbs sampler},
  journal = {Journal of the Royal Statistical Society B},
  year = {1994},
  volume = {56},
  pages = {377-384},
}

@ARTICLE{Smi.G:92,
  author = {Smith, A.F.M. and Gelfand, A.E.},
  title = {Bayesian statistics without tears: a sampling-resampling perspective},
  journal = {The American Statistician},
  year = {1992},
  volume = {46},
  pages = {84-88},
}

@ARTICLE{Smi.R:93,
  author = {Smith, A.F.M. and Roberts, G.O.},
  title = {Bayesian computation via the Gibbs sampler and related Markov chain Monte Carlo methods},
  journal = {Journal of the Royal Statistical Society B},
  year = {1993},
  volume = {55},
  pages = {3-23},
}

@MANUAL{BOA,
  title = {Bayesian Output Analysis Program (BOA), Version 1.1 User's manual},
  author = {Smith, B. J. },
  year = {2004},
}

@TECHREPORT{Spi.B.C:98,
  author = {Spiegelhalter, D. and Best, N. and Carlin, B.P.},
  title = {Bayesian deviance, the effective number of parameters, and the comparison of arbitrarily complex models},
  institution = {Division of Biostatiscs, University of Minneasota},
  year = {1998},
  number = {9},
}

@MANUAL{Winbugs:98,
  title = {WinBUGS - Bayesian inference using Gibbs sampling for Windows: Version 1.1.1},
  author = {Spiegelhalter, D. and Thomas, A. and Best, N.},
  organization = {MRC Biostatistics Unit},
  address = {Cambrigde},
  year = {1998},
}

@MANUAL{Bugs:97,
  title = {BUGS - Bayesian inference using Gibbs sampling: Version 0.6},
  author = {Spiegelhalter, D. and Thomas, A. and Best, N. and Gilks, W.},
  organization = {MRC Biostatistics Unit},
  address = {Cambrigde},
  year = {1997},
}

@ARTICLE{Spial:02,
  author = {Spiegelhalter, D. J. and Best, N. G. and Carlin, B. P. and van der Linde, A.},
  title = {Bayesian Measures of model complexity and fit},
  journal = {Journal of the Royal Statistical Society B},
  year = {2002},
  number = {64},
  pages = {583-639},
}

@MANUAL{Stata:97,
  title = {Stata Statistical Software: Release 5.0},
  author = {Stata-Corporation},
  organization = {College Station, Stata Corporation},
  address = {Texas},
  year = {1997},
}

@UNPUBLISHED{Ste:03,
  author = {Steinhaus, S.},
  title = {Comparison of mathematical programs for data analysis},
  year = {2003},
  url = {http://www.scientificweb.com/ncrunch/ncrunch4.pdf},
}

@TECHREPORT{StrTwe:98,
  author = {Stramer, O. and Tweedie, R. L.},
  title = {Self-Targeting Candidates for Metropolis-Hastings Algorithms },
  institution = {University of Iowa and Colorado State University },
  year = {1998},
}

@ARTICLE{Tan.W:87,
  author = {Tanner, M.A. and Wong, W.H.},
  title = {The calculation of posterior distributions by data augmentation (with discussion)},
  journal = {Journal of the American Statistical Association},
  year = {1987},
  volume = {82},
  pages = {528-550},
}

@INPROCEEDINGS{Tho.S.G:92,
  author = {Thomas, A. and Spiegelhalter, D.J. and Gilks, W.R.},
  title = {BUGS: a program to perform Bayesian inference using Gibbs sampling},
  booktitle = {Bayesian Statistics 4},
  year = {1992},
  editor = {Bernardo, J.M. and Berger, J.O. and Dawid, A.P. and Smith, A.F.M.},
  pages = {837-842},
  publisher = {Oxford University Press},
}

@ARTICLE{Tie:94,
  author = {Tierney, L.},
  title = {Markov chains for exploring posterior distributions},
  journal = {The Annals of Statistics},
  year = {1994},
  volume = {22},
  pages = {1701-1762},
}

@ARTICLE{TieMir:99,
  author = {Tierney, L. and Mira, A.},
  title = {Some Adaptive Monte Carlo Methods For Bayesian Inference},
  journal = {Statistics in Medicine},
  year = {1999},
  number = {18},
  pages = {2507-2515},
}

@ARTICLE{VanMen:01,
  author = {Van Dyk, D. A. and Meng, X.},
  title = {The Art of Data Augmentation},
  journal = {Journal of the American Statistical Association},
  year = {2001},
  volume = {10},
  number = {1},
  pages = {1-50},
}

@ARTICLE{Wil.G:93,
  author = {Wild, P. and Gilks, W.R.},
  title = {Adaptive rejection sampling for log-concave density functions},
  journal = {Applied Statistics},
  year = {1993},
  volume = {42},
  pages = {701-709},
}

@BOOK{Wol:03,
  title = {The Mathematica Book},
  publisher = {Wolfram Media/Cambridge University Press},
  year = {2003},
  author = {Wolfram, S.},
  edition = {Fifth},
}

@ARTICLE{Zel.M:95,
  author = {Zellner, A. and Min, C.},
  title = {Gibbs sampler convergence criteria},
  journal = {Journal of the American Statistical Association},
  year = {1995},
  volume = {90},
  pages = {921-927},
}
}}}
Como se pode ver em <<cite AgaGel:03 bibliography:Bibliography>> o exemplo não é muito feliz <<cite CasLAvRob:01>> é uma referência obrigatória <<cite CheShaIbr:00>>, <<cite Coda:97 showAll>>, <<cite Coda:97>>, <<cite Gew:92>>, <<cite GelMen:96>>, <<cite Ste:03>>
!References
<<bibliography>>
/*{{{*/
#slideHeader {
 color: #cff;
 padding: 0.25em;
 background-image: url('figuras/logo.png');
 background-repeat: no-repeat;
 background-position: right; 
}

#slideFooter {
 color: #aaa
}

body {
 background-image: url('figuras/1.jpg');
 color: #000;
}

.tiddler {
 background: transparent;
 padding: 1em 1em 0.5em 1em;
}

#controlBar .button {
 background: transparent;
 color: #aaa;
 border: none
}

#controlBar .button:hover {
 background: #cff;
 color: #000
}

#slideClock {
 background: transparent;
 color: #aaa;
 margin: 0 0.5em 0 0.5em;
 padding: 0 0.25em 0 0.25em;
}

/* navigator always visible*/
.slideFooterOff #navigator{
 visibility: visible;
}

.slideFooterOff #buttonBar{
 visibility: hidden;
}
/*}}}*/
[[First slide|SlideShowExample-1]] 
SlideShowExample-2
SlideShowExample-3
SlideShowExample-4 (read the {{exclude{SlideShowPluginDoc}}} for more information)
[[About]]
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]]  is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].

!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

	
//============================================================================
//============================================================================
//		   ForEachTiddlerPlugin
//============================================================================
//============================================================================

// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {

if (!window.abego) window.abego = {};

version.extensions.ForEachTiddlerPlugin = {
	major: 1, minor: 0, revision: 8, 
	date: new Date(2007,3,12), 
	source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
	licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
	copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};

// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
	TiddlyWiki.prototype.forEachTiddler = function(callback) {
		for(var t in this.tiddlers) {
			callback.call(this,t,this.tiddlers[t]);
		}
	};
}

//============================================================================
// forEachTiddler Macro
//============================================================================

version.extensions.forEachTiddler = {
	major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler = {
	 // Standard Properties
	 label: "forEachTiddler",
	 prompt: "Perform actions on a (sorted) selection of tiddlers",

	 // actions
	 actions: {
		 addToList: {},
		 write: {}
	 }
};

// ---------------------------------------------------------------------------
//  The forEachTiddler Macro Handler 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler.getContainingTiddler = function(e) {
	while(e && !hasClass(e,"tiddler"))
		e = e.parentNode;
	var title = e ? e.getAttribute("tiddler") : null; 
	return title ? store.getTiddler(title) : null;
};

config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);

	if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params
	// Parse the "in" clause
	var tiddlyWikiPath = undefined;
	if ((i < params.length) && params[i] == "in") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "TiddlyWiki path expected behind 'in'.");
			return;
		}
		tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the where clause
	var whereClause ="true";
	if ((i < params.length) && params[i] == "where") {
		i++;
		whereClause = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the sort stuff
	var sortClause = null;
	var sortAscending = true; 
	if ((i < params.length) && params[i] == "sortBy") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "sortClause missing behind 'sortBy'.");
			return;
		}
		sortClause = this.paramEncode(params[i]);
		i++;

		if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
			 sortAscending = params[i] == "ascending";
			 i++;
		}
	}

	// Parse the script
	var scriptText = null;
	if ((i < params.length) && params[i] == "script") {
		i++;
		scriptText = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the action. 
	// When we are already at the end use the default action
	var actionName = "addToList";
	if (i < params.length) {
	   if (!config.macros.forEachTiddler.actions[params[i]]) {
			this.handleError(place, "Unknown action '"+params[i]+"'.");
			return;
		} else {
			actionName = params[i]; 
			i++;
		}
	} 
	
	// Get the action parameter
	// (the parsing is done inside the individual action implementation.)
	var actionParameter = params.slice(i);


	// --- Processing ------------------------------------------
	try {
		this.performMacro({
				place: place, 
				inTiddler: tiddler,
				whereClause: whereClause, 
				sortClause: sortClause, 
				sortAscending: sortAscending, 
				actionName: actionName, 
				actionParameter: actionParameter, 
				scriptText: scriptText, 
				tiddlyWikiPath: tiddlyWikiPath});

	} catch (e) {
		this.handleError(place, e);
	}
};

// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {

	var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);

	var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
	context["tiddlyWiki"] = tiddlyWiki;
	
	// Get the tiddlers, as defined by the whereClause
	var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
	context["tiddlers"] = tiddlers;

	// Sort the tiddlers, when sorting is required.
	if (parameter.sortClause) {
		this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
	}

	return {tiddlers: tiddlers, context: context};
};

// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
	return this.getTiddlersAndContext(parameter).tiddlers;
};

// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
//				  The following properties are supported:
//
//						place
//						whereClause
//						sortClause
//						sortAscending
//						actionName
//						actionParameter
//						scriptText
//						tiddlyWikiPath
//
//					All properties are optional. 
//					For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
	var tiddlersAndContext = this.getTiddlersAndContext(parameter);

	// Perform the action
	var actionName = parameter.actionName ? parameter.actionName : "addToList";
	var action = config.macros.forEachTiddler.actions[actionName];
	if (!action) {
		this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
		return;
	}

	var actionHandler = action.handler;
	actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};

// ---------------------------------------------------------------------------
//  The actions 
// ---------------------------------------------------------------------------

// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;

	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
		return;
	}

	// Perform the action.
	var list = document.createElement("ul");
	place.appendChild(list);
	for (var i = 0; i < tiddlers.length; i++) {
		var tiddler = tiddlers[i];
		var listItem = document.createElement("li");
		list.appendChild(listItem);
		createTiddlyLink(listItem, tiddler.title, true);
	}
};

abego.parseNamedParameter = function(name, parameter, i) {
	var beginExpression = null;
	if ((i < parameter.length) && parameter[i] == name) {
		i++;
		if (i >= parameter.length) {
			throw "Missing text behind '%0'".format([name]);
		}
		
		return config.macros.forEachTiddler.paramEncode(parameter[i]);
	}
	return null;
}

// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;
	if (p >= parameter.length) {
		this.handleError(place, "Missing expression behind 'write'.");
		return;
	}

	var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
	p++;

	// Parse the "begin" option
	var beginExpression = abego.parseNamedParameter("begin", parameter, p);
	if (beginExpression !== null) 
		p += 2;
	var endExpression = abego.parseNamedParameter("end", parameter, p);
	if (endExpression !== null) 
		p += 2;
	var noneExpression = abego.parseNamedParameter("none", parameter, p);
	if (noneExpression !== null) 
		p += 2;

	// Parse the "toFile" option
	var filename = null;
	var lineSeparator = undefined;
	if ((p < parameter.length) && parameter[p] == "toFile") {
		p++;
		if (p >= parameter.length) {
			this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
			return;
		}
		
		filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
		p++;
		if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
			p++;
			if (p >= parameter.length) {
				this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
				return;
			}
			lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
			p++;
		}
	}
	
	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
		return;
	}

	// Perform the action.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
	var count = tiddlers.length;
	var text = "";
	if (count > 0 && beginExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
	
	for (var i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		text += func(tiddler, context, count, i);
	}
	
	if (count > 0 && endExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);

	if (count == 0 && noneExpression) 
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
		

	if (filename) {
		if (lineSeparator !== undefined) {
			lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
			text = text.replace(/\n/mg,lineSeparator);
		}
		saveFile(filename, convertUnicodeToUTF8(text));
	} else {
		var wrapper = createTiddlyElement(place, "span");
		wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
	}
};


// ---------------------------------------------------------------------------
//  Helpers
// ---------------------------------------------------------------------------

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
	return {
		place : placeParam, 
		whereClause : whereClauseParam, 
		sortClause : sortClauseParam, 
		sortAscending : sortAscendingParam, 
		script : scriptText,
		actionName : actionNameParam, 
		actionParameter : actionParameterParam,
		tiddlyWikiPath : tiddlyWikiPathParam,
		inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
		viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
	};
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
	if (!idPrefix) {
		idPrefix = "store";
	}
	var lenPrefix = idPrefix.length;
	
	// Read the content of the given file
	var content = loadFile(this.getLocalPath(path));
	if(content === null) {
		throw "TiddlyWiki '"+path+"' not found.";
	}
	
	var tiddlyWiki = new TiddlyWiki();

	// Starting with TW 2.2 there is a helper function to import the tiddlers
	if (tiddlyWiki.importTiddlyWiki) {
		if (!tiddlyWiki.importTiddlyWiki(content))
			throw "File '"+path+"' is not a TiddlyWiki.";
		tiddlyWiki.dirty = false;
		return tiddlyWiki;
	}
	
	// The legacy code, for TW < 2.2
	
	// Locate the storeArea div's
	var posOpeningDiv = content.indexOf(startSaveArea);
	var posClosingDiv = content.lastIndexOf(endSaveArea);
	if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
		throw "File '"+path+"' is not a TiddlyWiki.";
	}
	var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
	
	// Create a "div" element that contains the storage text
	var myStorageDiv = document.createElement("div");
	myStorageDiv.innerHTML = storageText;
	myStorageDiv.normalize();
	
	// Create all tiddlers in a new TiddlyWiki
	// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
	var store = myStorageDiv.childNodes;
	for(var t = 0; t < store.length; t++) {
		var e = store[t];
		var title = null;
		if(e.getAttribute)
			title = e.getAttribute("tiddler");
		if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
			title = e.id.substr(lenPrefix);
		if(title && title !== "") {
			var tiddler = tiddlyWiki.createTiddler(title);
			tiddler.loadFromDiv(e,title);
		}
	}
	tiddlyWiki.dirty = false;

	return tiddlyWiki;
};


	
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
// 
//	 (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
	var script = context["script"];
	var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
	var fullText = (script ? script+";" : "")+functionText+";theFunction;";
	return eval(fullText);
};

// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
	var result = [];
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
	tiddlyWiki.forEachTiddler(function(title,tiddler) {
		if (func(tiddler, context, undefined, undefined)) {
			result.push(tiddler);
		}
	});
	return result;
};

// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
	var message = "Extra parameter behind '"+actionName+"':";
	for (var i = firstUnusedIndex; i < parameter.length; i++) {
		message += " "+parameter[i];
	}
	this.handleError(place, message);
};

// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? -1 
			   : +1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? +1 
			   : -1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
	// To avoid evaluating the sortClause whenever two items are compared 
	// we pre-calculate the sortValue for every item in the array and store it in a 
	// temporary property ("forEachTiddlerSortValue") of the tiddlers.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
	var count = tiddlers.length;
	var i;
	for (i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
	}

	// Do the sorting
	tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);

	// Delete the temporary property that holds the sortValue.	
	for (i = 0; i < tiddlers.length; i++) {
		delete tiddlers[i].forEachTiddlerSortValue;
	}
};


// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
	displayMessage(message);
};

// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
	var message ="<<"+macroName;
	for (var i = 0; i < params.length; i++) {
		message += " "+params[i];
	}
	message += ">>";
	displayMessage(message);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
	var message = (exception.description) ? exception.description : exception.toString();
	return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};

// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
	if (place) {
		this.createErrorElement(place, exception);
	} else {
		throw exception;
	}
};

// Internal.
//
// Encodes the given string.
//
// Replaces 
//	 "$))" to ">>"
//	 "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
	var reGTGT = new RegExp("\\$\\)\\)","mg");
	var reGT = new RegExp("\\$\\)","mg");
	return s.replace(reGTGT, ">>").replace(reGT, ">");
};

// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
// 
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
	// Remove any location part of the URL
	var hashPos = originalPath.indexOf("#");
	if(hashPos != -1)
		originalPath = originalPath.substr(0,hashPos);
	// Convert to a native file format assuming
	// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
	// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
	// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
	// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
	var localPath;
	if(originalPath.charAt(9) == ":") // pc local file
		localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
		localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(7));
	else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(5));
	else // pc network file
		localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");	
	return localPath;
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
	".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
	"forEachTiddler");

//============================================================================
// End of forEachTiddler Macro
//============================================================================


//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
	var n =  prefix.length;
	return (this.length >= n) && (this.slice(0, n) == prefix);
};



//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
	var n = suffix.length;
	return (this.length >= n) && (this.right(n) == suffix);
};


//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
	return this.indexOf(substring) >= 0;
};

//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or 
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
	for (var i = 0; i < this.length; i++) {
		if (this[i] == item) {
			return i;
		}
	}
	return -1;
};

//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false. 
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
	return (this.indexOf(item) >= 0);
};

//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements 
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (this.contains(items[i])) {
			return true;
		}
	}
	return false;
};


//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
// 
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null] 
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (!this.contains(items[i])) {
			return false;
		}
	}
	return true;
};


} // of "install only once"

// Used Globals (for JSLint) ==============
// ... DOM
/*global 	document */
// ... TiddlyWiki Core
/*global 	convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, 
			displayMessage, endSaveArea, hasClass, loadFile, saveFile, 
			startSaveArea, store, wikify */
//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
This one DOES work.
<<slideShow>>
<<forEachTiddler 
 where
 'tiddler.tags.contains("show")'
 write
 '"[["+tiddler.title+"]]\n"'
>>
''Note:'' I know this is a poor and unnecessary example but fancier things can be done with the {{exclude{[[ForEachTiddlerPlugin]]}}}.
If you have a few presentations with the same {{{<<slideshow>>}}} macro you can define it only once in a tiddler and included it with the {{{<<tiddler>>}}} macro as in this example. In this case, the macro is in the {{exclude{ShowStarter}}} tiddler.

MissingSlide
[[First slide|SlideShowExample-1]]
SlideShowExample-2
SlideShowExample-3
SlideShowExample-4 (read the {{exclude{SlideShowPluginDoc for more information)

<<tiddler ShowStarter>>}}}
// //''Name:'' EmailLink
// //''Author:'' AlanHecht
// //''Type:'' [[Macro|Macros]]

// //''Description:'' email lets you list a "email" address without displaying it as readable text. This helps prevent your email address from being harvested by search engines and other web crawlers that read your page's contents. Using email, you type in the words "at" and "dot" instead of the punctuation symbols and add spaces inbetween words to disguise your address. However, email will display your email address in a web browser so that humans can read it. And email turns the address into a hyperlink that can be clicked to send you an instant email.

// //''Syntax:'' << {{{email yourname at yourdomain dot com "?optional parameters"}}} >>
// //Example 1: <<linkTo email ? sample at nowhere dot com>> (standard)
// //Example 2: <<linkTo email ? sample at nowhere dot com "?subject=Submission&body=Type your message here.">> (with optional parameters)

// //''Directions:'' <<tiddler MacroDirections>>

// //''Notes:'' You can use the optional email parameters to stipulate a subject or message body for the message. Most (not all) email clients will use this information to construct the email message.

// //''Related Links:'' none

// //''Revision History:''
// // v0.1.0 (20 July 2005): initial release
// // v0.1.1 (22 July 2005): renamed the macro from "mailto" to "email" to further thwart email harvesters.

// //''Code section:''
version.extensions.linkTo = {major: 0, minor: 1, revision: 1, date: new Date("Jul 22, 2005")};
config.macros.linkTo = {}
config.macros.linkTo.handler = function(place,macroName,params)
{
var temp = params.join(" ");
var data = temp.split("?");
var protocol =  data[0].replace(/\s/g,"");
if(protocol=='email') protocol = "ma"+"il"+"to:";
else if(protocol=='phone') protocol = "s"+"ip:";
var recipient = data[1];
recipient = recipient.replace(" at ","@").replace(" dot ",".");
recipient = recipient.replace(/\s/g,"");
var optional = data[2] ? "?" + data[2] : "";
var theLink = createExternalLink(place,protocol+recipient+optional);
theLink.appendChild(document.createTextNode(recipient))
}
<<photoGallery url:photos/lisboa-*.jpg sequence:'1-4' height:200 time:2000 labels:SubTitles numbers start:5000>>
<<photoGallery sequence:"!" height:200 time:2000 labels:SubTitles numbers start:5000
photos/lisboa-1.jpg
photos/lisboa-2.jpg
photos/lisboa-3.jpg
photos/lisboa-4.jpg
>>
<<slideShow>> Default slide show
<<slideShow label:'Go for it!' tooltip:"Rock'n roll!" header:''>> Default slide show with a custom button and no header
<<slideShow theme:ConferenceTheme clock:0 header:'New Advances on ...' footer:'I Conference on Everything'>> Custom style with clock
<<slideShow theme:StudentTheme header:'' cycle noClicks noKeyboard>> No full screen 
<<slideShow clock:-10 clockFormat:'mm:0ss' noOverlays header:''>> Countdown clock without overlays
<<slideShow showAll theme:PrintingTheme header:"First Course on Slide Show Printing">> Printing version
MissingSlide
[[First slide|SlideShowExample-1]] {{exclude{(read the SlideShowPluginDoc for more information)}}}
SlideShowExample-2
SlideShowExample-3
SlideShowExample-4
<!--{{{-->
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin|Droid+Serif:regular,italic,bold,bolditalic&subset=latin|Droid+Sans+Mono&subset=latin">
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Some of you may notice that my list of plugins has shrinked. That happened because I lost interest in some of them and, even more important, I simply don't have enough time to keep up with the pace of TiddlyWiki development. I intend to update a few more plugins but, meanwhile, my previous work can still be found [[here|http://www.math.ist.utl.pt/~psoares/addons_2.4.html]].
|''Name''|PSTheme|
|''Description''|personal theme|

!Author Mode
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|
|ColorPalette|ColorPalette|

!Read-Only Mode
|PageTemplateReadOnly|##PageTemplate|
|ViewTemplateReadOnly|##ViewTemplate|
|EditTemplateReadOnly|##EditTemplate|
|StyleSheetReadOnly|##StyleSheet|
|ColorPalette|ColorPalette|

!PageTemplate
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::Foreground]] [[ColorPalette::PrimaryMid]]'>
<div class="titles"><span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span></div>
<span class='topMenu' refresh='content' tiddler='TopMenu'></span>
</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>
<!--}}}-->

!ViewTemplate
<!--{{{-->
<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='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->

!EditTemplate
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<div class='editor' macro='edit text'></div>
<!--}}}-->

!StyleSheet
[[StyleSheet]]
/*{{{*/
.HideSideBarButton {float:right;  font-size: 1em;} 

.viewer .center {
 text-align: center;
 margin-left: auto;
 margin-right: auto
}

body {
 font-family: Nobile,arial,sans-serif;
 line-height: 1.2
}

.header {
 padding: 1.25em 0 0 0;
}

.header a {
 color: [[ColorPalette::Background]];
 padding: 0.25em 0.25em 0.25em 0.25em;
 margin-bottom: -2px
}

.header .externalLink {
 text-decoration: none;
}

.header a:hover {
 color:[[ColorPalette::Foreground]];
 background: [[ColorPalette::Background]];
}

.siteTitle {
 color: [[ColorPalette::SecondaryLight]];
 font-size: 2em;
 font-weight: bold;
 padding: 0 0 0 0.5em;
}

.siteSubtitle {
 color: [[ColorPalette::SecondaryLight]];
 font-weight: bold;
}

.titles {
 margin: 0.25em 0 0.5em 0
}

.topMenu {
 padding: 0 0 0 1em;
 font-size: 0.9em;
}

h1,h2,h3,h4,h5 {
 color: [[ColorPalette::Foreground]];
 border: none;
}

h1 {font-size:1.6em;}
h2 {font-size:1.35em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.8em;}

.viewer hr {
 border: 0;
 border-top: 1px dotted [[ColorPalette::SecondaryDark]];
 color: [[ColorPalette::SecondaryDark]];
}

.title {
 font-size:1.8em;
 border-bottom: 1px dotted [[ColorPalette::SecondaryDark]];
 padding-bottom: 0.1em;
 margin-bottom: 0.1em;
}

.subtitle {
 padding-top: 0.25em;
 margin-bottom: 0.25em;
 font-size: x-small
}

.editor input, .editor textarea {
 margin-bottom: 1px;
}

input {font-size: 100%;}

.txtOptionInput {width: 15em;}

#displayArea {margin: 1em 15.5em 0em 1em;}

@media print {
body {background:#ffffff;}
#mainMenu, #sidebar, #messageArea, .tagging, .tagged, .subtitle, #pageFooter, .button, .header {display: none ! important;}
#displayArea {margin: 1em 0em 0em 0em !important;}
.tiddler {padding:0;}
noscript{ display:none;}
.title {color:#000;}
}
/*}}}*/
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
	major: 1, minor: 0, revision: 2, 
	date: new Date("Apr 19, 2007"),
	source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
	coreVersion: '2.2.0 (Beta 5)'
};

config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");

merge(config.macros.option.types, {
	'pas': {
		elementType: "input",
		valueField: "value",
		eventName: "onkeyup",
		className: "pasOptionInput",
		typeValue: config.macros.option.passwordInputType,
		create: function(place,type,opt,className,desc) {
			// password field
			config.macros.option.genericCreate(place,'pas',opt,className,desc);
			// checkbox linked with this password "save this password on this computer"
			config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);			
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
		},
		onChange: config.macros.option.genericOnChange
	}
});

merge(config.optionHandlers['chk'], {
	get: function(name) {
		// is there an option linked with this chk ?
		var opt = name.substr(3);
		if (config.options[opt]) 
			saveOptionCookie(opt);
		return config.options[name] ? "true" : "false";
	}
});

merge(config.optionHandlers, {
	'pas': {
 		get: function(name) {
			if (config.options["chk"+name]) {
				return encodeCookie(config.options[name].toString());
			} else {
				return "";
			}
		},
		set: function(name,value) {config.options[name] = decodeCookie(value);}
	}
});

// need to reload options to load passwordOptions
loadOptionsCookie();

/*
if (!config.options['pasPassword'])
	config.options['pasPassword'] = '';

merge(config.optionsDesc,{
		pasPassword: "Test password"
	});
*/
//}}}
/***
|''Name:''|PhotoGalleryPlugin|
|''Description:''|A photo gallery with optional subtitles|
|''Author:''|Paulo Soares|
|''Version:''|1.3.0|
|''Date:''|2011-04-25|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Documentation:''|See the examples|
|''License:''|[[Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.5.0|
***/
//{{{
if(!version.extensions.photoGalleryPlugin) { //# ensure that the plugin is only installed once
version.extensions.photoGalleryPlugin = {installed: true};

(function($) {
config.macros.photoGallery = {};

config.macros.photoGallery.handler= function(place,macroName,params,wikifier,paramString,tiddler) {
  var i, args = paramString.parseParams(null,null,false);
  this.url = getParam(args,"url","*");
  this.sequence = getParam(args,"sequence",null);
  var height = getParam(args,"height",null);
  var width = getParam(args,"width",null);
  this.time = parseFloat(getParam(args,"time",0));
  this.start = parseFloat(getParam(args,"start",-1));
  this.labels = getParam(args,"labels",null);
  this.numbers = ($.inArray('numbers',paramString.readMacroParams()) > -1);
  if(!this.sequence){return false;}
  if(this.sequence=="!"){
    var lines = paramString.split("\n");
    if(lines.length>1){
      lines.pop();
      lines.shift();
    } else {return false;}
    this.sequence = lines;
  } else {
    this.sequence = this.parseSequence(this.sequence);
  }
  this.nImages = this.sequence.length;
  this.current = 0;
  if(!store.tiddlerExists(this.labels)) this.labels = null;
  if(this.labels) this.labelsArray = store.getTiddlerText(this.labels).split("\n");
  var pictureHolder = document.createElement('center');
  var image=pictureHolder.appendChild(document.createElement('img'));
  image.src = this.url.replace("*",this.sequence[0]);
  image.id = 'pgObject';
  if(height) image.height = height;
  if(width) image.width = width;
  image.className = "photoGallery";
  place.appendChild(pictureHolder);
  var navBar = createTiddlyElement(pictureHolder,"div");
  createTiddlyButton(navBar,"«","",this.firstImage);
  createTiddlyButton(navBar,"‹","",this.previousImage);
  if(this.time>0) {
    createTiddlyButton(navBar,"►",null,this.auto,null,"pgPlay");
  }
  createTiddlyButton(navBar,"›","",this.nextImage);
  createTiddlyButton(navBar,"»","",this.lastImage);
  if(this.labels) createTiddlyElement(pictureHolder,"div","pgLabel","",this.labelsArray[0]);
  if(this.numbers) createTiddlyElement(navBar,"span","pgCounter","","1/"+this.nImages);
  if(this.time>0 && this.start>-1) setTimeout(this.auto,this.start);
}

config.macros.photoGallery.parseSequence = function(seq) {
  var list = seq.split(","), res = [], limits, i, j;
  for (i=0; i<list.length; i++){
    if(list[i].indexOf("-") == -1){
      res.push(parseInt(list[i]));
    } else {
      limits = list[i].split("-");
      if(limits[0]>limits[1]){
        for(j=parseInt(limits[0]); j>=parseInt(limits[1]); j--){
          res.push(j); 
        }
      } else {
        for(j=parseInt(limits[0]); j<=parseInt(limits[1]); j++){
          res.push(j); 
        }
      }
    }
  }
  return res;
}

config.macros.photoGallery.auto = function() {
  var cm = config.macros.photoGallery;
  if(cm.autoAdvance) {
    clearInterval(cm.autoAdvance);
    cm.autoAdvance = null;
    $("#pgPlay").text('►');
  } else {
    if(cm.time>0) {
      cm.autoAdvance = setInterval(cm.nextImage, cm.time);
      $("#pgPlay").text('■');
    }
  }
}

config.macros.photoGallery.jump = function(step) {
  var target;
  switch (step) {
  case "f":
    target=0;
    break;
  case "l":
    target=this.nImages-1;
    break;
  case "n":
    target = (this.current == this.nImages-1) ? 0 : this.current+1; 
    break;
  case "p":
    target = (this.current == 0) ? this.nImages-1 : this.current-1; 
  }
  this.current = target;
  $("#pgObject").attr("src",this.url.replace("*",this.sequence[target]))
  if(this.numbers) $("#pgCounter").text((target+1) + '/'+ this.nImages);
  if(this.labels) $("#pgLabel").text(this.labelsArray[target]);
}

config.macros.photoGallery.nextImage = function(){config.macros.photoGallery.jump('n');}
config.macros.photoGallery.previousImage = function(){config.macros.photoGallery.jump('p');}
config.macros.photoGallery.lastImage = function(){config.macros.photoGallery.jump('l');}
config.macros.photoGallery.firstImage = function(){config.macros.photoGallery.jump('f');}
})(jQuery)
}
//}}}
Here are my contributed [[TiddlyWiki|http://www.tiddlywiki.com]] extensions. Enjoy!
| Plugin (Translation) | Description | Examples |h
|BibTeXPlugin|Very incomplete ~BibTeX implementation to work with bibliographic references|[[Citations]] <br>[[References]]|
|~MathSVGPlugin|[[MathSVGPlugin home page|MathSVG.html]]||
|PhotoGalleryPlugin|A simple photo gallery with optional subtitles|[[Lisboa]] ListOfPhotos|
|SlideShowPlugin ([[PT|SlideShowPluginMsgPT]])|	Creates a slide show from a group of tiddlers|ListSlideShow<br>TagSlideShow<br>ForEachTiddlerSlideShow<br>IncludeShowStarter<br>RemoteShow<br>SingleTiddlerSlideShow|
|TaggerCommand ([[PT|TaggerCommandMsgPT]])|A simple alternative to manage tags||
Looking for MissingPlugins?
Para alterar o seu TiddlyWiki para português (europeu) copie o tiddler PortugueseTranslationPlugin e classifique-o com a etiqueta //systemConfig//.
Se quiser começar com um TiddlyWiki novo já em português, pode encontrar uma tradução completa do TiddlyWiki [[aqui|pt_empty.html]] (clique com o botão direito do rato para guardar).
----
To change your TiddlyWiki to (european) portuguese copy the tiddler PortugueseTranslationPlugin and give it the //systemConfig// tag.
If you want to start with a new Tiddlywiki in portuguese, you can find a full translation of TiddlyWiki [[here|pt_empty.html]] (right-click to save).
/***
|''Name:''|PortugueseTranslationPlugin|
|''Description:''|Translation of TiddlyWiki into European Portuguese|
|''Author:''|Paulo Soares|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Version:''|2.6.2|
|''Date:''|Jan 18, 2011|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/ ]]|
|''~CoreVersion:''|2.6.0|
***/
/*{{{*/
config.locale = "pt"; // W3C language tag

if (config.options.txtUserName=="YourName")
   merge(config.options,{txtUserName: "OSeuNome"});

merge(config.tasks,{
	save: {text: "guardar", tooltip: "Guarda as alterações a este TiddlyWiki", action: saveChanges},
	sync: {text: "sincronizar", tooltip: "Sincroniza alterações com outros ficheiros TiddlyWiki ou servidores", content: '<<sync>>'},
	importTask: {text: "importar", tooltip: "Importa tiddlers e plugins de outros ficheiros TiddlyWiki ou servidores", content: '<<importTiddlers>>'},
	tweak: {text: "configurar", tooltip: "Configura a aparência e o comportamento do TiddlyWiki", content: '<<options>>'},
	upgrade: {text: "actualizar", tooltip: "Actualiza o código central do TiddlyWiki", content: '<<upgrade>>'},
	plugins: {text: "plugins", tooltip: "Gerir plugins instalados", content: '<<plugins>>'}
});

// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
	txtUserName: "Nome de utilizador para assinar as edições",
	chkRegExpSearch: "Activar expressões regulares na procura",
	chkCaseSensitiveSearch: "Procura sensível a maiúsculas",
	chkIncrementalSearch: "Procura incremental caracter-a-caracter",
	chkAnimate: "Activar animações",
	chkSaveBackups: "Manter ficheiro de salvaguarda ao guardar alterações",
	chkAutoSave: "Guardar alterações automaticamente",
	chkGenerateAnRssFeed: "Gerar um ficheiro RSS ao guardar alterações",
	chkSaveEmptyTemplate: "Gerar um modelo vazio ao guardar alterações",
	chkOpenInNewWindow: "Abrir ligações externas em novas janelas",
	chkToggleLinks: "Clicar em ligações para tiddlers abertos, fecha-os",
	chkHttpReadOnly: "Esconde funções de edição quando acedido por HTTP",
	chkForceMinorUpdate: "Não actualizar o nome de utilizador nem a data ao editar tiddlers",
	chkConfirmDelete: "Requerer confirmação ao eliminar tiddlers",
	chkInsertTabs: "Usar a tecla TAB para inserir caracteres de tabulação em vez de saltar para o próximo campo",
	txtBackupFolder: "Nome do directório para os ficheiros de salvaguarda",
	txtMaxEditRows: "Número máximo de linhas nas caixas de edição",
	txtTheme: "Nome do tema a usar", 
	txtFileSystemCharSet: "Código de caracteres por omissão para guardar alterações (apenas em Firefox/Mozilla)"});

merge(config.messages,{
	customConfigError: "Foram encontrados problemas ao carregar plugins. Veja o PluginManager para mais detalhes",
	pluginError: "Erro: %0",
	pluginDisabled: "Não executado porque foi desactivado pela etiqueta 'systemConfigDisable'",
	pluginForced: "Executado porque foi forçado pela etiqueta 'systemConfigForce'",
	pluginVersionError: "Não executado porque este plugin requer uma versão mais recente do TiddlyWiki",
	nothingSelected: "Nada está selecionado. Deve selecionar um ou mais itens primeiro",
	savedSnapshotError: "Parece que este TiddlyWiki foi guardado incorrectamente. Por favor veja http://www.tiddlywiki.com/#Download para mais detalhes",
	subtitleUnknown: "(desconhecido)",
	undefinedTiddlerToolTip: "O tiddler '%0' ainda não existe",
	shadowedTiddlerToolTip: "O tiddler '%0' ainda não existe, mas tem um modelo pré-definido",
	tiddlerLinkTooltip: "%0 - %1, %2",
	externalLinkTooltip: "Ligação externa a %0",
	noTags: "Não há tiddlers com etiquetas",
	notFileUrlError: "É necessário guardar este TiddlyWiki num ficheiro antes de poder guardar alterações",
	cantSaveError: "Não é possível guardar alterações. Possíveis razões incluem:\n- o seu browser não o permite (funciona sob Firefox, Internet Explorer, Safari ou Opera se estes estiverem configurados adequadamente)\n- o nome do caminho para o seu ficheiro TiddlyWiki contém caracteres ilegais\n- o nome ou a localização do ficheiro TiddlyWiki foram alterados",
	invalidFileError: "O ficheiro original '%0' não parece ser um TiddlyWiki válido",
	backupSaved: "Ficheiro de salvaguarda guardado",
	backupFailed: "Falha ao guardar o ficheiro de salvaguarda",
	rssSaved: "Ficheiro RSS guardado",
	rssFailed: "Falha ao guardar o ficheiro RSS",
	emptySaved: "Modelo vazio guardado",
	emptyFailed: "Falha ao guardar o modelo vazio",
	mainSaved: "Ficheiro principal de TiddlyWiki guardado",
	mainFailed: "Falha ao guardar o ficheiro principal de TiddlyWiki. As suas alterações não foram guardadas",
	macroError: "Erro na macro <<%0>>",
	macroErrorDetails: "Erro ao executar a macro <<%0>>:\n%1",
	missingMacro: "Essa macro não existe",
	overwriteWarning: "Um tiddler chamado '%0' já existe. Escolha OK para substituí-lo",
	unsavedChangesWarning: "ATENÇÃO! Há alterações no TiddlyWiki que ainda não foram guardadas\n\nEscolha OK para guardar\nEscolha CANCEL para abandonar as alterações",
	confirmExit: "--------------------------------\n\nHá alterações no TiddlyWiki que ainda não foram guardadas. Se continuar irá perder essas alterações\n\n--------------------------------",
	saveInstructions: "GuardarAlterações",
	unsupportedTWFormat: "Formato TiddlyWiki não suportado '%0'",
	tiddlerSaveError: "Erro ao guardar tiddler '%0'",
	tiddlerLoadError: "Erro ao carregar tiddler '%0'",
	wrongSaveFormat: "Não é possível guardar no formato de armazenamento '%0'. Use o formato padrão para guardar.",
	invalidFieldName: "Nome de campo inválido %0",
	loadingMissingTiddler: "Tentando obter o tiddler '%0' do servidor '%1' em:\n\n'%2' no espaço de trabalho '%3'",
	upgradeDone: "A actualização para a versão %0 está completa\n\nClique 'OK' para recarregar o TiddlyWiki actualizado",
	invalidCookie: "Cookie inválida '%0'"});

merge(config.messages.messageClose,{
	text: "fechar",
	tooltip: "fecha esta área de mensagens"});

config.messages.backstage = {
	open: {text: "bastidores", tooltip: "Abre a área de bastidores para executar tarefas de edição e administração"},
	close: {text: "fechar", tooltip: "Fecha a área de bastidores"},
	prompt: "bastidores: ",
	decal: {
		edit: {text: "editar", tooltip: "Edita o tiddler '%0'"}
	}
};

config.messages.listView = {
	tiddlerTooltip: "Clique para ver o texto completo deste tiddler",
	previewUnavailable: "(antevisão não disponível)"
};

config.messages.dates.months = ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];
config.messages.dates.days = ["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"];
config.messages.dates.shortMonths = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"];
config.messages.dates.shortDays = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"];

merge(config.messages.tiddlerPopup,{
	});

merge(config.views.wikified.tag,{
	labelNoTags: "sem etiquetas",
	labelTags: "etiquetas: ",
	openTag: "Abrir etiqueta '%0'",
	tooltip: "Abrir tiddlers etiquetados com '%0'",
	openAllText: "Abrir todos",
	openAllTooltip: "Abrir todos estes tiddlers",
	popupNone: "Não há outros tiddlers etiquetados com '%0'"});

merge(config.views.wikified,{
	defaultText: "O tiddler '%0' ainda não existe. Faça duplo-clique para criá-lo",
	defaultModifier: "(em falta)",
	shadowModifier: "(tiddler sombra pré-definido)",
	dateFormat: "DD MMM YYYY",
	createdPrompt: "criado em"});

merge(config.views.editor,{
	tagPrompt: "Escreva as etiquetas separadas por espaços, [[use duplos parênteses rectos]] se necessário, ou atribua existentes",
	defaultText: "Escreva o texto para '%0'"});

merge(config.views.editor.tagChooser,{
	text: "etiquetas",
	tooltip: "Escolha entre as etiquetas existentes para atribuir a este tiddler",
	popupNone: "Não há etiquetas definidas",
	tagTooltip: "Atribuir a etiqueta '%0'"});

merge(config.messages,{
	sizeTemplates:
		[
		{unit: 1024*1024*1024, template: "%0\u00a0GB"},
		{unit: 1024*1024, template: "%0\u00a0MB"},
		{unit: 1024, template: "%0\u00a0KB"},
		{unit: 1, template: "%0\u00a0B"}
		]});

merge(config.macros.search,{
	label: "procurar",
	prompt: "Procura neste TiddlyWiki",
	accessKey: "F",
	successMsg: "%0 tiddlers encontrados que contêm %1",
	failureMsg: "Não foi encontrado nenhum tiddler que contenha %0"});

merge(config.macros.tagging,{
	label: "etiquetando:",
	labelNotTag: "não etiquetando",
	tooltip: "Lista de tiddlers etiquetados com '%0'"});

merge(config.macros.timeline,{
	dateFormat: "DD MMM YYYY"});

merge(config.macros.allTags,{
	tooltip: "Mostra tiddlers com a etiqueta '%0'",
	noTags: "Não há tiddlers etiquetados"});

config.macros.list.all.prompt = "Todos os tiddlers em ordem alfabética";
config.macros.list.missing.prompt = "Tiddlers com ligações para eles mas que não existem";
config.macros.list.orphans.prompt = "Tiddlers sem ligações de outros tiddlers";
config.macros.list.shadowed.prompt = "Tiddlers na sombra com conteúdo pré-definido";
config.macros.list.touched.prompt = "Tiddlers que foram modificados localmente";

merge(config.macros.closeAll,{
	label: "fechar todos",
	prompt: "Fecha todos os tiddlers abertos (excepto os que estão a ser editados)"});

merge(config.macros.permaview,{
	label: "permavista",
	prompt: "Ligação a um URL que mostra todos os tiddlers que estão abertos"});

merge(config.macros.saveChanges,{
	label: "guardar alterações",
	prompt: "Guarda todas as alterações em ficheiro",
	accessKey: "S"});

merge(config.macros.newTiddler,{
	label: "novo tiddler",
	prompt: "Cria um novo tiddler",
	title: "Novo tiddler",
	accessKey: "N"});

merge(config.macros.newJournal,{
	label: "novo diário",
	prompt: "Cria um novo tiddler com a data e hora actuais",
	accessKey: "J"});

merge(config.macros.options,{
	wizardTitle: "Configurar opções avançadas",
	step1Title: "Estas opções são guardadas em cookies no seu browser",
	step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Mostra opções desconhecidas</input>",
	unknownDescription: "//(desconhecido)//",
	listViewTemplate: {
		columns: [
			{name: 'Option', field: 'option', title: "Opção", type: 'String'},
			{name: 'Description', field: 'description', title: "Descrição", type: 'WikiText'},
			{name: 'Name', field: 'name', title: "Nome", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
	});

merge(config.macros.plugins,{
	wizardTitle: "Gerir plugins",
	step1Title: "Plugins carregados",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	skippedText: "(Este plugin não foi executado porque foi incluido depois do arranque)",
	noPluginText: "Não há plugins instalados",
	confirmDeleteText: "Tem a a certeza que quer eliminar estes plugins:\n\n%0",
	removeLabel: "remover a etiqueta systemConfig",
	removePrompt: "Remove a etiqueta systemConfig",
	deleteLabel: "eliminar",
	deletePrompt: "Elimina estes tiddlers para sempre",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Description', field: 'Description', title: "Descrição", type: 'String'},
			{name: 'Version', field: 'Version', title: "Versão", type: 'String'}, 
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Tamanho", type: 'Size'},
			{name: 'Forced', field: 'forced', title: "Forçado", tag: 'systemConfigForce', type: 'TagCheckbox'},
			{name: 'Disabled', field: 'disabled', title: "Desactivado", tag: 'systemConfigDisable', type: 'TagCheckbox'},
			{name: 'Executed', field: 'executed', title: "Carregado", type: 'Boolean', trueText: "Sim", falseText: "Não"},
			{name: 'Startup Time', field: 'startupTime', title: "Tempo de arranque", type: 'String'},
			{name: 'Error', field: 'error', title: "Estado", type: 'Boolean', trueText: "Erro", falseText: "OK"},
			{name: 'Log', field: 'log', title: "Registo", type: 'StringList'}
			],
		rowClasses: [
			{className: 'error', field: 'error'},
			{className: 'warning', field: 'warning'}
            ]}, 
	listViewTemplateReadOnly: { 
		columns: [ 
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'}, 
			{name: 'Description', field: 'Description', title: "Descrição", type: 'String'}, 
			{name: 'Version', field: 'Version', title: "Versão", type: 'String'}, 
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Tamanho", type: 'Size'}, 
			{name: 'Executed', field: 'executed', title: "Carregado", type: 'Boolean', trueText: "Sim", falseText: "Não"}, 
			{name: 'Startup Time', field: 'startupTime', title: "Tempo de inicialização", type: 'String'}, 
			{name: 'Error', field: 'error', title: "Estado", type: 'Boolean', trueText: "Erro", falseText: "OK"}, 
			{name: 'Log', field: 'log', title: "Registo", type: 'StringList'} 
			], 
		rowClasses: [ 
			{className: 'error', field: 'error'}, 
			{className: 'warning', field: 'warning'}
			]}
	});

merge(config.macros.toolbar,{
	moreLabel: "mais",
	morePrompt: "Mostra comandos adicionais",
	lessLabel: "menos",
	lessPrompt: "Esconde comandos adicionais",
	separator: "|"
	});

merge(config.macros.refreshDisplay,{
	label: "refresca",
	prompt: "Refresca a apresentação de todo o TiddlyWiki"
	});

merge(config.macros.importTiddlers,{
	readOnlyWarning: "Não pode importar para um ficheiro TiddlyWiki só de leitura. Tente abrir a partir de um URL do tipo file://",
	wizardTitle: "Importar tiddlers de outro ficheiro TiddlyWiki ou servidor",
	step1Title: "Passo 1: Localize o servidor ou o ficheiro TiddlyWiki",
	step1Html: "Especifique o tipo de servidor: <select name='selTypes'><option value=''>Escolha...</option></select><br>Escreva o URL ou o caminho aqui: <input type='text' size=50 name='txtPath'><br>...ou procure um ficheiro: <input type='file' size=50 name='txtBrowse'><br><hr>...ou selecione uma localização pré-definida: <select name='selFeeds'><option value=''>Escolha...</option></select>",
	openLabel: "abrir",
	openPrompt: "Abre a ligação a este ficheiro ou servidor",
	statusOpenHost: "Abrindo o anfitrião",
	statusGetWorkspaceList: "Obtendo a lista de espaços de trabalho disponíveis",
	step2Title: "Passo 2: Escolha o espaço de trabalho",
	step2Html: "Escreva o nome de um espaço de trabalho: <input type='text' size=50 name='txtWorkspace'><br>...or selecione um espaço de trabalho: <select name='selWorkspace'><option value=''>Escolha...</option></select>",
	cancelLabel: "cancelar",
	cancelPrompt: "Cancela esta importação",
	statusOpenWorkspace: "Abrindo o espaço de trabalho",
	statusGetTiddlerList: "Obtendo a lista de tiddlers disponíveis",
	errorGettingTiddlerList: "Erro ao transferir a lista de tiddlers, clique em Cancelar para tentar novamente",
	step3Title: "Passo 3: Escolha os tiddlers para importar",
	step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>Manter estes tiddlers ligados a este servidor para poder sincronizar mudanças subsequentes</input><br><input type='checkbox' name='chkSave'>Guardar os detalhes deste servidor num tiddler 'systemServer' chamado:</input> <input type='text' size=25 name='txtSaveTiddler'>",
	importLabel: "importar",
	importPrompt: "Importa estes tiddlers",
	confirmOverwriteText: "Tem a certeza que quer substituir estes tiddlers:\n\n%0",
	step4Title: "Passo 4: Importando %0 tiddler(s)",
	step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
	doneLabel: "fechar",
	donePrompt: "Fecha este assistente",
	statusDoingImport: "Importando tiddlers",
	statusDoneImport: "Todos os tiddlers importados",
	systemServerNamePattern: "%2 de %1",
	systemServerNamePatternNoWorkspace: "%1",
	confirmOverwriteSaveTiddler: "O tiddler '%0' já existe. Clique 'OK' para o substituir pelos detalhes deste servidor, ou 'Cancel' para manter sem alterações",
	serverSaveTemplate: "|''Tipo:''|%0|\n|''URL:''|%1|\n|''Espaço de trabalho:''|%2|\n\nEste tiddler foi criado automaticamente para registar os detalhes deste servidor",
	serverSaveModifier: "(Sistema)",
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Size', field: 'size', tiddlerLink: 'size', title: "Tamanho", type: 'Size'},
			{name: 'Tags', field: 'tags', title: "Etiquetas", type: 'Tags'}
			],
		rowClasses: [
			]}
	});

merge(config.macros.upgrade,{
	wizardTitle: "Actualização do código central do TiddlyWiki",
	step1Title: "Actualize ou repare este TiddlyWiki para a versão mais recente",
	step1Html: "Vai proceder com a actualização para o código central do TiddlyWiki mais recente (a partir de <a href='%0' class='externalLink' target='_blank'>%1</a>). O seu conteúdo será preservado pela actualização.<br><br>Note que as actualizações do código central podem interferir com plugins antigos. Se tiver problemas com o ficheiro actualizado, veja <a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
	errorCantUpgrade: "Não é possível actualizar este TiddlyWiki.  Só são possíveis as actualizações de ficheiros TiddlyWiki guardados localmente",
	errorNotSaved: "É necessário guardar modificações antes de actualizar",
	step2Title: "Confirme os detalhes da actualização",
	step2Html_downgrade: "Vai regredir para a versão %0 do TiddlyWiki a partir da versão %1.<br><br>Regredir para uma versão anterior do código central não é recomendado",
	step2Html_restore: "Parece que este TiddlyWiki já usa a última versão do código central (%0).<br><br>Pode continuar a actualização para garantir que o código central não foi corrompido ou danificado",
	step2Html_upgrade: "Vai actualizar o TiddlyWiki da versão %1 para a versão %0",
	upgradeLabel: "actualizar",
	upgradePrompt: "Prepare-se para o processo de actualização",
	statusPreparingBackup: "A preparar cópia de segurança",
	statusSavingBackup: "A guardar cópia de segurança",
	errorSavingBackup: "Ocorreu um problema ao guardar a cópia de segurança",
	statusLoadingCore: "A transferir o código central",
	errorLoadingCore: "Erro ao transferir o código central",
	errorCoreFormat: "Erro com o novo código central",
	statusSavingCore: "A guardar o novo código central",
	statusReloadingCore: "A recarregar o novo código central",
	startLabel: "iniciar",
	startPrompt: "Inicie a actualização",
	cancelLabel: "cancelar",
	cancelPrompt: "Cancele a actualização",
	step3Title: "Actualização cancelada",
	step3Html: "A actualização foi cancelada"
	});

merge(config.macros.sync,{
	listViewTemplate: {
		columns: [
			{name: 'Selected', field: 'selected', rowName: 'title', type: 'Selector'},
			{name: 'Tiddler', field: 'tiddler', title: "Tiddler", type: 'Tiddler'},
			{name: 'Server Type', field: 'serverType', title: "Tipo de servidor", type: 'String'},
			{name: 'Server Host', field: 'serverHost', title: "Anfitrião do servidor", type: 'String'},
			{name: 'Server Workspace', field: 'serverWorkspace', title: "Espaço de trabalho do servidor", type: 'String'},
			{name: 'Status', field: 'status', title: "Estado da sincronização", type: 'String'},
			{name: 'Server URL', field: 'serverUrl', title: "URL do servidor", text: "Ver", type: 'Link'}
			],
		rowClasses: [
			],
		buttons: [
			{caption: "Sincroniza este tiddlers", name: 'sync'}
			]},
	wizardTitle: "Sincronizar com ficheiros ou servidores externos",
	step1Title: "Escolha os tiddlers que quer sincronizar",
	step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
	syncLabel: "sincronizar",
	syncPrompt: "Sincroniza este tiddlers",
	hasChanged: "Alterado enquanto desligado",
	hasNotChanged: "Sem alterações enquanto desligado",
	syncStatusList: {
		none: {text: "...", display:'none', className:'notChanged'},
		changedServer: {text: "Alterado no servidor", display:null, className:'changedServer'},
		changedLocally: {text: "Alterado enquanto desligado", display:null, className:'changedLocally'},
		changedBoth: {text: "Alterado enquanto desligado e no servidor",  display:null, className:'changedBoth'},
		notFound: {text: "Não encontrado no servidor", display:null, className:'notFound'},
		putToServer: {text: "Actualizado no servidor", display:null, className:'putToServer'},
		gotFromServer: {text: "Obtida actualização do servidor", display:null, className:'gotFromServer'}
		}
	});

merge(config.macros.annotations,{
	});

merge(config.commands.closeTiddler,{
	text: "fechar",
	tooltip: "Fecha este tiddler"});

merge(config.commands.closeOthers,{
	text: "isolar",
	tooltip: "Fecha todos os outros tiddlers"});

merge(config.commands.editTiddler,{
	text: "editar",
	tooltip: "Edita este tiddler",
	readOnlyText: "ver",
	readOnlyTooltip: "Ver o conteúdo deste tiddler"});

merge(config.commands.saveTiddler,{
	text: "guardar",
	tooltip: "Guarda as alterações a este tiddler"});

merge(config.commands.cancelTiddler,{
	text: "cancelar",
	tooltip: "Cancela as alterações a este tiddler",
	warning: "Tem a certeza que quer cancelar as alterações a '%0'?",
	readOnlyText: "voltar",
	readOnlyTooltip: "Ver este tiddler normalmente"});

merge(config.commands.deleteTiddler,{
	text: "eliminar",
	tooltip: "Elimina este tiddler",
	warning: "Tem a certeza que quer eliminar '%0'?"});

merge(config.commands.permalink,{
	text: "permaligação",
	tooltip: "Permaligação para este tiddler"});

merge(config.commands.references,{
	text: "referências",
	tooltip: "Mostra tiddlers que ligam a este",
	popupNone: "Sem referências"});

merge(config.commands.jump,{
	text: "saltar",
	tooltip: "Salta para outro tiddler aberto"});

merge(config.commands.syncing,{
	text: "sinc",
	tooltip: "Controla sincronização deste tiddler com um servidor ou ficheiro externo",
	currentlySyncing: "<div>Sincronizando via <span class='popupHighlight'>'%0'</span> para:</"+"div><div>anfitrião: <span class='popupHighlight'>%1</span></"+"div><div>espaço de trabalho: <span class='popupHighlight'>%2</span></"+"div>", // Note escaping of closing <div> tag
	notCurrentlySyncing: "Sem sincronização",
	captionUnSync: "Parar sincronização deste tiddler",
	chooseServer: "Sincronizar este tiddler com outro servidor:",
	currServerMarker: "\u25cf ",
	notCurrServerMarker: "  "});

merge(config.commands.fields,{
	text: "campos",
	tooltip: "Mostra os campos estendidos deste tiddler",
	emptyText: "Este tiddler não tem campos estendidos",
	listViewTemplate: {
		columns: [
			{name: 'Field', field: 'field', title: "Campo", type: 'String'},
			{name: 'Value', field: 'value', title: "Valor", type: 'String'}
			],
		rowClasses: [
			],
		buttons: [
			]}});

merge(config.shadowTiddlers,{
	DefaultTiddlers: "[[ComoIniciar]]",
	MainMenu: "[[ComoIniciar]]",
	ComoIniciar: "Para começar a usar este TiddlyWiki vazio terá de modificar os seguintes tiddlers:\n* SiteTitle & SiteSubtitle: O título e o subtítulo do site, como pode ver acima (depois de guardar as alterações, eles aparecerão também na barra de título do browser)\n* MainMenu: O menu (usualmente à esquerda)\n* DefaultTiddlers: Contém o nome dos tiddlers que pretende que apareçam quando o TiddlyWiki é aberto\nSerá também necessário inserir o nome de utilizador que servirá para assinar as edições: <<option txtUserName>>",
	SiteTitle: "O meu TiddlyWiki",
	SiteSubtitle: "um bloco de notas reutilizável e não-linear na web",
	SiteUrl: "",
	SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "opções \u00bb" "Muda as opções avançadas do TiddlyWiki">>',
	OptionsPanel: "Estas opções de personalização do TiddlyWiki ficam guardadas no seu browser\n\nO seu nome de utilizador para assinar os textos. Use uma PalavraWiki (eg, JoséSilva)\n\n<<option txtUserName>>\n<<option chkSaveBackups>> GuardarSalvaguardas\n<<option chkAutoSave>> AutoGuardar\n<<option chkRegExpSearch>> ProcuraExpReg\n<<option chkCaseSensitiveSearch>> ProcuraSensívMaiúsc\n<<option chkAnimate>> ActivarAnimações\n\n----\nVeja as [[OpçõesAvançadas|AdvancedOptions]]",
	SideBarTabs: '<<tabs txtMainTab "Data" "Tiddlers por ordem cronológica" TabTimeline "Título" "Tiddlers por ordem alfabética" TabAll "Etiquetas" "Todas as etiquetas" TabTags "Mais" "Mais listas" TabMore>>',
	TabMore: '<<tabs txtMoreTab "Em falta" "Tiddlers em falta" TabMoreMissing "Órfãos" "Tiddlers sem ligações de outros tiddlers" TabMoreOrphans "Sombra" "Tiddlers na sombra" TabMoreShadowed>>',
	ToolbarCommands: "|~ViewToolbar|closeTiddler closeOthers +editTiddler > fields syncing permalink references jump|\n|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|"});

merge(config.annotations,{
	AdvancedOptions: "Este tiddler sombra dá acesso a várias opções avançadas",
	ColorPalette: "Estes valores neste tiddler sombra determinam o esquema de cores do interface de utilizador do ~TiddlyWiki",
	DefaultTiddlers: "Os tiddlers listados neste tiddler sombra serão automaticamente abertos no arranque do ~TiddlyWiki",
	EditTemplate: "O modelo em HTML neste tiddler sombra determina o aspecto dos tiddlers enquanto são editados",
	ComoIniciar: "Este tiddler sombra fornece algumas instruções básicas de utilização",
	ImportTiddlers: "Este tiddler sombra dá acesso à importação de tiddlers",
	MainMenu: "Este tiddler sombra é usado como conteúdo do menu principal na coluna da esquerda do ecran",
	MarkupPreHead: "Este tiddler é inserido no topo da secção <head> do ficheiro TiddlyWiki",
	MarkupPostHead: "Este tiddler é inserido no fundo da secção <head> do ficheiro TiddlyWiki",
	MarkupPreBody: "Este tiddler é inserido no topo da secção <body> do ficheiro TiddlyWiki",
	MarkupPostBody: "Este tiddler é inserido no fim da secção <head> do ficheiro TiddlyWiki immediatamente após o bloco <script>",
	OptionsPanel: "Este tiddler sombra é usado como conteúdo do painel deslizante de opções na barra lateral da direita",
	PageTemplate: "O modelo em HTML neste tiddler sombra determina o aspecto geral do ~TiddlyWiki",
	PluginManager: "Este tiddler sombra dá acesso ao gestor de plugins",
	SideBarOptions: "Este tiddler sombra é usado como conteúdo do painel de opções na barra lateral da direita",
	SideBarTabs: "Este tiddler sombra é usado como conteúdo do painel de abas na barra lateral da direita",
	SiteSubtitle: "Este tiddler sombra é usado como a segunda parte do título da página",
	SiteTitle: "Este tiddler sombra é usado como a primeira parte do título da página",
	SiteUrl: "Este tiddler sombra deve conter o URL completo para publicação",
	StyleSheetColors: "Este tiddler sombra contém definições CSS relacionadas com a cor dos elementos da página. ''NÃO EDITE ESTE TIDDLER'', em vez disso faça as suas alterações no tiddler sombra StyleSheet",
	StyleSheet: "Este tiddler pode conter definições CSS do utilizador",
	StyleSheetLayout: "Este tiddler sombra contém definições CSS relacionadas com a disposição dos elementos da página. ''NÃO EDITE ESTE TIDDLER'', em vez disso faça as suas alterações no tiddler sombra StyleSheet",
	StyleSheetLocale: "Este tiddler sombra contém definições CSS relacionadas com traduções",
	StyleSheetPrint: "Este tiddler sombra contém definições CSS relacionadas com a impressão",
	SystemSettings: "Este tiddler é usado para guardar opções de configuração deste documento ~TiddlyWiki",
	TabAll: "Este tiddler sombra define o conteúdo da aba 'Título' na barra lateral da direita",
	TabMore: "Este tiddler sombra define o conteúdo da aba 'Mais' na barra lateral da direita",
	TabMoreMissing: "Este tiddler sombra define o conteúdo da aba 'Em falta' na barra lateral da direita",
	TabMoreOrphans: "Este tiddler sombra define o conteúdo da aba 'Órfãos' na barra lateral da direita",
	TabMoreShadowed: "Este tiddler sombra define o conteúdo da aba 'Sombra' na barra lateral da direita",
	TabTags: "Este tiddler sombra define o conteúdo da aba 'Etiquetas' na barra lateral da direita",
	TabTimeline: "Este tiddler sombra define o conteúdo da aba 'Data' na barra lateral da direita",
	ToolbarCommands: "Este tiddler sombra determina quais os comandos que aparecem na barra de ferramentas dos tiddlers",
	ViewTemplate: "O modelo em HTML neste tiddler sombra determina o aspecto dos tiddlers"
	});

delete config.shadowTiddlers.GettingStarted;
/*}}}*/
/*{{{*/
.header, .mainMenu, #sidebar, #backstageShow{
 display:block !important
}

#displayArea{
 font-size: 100%;
 margin: 1em 15.5em 0em 1em !important;
 position: relative;
}

h1,h2,h3 {margin-top:0.3em}

@media print {
#mainMenu, #sidebar, #messageArea, .tagging, .tagged, .subtitle, #pageFooter, .button, .header {display: none ! important;}

.tiddler{
 page-break-after: always;
 border: 2px solid blue;
 margin: 1em 0 1em 0;
 padding: 0.5em
}

#displayArea {margin: 1em 0em 0em 0em !important;}
}
/*}}}*/
<<bibliography Bibliography showAll>>
This presentation's content is defined in the tiddler [[Content Show]].
<<slideShow tiddler:'Content Show' theme:ConferenceTheme clock:0 header:'New Advances on ...' footer:'I Conference on Everything'>> Custom style with clock
<<slideShow toc:'titles' theme:ConferenceTheme clock:0 header:'New Advances on ...' footer:'I Conference on Everything'>> Custom style with clock
!Let's start!
Press F11 to go fullscreen and adjust the font sizes with Ctrl++ Ctrl+- (or Ctrl+mousewheel).
{{comment{
!Test
@@You can hide text on a slide so it won't be displayed in the slide show@@}}}
{{noClicks{
This button can be clicked without advancing the slide show: <<tag show>>}}}
Now press ''B'' to pause/restart the presentation.
-s-
!Main features
Most features that are usually found in presentation software are available. 
*Build a slide show from a list of tiddlers' titles or selecting a specific tag with optional sort
*Fully customizable presentations (CSS knowledge required)
*Auto-advancing slide show (kiosk mode) and looping (circular mode)
*Incremental display (several overlays or layers in a slide)
*Optional clock with 3 different modes:
**local time
**elapsed time of presentation
**countdown clock for a given period
*Screen blanking for pauses
-s-
!Overlays
To see how incremental display works use the left and right mouse buttons.
{{overlay1{You can}}} {{overlay2{present things}}} {{overlay1{in an arbitrary order!!!}}}
{{overlay3{Its a bit harder with lists but it works:}}}
<html>
<ol>
<li class="overlay4">First item</li>
<li class="overlay5">Second item</li>
<li class="overlay4">Last item</li>
</ol>
</html>{{comment{You can hide comments on a slide that won't display in the slide show}}}
-s-
!Using the keyboard
!!Slide/overlay navigation
*Home/Up arrow - first slide/overlay
*~PageUp/Left arrow - previous slide/overlay
*~PageDown/Left arrow - next slide/overlay
*End/Down arrow - last slide/overlay
*Escape - exit slide show
The content of this presentation is written in the tiddler SingleSlideShow.
<<slideShow tiddler:'SingleSlideShow' single header:'A single tidller slide show'>>
~TiddlyWiki <<version>> addons
Paulo Soares
!Let's start!
Press F11 to go fullscreen and adjust the font sizes with Ctrl++ Ctrl+- (or Ctrl+mousewheel).
{{comment{
!Test
@@You can hide text on a slide so it won't be displayed in the slide show@@}}}
{{noClicks{
This button can be clicked without advancing the slide show: <<tag show>>}}}
Now press ''B'' to pause/restart the presentation.
!Main features
Most features that are usually found in presentation software are available. 
*Build a slide show from a list of tiddlers' titles or selecting a specific tag with optional sort
*Fully customizable presentations (CSS knowledge required)
*Auto-advancing slide show (kiosk mode) and looping (circular mode)
*Incremental display (several overlays or layers in a slide)
*Optional clock with 3 different modes:
**local time
**elapsed time of presentation
**countdown clock for a given period
*Screen blanking for pauses
!Overlays
To see how incremental display works use the left and right mouse buttons.
{{overlay1{You can}}} {{overlay2{present things}}} {{overlay1{in an arbitrary order!!!}}}
{{overlay3{Its a bit harder with lists but it works:}}}
<html>
<ol>
<li class="overlay4">First item</li>
<li class="overlay5">Second item</li>
<li class="overlay4">Last item</li>
</ol>
</html>{{comment{You can hide comments on a slide that won't display in the slide show}}}
!Using the keyboard
!!Slide/overlay navigation
*Home/Up arrow - first slide/overlay
*~PageUp/Left arrow - previous slide/overlay
*~PageDown/Left arrow - next slide/overlay
*End/Down arrow - last slide/overlay
*Escape - exit slide show
/***
|''Name:''|SlideShowPlugin|
|''Description:''|Creates a slide show from any number of tiddlers|
|''Author:''|Paulo Soares|
|''Contributors:''|John P. Rouillard|
|''Version:''|2.2.6|
|''Date:''|2010-11-17|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Documentation:''|[[SlideShowPlugin Documentation|SlideShowPluginDoc]]|
|''License:''|[[Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.5.0|
***/
//{{{
if(!version.extensions.SlideShowPlugin) { //# ensure that the plugin is only installed once
version.extensions.SlideShowPlugin = {installed: true};

(function($) {
config.macros.slideShow = {maxTOCLength: 30, separator:'-s-'};

config.formatters.push( {
	name: "SlideSeparator",
	match: "^"+config.macros.slideShow.separator+"+$\\n?",
	handler: function(w) {
		createTiddlyElement(w.output,"hr",null,'slideSeparator');
	}
});

config.macros.slideShow.text = {
  label: "slide show", tooltip: "Start slide show",
  quit: {label: "x", tooltip: "Quit the slide show"},
  firstSlide: {label: "<<", tooltip: "Go to first slide"},
  previous: {label: "<", tooltip: "Go back"},
  next: {label: ">", tooltip: "Advance"},
  lastSlide: {label: ">>", tooltip: "Go to last slide"},
  goto: {label: "Go to slide:"},
  resetClock: {tooltip: "Reset the clock"},
  overlay: "overlay"
};

config.macros.slideShow.handler = function(place,macroName,params,wikifier,paramString){
  var args = paramString.parseParams(null,null,false);
  this.label = getParam(args,"label",this.text.label);
  this.tooltip = getParam(args,"tooltip",this.text.tooltip);
  var onclick = function(){config.macros.slideShow.onClick(place,paramString); return false;};
  createTiddlyButton(place,this.label,this.tooltip,onclick);
  return false;
}

config.macros.slideShow.onClick = function(place,paramString) {
  var slide, cm = config.macros.slideShow;
  var title = story.findContainingTiddler(place);
  title = title ? title.getAttribute("tiddler") : null;
  var args = paramString.parseParams(null,null,false);
  title =  getParam(args,"tiddler",title);
  var argsArray = paramString.readMacroParams();
  this.single = ($.inArray('single',argsArray) > -1);
  this.clicks = ($.inArray('noClicks',argsArray) < 0);
  this.keyboard = ($.inArray('noKeyboard',argsArray) < 0);
  this.showAll = ($.inArray('showAll',argsArray) > -1);
  this.cycle = ($.inArray('cycle',argsArray) > -1);
  this.overlays = ($.inArray('noOverlays',argsArray) < 0);
  this.theme = getParam(args,"theme");
  this.tag = getParam(args,"tag");
  this.toc = getParam(args,"toc","headers");
  this.sort = getParam(args,"sort");
  this.clockFormat = getParam(args,"clockFormat",'0hh:0mm:0ss');
  this.auto = getParam(args,"auto",0);
  this.header = getParam(args,"header",title);
  this.footer = getParam(args,"footer","");
  this.clock = getParam(args,"clock");
  this.blocked = 0;
  if(this.clock){
    var startTime = new Date(0);
    this.clockCorrection=startTime.getTimezoneOffset()*60000;
    startTime = new Date();
    this.clockMultiplier = 1;
    this.clockInterval = 0;
    var clockType= parseFloat(this.clock);
    if(clockType < 0) {
      this.clockMultiplier = -1;
      this.clockInterval = -clockType*60000;
    } else if(clockType == 0){
      this.clockCorrection = 0;
      startTime = new Date(0);
    }
    this.clockStartTime=startTime.getTime();
  }
  this.slides = [];
  this.openTiddlers = [];
  $("#tiddlerDisplay > *").each(function(){cm.openTiddlers.push($(this).attr('tiddler'))});
  var count = 0;
  this.slideTOC=[];
  if(this.single){
    if(!store.tiddlerExists(title)) return;
    var newTiddler;
    var content = store.getTiddlerText(title).split(cm.separator);
    $.each(content, function(){
      count++;
      newTiddler = new Tiddler();
      newTiddler.title ="TempSlide" + count;
      newTiddler.tags[0] = "excludeLists";
      newTiddler.text = $.trim(this);
      newTiddler.fields['doNotSave']= true;
      store.addTiddler(newTiddler);
      cm.buildTOC(count,newTiddler.title);
      cm.slides.push(newTiddler.title);
    });
  } else {
    if(this.tag){
      var content = store.getTaggedTiddlers(this.tag,this.sort);
      $.each(content, function(){
        count++;
        cm.buildTOC(count,this.title);
        cm.slides.push(this.title);
      });
    } else {
      story.displayTiddler(null,title);
      var list = $('[tiddler='+title+']').find('.viewer').find('.tiddlyLinkExisting');
      $.each(list,function(){
        if(!$(this).parents().hasClass("exclude")){
          slide = $(this).attr('tiddlylink');
          count++;
          cm.buildTOC(count,slide);
          cm.slides.push(slide);
        }
      });
    }
  }
  this.nSlides = this.slides.length;
  if(this.nSlides==0) return false;
  clearMessage();
  this.toggleSlideStyles();
  if(!this.showAll){
    //Attach the key and mouse listeners
    if(this.keyboard && !$("#tiddlerDisplay").hasClass("noKeyboard")) $(document).keyup(cm.keys);
    if(this.clicks){
      $(document).mouseup(cm.clicker);
      document.oncontextmenu = function(){return false;}
    }
    if(this.clock) this.slideClock=setInterval(this.setClock, 1000);
    if(this.auto>0){
      this.autoAdvance=setInterval(cm.next, this.auto*1000);
    }
    this.showSlide(1);
  } else {
    story.closeAllTiddlers();
    story.displayTiddlers(null,this.slides);
    $(".tiddler").attr("ondblclick",null);
    $(document).keyup(cm.endSlideShow);
  }
  return false;
}

config.macros.slideShow.buildNavigator = function() {
  //Create the navigation bar
  var i, slidefooter = $("#controlBar")[0];
  if(!slidefooter) return;
  $(slidefooter).addClass("slideFooterOff noClicks");
  var navigator = createTiddlyElement(slidefooter,"SPAN","navigator");
  var buttonBar = createTiddlyElement(navigator,"SPAN","buttonBar");
  //Make it so that when the footer is hovered over the class will change to make it visible
  $(slidefooter).bind("mouseenter mouseleave", function(e){$(this).toggleClass("slideFooterOff");});
  //Create the control buttons for the navigation
 
  createTiddlyButton(buttonBar,this.text.firstSlide.label,this.text.firstSlide.tooltip,this.firstSlide,"button");
  createTiddlyButton(buttonBar,this.text.previous.label,this.text.previous.tooltip,this.previous,"button");
  createTiddlyButton(buttonBar,this.text.quit.label,this.text.quit.tooltip,this.endSlideShow,"button");
  createTiddlyButton(buttonBar,this.text.next.label,this.text.next.tooltip,this.next,"button");
  createTiddlyButton(buttonBar,this.text.lastSlide.label,this.text.lastSlide.tooltip,this.lastSlide,"button");
  if(this.clock){
    if(this.clock == 0){
       createTiddlyElement(navigator,"SPAN","slideClock");
    } else {
      createTiddlyButton(navigator," ",this.text.resetClock.tooltip,this.resetClock,"button","slideClock");
    }
    this.setClock();
  }
  var index = createTiddlyElement(slidefooter,"SPAN","slideCounter");
  index.onclick = this.toggleTOC;
  var toc = createTiddlyElement(slidefooter,"SPAN","toc");
  var tocLine;
  for(i=0; i<this.slideTOC.length; i++){
    $(toc).append(this.slideTOC[i][2]);
    tocLine = $(toc.lastChild);
    tocLine.addClass("tocLevel"+this.slideTOC[i][1]).css("cursor", "pointer").hover(function () {
        $(this).addClass("highlight");}, function () {
        $(this).removeClass("highlight");});
    tocLine.attr("slide",this.slideTOC[i][0]);
    tocLine.click(config.macros.slideShow.showSlideFromTOC);
  }
  //Input box to jump to specific slide
  var tocItem = createTiddlyElement(toc,"DIV","jumpItem",null,this.text.goto.label);
  var tocJumpInput = createTiddlyElement(tocItem,"INPUT","jumpInput");
  tocJumpInput.type="text";
  $(tocJumpInput).keyup(config.macros.slideShow.jumpToSlide);
}

//Used to shorten the TOC fields
config.macros.slideShow.abbreviate = function(label){
  if(label.length>this.maxTOCLength) {
    var temp = new Array();
    temp = label.split(' ');
    label = temp[0];
    for(var j=1; j<temp.length; j++){
      if((label.length+temp[j].length)<=this.maxTOCLength){
        label += " " + temp[j];
      } else {
        label += " ...";
        break;
      }
    }
  }
  return label;
}

config.macros.slideShow.buildTOC = function(count,title) {
  var level = 1, text;
  switch(this.toc){
  case "headers":
    var frag = wikifyStatic(store.getTiddlerText(title));
    text = frag.replace(/<div class="comment">.*<\/div>/mg,"");
    var matches =  text.match(/<h[123456]>.*?<\/h[123456]>/mgi);
    if(matches){
      for (var j=0; j<matches.length; j++){
        level = matches[j].charAt(2);
        text = matches[j].replace(/<\/?h[123456]>/gi,"");
        text = this.abbreviate(text);
        this.slideTOC.push([count,level,"<div>"+text+"</div>"]);
      }
    }
    break;
  case "titles":
    text = this.abbreviate(title);
    this.slideTOC.push([count,level,"<div>"+text+"</div>"]);
  }
}

config.macros.slideShow.showSlideFromTOC = function(e) {
  var cm = config.macros.slideShow;
  var slide = parseInt(e.target.getAttribute('slide'));
  $("#toc").hide();
  cm.showSlide(slide);
  return false;
}

config.macros.slideShow.toggleTOC = function(){
  $("#toc").toggle();
  $("#jumpInput").focus().val('');
  return false;
}

config.macros.slideShow.isInteger = function(s){
  for (var i = 0; i < s.length; i++){
    // Check that current character is number
    var c = s.charAt(i);
    if (((c < "0") || (c > "9"))) return false;
  }
  // All characters are numbers
  return true;
}

config.macros.slideShow.jumpToSlide = function(e){
  var cm = config.macros.slideShow;
  if(e.which==13){
    var input= $("#jumpInput").val();
    if(cm.isInteger(input) && input>0 && input<=cm.nSlides){
      $("#toc").hide();
      cm.showSlide(input);
    } else  {$("#jumpInput").val('');}
  }
  return false;
}

config.macros.slideShow.toggleSlideStyles = function(){
  var contentWrapper = $('#contentWrapper');
  if(contentWrapper.hasClass("slideShowMode")){
    refreshPageTemplate();
    removeStyleSheet("SlideShowStyleSheet");
    if(this.theme) removeStyleSheet(this.theme);
  } else {
    $("#displayArea").prepend('<div id="slideBlanker" style="display:none"></div><div id="slideHeader">'+this.header+'</div><div id="slideFooter">'+this.footer+'</div><div id="controlBar"></div>');
    setStylesheet(store.getRecursiveTiddlerText("SlideShowStyleSheet"),"SlideShowStyleSheet");
    if(this.theme && store.tiddlerExists(this.theme)){setStylesheet(store.getRecursiveTiddlerText(this.theme),this.theme);}
    this.buildNavigator();
  }
  contentWrapper.toggleClass("slideShowMode");
  return false;
}

config.macros.slideShow.showSlide = function(n){
  if(this.cycle) {
    if(n>this.nSlides) {
      n = 1;
    } else if(n<1) {
      n = this.nSlides;
    }
  } else {
    if(n>this.nSlides || n<1) return;
  }
  story.closeAllTiddlers();
  if(this.clock=='-'){this.resetClock();}
  story.displayTiddler(null,String(this.slides[n-1]));
  $(".tiddler").attr("ondblclick",null);
  $("body").removeClass("slide"+this.curSlide);
  this.curSlide = n;
  $("body").addClass("slide"+this.curSlide);
  $("#slideCounter").text(this.curSlide+"/"+this.nSlides);
  if(this.overlays){
    var contents = $(".viewer *");
    this.numOverlays = 1;
    while(1){
      if(contents.hasClass(this.text.overlay+this.numOverlays)){
        this.numOverlays++;
      } else {break;}
    }
    this.numOverlays--;
    this.showOverlay(0);
  }
  return false;
}

config.macros.slideShow.showOverlay = function(n){
  var i, set, cm = config.macros.slideShow;
  if(!cm.overlays || cm.numOverlays == 0 || n<0 || n>cm.numOverlays){return;}
  for(i=1; i<n; i++){
    set = $(".viewer "+"."+cm.text.overlay+i);
    set.removeClass("currentOverlay nextOverlay");
    set.addClass("previousOverlay");
  }
  set = $(".viewer "+"."+cm.text.overlay+n);
  set.removeClass("previousOverlay nextOverlay");
  set.addClass("currentOverlay");
  for(i=n; i<config.macros.slideShow.numOverlays; i++){
    set = $(".viewer "+"."+cm.text.overlay+(i+1));
    set.removeClass("previousOverlay currentOverlay");
    set.addClass("nextOverlay");
  }
  cm.curOverlay = n;
}

config.macros.slideShow.firstSlide = function(){
  config.macros.slideShow.showSlide(1);
  return false;
}

config.macros.slideShow.lastSlide = function(){
  config.macros.slideShow.showSlide(config.macros.slideShow.nSlides);
  return false;
}

config.macros.slideShow.next = function(){
  var cm = config.macros.slideShow;
  if(!cm.overlays || cm.numOverlays == 0 || cm.curOverlay == cm.numOverlays) {
    cm.showSlide(cm.curSlide+1);
  } else {
    cm.showOverlay(cm.curOverlay+1);
  }
  return false;
}

config.macros.slideShow.previous = function(){
  var cm = config.macros.slideShow;
  if(!cm.overlays || cm.numOverlays == 0 || cm.curOverlay == 0) {
    cm.showSlide(cm.curSlide-1);
    cm.showOverlay(cm.numOverlays);
  } else {
    cm.showOverlay(cm.curOverlay-1);
  }
  return false;
}

config.macros.slideShow.endSlideShow=function(){
  var cm = config.macros.slideShow;
  if(cm.autoAdvance) {clearInterval(cm.autoAdvance);}
  if(cm.clock) clearInterval(cm.slideClock);
  story.closeAllTiddlers();
  cm.toggleSlideStyles();
  story.displayTiddlers(null,cm.openTiddlers);
  $(document).unbind();
  document.oncontextmenu =  function(){};
  $("body").removeClass("slide"+cm.curSlide);
  return false;
}

// 'keys' code adapted from S5 which in turn was adapted from MozPoint (http://mozpoint.mozdev.org/)
config.macros.slideShow.keys = function(key) {
  var cm = config.macros.slideShow;
  switch(key.which) {
  case 32: // spacebar
    if(cm.auto>0 && cm.blocked==0){
      if(cm.autoAdvance){
        clearInterval(cm.autoAdvance);
        cm.autoAdvance = null;
      } else {
        cm.autoAdvance=setInterval(cm.next, cm.auto*1000);
      }
    } else {
      if(cm.blocked==0) cm.next();
    }
    break;
  case 34: // page down
    if(cm.blocked==0) cm.showSlide(cm.curSlide+1);
    break;
  case 39: // rightkey
    if(cm.blocked==0) cm.next();
    break;
  case 40: // downkey
    if(cm.blocked==0) cm.showOverlay(cm.numOverlays);
    break;
  case 33: // page up
    if(cm.blocked==0) cm.showSlide(cm.curSlide-1);
    break;
  case 37: // leftkey
    if(cm.blocked==0) cm.previous();
    break;
  case 38: // upkey
    if(cm.blocked==0) cm.showOverlay(0);
    break;
  case 36: // home
    if(cm.blocked==0) cm.firstSlide();
    break;
  case 35: // end
    if(cm.blocked==0) cm.lastSlide();
    break;
  case 27: // escape
    cm.endSlideShow();
    break;
  case 66: // B
    $("#slideBlanker").toggle();
    cm.blocked = (cm.blocked +1)%2;
    break;
  }
  return false;
}

config.macros.slideShow.clicker = function(e) {
  var cm = config.macros.slideShow;
  if(cm.blocked==1 || $(e.target).attr('href') || $(e.target).parents().andSelf().hasClass('noClicks')){
    return true;
  }
  if($("#toc").is(':visible')){
    cm.toggleTOC();
  } else {
    if((!e.which && e.button == 1) || e.which == 1) {
      cm.next();
    }
    if((!e.which && e.button == 2) || e.which == 3) {
      cm.previous();
    }
  }
  return false;
}

config.macros.slideShow.setClock = function(){
  var cm = config.macros.slideShow;
  var actualTime = new Date();
  var newTime = actualTime.getTime() - cm.clockStartTime;
  newTime = cm.clockMultiplier*newTime+cm.clockInterval+cm.clockCorrection;
  actualTime.setTime(newTime);
  newTime = actualTime.formatString(cm.clockFormat);
  $("#slideClock").text(newTime);
  return false;
}

config.macros.slideShow.resetClock = function(){
  var cm = config.macros.slideShow;
  if(cm.clock == 0) return;
  var time = new Date(0);
  if(cm.clockStartTime>time){
    var startTime = new Date();
    cm.clockStartTime=startTime.getTime();
  }
  return false;
}

config.shadowTiddlers.SlideShowStyleSheet="/*{{{*/\n.header, #mainMenu, #sidebar, #backstageButton, #backstageArea, .toolbar, .title, .subtitle, .tagging, .tagged, .tagClear, .comment{\n display:none !important\n}\n\n#slideBlanker{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 90; \n background-color: #000;\n opacity: 0.9;\n filter: alpha(opacity=90)\n}\n\n.nextOverlay{\n visibility: hidden\n}\n\n.previousOverlay,.currentOverlay{\n visibility: visible\n}\n\n#displayArea{\n font-size: 250%;\n margin: 0 !important;\n padding: 0\n}\n\n#controlBar{\n position: fixed;\n bottom: 2px;\n right: 2px;\n width: 100%;\n text-align: right\n}\n\n#controlBar .button{\n margin: 0 0.25em;\n padding: 0 0.25em\n}\n\n#slideHeader{\n font-size: 200%;\n font-weight: bold\n}\n\n#slideFooter{\n position: fixed;\n bottom: 2px\n}\n\n.slideFooterOff #navigator{\n visibility: hidden\n}\n\n#slideClock{\n margin: 0 5px 0 5px\n}\n\n#slideCounter{\n cursor: pointer;\n color: #aaa\n}\n\n#toc{\n display: none;\n position: absolute;\n font-size: .75em;\n bottom: 2em;\n right: 0;\n background: #fff;\n border: 1px solid #000;\n text-align: left\n}\n\n#jumpItem{\n padding-left:0.25em\n}\n\n#jumpInput{\n margin-left: 0.25em;\n width: 3em\n}\n\n.tocLevel1{\n font-size: .8em\n}\n\n.tocLevel2{\n margin-left: 1em;\n font-size: .75em\n}\n\n.tocLevel3{\n margin-left: 2em;\n font-size: .7em\n}\n\n.tocLevel4{\n margin-left: 3em;\n font-size: .65em\n}\n\n.tocLevel5{\n margin-left: 4em;\n font-size: .6em\n}\n\n.tocLevel6{\n margin-left: 5em;\n font-size: .55em\n}\n/*}}}*/";

config.shadowTiddlers.SlideShowPluginDoc="The documentation is available [[here|http://www.math.ist.utl.pt/~psoares/addons.html#SlideShowPluginDoc]].";
})(jQuery)
}
//}}}
!Description
This plugin turns any number of tiddlers into a slide show. A single macro provides a flexible way to present a set of tiddlers, including:
#a full screen presentation that hides the TiddlyWiki structure (header, sidebar, main menu);
#a way to navigate through a set of tiddlers keeping the TiddlyWiki structure (similar to the [[NavigationMacro|http://tw.lewcid.org/#NavigationMacro]] by Saq Imtiaz);
#a display of all the selected tiddlers ready to be printed.
!Main features
Most features that are usually found in presentation software are available. 
*Build a slide show from a list of tiddlers' titles or selecting a specific tag with optional sort
*Build a slide show from a single tiddler where slides are divided by a separator
*Fully customizable presentations (CSS knowledge required)
*Auto-advancing slide show (kiosk mode) and looping (circular mode)
*Incremental display (several overlays or layers in a slide)
*Optional clock with 4 different modes:
**local time
**elapsed time of presentation
**elapsed time for each slide
**countdown clock for a given period
*Screen blanking for pauses
!Installation
To install this plugin copy the tiddler SlideShowPlugin to your TiddlyWiki, label it with the ''systemConfig'' tag, save the TW and refresh the browser.
Optionally, you can also copy this documentation tiddler. If you don't, a link to the original one in my site is provided.  
!Quick start
The simplest way to make a slide show is to create a new tiddler with references to all the tiddlers you want to include in your presentation. Any reference or group of references to tiddlers that should be skipped must be wrapped in a {{{exclude}}} class as in the following example:
{{{
MissingSlide
[[First slide|SlideShowExample-1]] {{exclude{(the tiddler SlideShowPluginDoc will not be included in the presentation)}}}
SlideShowExample-2
SlideShowExample-3
SlideShowExample-4
}}}
Add {{{<<slideShow>>}}} anywhere in the tiddler, close the edit form, click the ''slide show'' button and there you are. Move forward/backward in the presentation with the mouse left/right button. If you move the mouse pointer over the bottom of the browser window you will see a few navigation buttons. Click the ''x'' button or press the ''Escape'' key to exit.
!Options
{{{
<<slideShow
  noClicks
  noKeyboard
  noOverlays
  cycle
  showAll
  single
  tiddler:tiddler
  label:string
  tooltip:string
  tag:tag
  sort:field
  theme:tiddler
  toc:string
  auto:time
  clock:type
  clockFormat:string
  header:string
  footer:string
>> 
}}}
''noClicks''
Disables navigation through mouse clicks on the tiddlers. This is useful when there are lots of clickable elements in the presentation.
If you want to keep using the mouse to move around the presentation and there are occasional elements that require mouse clicking, these can be formatted with a {{{noClicks}}} class (read more [[here|http://www.tiddlywiki.com/#CustomCssClass]]).

''noKeyboard''
Disables keyboard navigation.

''noOverlays''
Disables the incremental display of overlays.

''cycle''
The slide shows runs in a continuous loop. 

''showAll''
To print a presentation all the selected tiddlers are opened in the specified order. Press any key to return to the default TiddlyWiki layout.

''single''
Use this if a presentation is defined in a single tiddler.

''tiddler''
Use this option to indicate the tiddler where your slide show is defined when it is not the same one that contains the button that starts the presentation.

''label''
Text to replace the default text in the slide show button.

''tooltip''
Text to be shown when the mouse is over the slide show button.

''tag''
Use this option to create a slide show with the tiddlers with the provided tag instead of providing a list of tiddlers.

''sort''
If the ''tag'' option is used you can use this other option to sort the tiddlers according to a specific field. Valid values are: //created// (default), //modified//, //title// and //text//.

''theme''
A user provided tiddler containing CSS rules that define the style of the slide show. To redefine the default style, edit the SlideShowStyleSheet shadow tiddler. 

''toc''
Choose the type of table of contents. Possible values: ''titles'' will enable the use of the tiddlers titles, ''headers'' (default) to choose html headers (h1, h2,...), anything else will disable the table of contents.  

''auto''
The slide show auto advances after the defined number of seconds. The slide show can be paused by pressing the ''space bar''.

''clock''
Displays a clock near the navigation buttons at the bottom of the screen. Four types of clocks can be defined:
#''clock:0'' -- shows the local time.
#''clock:'+''' -- displays the elapsed time of the presentation. Click the clock display to reset the time.
#''clock:'-''' -- displays the elapsed for each slide. Click the clock display to reset the time.
#''clock:-20'' -- displays a countdown clock for the given (negative) number of minutes. Click the clock display to reset the time.
''clockFormat''
A string that defines the clock format. The default is '0hh:0mm:0ss' where the prefix '0' forces a leading zero. 

''header''
A string to be used as a permanent header for the slide show. By default it's used the title of tiddler that defines the slide show.

''footer''
A string to be used as a permanent footer for the slide show. By default the footer is empty.
!Incremental display
A succession of overlays (or layers) can be defined in each slide by marking blocks of text with
{{{
{{overlay1{...some text...}}}, {{overlay2{...some text...}}}, {{overlay3{...some text...}}}, ...
}}}
The default name of the classes (//overlay//) can be redefined with //config.macros.slideShow.text.overlay = "layer"//, for example. 
To costumize the way overlays are shown you can redefine the following CSS classes
*.previousOverlay 
*.currentOverlay 
*.nextOverlay 
in a ~StyleSheet. The default style simply hides the next overlays and shows the current and the previous ones as normal text.
!Slide show navigation
You can navigate through a slide show using the keyboard or the mouse. 
!!Mouse navigation
Left (right) clicking on a slide jumps to the next (previous) slide or overlay. To move to the first or last slides you must use the navigation bar at the bottom of the browser's window.
!!Keyboard
The following keys are defined:
*Home - first slide
*~PageUp - previous slide
*~PageDown - next slide
*End - last slide
*Escape - exit slide show
*Up arrow - first overlay
*Left arrow - previous overlay/slide
*Pause/Right arrow - next overlay/slide
*Down arrow - last overlay
*Spacebar - pause/resume slide show in auto advance mode, next overlay/slide otherwise
*B - blank screen and block the slide show
!Miscellaneous 
Any block of text marked as
{{{
{{comment{For my eyes only!}}}
}}}
will not be displayed in the slide show.

All translatable strings are defined in //config.macros.slideShow.text// parameter. See SlideShowPluginMsgPT with the portuguese translation as an example.
//{{{
config.macros.slideShow.text = {
  label: "apresentação", tooltip: "Começar apresentação",
  quit: {label: "x", tooltip: "Terminar apresentação"},
  firstSlide: {label: "<<", tooltip: "Primeiro slide"},
  previous: {label: "<", tooltip: "Anterior"},
  next: {label: ">", tooltip: "Seguinte"},
  lastSlide: {label: ">>", tooltip: "Último slide"},
  goto: {label: "Ir para o slide:"},
  resetClock: {tooltip: "Recomeçar relógio"},
  overlay: "camada"
}
//}}}
/*{{{*/
.header, #mainMenu, #sidebar, #backstageButton, #backstageArea, .topMenu,.toolbar, .title, .subtitle, .tagging, .tagged, .tagClear, .comment{
 display:none !important
}

#slideBlanker{
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 z-index: 90; 
 background-color: #000;
 opacity: 0.9;
 filter: alpha(opacity=90)
}

.nextOverlay{
 visibility: hidden
}

.previousOverlay,.currentOverlay{
 visibility: visible
}

#displayArea{
 font-size: 250%;
 margin: 0 !important;
 padding: 0
}

#controlBar{
 position: fixed;
 bottom: 2px;
 right: 2px;
 width: 100%;
 text-align: right
}

#controlBar .button{
 margin: 0 0.25em;
 padding: 0 0.25em
}

#slideHeader{
 font-size: 200%;
 font-weight: bold
}

#slideFooter{
 position: fixed;
 bottom: 2px
}

.slideFooterOff #navigator{
 visibility: hidden
}

#slideClock{
 margin: 0 5px 0 5px
}

#slideCounter{
 cursor: pointer;
 color: #aaa
}

#toc{
 display: none;
 position: absolute;
 font-size: .75em;
 bottom: 2em;
 right: 0;
 background: #fff;
 border: 1px solid #000;
 text-align: left
}

#jumpItem{
 padding-left:0.25em
}

#jumpInput{
 margin-left: 0.25em;
 width: 3em
}

.tocLevel1{
 font-size: .8em
}

.tocLevel2{
 margin-left: 1em;
 font-size: .75em
}

.tocLevel3{
 margin-left: 2em;
 font-size: .7em
}

.tocLevel4{
 margin-left: 3em;
 font-size: .65em
}

.tocLevel5{
 margin-left: 4em;
 font-size: .6em
}

.tocLevel6{
 margin-left: 5em;
 font-size: .55em
}
/*}}}*/
/*{{{*/
.header, .mainMenu, #sidebar, #backstageShow, .title{
 display:block !important
}

#displayArea{
 font-size: 100%;
 margin: 1em 15.5em 0em 1em !important;
 position: relative;
}

.tiddler{
padding-bottom: 2em
}

#controlBar{
 position: absolute;
 top: 2px;
 right: 2px;
 bottom: auto
}

#slideFooter{
 position: absolute;
}

#toc{
 font-size: 1em;
 bottom: auto;
 top: 2em;
 right: 0;
}

#slideCounter{
 background: #eee;
 padding: 0.2em
}

/* navigator always visible*/
.slideFooterOff #navigator{
 visibility: visible;
}
/*}}}*/
Baixa de Lisboa e rio Tejo
Praça do Comércio (arco da rua Augusta)
Torre de Belém
S. Vicente de Fora e Panteão Nacional
This one uses the ''tag'' and ''sort'' options. The presentation advances every 2 seconds in an infinite loop.
The slides are ordered according to their text contents.
<<slideShow tag:'show' sort:'text' auto:2 cycle noTitles>>
Open the slides here: <<tag show>>
/***
|''Name:''|TaggerCommand|
|''Description:''|Alternative mechanism for tags management.|
|''Author:''|Paulo Soares|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Version:''|1.1|
|''Date:''|Jan 28, 2011|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/ ]]|
|''~CoreVersion:''|2.5|
***/
//{{{
(function($) {

config.commands.tagger = {
  text: 'tags',
  tooltip: 'Manage tags',
  excludeTags: '',
  addTag: 'add tag ',
  removeTag: 'remove tag ',
  newTag: 'new tag',
  newTagPrompt: 'New tag:'
};

config.commands.tagger.handler =  function(ev,src,title) {
  var e = ev || window.event;
  var tagTiddler, target = story.findContainingTiddler(resolveTarget(e));
  var ct = config.commands.tagger;
  var exclude = ct.excludeTags.readBracketedList();
  var tiddler = store.getTiddler(title);
  var popup = Popup.create($(".command_tagger",target)[0],null,"popup tagger");
  var tag, tagsarray = store.getTags();

  for (var i=0; i<tagsarray.length; i++){
    tag = tagsarray[i][0];
    tagTiddler = store.getTiddler(tag);
    if (!(tagTiddler && tagTiddler.isTagged('excludeLists'))){
      if(tiddler.isTagged(tag)){
        createTiddlyButton(createTiddlyElement(popup,"li"),tag,ct.removeTag+" '"+tag+"'",ct.toggle,"button usedTag");
      } else if(!exclude.contains(tag)){
        createTiddlyButton(createTiddlyElement(popup,"li"),tag,ct.addTag+" '"+tag+"'",ct.toggle,"button unusedTag");
      }
    }
  }

  createTiddlyElement(createTiddlyElement(popup,"li"),"hr");
  createTiddlyButton(createTiddlyElement(popup,"li"),ct.newTag,null,ct.toggle);
  Popup.show();
  e.cancelBubble = true;
  if(e.stopPropagation) e.stopPropagation();
  return false;
};


config.commands.tagger.toggle = function(ev) {
  var e = ev || window.event;
  var target = resolveTarget(e);
  if($(target).parent().index() < $(target).parent().parent().children().length-1){
    var tag = $(target).text();
  }
  var title = story.findContainingTiddler(target).getAttribute("tiddler");
  var tiddler = store.getTiddler(title);
  if(!tag){
    var newtag=prompt(config.commands.tagger.newTagPrompt,"");
    if(newtag!='' && newtag!=null)
      {var tag=newtag;}
    else
      {return false;};
  }
  if(!tiddler || !tiddler.tags)
    {store.saveTiddler(title,title,'',config.options.txtUserName,new Date(),tag);}
  else
     {if(!tiddler.isTagged(tag))
        {tiddler.tags.push(tag)}
     else if(!newtag){
       var newtags = [];
       for(var i=0; i<tiddler.tags.length; i++){
         if(tiddler.tags[i]!=tag) newtags.push(tiddler.tags[i]);
       }
       tiddler.tags = newtags;
    };
    store.saveTiddler(tiddler.title,tiddler.title,tiddler.text,tiddler.modifier,tiddler.modified,tiddler.tags);
  };
  if(config.options.chkAutoSave)
    saveChanges();
  return false;
};
})(jQuery);

setStylesheet(
 ".tagger a.button {display:inline; padding:0 2px 0 2px;}\n"+
 ".tagger .usedTag {font-weight: bold;}\n"+
 ".tagger .unusedTag {color: #777;}",
"TaggerStyles");
//}}}
//{{{
config.commands.tagger.text = 'etiquetas';
config.commands.tagger.tooltip = 'Gerir etiquetas';
config.commands.tagger.addTag = 'adicionar ';
config.commands.tagger.removeTag = 'remover ';
config.commands.tagger.newTag = 'nova etiqueta';
config.commands.tagger.newTagPrompt = 'Nova etiqueta:'
//}}}
<<tiddler 'What is this?'>>
/***
|''Name:''|ToggleSideBarMacro|
|''Description:''|Provides a button for toggling visibility of the SideBar.|
|''Author:''|Paulo Soares (based on a previous macro from Saq Imtiaz)|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Version:''|1.1|
|''Date:''|Jan 28, 2011|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/ ]]|
|''~CoreVersion:''|2.5|
***/
//{{{
(function($) {
config.macros.toggleSideBar={
  mode: 'hide',
  arrowShow: "◄",
  arrowHide: "►",
  tooltip: "Toggle sidebar"
};

config.macros.toggleSideBar.handler=function(place){
  var label = (this.mode == "hide")? this.arrowShow : this.arrowHide;
  createTiddlyButton(place,label,this.tooltip,this.onToggleSideBar,"HideSideBarButton");
  if(this.mode == "hide"){ 
    $('#sidebar').hide();
    $('#displayArea').css({'margin-right':'1em'});
  }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
  var cm = config.macros.toggleSideBar;
  var button = this.firstChild;
  var sidebar = $('#sidebar');
  if(sidebar.is(':visible') ) {
    $('#displayArea').css({'margin-right':'1em'});
    button.data = cm.arrowShow;
  } else {
    $('#displayArea').css({'margin-right':''});
    button.data = cm.arrowHide;
  }
  sidebar.toggle();
  return false;
}
})(jQuery)
//}}}
|~ViewToolbar|closeTiddler closeOthers tagger +editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
<<toggleSideBar>> [[?|What is this?]] [[PortugueseTranslation]] [[Plugins]]
//{{{
readOnly = false; // means web visitors can experiment with your site by clicking edit
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = "";   // don't need message when creating a new tiddler
config.messages.backstage.open.text="";
config.messages.backstage.close.text="";
config.options.txtTheme = "PSTheme";
config.macros.toggleSideBar.mode = 'show';
//}}}
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.4|
|''Date:''|2008-08-11|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 4, minor: 1, revision: 4,
	date: new Date("2008-08-11"),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	author: 'BidiX (BidiX (at) bidix (dot) info',
	coreVersion: '2.2.0'
};

//
// Environment
//

if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false;	// true to activate both in Plugin and UploadService
	
//
// Upload Macro
//

config.macros.upload = {
// default values
	defaultBackupDir: '',	//no backup
	defaultStoreScript: "store.php",
	defaultToFilename: "index.html",
	defaultUploadDir: ".",
	authenticateUser: true	// UploadService Authenticate User
};
	
config.macros.upload.label = {
	promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
	promptParamMacro: "Save and Upload this TiddlyWiki in %0",
	saveLabel: "save to web", 
	saveToDisk: "save to disk",
	uploadLabel: "upload"	
};

config.macros.upload.messages = {
	noStoreUrl: "No store URL in parmeters or options",
	usernameOrPasswordMissing: "Username or password missing"
};

config.macros.upload.handler = function(place,macroName,params) {
	if (readOnly)
		return;
	var label;
	if (document.location.toString().substr(0,4) == "http") 
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (params[0]) {
		prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0], 
			(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
	} else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};

config.macros.upload.action = function(params)
{
		// for missing macro parameter set value from options
		if (!params) params = {};
		var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
		var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
		var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
		var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
		var username = params[4] ? params[4] : config.options.txtUploadUserName;
		var password = config.options.pasUploadPassword; // for security reason no password as macro parameter	
		// for still missing parameter set default value
		if ((!storeUrl) && (document.location.toString().substr(0,4) == "http")) 
			storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
		if (storeUrl.substr(0,4) != "http")
			storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
		if (!toFilename)
			toFilename = bidix.basename(window.location.toString());
		if (!toFilename)
			toFilename = config.macros.upload.defaultToFilename;
		if (!uploadDir)
			uploadDir = config.macros.upload.defaultUploadDir;
		if (!backupDir)
			backupDir = config.macros.upload.defaultBackupDir;
		// report error if still missing
		if (!storeUrl) {
			alert(config.macros.upload.messages.noStoreUrl);
			clearMessage();
			return false;
		}
		if (config.macros.upload.authenticateUser && (!username || !password)) {
			alert(config.macros.upload.messages.usernameOrPasswordMissing);
			clearMessage();
			return false;
		}
		bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password); 
		return false; 
};

config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir) 
{
	if (!storeUrl)
		return null;
		var dest = bidix.dirname(storeUrl);
		if (uploadDir && uploadDir != '.')
			dest = dest + '/' + uploadDir;
		dest = dest + '/' + toFilename;
	return dest;
};

//
// uploadOptions Macro
//

config.macros.uploadOptions = {
	handler: function(place,macroName,params) {
		var wizard = new Wizard();
		wizard.createWizard(place,this.wizardTitle);
		wizard.addStep(this.step1Title,this.step1Html);
		var markList = wizard.getElement("markList");
		var listWrapper = document.createElement("div");
		markList.parentNode.insertBefore(listWrapper,markList);
		wizard.setValue("listWrapper",listWrapper);
		this.refreshOptions(listWrapper,false);
		var uploadCaption;
		if (document.location.toString().substr(0,4) == "http") 
			uploadCaption = config.macros.upload.label.saveLabel;
		else
			uploadCaption = config.macros.upload.label.uploadLabel;
		
		wizard.setButtons([
				{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption, 
					onClick: config.macros.upload.action},
				{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
				
			]);
	},
	options: [
		"txtUploadUserName",
		"pasUploadPassword",
		"txtUploadStoreUrl",
		"txtUploadDir",
		"txtUploadFilename",
		"txtUploadBackupDir",
		"chkUploadLog",
		"txtUploadLogMaxLine"		
	],
	refreshOptions: function(listWrapper) {
		var opts = [];
		for(i=0; i<this.options.length; i++) {
			var opt = {};
			opts.push();
			opt.option = "";
			n = this.options[i];
			opt.name = n;
			opt.lowlight = !config.optionsDesc[n];
			opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
			opts.push(opt);
		}
		var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
		for(n=0; n<opts.length; n++) {
			var type = opts[n].name.substr(0,3);
			var h = config.macros.option.types[type];
			if (h && h.create) {
				h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
			}
		}
		
	},
	onCancel: function(e)
	{
		backstage.switchTab(null);
		return false;
	},
	
	wizardTitle: "Upload with options",
	step1Title: "These options are saved in cookies in your browser",
	step1Html: "<input type='hidden' name='markList'></input><br>",
	cancelButton: "Cancel",
	cancelButtonPrompt: "Cancel prompt",
	listViewTemplate: {
		columns: [
			{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
			{name: 'Option', field: 'option', title: "Option", type: 'String'},
			{name: 'Name', field: 'name', title: "Name", type: 'String'}
			],
		rowClasses: [
			{className: 'lowlight', field: 'lowlight'} 
			]}
};

//
// upload functions
//

if (!bidix.upload) bidix.upload = {};

if (!bidix.upload.messages) bidix.upload.messages = {
	//from saving
	invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
	backupSaved: "Backup saved",
	backupFailed: "Failed to upload backup file",
	rssSaved: "RSS feed uploaded",
	rssFailed: "Failed to upload RSS feed file",
	emptySaved: "Empty template uploaded",
	emptyFailed: "Failed to upload empty template file",
	mainSaved: "Main TiddlyWiki file uploaded",
	mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
	//specific upload
	loadOriginalHttpPostError: "Can't get original file",
	aboutToSaveOnHttpPost: 'About to upload on %0 ...',
	storePhpNotFound: "The store script '%0' was not found."
};

bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
	var callback = function(status,uploadParams,original,url,xhr) {
		if (!status) {
			displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
			return;
		}
		if (bidix.debugMode) 
			alert(original.substr(0,500)+"\n...");
		// Locate the storeArea div's 
		var posDiv = locateStoreArea(original);
		if((posDiv[0] == -1) || (posDiv[1] == -1)) {
			alert(config.messages.invalidFileError.format([localPath]));
			return;
		}
		bidix.upload.uploadRss(uploadParams,original,posDiv);
	};
	
	if(onlyIfDirty && !store.isDirty())
		return;
	clearMessage();
	// save on localdisk ?
	if (document.location.toString().substr(0,4) == "file") {
		var path = document.location.toString();
		var localPath = getLocalPath(path);
		saveChanges();
	}
	// get original
	var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
	var originalPath = document.location.toString();
	// If url is a directory : add index.html
	if (originalPath.charAt(originalPath.length-1) == "/")
		originalPath = originalPath + "index.html";
	var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
	var log = new bidix.UploadLog();
	log.startUpload(storeUrl, dest, uploadDir,  backupDir);
	displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
	if (bidix.debugMode) 
		alert("about to execute Http - GET on "+originalPath);
	var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

bidix.upload.uploadRss = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		if(status) {
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
			bidix.upload.uploadMain(params[0],params[1],params[2]);
		} else {
			displayMessage(bidix.upload.messages.rssFailed);			
		}
	};
	// do uploadRss
	if(config.options.chkGenerateAnRssFeed) {
		var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
		var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
		var rssString = generateRss();
		// no UnicodeToUTF8 conversion needed when location is "file" !!!
		if (document.location.toString().substr(0,4) != "file")
			rssString = convertUnicodeToUTF8(rssString);	
		bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
	} else {
		bidix.upload.uploadMain(uploadParams,original,posDiv);
	}
};

bidix.upload.uploadMain = function(uploadParams,original,posDiv) 
{
	var callback = function(status,params,responseText,url,xhr) {
		var log = new bidix.UploadLog();
		if(status) {
			// if backupDir specified
			if ((params[3]) && (responseText.indexOf("backupfile:") > -1))  {
				var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
				displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
			}
			var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
			displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
			store.setDirty(false);
			log.endUpload("ok");
		} else {
			alert(bidix.upload.messages.mainFailed);
			displayMessage(bidix.upload.messages.mainFailed);
			log.endUpload("failed");			
		}
	};
	// do uploadMain
	var revised = bidix.upload.updateOriginal(original,posDiv);
	bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};

bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
	var localCallback = function(status,params,responseText,url,xhr) {
		url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
		if (xhr.status == 404)
			alert(bidix.upload.messages.storePhpNotFound.format([url]));
		if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
			alert(responseText);
			if (responseText.indexOf("Debug mode") >= 0 )
				responseText = responseText.substring(responseText.indexOf("\n\n")+2);
		} else if (responseText.charAt(0) != '0') 
			alert(responseText);
		if (responseText.charAt(0) != '0')
			status = null;
		callback(status,params,responseText,url,xhr);
	};
	// do httpUpload
	var boundary = "---------------------------"+"AaB03x";	
	var uploadFormName = "UploadPlugin";
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += uploadFormName +"\"\r\n\r\n";
	sheader += "backupDir="+uploadParams[3] +
				";user=" + uploadParams[4] +
				";password=" + uploadParams[5] +
				";uploaddir=" + uploadParams[2];
	if (bidix.debugMode)
		sheader += ";debug=1";
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
	sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
	sheader += "Content-Length: " + data.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	data = sheader + data + strailer;
	if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
	var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
	if (typeof r == "string")
		displayMessage(r);
	return r;
};

// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
	if (!posDiv)
		posDiv = locateStoreArea(original);
	if((posDiv[0] == -1) || (posDiv[1] == -1)) {
		alert(config.messages.invalidFileError.format([localPath]));
		return;
	}
	var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
				store.allTiddlersAsHtml() + "\n" +
				original.substr(posDiv[1]);
	var newSiteTitle = getPageTitle().htmlEncode();
	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
	revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
	revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
	revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
	return revised;
};

//
// UploadLog
// 
// config.options.chkUploadLog :
//		false : no logging
//		true : logging
// config.options.txtUploadLogMaxLine :
//		-1 : no limit
//      0 :  no Log lines but UploadLog is still in place
//		n :  the last n lines are only kept
//		NaN : no limit (-1)

bidix.UploadLog = function() {
	if (!config.options.chkUploadLog) 
		return; // this.tiddler = null
	this.tiddler = store.getTiddler("UploadLog");
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = "UploadLog";
		this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
		store.addTiddler(this.tiddler);
	}
	return this;
};

bidix.UploadLog.prototype.addText = function(text) {
	if (!this.tiddler)
		return;
	// retrieve maxLine when we need it
	var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
	if (isNaN(maxLine))
		maxLine = -1;
	// add text
	if (maxLine != 0) 
		this.tiddler.text = this.tiddler.text + text;
	// Trunck to maxLine
	if (maxLine >= 0) {
		var textArray = this.tiddler.text.split('\n');
		if (textArray.length > maxLine + 1)
			textArray.splice(1,textArray.length-1-maxLine);
			this.tiddler.text = textArray.join('\n');		
	}
	// update tiddler fields
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	store.addTiddler(this.tiddler);
	// refresh and notifiy for immediate update
	story.refreshTiddler(this.tiddler.title);
	store.notify(this.tiddler.title, true);
};

bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	if (!this.tiddler)
		return;
	var now = new Date();
	var text = "\n| ";
	var filename = bidix.basename(document.location.toString());
	if (!filename) filename = '/';
	text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
	text += config.options.txtUserName + " | ";
	text += "[["+filename+"|"+location + "]] |";
	text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
	text += uploadDir + " | ";
	text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
	text += backupDir + " |";
	this.addText(text);
};

bidix.UploadLog.prototype.endUpload = function(status) {
	if (!this.tiddler)
		return;
	this.addText(" "+status+" |");
};

//
// Utilities
// 

bidix.checkPlugin = function(plugin, major, minor, revision) {
	var ext = version.extensions[plugin];
	if (!
		(ext  && 
			((ext.major > major) || 
			((ext.major == major) && (ext.minor > minor))  ||
			((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
			// write error in PluginManager
			if (pluginInfo)
				pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
			eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
	}
};

bidix.dirname = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};

bidix.basename = function(filePath) {
	if (!filePath) 
		return;
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("#")) != -1) 
		filePath = filePath.substring(0, lastpos);
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(lastpos + 1);
	} else
		return filePath.substring(filePath.lastIndexOf("\\")+1);
};

bidix.initOption = function(name,value) {
	if (!config.options[name])
		config.options[name] = value;
};

//
// Initializations
//

// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);

// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");

//optionsDesc
merge(config.optionsDesc,{
	txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
	txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
	txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
	txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
	txtUploadUserName: "Upload Username",
	pasUploadPassword: "Upload Password",
	chkUploadLog: "do Logging in UploadLog (default: true)",
	txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});

// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');


// Backstage
merge(config.tasks,{
	uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");


//}}}

{{{
//URL do script de autenticação e upload
config.options.txtUploadStoreUrl = 'http://www.math.ist.utl.pt/~psoares/store.php';
//Nome relativo da directoria onde o ficheiro é guardado
config.options.txtUploadDir = '';
//Nome do ficheiro que é guardado remotamente
config.options.txtUploadFilename = 'addons.html';
//Nome de uma directoria de backup remota
config.options.txtUploadBackupDir = '';
//Não guarda registos
config.options.chkUploadLog=false;
}}}
This is a  [[TiddlyWiki|http://www.tiddlywiki.com]] (version <<version>> ©2011 [[UnaMesa|http://www.unamesa.org]]). A ~TiddlyWiki it's an excellent tool to manage fragmented information in a very efficient way. According to its author, Jeremy Ruston:
>A ~TiddlyWiki is like a blog because it's divided up into neat little chunks, but it encourages you to read it by hyperlinking rather than sequentially: if you like, a non-linear blog analogue that binds the individual microcontent items into a cohesive whole.
//{{{
config.macros.wikipedia = {};
config.macros.wikipedia.handler= function(place,macroName,params) {
	if(params.length==1){
		var key=params[0];
		var lang="en";
	} else {
		var key=params[1];
		var lang=params[0];
	}
	wikify("[["+key+"|http://"+lang+".wikipedia.org/wiki/"+key+"]]",place)
}
//}}}