TiddlyWiki.org

Changeset 78

Show
Ignore:
Timestamp:
11/04/06 21:57:45 (2 years ago)
Author:
DevonJones
Message:

TiddlyWiki 2.0.00 Merge

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/core/tiddlywiki.html

    r72 r78  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
     1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
    22<script type="text/javascript"> 
    3 var version = {major: 1, minor: 2, revision: 39, date: new Date("Nov 30, 2005"), extensions: {}}; 
     3var version = {major: 2, minor: 0, revision: 0, date: new Date("Jan 5, 2006"), extensions: {}}; 
    44</script> 
    55<!-- 
    6 TiddlyWiki 1.2.39 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com) 
    7  
    8 Published under a BSD open source license 
    9  
    10 Copyright (c) Osmosoft Limited 2005 
     6TiddlyWiki 2.0.0 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com) 
     7 
     8Copyright (c) Osmosoft Limited 2004-2006 
    119 
    1210Redistribution and use in source and binary forms, with or without modification, 
     
    4543// --------------------------------------------------------------------------------- 
    4644 
     45// Miscellaneous options 
    4746var config = { 
    48         // Options that can be set in the options panel and/or cookies 
    49         options: { 
    50                 chkRegExpSearch: false, 
    51                 chkCaseSensitiveSearch: false, 
    52                 chkAnimate: true, 
    53                 txtUserName: "YourName", 
    54                 chkSaveBackups: true, 
    55                 chkAutoSave: false, 
    56                 chkGenerateAnRssFeed: false, 
    57                 chkSaveEmptyTemplate: false, 
    58                 chkOpenInNewWindow: true, 
    59                 chkToggleLinks: false, 
    60                 chkHttpReadOnly: false, 
    61                 chkForceMinorUpdate: false, 
    62                 txtMainTab: "tabTimeline", 
    63                 txtMoreTab: "moreTabAll" 
    64                 }, 
    65         // List of notification functions to be called when certain tiddlers are changed or deleted 
    66         notifyTiddlers: [ 
    67                 {name: "StyleSheetColors", notify: refreshStyles}, 
    68                 {name: "StyleSheetLayout", notify: refreshStyles}, 
    69                 {name: "StyleSheet", notify: refreshStyles}, 
    70                 {name: null, notify: refreshMenu}, 
    71                 {name: null, notify: refreshStory}, 
    72                 {name: null, notify: refreshTabs}, 
    73                 {name: "SiteTitle", notify: refreshTitle}, 
    74                 {name: "SiteSubtitle", notify: refreshSubtitle}, 
    75                 {name: "SideBarOptions", notify: refreshSidebar} 
    76                 ], 
    77         // Shadow tiddlers for emergencies 
    78         shadowTiddlers: { 
    79                 SideBarOptions: "<<gradient vert #ffffff #cc9900>><<search>><<closeAll>><<permaview>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel options 'Change TiddlyWiki advanced options'>>>>", 
    80                 OptionsPanel: "These InterfaceOptions for customising TiddlyWiki are saved in your browser\n\nYour username for signing your edits. Write it as a WikiWord (eg JoeBloggs)\n\n<<option txtUserName>>\n<<option chkSaveBackups>> SaveBackups\n<<option chkAutoSave>> AutoSave\n<<option chkGenerateAnRssFeed>> GenerateAnRssFeed\n<<option chkRegExpSearch>> RegExpSearch\n<<option chkCaseSensitiveSearch>> CaseSensitiveSearch\n<<option chkAnimate>> EnableAnimations\n\nSee AdvancedOptions", 
    81                 AdvancedOptions: "<<option chkOpenInNewWindow>> OpenLinksInNewWindow\n<<option chkSaveEmptyTemplate>> SaveEmptyTemplate\n<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close\n^^(override with Control or other modifier key)^^\n<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP\n<<option chkForceMinorUpdate>> Treat edits as MinorChanges by preserving date and time\n^^(override with Shift key when clicking 'done' or by pressing Ctrl-Shift-Enter^^", 
    82                 SideBarTabs: "<<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>", 
    83                 TabTimeline: "<<timeline>>", 
    84                 TabAll: "<<list all>>", 
    85                 TabTags: "<<allTags>>", 
    86                 TabMore: "<<tabs txtMoreTab Missing 'Missing tiddlers' TabMoreMissing Orphans 'Orphaned tiddlers' TabMoreOrphans>>", 
    87                 TabMoreMissing: "<<list missing>>", 
    88                 TabMoreOrphans: "<<list orphans>>" 
    89                 }, 
    90         // Miscellaneous options 
    9147        numRssItems: 20, // Number of items in the RSS feed 
    9248        animFast: 0.12, // Speed for animations (lower == slower) 
    9349        animSlow: 0.01, // Speed for EasterEgg animations 
    94         // Messages 
    95         messages: { 
    96                 customConfigError: "Error in systemConfig tiddler '%1' - %0", 
    97                 savedSnapshotError: "It appears that this TiddlyWiki has been incorrectly saved. Please see http://www.tiddlywiki.com/#DownloadSoftware for details", 
    98                 subtitleUnknown: "(unknown)", 
    99                 undefinedTiddlerToolTip: "The tiddler '%0' doesn't yet exist", 
    100                 shadowedTiddlerToolTip: "The tiddler '%0' doesn't yet exist, but has a pre-defined shadow value", 
    101                 externalLinkTooltip: "External link to %0", 
    102                 noTags: "There are no tagged tiddlers", 
    103                 notFileUrlError: "You need to save this TiddlyWiki to a file before you can save changes", 
    104                 cantSaveError: "It's not possible to save changes using this browser. Use FireFox if you can", 
    105                 invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki", 
    106                 backupSaved: "Backup saved", 
    107                 backupFailed: "Failed to save backup file", 
    108                 rssSaved: "RSS feed saved", 
    109                 rssFailed: "Failed to save RSS feed file", 
    110                 emptySaved: "Empty template saved", 
    111                 emptyFailed: "Failed to save empty template file", 
    112                 mainSaved: "Main TiddlyWiki file saved", 
    113                 mainFailed: "Failed to save main TiddlyWiki file. Your changes have not been saved", 
    114                 macroError: "Error executing macro '%0'", 
    115                 overwriteWarning: "A tiddler named '%0' already exists. Choose OK to overwrite it", 
    116                 unsavedChangesWarning: "WARNING! There are unsaved changes in TiddlyWiki\n\nChoose OK to save\nChoose CANCEL to discard", 
    117                 dates: { 
    118                         months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"], 
    119                         days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] 
    120                         } 
     50        cascadeFast: 20, // Speed for cascade animations (higher == slower) 
     51        cascadeSlow: 60, // Speed for EasterEgg cascade animations 
     52        cascadeDepth: 5 // Depth of cascade animation 
     53        }; 
     54 
     55// Options that can be set in the options panel and/or cookies 
     56config.options = { 
     57        chkRegExpSearch: false, 
     58        chkCaseSensitiveSearch: false, 
     59        chkAnimate: true, 
     60        txtUserName: "YourName", 
     61        chkSaveBackups: true, 
     62        chkAutoSave: false, 
     63        chkGenerateAnRssFeed: false, 
     64        chkSaveEmptyTemplate: false, 
     65        chkOpenInNewWindow: true, 
     66        chkToggleLinks: false, 
     67        chkHttpReadOnly: false, 
     68        chkForceMinorUpdate: false, 
     69        chkConfirmDelete: true, 
     70        txtMainTab: "tabTimeline", 
     71        txtMoreTab: "moreTabAll", 
     72        txtMaxEditRows: "30" 
     73        }; 
     74         
     75// List of notification functions to be called when certain tiddlers are changed or deleted 
     76config.notifyTiddlers = [ 
     77        {name: "StyleSheetLayout", notify: refreshStyles}, 
     78        {name: "StyleSheetColors", notify: refreshStyles}, 
     79        {name: "StyleSheet", notify: refreshStyles}, 
     80        {name: "StyleSheetPrint", notify: refreshStyles}, 
     81        {name: "PageTemplate", notify: refreshPageTemplate}, 
     82        {name: null, notify: refreshDisplay} 
     83        ]; 
     84 
     85// Default tiddler templates 
     86var DEFAULT_VIEW_TEMPLATE = 1; 
     87var DEFAULT_EDIT_TEMPLATE = 2; 
     88config.tiddlerTemplates = { 
     89        1: "ViewTemplate", 
     90        2: "EditTemplate" 
     91        }; 
     92 
     93// Messages 
     94config.messages = { 
     95        customConfigError: "Error in systemConfig tiddler '%1' - %0", 
     96        savedSnapshotError: "It appears that this TiddlyWiki has been incorrectly saved. Please see http://www.tiddlywiki.com/#DownloadSoftware for details", 
     97        subtitleUnknown: "(unknown)", 
     98        undefinedTiddlerToolTip: "The tiddler '%0' doesn't yet exist", 
     99        shadowedTiddlerToolTip: "The tiddler '%0' doesn't yet exist, but has a pre-defined shadow value", 
     100        externalLinkTooltip: "External link to %0", 
     101        noTags: "There are no tagged tiddlers", 
     102        notFileUrlError: "You need to save this TiddlyWiki to a file before you can save changes", 
     103        cantSaveError: "It's not possible to save changes using this browser. Use FireFox if you can", 
     104        invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki", 
     105        backupSaved: "Backup saved", 
     106        backupFailed: "Failed to save backup file", 
     107        rssSaved: "RSS feed saved", 
     108        rssFailed: "Failed to save RSS feed file", 
     109        emptySaved: "Empty template saved", 
     110        emptyFailed: "Failed to save empty template file", 
     111        mainSaved: "Main TiddlyWiki file saved", 
     112        mainFailed: "Failed to save main TiddlyWiki file. Your changes have not been saved", 
     113        macroError: "Error in macro <<%0>>", 
     114        macroErrorDetails: "Error while executing macro <<%0>>:\n%1", 
     115        missingMacro: "No such macro", 
     116        overwriteWarning: "A tiddler named '%0' already exists. Choose OK to overwrite it", 
     117        unsavedChangesWarning: "WARNING! There are unsaved changes in TiddlyWiki\n\nChoose OK to save\nChoose CANCEL to discard", 
     118        messageClose: {text: "close", tooltip: "close this message area"}, 
     119        dates: { 
     120                months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"], 
     121                days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] 
     122                } 
     123        }; 
     124 
     125// More messages (rather a legacy layout that shouldn't really be like this) 
     126config.views = { 
     127        wikified: { 
     128                tag: {labelNoTags: "no tags", labelTags: "tags: ", openTag: "Open tag '%0'", tooltip: "Show tiddlers tagged with '%0'", openAllText: "Open all", openAllTooltip: "Open all of these tiddlers", popupNone: "No other tiddlers tagged with '%0'"}, 
     129                defaultText: "The tiddler '%0' doesn't yet exist. Double-click to create it", 
     130                defaultModifier: "(missing)", 
     131                shadowModifier: "(shadow)" 
    121132                }, 
    122         views: { 
    123                 wikified: { 
    124                         tag: {labelNoTags: "no tags", labelTags: "tags: ", tooltip: "Show tiddlers tagged with '%0'", openAllText: "Open all", openAllTooltip: "Open all of these tiddlers", popupNone: "No other tiddlers tagged with '%0'"}, 
    125                         toolbarClose: {text: "close", tooltip: "Close this tiddler"}, 
    126                         toolbarEdit: {text: "edit", tooltip: "Edit this tiddler"}, 
    127                         toolbarPermalink: {text: "permalink", tooltip: "Permalink for this tiddler"}, 
    128                         toolbarReferences: {text: "references", tooltip: "Show tiddlers that link to this one", popupNone: "No references"}, 
    129                         defaultText: "The tiddler '%0' doesn't yet exist. Double-click to create it" 
    130                         }, 
    131                 editor: { 
    132                         tagPrompt: "Type tags separated with spaces, [[use double square brackets]] if necessary, or add existing", 
    133                         tagChooser: {text: "tags", tooltip: "Choose existing tags to add to this tiddler", popupNone: "There are no tags defined", tagTooltip: "Add the tag '%0'"}, 
    134                         toolbarDone: {text: "done", tooltip: "Save changes to this tiddler"}, 
    135                         toolbarCancel: {text: "cancel", tooltip: "Undo changes to this tiddler"}, 
    136                         toolbarDelete: {text: "delete", tooltip: "Delete this tiddler"}, 
    137                         defaultText: "Type the text for '%0'" 
    138                         } 
     133        editor: { 
     134                tagPrompt: "Type tags separated with spaces, [[use double square brackets]] if necessary, or add existing", 
     135                tagChooser: {text: "tags", tooltip: "Choose existing tags to add to this tiddler", popupNone: "There are no tags defined", tagTooltip: "Add the tag '%0'"}, 
     136                defaultText: "Type the text for '%0'" 
     137                } 
     138        }; 
     139                 
     140// Macros; each has a 'handler' member that is inserted later 
     141config.macros = { 
     142        today: {}, 
     143        version: {}, 
     144        search: {label: "search", prompt: "Search this TiddlyWiki", sizeTextbox: 15, accessKey: "F", successMsg: "%0 tiddlers found matching %1", failureMsg: "No tiddlers found matching %0"}, 
     145        tiddler: {}, 
     146        tag: {}, 
     147        tags: {}, 
     148        tagging: {label: "tagging:", labelNotTag: "not tagging", tooltip: "List of tiddlers tagged with '%0'"}, 
     149        timeline: {dateFormat: "DD MMM YYYY"}, 
     150        allTags: {tooltip: "Show tiddlers tagged with '%0'", noTags: "There are no tagged tiddlers"}, 
     151        list: { 
     152                all: {prompt: "All tiddlers in alphabetical order"}, 
     153                missing: {prompt: "Tiddlers that have links to them but are not defined"}, 
     154                orphans: {prompt: "Tiddlers that are not linked to from any other tiddlers"}, 
     155                shadowed: {prompt: "Tiddlers shadowed with default contents"} 
    139156                }, 
    140         macros: { // Each has a 'handler' member that is inserted later 
    141                today: {}, 
    142                version: {}, 
    143                search: {label: "search", prompt: "Search this TiddlyWiki", sizeTextbox: 15, accessKey: "F", successMsg: "%0 tiddlers found matching %1", failureMsg: "No tiddlers found matching %0"}, 
    144                tiddler: {}, 
    145                tag: {}, 
    146                timeline: {dateFormat: "DD MMM YYYY"}, 
    147                allTags: {tooltip: "Show tiddlers tagged with '%0'", noTags: "There are no tagged tiddlers"}, 
    148                list: { 
    149                        all: {prompt: "All tiddlers in alphabetical order"}, 
    150                        missing: {prompt: "Tiddlers that have links to them but are not defined"}, 
    151                        orphans: {prompt: "Tiddlers that are not linked to from any other tiddlers"}, 
    152                        shadowed: {prompt: "Tiddlers shadowed with default contents"} 
    153                        }, 
    154                closeAll: {label: "close all", prompt: "Close all displayed tiddlers (except any that are being edited)"}, 
    155                permaview: {label: "permaview", prompt: "Link to an URL that retrieves all the currently displayed tiddlers"}, 
    156                 saveChanges: {label: "save changes", prompt: "Save all tiddlers to create a new TiddlyWiki", accessKey: "S"}, 
    157                 slider: {}, 
    158                 option: {}, 
    159                newTiddler: {label: "new tiddler", prompt: "Create a new tiddler", title: "New Tiddler", accessKey: "N"}, 
    160                newJournal: {label: "new journal", prompt: "Create a new tiddler from the current date and time", accessKey: "J"}, 
    161                sparkline: {}, 
    162                tabs: {}, 
    163                gradient: {} 
    164                }, 
    165         textPrimitives: {} 
    166 }; 
    167  
    168  
    169 // --------------------------------------------------------------------------------- 
     157        closeAll: {label: "close all", prompt: "Close all displayed tiddlers (except any that are being edited)"}, 
     158        permaview: {label: "permaview", prompt: "Link to an URL that retrieves all the currently displayed tiddlers"}, 
     159        saveChanges: {label: "save changes", prompt: "Save all tiddlers to create a new TiddlyWiki", accessKey: "S"}, 
     160        slider: {}, 
     161        option: {}, 
     162        newTiddler: {label: "new tiddler", prompt: "Create a new tiddler", title: "New Tiddler", accessKey: "N"}, 
     163        newJournal: {label: "new journal", prompt: "Create a new tiddler from the current date and time", accessKey: "J"}, 
     164        sparkline: {}, 
     165        tabs: {}, 
     166        gradient: {}, 
     167        message: {}, 
     168        view: {}, 
     169        edit: {}, 
     170        tagChooser: {}, 
     171        toolbar: {} 
     172        }; 
     173 
     174// Commands supported by the toolbar macro 
     175config.commands = { 
     176        closeTiddler: {text: "close", tooltip: "Close this tiddler"}, 
     177        closeOthers: {text: "close others", tooltip: "Close all other tiddlers"}, 
     178        editTiddler: {text: "edit", tooltip: "Edit this tiddler"}, 
     179        saveTiddler: {text: "done", tooltip: "Save changes to this tiddler"}, 
     180        cancelTiddler: {text: "cancel", tooltip: "Undo changes to this tiddler"}, 
     181        deleteTiddler: {text: "delete", tooltip: "Delete this tiddler", warning: "Are you sure you want to delete '%0'?"}, 
     182        permalink: {text: "permalink", tooltip: "Permalink for this tiddler"}, 
     183        references: {text: "references", tooltip: "Show tiddlers that link to this one", popupNone: "No references"}, 
     184        jump: {text: "jump", tooltip: "Jump to another open tiddler"} 
     185        }; 
     186         
    170187// Browser detection... In a very few places, there's nothing else for it but to 
    171188// know what browser we're using. 
    172 // --------------------------------------------------------------------------------- 
    173  
    174189config.userAgent = navigator.userAgent.toLowerCase(); 
    175190config.browser = { 
    176191        isIE: config.userAgent.indexOf("msie") != -1 && config.userAgent.indexOf("opera") == -1, 
     192        isSafari: config.userAgent.indexOf("applewebkit") != -1, 
    177193        isBadSafari: !((new RegExp("[\u0150\u0170]","g")).test("\u0150")) 
    178194        }; 
    179195 
    180 // --------------------------------------------------------------------------------- 
    181196// Basic regular expressions 
    182 // --------------------------------------------------------------------------------- 
    183  
     197config.textPrimitives = { 
     198        upperLetter: "[A-Z\u00c0-\u00de\u0150\u0170]", 
     199        lowerLetter: "[a-z\u00df-\u00ff_0-9\\-\u0151\u0171]", 
     200        anyLetter: "[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-\u0150\u0170\u0151\u0171]" 
     201        }; 
    184202if(config.browser.isBadSafari) 
    185         { 
    186         config.textPrimitives.upperLetter = "[A-Z\u00c0-\u00de]"; 
    187         config.textPrimitives.lowerLetter = "[a-z\u00df-\u00ff_0-9\\-]"; 
    188         config.textPrimitives.anyLetter = "[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-]"; 
    189         } 
    190 else 
    191         { 
    192         config.textPrimitives.upperLetter = "[A-Z\u00c0-\u00de\u0150\u0170]"; 
    193         config.textPrimitives.lowerLetter = "[a-z\u00df-\u00ff_0-9\\-\u0151\u0171]"; 
    194         config.textPrimitives.anyLetter = "[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-\u0150\u0170\u0151\u0171]"; 
    195         } 
     203        config.textPrimitives = { 
     204                upperLetter: "[A-Z\u00c0-\u00de]", 
     205                lowerLetter: "[a-z\u00df-\u00ff_0-9\\-]", 
     206                anyLetter: "[A-Za-z\u00c0-\u00de\u00df-\u00ff_0-9\\-]" 
     207                } 
    196208config.textPrimitives.anyDigit = "[0-9]"; 
    197209config.textPrimitives.anyNumberChar = "[0-9\\.E]"; 
    198 config.textPrimitives.urlPattern = "(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)"; 
     210config.textPrimitives.urlPattern = "(?:file|http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)"; 
    199211config.textPrimitives.unWikiLink = "~"; 
    200212config.textPrimitives.wikiLink = "(?:" + config.textPrimitives.unWikiLink + "{0,1})(?:(?:" + config.textPrimitives.upperLetter + "+" + 
     
    206218 
    207219// --------------------------------------------------------------------------------- 
    208 // Shadow stylesheet elements 
    209 // --------------------------------------------------------------------------------- 
    210  
    211 config.shadowTiddlers.StyleSheetColors = "body {\n      background: #fff;\n}\n\n#titleLine {\n  color: #fff;\n  background: #300;\n}\n\n#titleLine a {\n        color: #cf6;\n}\n\n#mainMenu {\n        color: #000;\n}\n\n#mainMenu .tiddlyLink {\n    color: #963;\n}\n\n#mainMenu .tiddlyLink:hover {\n      background: #963;\n     color: #fff;\n}\n\n#mainMenu .externalLink {\n  color: #963;\n}\n\n#mainMenu .externalLink:hover {\n    background: #963;\n     color: #fff;\n}\n\n#mainMenu .button {\n        color: #930;\n}\n\n#mainMenu .button:hover {\n  color: #cf6;\n  background: #930;\n}\n\n#messageArea {\n        background: #930;\n     color: #fff;\n}\n\n#messageArea a:link, #messageArea a:visited {\n      color: #c90;\n}\n\n#messageArea a:hover {\n     color: #963;\n}\n\n#messageArea a:active {\n    color: #fff;\n}\n\n.popup {\n   background: #eea;\n     border: 1px solid #930;\n}\n\n.popup hr {\n     color: #963;\n  background: #963;\n     border: 0;\n}\n\n.popup li.disabled {\n color: #ba9;\n}\n\n.popup li a, .popup li a:visited {\n color: #300;\n}\n\n.popup li a:hover {\n        background: #930;\n     color: #eea;\n}\n\n.tabSelected {\n     background: #eea;\n}\n\n.tabUnselected {\n      background: #c90;\n}\n\n.tabContents {\n        background: #eea;\n}\n\n.tiddler .button {\n    color: #930;\n}\n\n.tiddler .button:hover {\n   color: #cf6;\n  background: #930;\n}\n\n.tiddler .button:active {\n     color: #fff;\n  background: #c90;\n}\n\n.toolbar {\n    color: #aaa;\n}\n\n.footer {\n  color: #ddd;\n}\n\n.selectedTiddler .footer {\n color: #888;\n}\n\n.viewer {\n  color: #000;\n}\n\n.viewer a:link, .body a:visited {\n  color: #963;\n}\n\n.viewer a:hover {\n  color: #fff;\n  background: #963;\n}\n\n.viewer .button {\n     background: #c90;\n     color: #300;\n  border-right: 1px solid #300;\n border-bottom: 1px solid #300;\n}\n\n.viewer .button:hover {\n  background: #eea;\n     color: #c90;\n}\n\n.viewer blockquote {\n       border-left: 3px solid #666;\n}\n\n.viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5 {\n   background: #cc9;\n}\n\n.viewer table {\n       border: 2px solid #303030;\n}\n\n.viewer th {\n background: #996;\n     border: 1px solid #606060;\n    color: #fff;\n}\n\n.viewer td, .viewer tr {\n   border: 1px solid #606060;\n}\n\n.viewer pre {\n        color: #000000;\n       border: 1px solid #963;\n       background: #eea;\n}\n\n.viewer code {\n        color: #630;\n}\n\n.viewer hr {\n       border-top: dashed 1px #606060;\n       border-left: none;\n    border-right: none;\n   border-bottom: none;\n  color: #666;\n}\n\n.highlight, .marked {\n      color: #000;\n  background: #ffe72f;\n}\n\n.editor {\n  color: #402C74;\n}\n\n.editor input {\n border: 1px solid #000000;\n}\n\n.editor textarea {\n   border: 1px solid #000000;\n    width: 100%;\n}\n\n.editorFooter {\n    color: #aaa;\n}\n\n.editorFooter A {\n  color: #930;\n}\n\n.editorFooter A:hover {\n    color: #cf6;\n  background: #930;\n}\n\n.editorFooter A:active {\n      color: #fff;\n  background: #c90;\n}\n\n#sidebar {\n    color: #000;\n}\n\n#sidebarOptions {\n  background: #c90;\n}\n\n#sidebarOptions .button {\n     color: #930;\n}\n\n#sidebarOptions .button:hover {\n    color: #cf6;\n  background: #930;\n}\n\n#sidebarOptions .button:active {\n      color: #930;\n  background: #cf6;\n}\n\n#sidebarOptions .sliderPanel {\n        background: #eea;\n}\n\n#sidebarOptions .sliderPanel A {\n      color: #930;\n}\n\n#sidebarOptions .sliderPanel A:hover {\n     color: #cf6;\n  background: #930;\n}\n\n#sidebarOptions .sliderPanel A:active {\n       color: #930;\n  background: #cf6;\n}\n\n.sidebarSubHeading {\n  color: #300;\n}\n\n#sidebarTabs {\n     background: #c90;\n}\n\n#sidebarTabs .tabSelected {\n   color: #cf6;\n  background: #963;\n}\n\n#sidebarTabs .tabUnselected {\n color: #cf6;\n  background: #930;\n}\n\n#sidebarTabs .tabContents {\n   background: #963;\n}\n\n\n#sidebarTabs .txtMoreTab .tabSelected {\n     background: #930;\n}\n\n#sidebarTabs .txtMoreTab .tabUnselected {\n     background: #300;\n}\n\n#sidebarTabs .txtMoreTab .tabContents {\n       background: #930;\n}\n\n#sidebarTabs .tabContents .tiddlyLink {\n       color: #cf6;\n}\n\n#sidebarTabs .tabContents .tiddlyLink:hover {\n      background: #ccff66;\n  color: #300;\n}\n\n#sidebarTabs .tabContents .button {\n        color: #cf6;\n}\n\n#sidebarTabs .tabContents .button:hover {\n  color: #300;\n  background: #cf6;\n}\n\n.sparkline {\n  background: #eea;\n     border: 0;\n}\n\n.sparktick {\n background: #930;\n}\n\n.errorNoSuchMacro {\n   color: #ff0;\n  background: #f00;\n}\n\n.zoomer {\n     color: #963;\n  border: 1px solid #963;\n}"; 
    212 config.shadowTiddlers.StyleSheetLayout = "body {\n      font-size: 9pt;\n       font-family: verdana,arial,helvetica;\n margin: 0;\n    padding: 0;\n   position: relative;\n   z-index: 0;\n}\n\na:link, a:visited, a:hover, a:active{\n       text-decoration: none;\n}\n\n#contentWrapper {\n        position: relative;\n}\n\n#titleLine {\n        padding: 5em 1em 1em 1em;\n}\n\n#siteTitle {\n  font-size: 26pt;\n}\n\n#siteSubtitle {\n        padding-left: 1em;\n    font-size: 10pt;\n}\n\n#mainMenu {\n    position: absolute;\n   left: 0em;\n    width: 10em;\n  line-height: 166%;\n    padding: 1.5em 0.5em 0.5em 0.5em;\n     font-size: 10pt;\n      text-align: right;\n}\n\n\n#mainMenu .externalLink {\n  text-decoration: underline;\n}\n\n#displayArea {\n      margin: 1em 17em 0em 14em;\n}\n\n#messageArea {\n       padding: 0.5em;\n\n}\n\n#messageArea a:link, #messageArea a:visited {\n display: inline;\n      text-decoration: underline;\n}\n\n.popup {\n    font-size: 8pt;\n       list-style: none;\n     padding: 0.2em;\n       margin: 0;\n}\n\n.popup hr {\n  display: block;\n       height: 1px;\n  width: auto;\n  padding: 0;\n   margin: 0.2em 0em;\n}\n\n.popup li {\n  display: block;\n       padding: 0;\n}\n\n.popup li.disabled {\n        padding: 0.2em;\n}\n\n.popup li a, .popup li a:visited {\n      display: block;\n       text-decoration: none;\n        padding: 0.2em;\n}\n\n.tabset {\n       padding: 1em 0em 0em 0.5em;\n}\n\n.tab {\n      margin: 0em 0em 0em 0.25em;\n   padding: 2px;\n}\n\n.tabContents {\n    padding: 0.5em;\n}\n\n.tabContents ul, .tabContents ol {\n      margin: 0;\n    padding: 0;\n}\n\n.tabContents li {\n   list-style: none;\n}\n\n.tabContents li.listLink {\n   margin-left: .75em;\n}\n\n.tiddler {\n   padding: 0;\n   padding: 1em 1em 0em 1em;\n     font-size: 9pt;\n}\n\n\n/* Can these styles be moved to the previous rule?\n.selectedTiddler {\n        padding: 1em 1em 0em 1em;\n     font-size: 9pt;\n}\n\n.unselectedTiddler {\n    padding: 1em 1em 0em 1em;\n     font-size: 9pt;\n} */\n\n.tiddler a.tiddlyLinkExisting {\n      font-weight: bold;\n}\n\n.tiddler a.tiddlyLinkNonExisting {\n   font-style: italic;\n}\n\n.tiddler a.tiddlyLinkNonExisting.shadow {\n   font-weight: bold;\n}\n\n.tiddler a.externalLink {\n    text-decoration: underline;\n}\n\n.tiddler .button {\n  padding: 0.2em 0.4em;\n}\n\n.tiddler .button:hover {\n  text-decoration: none;\n}\n\n.title {\n font-size: 10pt;\n      font-weight: bold;\n}\n\n.shadow .title {\n     color: #888888;\n}\n\n.toolbar {\n      text-align: right;\n    font-weight: normal;\n  font-size: 8pt;\n       padding: 0;\n   visibility: hidden;\n}\n\n.selectedTiddler .toolbar {\n visibility: visible;\n}\n\n.footer {\n/* Isn't 'clear:both' the right rule? */\n        clear: left;\n  clear: right;\n font-weight: normal;\n  font-size: 8pt;\n       margin: 0;\n    padding: 0;\n}\n\n.body {\n     padding-top: 0.5em;\n}\n\n.viewer {\n   line-height: 140%;\n}\n\n.viewer .button {\n    margin: 0em 0.25em;\n   padding: 0em 0.25em;\n}\n\n.viewer blockquote {\n       font-size: 8pt;\n       line-height: 150%;\n    padding-left: 0.8em;\n  margin-left: 2.5em;\n}\n\n.viewer ul {\n        margin-left: 0.5em;\n   padding-left: 1.5em;\n}\n\n.viewer ol {\n       margin-left: 0.5em;\n   padding-left: 1.5em;\n}\n\n.viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5 {\n   font-weight: bold;\n    text-decoration: none;\n        padding-left: 0.4em;\n}\n\n.viewer h1 {font-size: 12pt;}\n.viewer h2 {font-size: 11pt;}\n.viewer h3 {font-size: 10pt;}\n.viewer h4 {font-size: 9pt;}\n.viewer h5 {font-size: 8pt;}\n\n.viewer table {\n border-collapse: collapse;\n    margin: 0.8em 1.0em;;\n font-size: 100%;\n}\n\n.viewer th, .viewer td, .viewer tr,.viewer caption{\n    padding: 3px;\n}\n\n.viewer pre {\n     padding: 0.5em;\n       margin-left: 0.5em;\n   font-size: 100%;\n      line-height: 1.4em;\n   overflow: auto;\n}\n\n.viewer code {\n  font-size: 100%;\n      line-height: 1.4em;\n}\n\n.viewer hr {\n        height: 1px;\n}\n\n.editor {\n  font-size: 8pt;\n       font-weight: normal;\n}\n\n.editor input {\n    display: block;\n       width: 100%;\n}\n\n.editor textarea {\n display: block;\n       font: inherit;\n        width: 100%;\n}\n\n.editorFooter {\n    padding: 0.25em 0em;\n  font-size: 8pt;\n}\n\n.editorFooter A {\n       padding: 0.2em 0.4em;\n}\n\n.editorFooter A:hover {\n   text-decoration: none;\n}\n\n#sidebar {\n       position: absolute;\n   right: 0em;\n   width: 16em;\n  font-size: 8pt;\n}\n\n#sidebarOptions {\n       padding-top: 0em;\n}\n\n#sidebarOptions .button {\n     padding: 0.3em 0.2em 0.3em 1em;\n       display: block;\n}\n\n#sidebarOptions input {\n margin: 0.4em 0em 0.3em 1em;\n}\n\n#sidebarOptions .sliderPanel {\n     padding: 0.5em;\n       font-size: 7pt;\n}\n\n#sidebarOptions .sliderPanel A {\n        font-weight: bold;\n}\n\n#sidebarOptions .sliderPanel input {\n margin: 0;\n    margin-bottom: 0.3em;\n}\n\n.sidebarSubHeading {\n      font-size: 7pt;\n}\n\n#sidebarTabs .tabSelected {\n     position: relative;\n   top: -2px;\n}\n\n\n#sidebarTabs .tabContents {\n        width: 15em;\n  overflow: hidden;\n}\n\n.sparkline {\n  line-height: 100%;\n}\n\n.sparktick {\n outline: 0;\n}\n\n.zoomer {\n   font-size: 10pt;\n      position: absolute;\n   padding: 1em;\n}\n"; 
     220// Shadow tiddlers for emergencies 
     221// --------------------------------------------------------------------------------- 
     222 
     223config.shadowTiddlers = { 
     224        SideBarOptions: "<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>", 
     225        OptionsPanel: "These InterfaceOptions for customising TiddlyWiki are saved in your browser\n\nYour username for signing your edits. Write it as a WikiWord (eg JoeBloggs)\n\n<<option txtUserName>>\n<<option chkSaveBackups>> SaveBackups\n<<option chkAutoSave>> AutoSave\n<<option chkRegExpSearch>> RegExpSearch\n<<option chkCaseSensitiveSearch>> CaseSensitiveSearch\n<<option chkAnimate>> EnableAnimations\n\nSee AdvancedOptions", 
     226        AdvancedOptions: "<<option chkGenerateAnRssFeed>> GenerateAnRssFeed\n<<option chkOpenInNewWindow>> OpenLinksInNewWindow\n<<option chkSaveEmptyTemplate>> SaveEmptyTemplate\n<<option chkToggleLinks>> Clicking on links to tiddlers that are already open causes them to close\n^^(override with Control or other modifier key)^^\n<<option chkHttpReadOnly>> HideEditingFeatures when viewed over HTTP\n<<option chkForceMinorUpdate>> Treat edits as MinorChanges by preserving date and time\n^^(override with Shift key when clicking 'done' or by pressing Ctrl-Shift-Enter^^\n<<option chkConfirmDelete>> ConfirmBeforeDeleting\nMaximum number of lines in a tiddler edit box: <<option txtMaxEditRows>>", 
     227        SideBarTabs: "<<tabs txtMainTab Timeline Timeline TabTimeline All 'All tiddlers' TabAll Tags 'All tags' TabTags More 'More lists' TabMore>>", 
     228        TabTimeline: "<<timeline>>", 
     229        TabAll: "<<list all>>", 
     230        TabTags: "<<allTags>>", 
     231        TabMore: "<<tabs txtMoreTab Missing 'Missing tiddlers' TabMoreMissing Orphans 'Orphaned tiddlers' TabMoreOrphans>>", 
     232        TabMoreMissing: "<<list missing>>", 
     233        TabMoreOrphans: "<<list orphans>>", 
     234        StyleSheetColors: "/***\n!Colors Used\n*@@bgcolor(#8cf): #8cf - Background blue@@\n*@@bgcolor(#18f): #18f - Top blue@@\n*@@bgcolor(#04b): #04b - Mid blue@@\n*@@bgcolor(#014):color(#fff): #014 - Bottom blue@@\n*@@bgcolor(#ffc): #ffc - Bright yellow@@\n*@@bgcolor(#fe8): #fe8 - Highlight yellow@@\n*@@bgcolor(#db4): #db4 - Background yellow@@\n*@@bgcolor(#841): #841 - Border yellow@@\n*@@bgcolor(#703):color(#fff): #703 - Title red@@\n*@@bgcolor(#866): #866 - Subtitle grey@@\n!Generic Rules /%==============================================%/\n***/\n/*{{{*/\nbody {\n  background: #fff;\n     color: #000;\n}\n\na{\n color: #04b;\n}\n\na:hover{\n   background: #04b;\n     color: #fff;\n}\n\na img{\n     border: 0;\n}\n\nh1,h2,h3,h4,h5 {\n     color: #703;\n  background: #8cf;\n}\n\n.button {\n     color: #014;\n  border: 1px solid #fff;\n}\n\n.button:hover {\n color: #014;\n  background: #fe8;\n     border: 1px solid #db4;\n}\n\n.button:active {\n        color: #fff;\n  background: #db4;\n     border: 1px solid #841;\n}\n\n/*}}}*/\n/***\n!Header /%==================================================%/\n***/\n/*{{{*/\n.header {\n background: #04b;\n}\n\n.headerShadow {\n       color: #000;\n}\n\n.headerShadow a {\n  font-weight: normal;\n  color: #000;\n}\n\n.headerForeground {\n        color: #fff;\n}\n\n.headerForeground a {\n      font-weight: normal;\n  color: #8cf;\n}\n\n/*}}}*/\n/***\n!General tabs /%=================================================%/\n***/\n/*{{{*/\n\n.tabSelected{\n color: #014;\n  background: #eee;\n     border-left: 1px solid #ccc;\n  border-top: 1px solid #ccc;\n   border-right: 1px solid #ccc;\n}\n\n.tabUnselected {\n  color: #fff;\n  background: #999;\n}\n\n.tabContents {\n        color: #014;\n  background: #eee;\n     border: 1px solid #ccc;\n}\n\n/*}}}*/\n/***\n!Sidebar options /%=================================================%/\n~TiddlyLinks and buttons are treated identically in the sidebar and slider panel\n***/\n/*{{{*/\n#sidebar {\n}\n\n#sidebarOptions input {\n        border: 1px solid #04b;\n}\n\n#sidebarOptions .sliderPanel {\n  background: #8cf;\n}\n\n#sidebarOptions .sliderPanel a {\n      border: none;\n color: #04b;\n}\n\n#sidebarOptions .sliderPanel a:hover {\n     color: #fff;\n  background: #04b;\n}\n\n#sidebarOptions .sliderPanel a:active {\n       color: #04b;\n  background: #fff;\n}\n/*}}}*/\n/***\n!Message Area /%=================================================%/\n***/\n/*{{{*/\n#messageArea {\n       border: 1px solid #841;\n       background: #db4;\n     color: #014;\n}\n\n#messageArea .button {\n     padding: 0.2em 0.2em 0.2em 0.2em;\n     color: #014;\n  background: #fff;\n}\n\n/*}}}*/\n/***\n!Popup /%=================================================%/\n***/\n/*{{{*/\n.popup {\n  background: #18f;\n     border: 1px solid #04b;\n}\n\n.popup hr {\n     color: #014;\n  background: #014;\n     border-bottom: 1px;\n}\n\n.popup li.disabled {\n        color: #04b;\n}\n\n.popup li a, .popup li a:visited {\n color: #eee;\n  border: none;\n}\n\n.popup li a:hover {\n       background: #014;\n     color: #fff;\n  border: none;\n}\n/*}}}*/\n/***\n!Tiddler Display /%=================================================%/\n***/\n/*{{{*/\n.tiddler .defaultCommand {\n font-weight: bold;\n}\n\n.shadow .title {\n        color: #866;\n}\n\n.title {\n   color: #703;\n}\n\n.subtitle {\n        color: #866;\n}\n\n.toolbar {\n color: #04b;\n}\n\n.tagging, .tagged {\n        border: 1px solid #eee;\n       background-color: #eee;\n}\n\n.selected .tagging, .selected .tagged {\n background-color: #ddd;\n       border: 1px solid #bbb;\n}\n\n.tagging .listTitle, .tagged .listTitle {\n       color: #014;\n}\n\n.tagging a, .tagged a {\n    border: none;\n}\n\n.footer {\n color: #ddd;\n}\n\n.selected .footer {\n        color: #888;\n}\n\n.sparkline {\n       background: #8cf;\n     border: 0;\n}\n\n.sparktick {\n background: #014;\n}\n\n.errorButton {\n        color: #ff0;\n  background: #f00;\n}\n\n.cascade {\n    background: #eef;\n     color: #aac;\n  border: 1px solid #aac;\n}\n\n.imageLink {\n    background: transparent;\n}\n\n/*}}}*/\n/***\n''The viewer is where the tiddler content is displayed'' /%------------------------------------------------%/\n***/\n/*{{{*/\n\n.viewer .button {\n       border: 1px solid #db4;\n}\n\n.viewer blockquote {\n    border-left: 3px solid #666;\n}\n\n.viewer table {\n    border: 2px solid #333;\n}\n\n.viewer th, thead td {\n  background: #996;\n     border: 1px solid #666;\n       color: #fff;\n}\n\n.viewer td, .viewer tr {\n   border: 1px solid #666;\n}\n\n.viewer pre {\n   border: 1px solid #fe8;\n       background: #ffc;\n}\n\n.viewer code {\n        color: #703;\n}\n\n.viewer hr {\n       border: 0;\n    border-top: dashed 1px #666;\n  color: #666;\n}\n\n.highlight, .marked {\n      background: #fe8;\n}\n/*}}}*/\n/***\n''The editor replaces the viewer in the tiddler'' /%------------------------------------------------%/\n***/\n/*{{{*/\n.editor input {\n   border: 1px solid #04b;\n}\n\n.editor textarea {\n      border: 1px solid #04b;\n       width: 100%;\n}\n\n.editorFooter {\n    color: #aaa;\n}\n\n/*}}}*/", 
     235        StyleSheetLayout: "/***\n!Sections in this Tiddler:\n*Generic rules\n**Links styles\n**Link Exceptions\n*Header\n*Main menu\n*Sidebar\n**Sidebar options\n**Sidebar tabs\n*Message area\n*Popup\n*Tabs\n*Tiddler display\n**Viewer\n**Editor\n*Misc. rules\n!Generic Rules /%==============================================%/\n***/\n/*{{{*/\nbody {\n  font-size: .75em;\n     font-family: arial,helvetica;\n position: relative;\n   margin: 0;\n    padding: 0;\n}\n\nh1,h2,h3,h4,h5 {\n    font-weight: bold;\n    text-decoration: none;\n        padding-left: 0.4em;\n}\n\nh1 {font-size: 1.35em;}\nh2 {font-size: 1.25em;}\nh3 {font-size: 1.1em;}\nh4 {font-size: 1em;}\nh5 {font-size: .9em;}\n\nhr {\n      height: 1px;\n}\n\na{\n text-decoration: none;\n}\n/*}}}*/\n/***\n''General Link Styles'' /%-----------------------------------------------------------------------------%/\n***/\n/*{{{*/\n.externalLink {\n   text-decoration: underline;\n}\n\n.tiddlyLinkExisting {\n       font-weight: bold;\n}\n\n.tiddlyLinkNonExisting {\n     font-style: italic;\n}\n\n/* the 'a' is required for IE, otherwise it renders the whole tiddler a bold */\na.tiddlyLinkNonExisting.shadow {\n   font-weight: bold;\n}\n/*}}}*/\n/***\n''Exceptions to common link styles'' /%------------------------------------------------------------------%/\n***/\n/*{{{*/\n\n#mainMenu .tiddlyLinkExisting, \n#mainMenu .tiddlyLinkNonExisting,\n#sidebarTabs .tiddlyLinkExisting,\n#sidebarTabs .tiddlyLinkNonExisting,\n#siteTitle .tiddlyLinkExisting,\n#siteTitle .tiddlyLinkNonExisting{\n font-weight: normal;\n font-style: normal;\n}\n\n/*}}}*/\n/***\n!Header /%==================================================%/\n***/\n/*{{{*/\n\n.header {\n    position: relative;\n}\n\n.header a:hover {\n    background: transparent;\n}\n\n.headerShadow {\n        position: relative;\n   padding: 4.5em 0em 1em 1em;\n   left: -1px;\n   top: -1px;\n}\n\n.headerForeground {\n  position: absolute;\n   padding: 4.5em 0em 1em 1em;\n   left: 0px;\n    top: 0px;\n}\n\n.siteTitle {\n  font-size: 3em;\n}\n\n.siteSubtitle {\n font-size: 1.2em;\n}\n\n/*}}}*/\n/***\n!Main menu /%==================================================%/\n***/\n/*{{{*/\n#mainMenu {\n  position: absolute;\n   left: 0;\n      width: 10em;\n  text-align: right;\n    line-height: 1.6em;\n   padding: 1.5em 0.5em 0.5em 0.5em;\n     font-size: 1.1em;\n}\n\n/*}}}*/\n/***\n!Sidebar rules /%==================================================%/\n***/\n/*{{{*/\n#sidebar {\n       position: absolute;\n   right: 3px;\n   width: 16em;\n  font-size: .9em;\n}\n/*}}}*/\n/***\n''Sidebar options'' /%----------------------------------------------------------------------------------%/\n***/\n/*{{{*/\n#sidebarOptions {\n      padding-top: 0.3em;\n}\n\n#sidebarOptions a {\n margin: 0em 0.2em;\n    padding: 0.2em 0.3em;\n display: block;\n}\n\n#sidebarOptions input {\n margin: 0.4em 0.5em;\n}\n\n#sidebarOptions .sliderPanel {\n     margin-left: 1em;\n     padding: 0.5em;\n       font-size: .85em;\n}\n\n#sidebarOptions .sliderPanel a {\n      font-weight: bold;\n    display: inline;\n      padding: 0;\n}\n\n#sidebarOptions .sliderPanel input {\n        margin: 0 0 .3em 0;\n}\n/*}}}*/\n/***\n''Sidebar tabs'' /%-------------------------------------------------------------------------------------%/\n***/\n/*{{{*/\n\n#sidebarTabs .tabContents {\n       width: 15em;\n  overflow: hidden;\n}\n\n/*}}}*/\n/***\n!Message area /%==================================================%/\n***/\n/*{{{*/\n#messageArea {\n    padding: 0.5em;\n}\n\n.messageToolbar {\ndisplay: block;\ntext-align: right;\n}\n\n#messageArea a{\n    text-decoration: underline;\n}\n/*}}}*/\n/***\n!Popup /%==================================================%/\n***/\n/*{{{*/\n.popup {\n font-size: .9em;\n      padding: 0.2em;\n       list-style: none;\n     margin: 0;\n}\n\n.popup hr {\n  display: block;\n       height: 1px;\n  width: auto;\n  padding: 0;\n   margin: 0.2em 0em;\n}\n\n.popup li.disabled {\n padding: 0.2em;\n}\n\n.popup li a{\n    display: block;\n       padding: 0.2em;\n}\n/*}}}*/\n/***\n!Tabs /%==================================================%/\n***/\n/*{{{*/\n.tabset {\n     padding: 1em 0em 0em 0.5em;\n}\n\n.tab {\n      margin: 0em 0em 0em 0.25em;\n   padding: 2px;\n}\n\n.tabContents {\n    padding: 0.5em;\n}\n\n.tabContents ul, .tabContents ol {\n      margin: 0;\n    padding: 0;\n}\n\n.tabContents li {\n   list-style: none;\n}\n\n.tabContents li.listLink {\n   margin-left: .75em;\n}\n/*}}}*/\n/***\n!Tiddler display rules /%==================================================%/\n***/\n/*{{{*/\n#displayArea {\n    margin: 1em 17em 0em 14em;\n}\n\n\n.toolbar {\n text-align: right;\n    font-size: .9em;\n      visibility: hidden;\n}\n\n.selected .toolbar {\n        visibility: visible;\n}\n\n.tiddler {\n padding: 1em 1em 0em 1em;\n}\n\n.missing .viewer,.missing .title {\n    font-style: italic;\n}\n\n.title {\n    font-size: 1.6em;\n     font-weight: bold;\n}\n\n.missing .subtitle {\n display: none\n}\n\n.subtitle {\n       font-size: 1.1em;\n}\n\n/* I'm not a fan of how button looks in tiddlers... */\n.tiddler .button {\n    padding: 0.2em 0.4em;\n}\n\n.tagging {\nmargin: 0.5em 0.5em 0.5em 0;\nfloat: left;\ndisplay: none;\n}\n\n.isTag .tagging {\ndisplay: block;\n}\n\n.tagged {\nmargin: 0.5em;\nfloat: right;\n}\n\n.tagging, .tagged {\nfont-size: 0.9em;\npadding: 0.25em;\n}\n\n.tagging ul, .tagged ul {\nlist-style: none;margin: 0.25em;\npadding: 0;\n}\n\n.tagClear {\nclear: both;\n}\n\n.footer {\n      font-size: .9em;\n}\n\n.footer li {\ndisplay: inline;\n}\n/***\n''The viewer is where the tiddler content is displayed'' /%------------------------------------------------%/\n***/\n/*{{{*/\n.viewer {\n       line-height: 1.4em;\n   padding-top: 0.5em;\n}\n\n.viewer .button {\n   margin: 0em 0.25em;\n   padding: 0em 0.25em;\n}\n\n.viewer blockquote {\n       line-height: 1.5em;\n   padding-left: 0.8em;\n  margin-left: 2.5em;\n}\n\n.viewer ul, .viewer ol{\n     margin-left: 0.5em;\n   padding-left: 1.5em;\n}\n\n.viewer table {\n    border-collapse: collapse;\n    margin: 0.8em 1.0em;\n}\n\n.viewer th, .viewer td, .viewer tr,.viewer caption{\n        padding: 3px;\n}\n\n.viewer pre {\n     padding: 0.5em;\n       margin-left: 0.5em;\n   font-size: 1.2em;\n     line-height: 1.4em;\n   overflow: auto;\n}\n\n.viewer code {\n  font-size: 1.2em;\n     line-height: 1.4em;\n}\n/*}}}*/\n/***\n''The editor replaces the viewer in the tiddler'' /%------------------------------------------------%/\n***/\n/*{{{*/\n.editor {\nfont-size: 1.1em;\n}\n\n.editor input, .editor textarea {\n    display: block;\n       width: 100%;\n  font: inherit;\n}\n\n.editorFooter {\n  padding: 0.25em 0em;\n  font-size: .9em;\n}\n\n.fieldsetFix {border: 0;\npadding: 0;\nmargin: 1px 0px 1px 0px;\n}\n/*}}}*/\n/***\n!Misc rules /%==================================================%/\n***/\n/*{{{*/\n.sparkline {\n     line-height: 1em;\n}\n\n.sparktick {\n  outline: 0;\n}\n\n.zoomer {\n   font-size: 1.1em;\n     position: absolute;\n   padding: 1em;\n}\n\n.cascade {\n        font-size: 1.1em;\n     position: absolute;\n   overflow: hidden;\n}\n/*}}}*/", 
     236        StyleSheetPrint: "@media print {\n#mainMenu, #sidebar, #messageArea {display: none ! important;}\n#displayArea {margin: 1em 1em 0em 1em;}\n}", 
     237        PageTemplate: "<div class='header' macro='gradient vert #18f #04b'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>", 
     238        ViewTemplate: "<div class='toolbar' macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'></div>\n<div class='title' macro='view title'></div>\n<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (created <span macro='view created date [[DD MMM YYYY]]'></span>)</div>\n<div class='tagging' macro='tagging'></div>\n<div class='tagged' macro='tags'></div>\n<div class='viewer' macro='view text wikified'></div>\n<div class='tagClear'></div>", 
     239        EditTemplate: "<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>\n<div class='title' macro='view title'></div>\n<div class='editor' macro='edit title'></div>\n<div class='editor' macro='edit text'></div>\n<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>" 
     240        }; 
    213241 
    214242// --------------------------------------------------------------------------------- 
     
    216244// --------------------------------------------------------------------------------- 
    217245 
    218 // TiddlyWiki storage 
    219 var store = new TiddlyWiki(); 
    220  
    221 // Animation engine 
    222 var anim = new Animator(); 
    223  
    224 var readOnly = false; 
     246var store = null; // TiddlyWiki storage 
     247var story = null; // Main story 
     248var formatter = null; // Default formatters for the wikifier 
     249var anim = new Animator(); // Animation engine 
     250var readOnly = false; // Whether we're in readonly mode 
     251var highlightHack = null; // Embarrassing hack department... 
    225252 
    226253// Starting up 
    227254function main() 
    228255{ 
     256        store = new TiddlyWiki(); 
     257        story = new Story("tiddlerDisplay","tiddler"); 
    229258        addEvent(document,"click",Popup.onDocumentClick); 
    230259        saveTest(); 
     
    234263        store.loadFromDiv("storeArea","store"); 
    235264        loadSystemConfig(); 
     265        formatter = new Formatter(config.formatters); 
    236266        readOnly = (document.location.toString().substr(0,7) == "http://") ? config.options.chkHttpReadOnly : false; 
    237267        store.notifyAll(); 
     
    244274        var start = store.getTiddlerText("DefaultTiddlers"); 
    245275        if(window.location.hash) 
    246                 displayTiddlers(null,convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1))),1,null,null); 
     276                story.displayTiddlers(null,convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1))).readBracketedList()); 
    247277        else if(start) 
    248                 displayTiddlers(null,start,1,null,null); 
     278                story.displayTiddlers(null,start.readBracketedList()); 
    249279} 
    250280 
     
    284314} 
    285315 
     316function invokeMacro(place,macro,params,wikifier,tiddler) 
     317{ 
     318        try 
     319                { 
     320                var m = config.macros[macro]; 
     321                if(m && m.handler) 
     322                        m.handler(place,macro,params.readMacroParams(),wikifier,params,tiddler); 
     323                else 
     324                        createTiddlyError(place,config.messages.macroError.format([macro]),config.messages.macroErrorDetails.format([macro,config.messages.missingMacro])); 
     325                } 
     326        catch(ex) 
     327                { 
     328                createTiddlyError(place,config.messages.macroError.format([macro]),config.messages.macroErrorDetails.format([macro,ex.toString()])); 
     329                } 
     330} 
     331 
    286332// --------------------------------------------------------------------------------- 
    287333// Formatters 
    288334// --------------------------------------------------------------------------------- 
     335 
     336function Formatter(formatters) 
     337{ 
     338        this.formatters = []; 
     339        var pattern = []; 
     340        for(var n=0; n<formatters.length; n++) 
     341                { 
     342                pattern.push("(" + formatters[n].match + ")"); 
     343                this.formatters.push(formatters[n]); 
     344                } 
     345        this.formatterRegExp = new RegExp(pattern.join("|"),"mg"); 
     346} 
    289347 
    290348config.formatterHelpers = { 
     
    384442                                        w.nextMatch = w.nextMatch + 1; 
    385443                                        w.subWikify(rowContainer,this.rowTerminator); 
     444                                        table.insertBefore(rowContainer,table.firstChild); 
    386445                                        } 
    387446                                else 
    388447                                        { 
    389                                         rowElement = createTiddlyElement(rowContainer,"tr"); 
     448                                        var rowClass = (rowCount & 1) ? "oddRow" : "evenRow"; 
     449                                        rowElement = createTiddlyElement(rowContainer,"tr",null,rowClass); 
    390450                                        this.rowHandler(w,rowElement,prevColumns); 
    391451                                        } 
     
    501561 
    502562{ 
     563        name: "monospacedByLineForCSS", 
     564        match: "^/\\*[\\{]{3}\\*/\\n", 
     565        lookahead: "/\\*[\\{]{3}\\*/\\n*((?:^[^\\n]*\\n)+?)(\\n*^/\\*[\\}]{3}\\*/$\\n?)",  
     566        handler: config.formatterHelpers.monospacedByLineHelper 
     567}, 
     568 
     569{ 
    503570        name: "monospacedByLineForPlugin", 
    504571        match: "^//\\{\\{\\{\\n", 
     
    673740{ 
    674741        name: "urlLink", 
    675         match: "(?:http|https|mailto|ftp):[^\\s'\"]+(?:/|\\b)"
     742        match: config.textPrimitives.urlPattern
    676743        handler: function(w) 
    677744        { 
     
    699766                                else 
    700767                                        e = createExternalLink(w.output,lookaheadMatch[5]); 
     768                                addClass(e,"imageLink"); 
    701769                                } 
    702770                        var img = createTiddlyElement(e,"img"); 
     
    716784        name: "macro", 
    717785        match: "<<", 
    718         lookahead: "<<([^>\\s]+)(?:\\s*)([^>]*)>>", 
     786        lookahead: "<<([^>\\s]+)(?:\\s*)((?:[^>]|(?:>(?!>)))*)>>", 
    719787        handler: function(w) 
    720788        { 
     
    723791                var lookaheadMatch = lookaheadRegExp.exec(w.source) 
    724792                if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[1]) 
    725                         { 
    726                         var params = lookaheadMatch[2].readMacroParams();                        
     793                        {                
    727794                        w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length; 
    728                         try 
    729                                 { 
    730                                 var macro = config.macros[lookaheadMatch[1]]; 
    731                                 if(macro && macro.handler) 
    732                                         macro.handler(w.output,lookaheadMatch[1],params,w); 
    733                                 else 
    734                                         createTiddlyElement(w.output,"span",null,"errorNoSuchMacro","<<" + lookaheadMatch[1] + ">>"); 
    735                                 } 
    736                         catch(e) 
    737                                 { 
    738                                 displayMessage(config.messages.macroError.format([lookaheadMatch[1]])); 
    739                                 displayMessage(e.toString()); 
    740                                 } 
     795                        invokeMacro(w.output,lookaheadMatch[1],lookaheadMatch[2],w,w.tiddler); 
    741796                        } 
    742797        } 
     
    865920                createTiddlyElement(w.output,"br"); 
    866921        } 
    867 
     922}, 
     923 
     924
     925        name: "htmlEntitiesEncoding", 
     926        match: "&#?[a-zA-Z0-9]{2,8};", 
     927        handler: function(w) 
     928                { 
     929                var e = createTiddlyElement(w.output,"span"); 
     930                e.innerHTML = w.matchText ; 
     931                } 
     932
     933 
    868934]; 
    869935 
     
    872938// --------------------------------------------------------------------------------- 
    873939 
    874 function wikify(source,output,highlightText,highlightCaseSensitive) 
    875 
    876         var w = new Wikifier(source,output,config.formatters,highlightText,highlightCaseSensitive); 
    877 
    878  
    879 function Wikifier(source,output,formatters,highlightText,highlightCaseSensitive) 
     940function wikify(source,output,highlightRegExp,tiddler) 
     941
     942        if(source && source != "") 
     943                { 
     944                var wikifier = new Wikifier(source,formatter,highlightRegExp,tiddler); 
     945                wikifier.subWikify(output,null); 
     946                } 
     947
     948 
     949// Wikify a named tiddler to plain text 
     950function wikifyPlain(title) 
     951
     952        if(store.tiddlerExists(title)) 
     953                { 
     954                var wikifier = new Wikifier(store.getTiddlerText(title),formatter,null,store.getTiddler(title)); 
     955                return wikifier.wikifyPlain(); 
     956                } 
     957        else 
     958                return ""; 
     959
     960 
     961// Highlight plain text into an element 
     962function highlightify(source,output,highlightRegExp) 
     963
     964        if(source && source != "") 
     965                { 
     966                var wikifier = new Wikifier(source,formatter,highlightRegExp,null); 
     967                wikifier.outputText(output,0,source.length); 
     968                } 
     969
     970 
     971// Construct a wikifier object 
     972// source - source string that's going to be wikified 
     973// formatter - Formatter() object containing the list of formatters to be used 
     974// highlightRegExp - regular expression of the text string to highlight 
     975// tiddler - reference to the tiddler that's taken to be the container for this wikification 
     976function Wikifier(source,formatter,highlightRegExp,tiddler) 
    880977{ 
    881978        this.source = source; 
    882         this.output = output; 
     979        this.output = null; 
     980        this.formatter = formatter; 
    883981        this.nextMatch = 0; 
    884         this.highlightText = highlightText; 
    885         this.highlightCaseSensitive = highlightCaseSensitive; 
    886         this.highlightRegExp = null; 
    887         this.highlightMatch = null; 
    888         this.assembleFormatterMatches(formatters); 
    889         if(highlightText) 
    890                 { 
    891                 this.highlightRegExp = new RegExp(highlightText,highlightCaseSensitive ? "mg" : "img"); 
    892                 this.highlightMatch = this.highlightRegExp.exec(this.source); 
    893                 } 
    894         if(source && source != "") 
    895                 this.subWikify(output,null); 
    896         return this; 
    897 
    898  
    899 Wikifier.prototype.assembleFormatterMatches = function(formatters) 
    900 
    901         this.formatters = []; 
    902         var pattern = []; 
    903         for(var n=0; n<formatters.length; n++) 
    904                 { 
    905                 pattern.push("(" + formatters[n].match + ")"); 
    906                 this.formatters.push(formatters[n]); 
    907                 } 
    908         this.formatterRegExp = new RegExp(pattern.join("|"),"mg"); 
     982        this.highlightRegExp = highlightRegExp; 
     983        this.highlightMatch = null;      
     984        if(highlightRegExp) 
     985                { 
     986                highlightRegExp.lastIndex = 0; 
     987                this.highlightMatch = highlightRegExp.exec(source); 
     988                } 
     989        this.tiddler = tiddler; 
     990
     991 
     992Wikifier.prototype.wikifyPlain = function() 
     993
     994        var e = createTiddlyElement(document.body,"div"); 
     995        e.style.display = "none"; 
     996        this.subWikify(e,null); 
     997        var text = getPlainText(e); 
     998        e.parentNode.removeChild(e); 
     999        return text; 
    9091000} 
    9101001 
     
    9181009        do { 
    9191010                // Prepare the RegExp match positions 
    920                 this.formatterRegExp.lastIndex = this.nextMatch; 
     1011                this.formatter.formatterRegExp.lastIndex = this.nextMatch; 
    9211012                if(terminatorRegExp) 
    9221013                        terminatorRegExp.lastIndex = this.nextMatch; 
    9231014                // Get the first matches 
    924                 var formatterMatch = this.formatterRegExp.exec(this.source); 
     1015                var formatterMatch = this.formatter.formatterRegExp.exec(this.source); 
    9251016                var terminatorMatch = terminatorRegExp ? terminatorRegExp.exec(this.source) : null; 
    9261017                // Check for a terminator match 
     
    9491040                        this.matchLength = formatterMatch[0].length; 
    9501041                        this.matchText = formatterMatch[0]; 
    951                         this.nextMatch = this.formatterRegExp.lastIndex; 
     1042                        this.nextMatch = this.formatter.formatterRegExp.lastIndex; 
    9521043                        // Figure out which formatter matched 
    9531044                        var matchingformatter = -1; 
     
    9571048                        // Call the formatter 
    9581049                        if(matchingFormatter != -1) 
    959                                 this.formatters[matchingFormatter].handler(this); 
     1050                                this.formatter.formatters[matchingFormatter].handler(this); 
    9601051                        } 
    9611052        } while(terminatorMatch || formatterMatch); 
     
    10731164config.macros.timeline.handler = function(place,macroName,params) 
    10741165{ 
    1075         var tiddlers = store.reverseLookup("tags","excludeLists",false,"modified"); 
     1166        var field = params[0] ? params[0] : "modified"; 
     1167        var tiddlers = store.reverseLookup("tags","excludeLists",false,field); 
    10761168        var lastDay = ""; 
    10771169        for (t=tiddlers.length-1; t>=0; t--) 
     
    10971189        var doSearch = function(txt) 
    1098119