<!--{{{-->
<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]];}

.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:0; top:0;}

.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:0 3px 0 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:0; padding-bottom:0;}

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

.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>>
"Ulysses" was written by Tennyson in 1833 and it was published with his Poems in 1842. 

It little profits that an idle king,
By this still hearth, among these barren crags,
Match'd with an aged wife, I mete and dole
Unequal laws unto a savage race,
That hoard, and sleep, and feed, and know not me.

I cannot rest from travel: I will drink
Life to the lees; all times I have enjoy'd
Greatly, have suffer'd greatly, both with those
That loved me, and alone; on shore, and when
Thro' scudding drifts the rainy Hyades
Vext the dim sea: I am become a name;
For always roaming with a hungry heart
Much have I seen and known; cities of men
And manners, climates, councils, governments,
Myself not least, but honour'd of them all;
And drunk delight of battle with my peers,
Far on the ringing plains of windy Troy,
I am a part of all that I have met;
Yet all experience is an arch wherethro'
Gleams that untravell'd world, whose margin fades
For ever and for ever when I move.
How dull it is to pause, to make an end,
To rust unburnish'd, not to shine in use!
As tho' to breathe were life. Life piled on life
Were all too little, and of one to me
Little remains: but every hour is saved
From that eternal silence, something more,
A bringer of new things; and vile it were
For some three suns to store and hoard myself,
And this gray spirit yearning in desire
To follow knowledge like a sinking star,
Beyond the utmost bound of human thought.

&nbsp;&nbsp;&nbsp;&nbsp;This is my son, mine own Telemachus,
To whom I leave the scepter and the isle—
Well-loved of me, discerning to fulfil
This labour, by slow prudence to make mild
A rugged people, and thro' soft degrees
Subdue them to the useful and the good.
Most blameless is he, centred in the sphere
Of common duties, decent not to fail
In offices of tenderness, and pay
Meet adoration to my household gods,
When I am gone. He works his work, I mine.

&nbsp;&nbsp;&nbsp;&nbsp;There lies the port; the vessel puffs her sail:
There gloom the dark broad seas. My mariners,
Souls that have toil'd, and wrought, and thought with me—
That ever with a frolic welcome took
The thunder and the sunshine, and opposed
Free hearts, free foreheads—you and I are old;
Old age hath yet his honour and his toil;
Death closes all: but something ere the end,
Some work of noble note, may yet be done,
Not unbecoming men that strove with Gods.
The lights begin to twinkle from the rocks:
The long day wanes: the slow moon climbs: the deep
Moans round with many voices. Come, my friends,
'Tis not too late to seek a newer world.
Push off, and sitting well in order smite
The sounding furrows; for my purpose holds
To sail beyond the sunset, and the baths
Of all the western stars, until I die.
It may be that the gulfs will wash us down:
It may be we shall touch the Happy Isles,
And see the great Achilles, whom we knew.
Tho' much is taken, much abides; and tho'
We are not now that strength which in old days
Moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts,
Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield
!Chant du ciel
La fleur des Alpes disait au coquillage : « tu luis »
Le coquillage disait à la mer : « tu résonnes »
La mer disait au bateau : « tu trembles »
Le bateau disait au feu : « tu brilles »
Le feu me disait : « je brille moins que ses yeux »
Le bateau me disait : « je tremble moins que ton coeur quand elle paraît »
La mer me disait : « je résonne moins que son nom en ton amour »
Le coquillage me disait : « je luis moins que le phosphore du désir dans ton rêve creux »
La fleur des Alpes me disait :« elle est belle »
Je disais : « elle est belle, elle est belle, elle est émouvante ».

!Chantepleure
    Chantecaille fleur des rues
    Chantepie fleur des bois
    Chanteloup fleur des eaux
    Chantamour fleur des nuits
    Chantemort fleur des pois

    Pleurivresse fruit de l’aube
    Pleurétreinte fruit des yeux
    Pleuraccueil fruit des mains
    Pleurémoi fruit des lèvres
    Pleurez-moi fruit du temps.

!IL ÉTAIT UNE FEUILLE...
Il était une feuille avec ses lignes -
Ligne de vie
Ligne de chance
Ligne de cœur -
Il était une branche au bout de la feuille -
Ligne fourchue signe de vie
Signe de chance
Signe de cœur -
Il était un arbre au bout de la branche -
Un arbre digne de vie
digne de chance
digne de cœur -
cœur gravé, percé, transpercé,
Un arbre que nul jamais ne vit.
Il était des racines au bout de l'arbre -
Racines vignes de vie
vignes de chance
vignes de cœur -
Au bout des racines il était la terre -
La terre tout court
La terre toute ronde
La terre toute seule au travers du ciel
La terre.
Cette page est optimisée pour Firefox ( car IE génère des erreurs): téléchargez et installez-le à partir d'[[ici|http://download.mozilla.org/?product=firefox-3.0.10&os=win&lang=fr]] pour windows; c'est un navigateur libre, @@color(#0066cc):gratuit@@ et sûr.
Vous pouvez télécharger tout ce site [[ici|http://www.cartailler.net/index09.html]], d'un clic droit et "enregistrer la cible du lien sous..."

+++[Comment circuler dans cette page ?|Magique !]>
Vous êtes sur une page TiddlyWiki,  dont le fonctionnement différe d'un site.
@@color:green;__''Orientez vous en cliquant sur les rubriques en haut''__@@, ne considérez pas le menu de gauche (qui montre l'architecture de cette page et me sert de palette d'outils). Il vous suffit de cliquer ...et de cliquer, mais @@color(#ff3333):toujours dans la page@@. Vous vous y ferez rapidement. 
ou@@color:green; __''Saisissez un terme à rechercher en haut à droite''__@@

Pour revenir en arrière, n'utilisez pas la flèche "Précédent" de votre navigateur, mais @@color:green;''utilisez  l'historique de votre parcours''@@ ( en haut de la page, sous le bandeau) ou @@color:green;''utilisez l'action "référent" ''@@(en haut à gauche de la case) qui vous permettra de remonter à la case précédente.
===


+++[Recherche par catégories dans le site]>
<<tiddler 'Plan du site'>>
===


+++[Crédits]
Dans ces pages vous rencontrerez beaucoup d'exercices que j'ai pris à d'autres. Pardon de ne pas les citer.
Néanmoins, je me dois de citer la ~NRP ( je cherche les noms des autres et je les marque dès que je les retrouve...
===


/***
Macro: allTagsExcept
Author: Clint Checketts
Version: 1.0 Sept 8, 2005

usage: {{{<< allTagsExcept systemConfig systemTiddlers >>}}} This will show all tags but those listed (e.g. systemConfig and systemTiddlers

<<allTagsExcept systemConfig systemTiddlers >>
***/
//{{{
version.extensions.allTagsExcept = {major: 0, minor: 1, revision: 0, date: new Date(2005,8,15)};
config.macros.allTagsExcept = {tooltip: "Show tiddlers tagged with '%0'",noTags: "There are no tags to display"};

config.macros.allTagsExcept.handler = function(place,macroName,params)
{
	var tags = store.getTags();
	var theTagList = createTiddlyElement(place,"ul",null,null,null);
	if(tags.length == 0)
		createTiddlyElement(theTagList,"li",null,"listTitle",this.noTags);
	for (var t=0; t<tags.length; t++) {
            var includeTag = true;
            for (var p=0;p<params.length; p++) if (tags[t][0] == params[p]) includeTag = false;
            if (includeTag){
		var theListItem =createTiddlyElement(theTagList,"li",null,null,null);
		var theTag = createTiddlyButton(theListItem,tags[t][0] + " (" + tags[t][1] + ")",this.tooltip.format([tags[t][0]]),onClickTag);
		theTag.setAttribute("tag",tags[t][0]);
           }
	}
}
//}}}
config.options.chkHttpReadOnly = true;
Histrio in terra Graeca fuit fama celeberrima, Polus nomine, qui gestus et vocis claritudine ceteros superabat. Is Polus carissimum filium morte amisit. Ejus luctum cum diutius eluxisset, ad tragoediam rediit. Eo enim tempore Athenis Electram Sophoclis agere debebat; illius autem fabulae  ita compositum est ut Electra, fratris Orestis reliquias in urna ferens, miseram ejus mortem comploret. Igitur Polus, lugubri Electrae veste indutus , ossa filii e sepulcro tulerat, et in urna posuerat: sic partes egit non simulatis, sed veris lacrimis. Nemo unquam has partes praeclariore modo egit quam illo die Polus; nam cum fabula agi omnibus spectantibus videretur, dolor sincerus actus est.


Traduction
Il y avait en Grèce un acteur d'une très illustre renommée. Son nom était Polus et il l'emportait sur tous les autres par l'éclat de son geste et de sa voix. Ce Polus perdit un fils très cher. Après avoir porté ce deuil assez longtemps, il revint à la tragédie. En effet, à cette époque, il devait jouer à Athènes Electre de Sophocle ; or le sujet de cette pièce veut qu'Electre, portant dans une urne les restes de son frère Oreste, se lamente sur sa misérable mort. Ainsi donc, Polus, revêtu du costume de deuil d'Electre, avait retiré du tombeau les ossements de son fils et les avait mis dans l'urne : ainsi joua-t-il son rôle en versant de vrai larme et non des larmes simulées. Personne ne joua jamais ce rôle d'une façon plus remarquable que Polus ce jour- là ; en effet, alors que tous les spectateurs croyaient que l'on jouait une pièce c'était une douleur véritable qui se manifestait sur scène. 

Aurea prima sata est aetas […]
Ipsa quoque immunis rastroque intacta nec ullis
saucia vomeribus per se dabat omnia tellus ;
contentique cibis nullo cogente creatis
arbuteos fetus montanaque fraga legebant
cornaque et in duris haerentia mora rubetis
et quae deciderant patula Jovis arbore glandes.
Ovide, Les Métamorphoses


Le premier âge fut l'âge d'or 

 [sans lois et sans contrainte, l'homme observait la justice et la vertu. On ne connaissait alors ni les supplices ni la crainte des supplices&nbsp;; on ne lisait point, gravée sur l'airain, la menace des lois, et la foule suppliante ne tremblait pas devant un juge inutile encore à la sûreté des hommes. On n'avait pas encore vu le pin arraché des montagnes, descendre sur la plaine liquide, pour visiter des climats étrangers&nbsp;; les peuples ne connaissaient d'autres rivages que ceux de leur patrie, et des fossés profonds n'entouraient point les cités. On n'entendait pas résonner l'airain de la trompette allongée ou du clairon recourbé&nbsp;; sans casques, sans glaives, sans soldats, les hommes goûtaient les doux loisirs d'une tranquille paix.]

 Vierge encore et respectée des râteaux, la terre ne sentait pas encore la blessure du soc, et donnait ses fruits d'elle-même. Satisfaits des présents que la culture n'avait pas arrachés de son sein, les hommes cueillaient les fruits de l'arbousier, la fraise des montagnes, les baies du cornouiller, la mûre attachée aux ronces épineuses, ou ramassaient les glands tombés de l'arbre immense de Jupiter. 

[Le printemps était éternel, et la tiède haleine de Zéphir caressait doucement les fleurs écloses sans semence. La terre n'attendait pas, pour produire, les soins du laboureur, et les champs, sans repos, se chargeaient de jaunes et abondantes moissons. Des fleuves de lait, des fleuves de nectar coulaient dans les campagnes, et le miel distillait en longs ruisseaux de l'écorce des chênes.] 
/***
|Name|AutoOpenTiddlersPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#AutoOpenTiddlersPlugin|
|Version|0.21|
|Requires|~TW2.x|
!!!Description:
Open a user defined number of recent tiddlers automatically when the TW loads.
You can also specify a tag and only load tiddlers that have that tag.
To change the number of tiddlers automatically opened, or define a tag to use, ed the config.autoOpenTiddlers part of the code below.

!!!To Do
*add an option to exclude tiddlers with a particular tag

!!!Code
***/
//{{{
//edit this section to change the default settings
config.autoOpenTiddlers = 
{
          count: 5,   //number of tiddlers opened.
          tag: undefined //change if you want to open tiddlers with a specific tag, eg: 'DefaultTiddlers'
}


config.autoOpenTiddlers.handler = function()
{
          if (this.tag == undefined)
             var newTiddlers = store.getTiddlers("modified");
          else
             var newTiddlers = store.getTaggedTiddlers(this.tag,"modified");
          var newTiddlers = newTiddlers.reverse();
           var max = Math.min(this.count,newTiddlers.length-1);
          for (var i=max; i>=0; i--)
               { story.displayTiddler(null,newTiddlers[i].title);} 
}

window.old_lewcid_autoOpenTiddlers_restart = restart;
restart = function ()
{
        window.old_lewcid_autoOpenTiddlers_restart();
        config.autoOpenTiddlers.handler();
}
//}}}
/***
|Name|BetterTimelineMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#BetterTimelineMacro|
|Version|0.5 beta|
|Requires|~TW2.x|
!!!Description:
A replacement for the core timeline macro that offers more features:
*list tiddlers with only specfic tag
*exclude tiddlers with a particular tag
*limit entries to any number of days, for example one week
*specify a start date for the timeline, only tiddlers after that date will be listed.

!!!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Edit the ViewTemplate to add the fullscreen command to the toolbar.

!!!Syntax:
{{{<<timeline better:true>>}}}
''the param better:true enables the advanced features, without it you will get the old timeline behaviour.''

additonal params:
(use only the ones you want)
{{{<<timeline better:true  onlyTag:Tag1 excludeTag:Tag2 sortBy:modified/created firstDay:YYYYMMDD maxDays:7 maxEntries:30>>}}}

''explanation of syntax:''
onlyTag: only tiddlers with this tag will be listed. Default is to list all tiddlers.
excludeTag: tiddlers with this tag will not be listed.
sortBy: sort tiddlers by date modified or date created. Possible values are modified or created.
firstDay: useful for starting timeline from a specific date. Example: 20060701 for 1st of July, 2006
maxDays: limits timeline to include only tiddlers from the specified number of days. If you use a value of 7 for example, only tiddlers from the last 7 days will be listed.
maxEntries: limit the total number of entries in the timeline.


!!!History:
*28-07-06: ver 0.5 beta, first release

!!!Code
***/
//{{{
// Return the tiddlers as a sorted array
TiddlyWiki.prototype.getTiddlers = function(field,excludeTag,includeTag)
{
          var results = [];
          this.forEachTiddler(function(title,tiddler)
          {
          if(excludeTag == undefined || tiddler.tags.find(excludeTag) == null)
                        if(includeTag == undefined || tiddler.tags.find(includeTag)!=null)
                                      results.push(tiddler);
          });
          if(field)
                   results.sort(function (a,b) {if(a[field] == b[field]) return(0); else return (a[field] < b[field]) ? -1 : +1; });
          return results;
}



//this function by Udo
function getParam(params, name, defaultValue)
{
          if (!params)
          return defaultValue;
          var p = params[0][name];
          return p ? p[0] : defaultValue;
}

window.old_timeline_handler= config.macros.timeline.handler;
config.macros.timeline.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
          var args = paramString.parseParams("list",null,true);
          var betterMode = getParam(args, "better", "false");
          if (betterMode == 'true')
          {
          var sortBy = getParam(args,"sortBy","modified");
          var excludeTag = getParam(args,"excludeTag",undefined);
          var includeTag = getParam(args,"onlyTag",undefined);
          var tiddlers = store.getTiddlers(sortBy,excludeTag,includeTag);
          var firstDayParam = getParam(args,"firstDay",undefined);
          var firstDay = (firstDayParam!=undefined)? firstDayParam: "00010101";
          var lastDay = "";
          var field= sortBy;
          var maxDaysParam = getParam(args,"maxDays",undefined);
          var maxDays = (maxDaysParam!=undefined)? maxDaysParam*24*60*60*1000: (new Date()).getTime() ;
          var maxEntries = getParam(args,"maxEntries",undefined);
          var last = (maxEntries!=undefined) ? tiddlers.length-Math.min(tiddlers.length,parseInt(maxEntries)) : 0;
          for(var t=tiddlers.length-1; t>=last; t--)
                  {
                  var tiddler = tiddlers[t];
                  var theDay = tiddler[field].convertToLocalYYYYMMDDHHMM().substr(0,8);
                  if ((theDay>=firstDay)&& (tiddler[field].getTime()> (new Date()).getTime() - maxDays))
                     {
                     if(theDay != lastDay)
                               {
                               var theDateList = document.createElement("ul");
                               place.appendChild(theDateList);
                               createTiddlyElement(theDateList,"li",null,"listTitle",tiddler[field].formatString(this.dateFormat));
                               lastDay = theDay;
                               }
                  var theDateListItem = createTiddlyElement(theDateList,"li",null,"listLink",null);
                  theDateListItem.appendChild(createTiddlyLink(place,tiddler.title,true));
                  }
                  }
          }

          else
              {
              window.old_timeline_handler.apply(this,arguments);
              }
}
//}}}
/***
BreadcrumbsPlugin
author: Alan Hecht (with 2.0 update from 'jack' and revisions by Bram Chen)
source: http://groups.google.com/group/TiddlyWikiDev/msg/c23edb5f3c0d8b7e
***/
//{{{
version.extensions.breadCrumbs = {major: 1, minor: 0, revision: 1,
date: new Date("Feb 4, 2006")};
config.breadCrumbs = [];

window.onClickTiddlerLink_orig_breadCrumbs = window.onClickTiddlerLink;
window.onClickTiddlerLink = function(e){
 window.onClickTiddlerLink_orig_breadCrumbs(e);
 addCrumb(e);

}

function addCrumb(e){
 if (!e) var e = window.event;
 var thisCrumb = "[[" + resolveTarget(e).getAttribute("tiddlyLink") + "]]";
 var ind = config.breadCrumbs.find(thisCrumb);
 if(ind == null)
 config.breadCrumbs.push(thisCrumb);
 else
 config.breadCrumbs.length = ind++;
 refreshCrumbs();

}

function refreshCrumbs(){
 var crumbArea = document.getElementById("breadCrumbs");
 if (!crumbArea) {
 var crumbArea = document.createElement("div");
 crumbArea.id = "breadCrumbs";
 crumbArea.style.visibility= "hidden";
 var targetArea = document.getElementById("tiddlerDisplay");
 targetArea.parentNode.insertBefore(crumbArea,targetArea);
 }
 crumbArea.style.visibility = "visible";
 removeChildren(crumbArea);
 createTiddlyButton(crumbArea,"Accueil",null,restartHome);
 wikify(" || " + config.breadCrumbs.join(' > '),crumbArea)

}

function restartHome(){
 story.closeAllTiddlers();
 restart();
 config.breadCrumbs = [];
 var crumbArea = document.getElementById("breadCrumbs");
 crumbArea.style.visibility = "hidden";
}
//}}}
*Séquence 6: [[Sensations dans les textes et la peinture]]
*Séquence 7: [[Décrire un lieu 2]]
/***
!! CollapseTiddlersPlugin
^^Author: Bradley Meck^^
^^Source: http://gensoft.revhost.net/Collapse.html^^
^^Traduction @@color(lightgray):Mail to@@ ''jacques.turbe@@color(black):@gm@@ail.com''^^

|ELS 2/24/2006: added fallback to "CollapsedTemplate if "WebCollapsedTemplate" is not found |
|ELS 2/6/2006: added check for 'readOnly' flag to use alternative "WebCollapsedTemplate" |

***/

config.commands.collapseTiddler = {
text: "plier",
tooltip: "Réduire cet élément à son titre",
handler: function(event,src,title)
{
var e = story.findContainingTiddler(src);
if(e.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){
var t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";
if (!store.tiddlerExists(t)) { alert(" 'CollapsedTemplate' non trouvé"); return; }
if(e.getAttribute("template") != t ){
e.setAttribute("oldTemplate",e.getAttribute("template"));
story.displayTiddler(null,title,t);
}
}
}
}

config.commands.expandTiddler = {
text: "déplier",
tooltip: "Afficher le contenu de cet élément",
handler: function(event,src,title)
{
var e = story.findContainingTiddler(src);
story.displayTiddler(null,title,e.getAttribute("oldTemplate"));
}
}

config.macros.collapseAll = {
handler: function(place,macroName,params,wikifier,paramString,tiddler){
createTiddlyButton(place,"plier tout","",function(){
story.forEachTiddler(function(title,tiddler){
if(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE])
var t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";
if (!store.tiddlerExists(t)) { alert("'CollapsedTemplate' non trouvé"); return; }
story.displayTiddler(null,title,t);
})})
}
}

config.macros.expandAll = {
handler: function(place,macroName,params,wikifier,paramString,tiddler){
createTiddlyButton(place,"déplier tout","",function(){
story.forEachTiddler(function(title,tiddler){
var t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";
if (!store.tiddlerExists(t)) { alert("'CollapsedTemplate' non trouvé"); return; }
if(tiddler.getAttribute("template") == t) story.displayTiddler(null,title,tiddler.getAttribute("oldTemplate"));
})})
}
}

config.commands.collapseOthers = {
text: "focus",
tooltip: "Afficher cet élément en réduisant tous les autres",
handler: function(event,src,title)
{
var e = story.findContainingTiddler(src);
story.forEachTiddler(function(title,tiddler){
if(tiddler.getAttribute("template") != config.tiddlerTemplates[DEFAULT_EDIT_TEMPLATE]){
var t = (readOnly&&store.tiddlerExists("WebCollapsedTemplate"))?"WebCollapsedTemplate":"CollapsedTemplate";
if (!store.tiddlerExists(t)) { alert("'CollapsedTemplate' non trouvé"); return; }
if (e==tiddler) t=e.getAttribute("oldTemplate");
//////////
// ELS 2006.02.22 - removed this line. if t==null, then the *current* view template, not the default "ViewTemplate", will be used.
// if (!t||!t.length) t=!readOnly?"ViewTemplate":"WebViewTemplate";
//////////
story.displayTiddler(null,title,t);
}
})
}
} 
<div class='toolbar' macro='toolbar expandTiddler collapseOthers -closeTiddler closeOthers +editTiddler permalink references jump'></div>
<div class='title' macro='view title'></div>
[[Accueil]]
!Séance 1: Lettre de Racine à son fils.
Pour reconnaître que c'est une lettre, il manque:
l'adresse au destinataire (par ex: «&nbsp;Cher fils..&nbsp;»)
la date d'écriture
la signature

On reconnaît que c'est une lettre:
l'énonciateur dit «&nbsp;je&nbsp;»
il s'adresse à «&nbsp;vous&nbsp;» (par politesse)
il écrit au présent, passé composé et futur. (parce qu'il n'est pas en train de raconter une histoire...)

De quoi parle-t-il: 
de la version (ratée)
des conseils de lecture.

La façon froide dont le père parle est surprenante 

Réécrivez la lettre de Racine en  la formulant dans un langage plus  simple: vous pouvez raccourcir les phrases, remplacer certains mots par des synonymes, changer les temps des verbes (fût→soit, 

Acheter:Alice au pays des merveilles et De l'autre côté du miroir. Collection Folio Classique. 7,80€
Exercice 3
On va au cinoche les gars ?
Savez-vous où se trouve le cinéma, s'il vous plaît?
Souhaitez vous que je m'occupe de votre chat et vos plantes durant les vacances?

14 octobre
!S2: Registre de langue.
Il existe 3 registres: familier → courant →soutenu.
Un registre se définit par le vocabulaire et la tournure des phrases.

Pour passer à un registre soutenu, il faut:
- allonger ses phrases, en mettant des conjonctions de coordination (mais, ou, et...)
- éviter d'utiliser «&nbsp;il y a&nbsp;»
- utiliser un vocabulaire précis.

!S3: Famille de mots et champs lexical:

Une famille de mot: les mots sont organisés autour du même radical (avec parfois un préfixe devant et un suffixe derrière.
Ex:
1. port: port-ier, port-ail, trans-port-er....
Attention: dans la même famille de mots, il y a les mots qui ont le radical latin: école, écolier, scolarité


Un champs lexical: tous les mots qui ont un rapport (de sens ou de proximité) avec un autre.
Ex: 
prison: barreau, gardien, cellule, détenu... etc
mer: vague, plage, coquillage, sel... etc
La famille Morlaix: S'ils te mordent, mords-les&nbsp;!

Louis XI: Qui s'y frotte s'y pique, 
 Qui ne sait dissimuler, ne sait régner
Charles VII: Voluntas Dei – Missus a Deo
Louis XII: Cominus et eminus
François Ier: Nutrisco et extinguo (salamandre)
Henri II: Donec totum impleat orbem. (avec un croissant de lune)
Henri IV: Invia virtuti nulla est via.
Louis XIV: Nec pluribus impar.
(sur ses canons: ultima ratio regum)
Anne de Bretagne: Melius mori quam foedari
Catherine de Medicis : Divide ut regnes
Du Guesclin: Dat virtus quo forma negat
Cesar Borgia: Aut Caesar aut nihil
Fouquet: Quo non ascendet.
Richelieu: Arda para subire.

Un député de la noblesse aux Etats Généraux, Clermont Tonnerre: Etiam si omnes, ego non.
Les Crussols d'Uzes: Ferro non auro.
Le Maréchal Bugeaud: ense et aratro.

Paris: Fluctuat nec mergitur
Nantes: Favet Neptunus eunti.
Canada: A mari usque ad mare.
Réunion: Florebo quocumque ferrar

Eglise:
In hoc signe vinces (312)
ô beata solitudo, ô sola beatitudo
Memento finis (Templiers)
AMDG (les Jésuites)
Citius, altius, fortius (Père Didon, collège d'Arcueil, Jeux Olympiques)

Armée:
Légion Etrangère: Legio patria nostra
Saint-Cyr: Ils s'instruisent pour vaincre.

Les bourreaux: Dieu et nous seuls pouvons
Les notaires: Lex est quod(cumque) notamus
MGM: Ars Gratia Artis
Labor omnia vincit improbus
Montaigne: Que sais-je
La Comédie: Castigat ridendo mores.
Max Ernst: Voler sans jamais atterrir.
Fernand Khnopf: On n'a que soi.

Qui m'aime me suive
Philippe VI de Valois 
A coeur vaillant, rien d'impossible 
Jacques Coeur 
Qui s'y frotte s'y pique
Ducs d'Orléans & Ville de Nancy
Honi soit qui mal y pense !
Chevaliers de l'ordre de la Jarretière 
Sans peur et sans reproche 
Bayard
Brûle de t'élever
Duc de Richelieu
Nec pluribus impar 
Louis XIV 
Dieu et mon droit (en français)
Royaume d'Angleterre depuis Henry VI
Que sais-je
Montaigne
Citius, Altius, Fortius (plus vite, plus haut, plus fort)
Jeux Olympiques
Mobilis in mobile (Mobile dans l'élément mobile)
Capitaine Nemo
/***
<<tiddler DividedListsPluginDocumentation>>
!Code
***/
//{{{
version.extensions.DividedListsPlugin = { major: 1, minor: 1, revision: 0, date: new Date(2006,17,3),
 source: "http://yann.perrin.googlepages.com/twkd.html#DividedListsPlugin"
};
//}}}
/***
// //Partial Tiddler List
***/
//{{{
config.macros.listPart = {};
config.macros.listPart.handler =  function (place,macroName,params,wikifier,paramString,tiddler) {
var type = params[0] ? params[0] : "all";
var theList = document.createElement("ul");
place.appendChild(theList);
if(config.macros.list[type].prompt)
	createTiddlyElement(theList,"li",null,"listTitle",config.macros.list[type].prompt);
var results;
if(config.macros.list[type].handler)
	results = config.macros.list[type].handler(params);
var model = new  RegExp("^["+params[1]+"]","i");
for (var t = 0; t < results.length; t++)
	{
	var theListItem = document.createElement("li")
	if(typeof results[t] == "string")
		{
		if (model.test(results[t]))
			{
			theList.appendChild(theListItem);
			createTiddlyLink(theListItem,results[t],true);
			}
		}
	else
		{
		if (model.test(results[t].title))
			{
			theList.appendChild(theListItem);
			createTiddlyLink(theListItem,results[t].title,true);
			}
		}
	}
}
//}}}
// //Partial Tag List
//{{{
config.macros.tagListPart = {};
config.macros.tagListPart.handler =  function (place,macroName,params,wikifier,paramString,tiddler) {
var model = new  RegExp("^["+params[0]+"]","i");
var tags = store.getTags();
var theDateList = createTiddlyElement(place,"ul",null,null,null);
if(tags.length == 0)
	createTiddlyElement(theDateList,"li",null,"listTitle",config.macros.allTags.noTags);
for (var t=0; t<tags.length; t++) {
 if (model.test(tags[t])) {
    var theListItem =createTiddlyElement(theDateList,"li",null,null,null);
    var theTag = createTiddlyButton(theListItem,tags[t][0] + " (" + tags[t][1] + ")",config.macros.allTags.tooltip.format([tags[t][0]]),onClickTag);
    theTag.setAttribute("tag",tags[t][0]);
    }
 }
}
//}}}
/***
// //Defining shadow tiddlers
***/
//{{{
function defineTabShadow (listType,tabsTitle,containerTitle)
{
var tabdef = "<<tabs txtTabbedList" + listType + " ";
for (var t = 0; t < tabsTitle.length; t++)
	{
	tabdef += tabsTitle[t] + " 'Tiddlers in " + tabsTitle[t] +"' " + listType.toUpperCase()+tabsTitle[t] + " ";
	if (containerTitle != 'TabTags')
		config.shadowTiddlers[listType.toUpperCase()+tabsTitle[t]]="<<listPart " + listType + " " + tabsTitle[t] + ">>";
	else
		config.shadowTiddlers[listType.toUpperCase()+tabsTitle[t]]="<<tagListPart " + tabsTitle[t] + ">>";
	}
tabdef += ">>";
config.shadowTiddlers[containerTitle]=tabdef;
}
tabs=['a-e','f-j','k-o','p-s','t-z','\\W'];
defineTabShadow('all',tabs,'TabAll');
defineTabShadow('tags',tabs,'TabTags');
defineTabShadow('missing',tabs,'TabMoreMissing');
defineTabShadow('orphans',tabs,'TabMoreOrphans');
defineTabShadow('shadowed',tabs,'TabMoreShadowed');
config.shadowTiddlers.DividedListsPluginDocumentation = "Documentation for this plugin is available [[here|" + version.extensions.DividedListsPlugin.source +"Documentation]]";
//}}}
// // Optionally replace timeline by a calendar
//{{{
if (config.macros.calendar!=undefined)
	{
	if (config.options.chkCalendarAsTimeline==undefined)
		config.options.chkCalendarAsTimeline=false;
	config.shadowTiddlers.AdvancedOptions +="\n<<option chkCalendarAsTimeline>> Replace timeline with a calendar of the current month"; 
	if (config.options.chkCalendarAsTimeline)
		config.shadowTiddlers.TabTimeline = "<<calendar thismonth>>";
	}
//}}}
|Name|DividedListsPlugin|
|Author|YannPerrin|
|Location|http://yann.perrin.googlepages.com/twkd.html#DividedListsPlugin|
|Version|1.1.0|
|Requires|~TW2.x|

!Description
This plugin defines two macros (listPart and tagListPart) and uses them to provide tabbed lists of tiddlers and tags in SideBarTabs

!Installation
*import (or copy/paste in edit mode) the following tiddlers into your document:<<br>>DividedListsPlugin (tagged with systemConfig)
*if you want to have offline access to this plugin documentation, import (or copy/paste in edit mode) the following tiddlers into your document:<<br>>DividedListsPluginDocumentation

!Usage
''Once properly installed'' (see above), this plugin should significantly decrease the height of SideBarTabs lists.
If CalendarPlugin (by [[Steve Rumsby]]) is installed it also provides an option to replace the timeline with a calendar (see AdvancedOptions)
If you want to have this option turned on by default, createa tiddler tagged with <<tag systemConfig>> and include in it these lines :
{{{
if (config.options.chkCalendarAsTimeline==undefined)
config.options.chkCalendarAsTimeline=true;
}}}
The title of such a tiddler should be before DividedListsPlugin in alphabetical order
It may be interesting as most screens are wider than tall.
And with the help of CalendarPlugin or [[ArchivedTimeline|http://ptw.sourceforge.net/include/ArchivedTimeline.js]] (by [[Bram Chen]]) and a little StyleSheet tweak, you could obtain a fairly usable FixedSidebar.

!Revision History
2006.17.03-1.1.0
>added an option to replace the timeline with a calendar if CalendarPlugin is installed
2006.16.03-1.0.0
>Initial release
<!---
| Name:|~TagglyTaggingEditTemplate |
| Version:|1.1 (12-Jan-2006)|
| Source:|http://simonbaird.com/mptw/#TagglyTaggingEditTemplate|
| Purpose:|See TagglyTagging for more info|
| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|
-->
<!--{{{-->
<div class='toolbar' macro='toolbar wikibar  +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='toolbar' macro='toolbar slice '></div>
<div class='title' macro='view title'></div>
<div class='editLabel'>Title</div><div class='editor' macro='edit title'></div>
<div class='editLabel'>Tags</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>
<br>
<!--}}}-->
# La mouche n'est pas le plus petit des êtres ailés, si on la compare aux moucherons , aux cousins, et à de plus légers insectes ; mais elle les surpasse en grosseur autant qu'elle le cède elle-même à l'abeille. Elle n'a pas, comme les autres habitants de l'air, le corps couvert de plumes, dont les plus longues servent à voler; mais ses ailes, semblables à celles des sauterelles, des cigales et des abeilles, sont formées d'une membrane dont la délicatesse surpasse autant celles des autres insectes qu'une étoffe des Indes est plus légère et plus moelleuse qu'une étoffe de la Grèce. Elle est fleurie de nuances comme les paons, quand on la regarde avec attention, au moment où, se déployant au soleil, elle va prendre l'essor.
# Son vol n'est pas, comme celui de la chauve-souris , un battement d'ailes continu, ni un bond comme celui de la sauterelle ; elle ne fait point entendre un son strident comme la guêpe, mais elle plane avec grâce dans la région de l'air à laquelle elle peut s'élever. Elle a encore cet avantage, qu'elle ne reste pas dans le silence, mais qu'elle chante en volant, sans produire toutefois le bruit insupportable des moucherons et des moustiques , ni le bourdonnement de l'abeille, ni le frémissement terrible et menaçant de la guêpe : elle l'emporte sur eux en douceur autant que la flûte a des accents plus mélodieux que la trompette et les cymbales.
# En ce qui regarde son corps, sa tête est jointe au cou par une attache extrêmement ténue ; elle se meut en tous sens avec facilité et ne demeure pas fixe comme dans la sauterelle : ses yeux sont saillants, solides, et ressemblent beaucoup à de la corne ; sa poitrine est bien emboîtée, et les pieds y adhèrent, sans y rester collés comme dans les guêpes. Son ventre est fortement plastronné, et ressemble à une cuirasse avec ses larges bandes et ses écailles. Elle se défend contre son ennemi, non avec son derrière, comme la guêpe et l'abeille, mais avec la bouche et la trompe, dont elle est armée comme les éléphants, et avec laquelle elle prend sa nourriture, saisit les objets et s'y attache, au moyen d'un cotylédon placé à l'extrémité. Il en sort une dent avec laquelle elle pique et boit le sang. Elle boit aussi du lait, mais elle préfère le sang, et sa piqûre n'est pas très-douloureuse. Elle a six pattes, mais elle ne marche que sur quatre ; les deux de devant lui servent de mains. On la voit donc marcher sur quatre pieds, tenant dans ses mains quelque nourriture qu'elle élève en l'air d'une façon tout humaine, absolument comme nous.
# Elle ne naît pas telle que nous la voyons : c'est d'abord un ver éclos du cadavre d'un homme ou d'un animal ; bientôt il lui vient des pieds, il lui pousse des ailes, de reptile elle devient oiseau ; puis, féconde à son tour, elle produit un ver destiné à être plus tard une mouche. Nourrie avec les hommes, leur commensale et leur convive, elle goûte à tous les aliments excepté l'huile : en boire, pour elle c'est la mort. Quelque rapide que soit sa destinée, car sa vie est limitée à un court intervalle, elle se plaît à la lumière et vaque à ses affaires eu plein jour. La nuit, elle demeure en paix , elle ne vole ni ne chante, mais elle reste blottie et sans mouvement.
# Pour prouver que son intelligence est loin d'être bornée, il me suffit de dire qu'elle sait éviter les pièges que lui tend l'araignée, sa plus cruelle ennemie. Celle-ci se place en embuscade, mais la mouche la voit, l'observe, et détourne son essor pour ne pas être prise dans les filets et ne pas tomber entre les pattes de cette bête cruelle. À l'égard de sa force et de son courage , ce n'est point à moi qu'il appartient d'en parler, c'est au plus sublime des poètes, à Homère. Ce poète, voulant faire l'éloge d'un de ses plus grands héros, au lieu de le comparer à un lion, à une panthère, ou à un sanglier, met son intrépidité et la constance de ses efforts, en parallèle avec l'audace de la mouche, et il ne dit pas qu'elle a de la jactance, mais de la vaillance. C'est en vain, ajoute-t-il, qu'on la repousse, elle n'abandonne pas sa proie, mais elle revient à sa morsure. Il aime tant la mouche, il se plaît si fort à la louer, qu'il n'en parle pas seulement une fois ni en quelques mots, mais qu'il en rehausse souvent la beauté de ses vers. Tantôt il en représente un essaim qui vole autour d'un vase plein de lait ; ailleurs, lorsqu'il nous peint Minerve détournant la flèche qui allait frapper Ménélas à un endroit mortel, comme une mère qui veille sur son enfant endormi, il a soin de faire entrer la mouche dans cette comparaison. Enfin, il décore les mouches de l'épithète la plus honorable, il les appelle serrées en bataillons, et donne le nom de nations à leurs essaims.
# La mouche est tellement forte, que tout ce qu'elle mord, elle le blesse. Sa morsure ne pénètre pas seulement la peau de l'homme, mais celle du cheval et du bœuf. Elle tourmente l'éléphant, en s'insinuant dans ses rides, et le blesse avec sa trompe autant que sa grosseur le lui permet. Dans ses amours et son hymen, elle jouit de la plus entière liberté : le mâle, comme le coq, ne descend pas aussitôt qu'il est monté ; mais il demeure longtemps à cheval sur sa femelle qui porte son époux sur son dos et vole avec lui, sans que rien trouble leur union aérienne. Quand on lui coupe la tête, le reste de son corps vit et respire longtemps encore.
# Mais le don le plus précieux que lui ait fait la nature, c'est celui dont je vais parler : et il me semble que Platon a observé ce fait dans son livre sur l'immortalité de l'âme. Lorsque la mouche est morte, si on jette sur elle un peu de cendre, elle ressuscite à l'instant, reçoit une nouvelle naissance et recommence une seconde vie. Aussi tout le monde doit-il être convaincu que l'âme des mouches est immortelle, et que, si elle s'éloigne de son corps pour quelques instants, elle y revient bientôt après, le reconnaît, Je ranime et lui fait prendre sa volée. Enfin elle rend vraisemblable la fable d'Hermotimas de Clazomène, qui disait que souvent son âme le quittait, et voyageait seule, qu'ensuite elle revenait, rentrait dans son corps, et ressuscitait Hermotimus.
# La mouche, cependant, est paresseuse; elle recueille le fruit du travail des autres, et trouve partout une table abondante. C'est pour elle qu'on trait les chèvres ; que l'abeille, aussi bien que pour les hommes, déploie son industrie ; que les cuisiniers assaisonnent leurs mets, dont elle goûte avant les rois sur la table desquels elle se promène, vivant comme eux et partageant tous leurs plaisirs.
# Elle ne place point son nid et sa ponte dans un lieu particulier, mais, errante en son vol, à l'exemple des Scythes, partout où la nuit la surprend, elle établit sa demeure et son gîte. Elle n'agit point, comme je l'ai déjà dit, pendant les ténèbres : elle ne veut pas dérober la vue de ses actions et ne croit pas devoir faire alors ce qu'elle rougirait de faire en plein jour. La Fable nous apprend que la mouche était autrefois une femme d'une beauté ravissante, mais un peu bavarde, d'ailleurs musicienne et amateur de chant. Elle devint rivale de la Lune dans ses amours avec Endymion. Comme elle se plaisait à réveiller ce beau dormeur, en chantant sans cesse à ses oreilles et lui contant mille sornettes, Endymion se fâcha, et la Lune irritée la métamorphosa en mouche. De là vient qu'elle ne veut laisser dormir personne, et le souvenir de son Endymion lui l'ait rechercher de préférence les jolis garçons, qui ont la peau tendre. Sa morsure, le goût qu'elle a pour le sang, ne sont donc pas une marque de cruauté, c'est un signe d'amour et de philanthropie : elle jouit comme elle peut et cueille une fleur de beauté.
# Il y eut chez les anciens une femme qui portait le nom de Mouche : elle excellait dans la poésie, aussi belle que sage. Une autre Mouche fut une des plus illustrés courtisanes d'Athènes. C'est d'elle que le poète comique a dit : //La Mouche l'a piqué jusques au fond du cœur.//
Ainsi, la muse de la comédie n'a pas dédaigné d'employer ce nom et de le produire sur la scène; nos pères ne se sont point fait un scrupule d'appeler ainsi leurs filles. Mais la tragédie elle-même parle de la mouche avec le plus grand éloge, quand elle dit ;
//Quoi ! la mouche peut bien, d'un courage invincible
Fondre sur les mortels, pour s'enivrer de sang,
Et des soldats ont peur du fer étincelant !//
J'aurais encore beaucoup de choses à dire de la Mouche, fille de Pythagore, si son histoire n'était connue de tout le monde.
L&nbsp;'éloge de la mouche de Lucien appartient à la catégorie de «&nbsp;éloge paradoxal&nbsp;», exercice de rhétorique qui consiste à louer une chose, une personne, alors qu'il est inattendu de l'interlocuteur et que l'expérience prouve le contraire (la mouche, la guerre, Hélène)

!!!L'argumentation se fait en paragraphes successifs, un pour chaque «&nbsp;arguments&nbsp;». On trouve toujours:
la beauté
l'intelligence (la supériorité intellectuelle)
l'utilité (pour l'humanité)
sa persistance (résistance aux attaques, son existence depuis longtemps).

!!!Méthode:
écrire au présent, comme d'un spectacle, même dans un récit.
Utiliser un lexique mélioratif
ne pas hésiter à l'hyperbole.
Trouver des «&nbsp;cautions&nbsp;» (Homère)
Exemples, illustrations.
/***
<<tiddler EncryptionPluginDocumentation>>
!Code
***/
//{{{
version.extensions.EncryptionPlugin = { major: 1, minor: 0, revision: 1, date: new Date(2006,18,3),
 source: "http://yann.perrin.googlepages.com/twkd.html#EncryptionPlugin"
};
//}}}
/***
// // Encrypt Command Definition
***/
//{{{
config.macros.encrypt = {
    label: '§',
    tooltip: 'Encrypt this tiddler',
    getkeydialog: 'Enter encryption key',
    cryptedtag: 'crypted',
    donotcrypttag: 'EncryptionPlugin'
};
config.macros.encrypt.action = function(tiddler) {
    var key = prompt(this.getkeydialog,'');
    if (key)
    {
        tiddler.text = TEAencrypt(tiddler.text,key);
        tiddler.tags.push(this.cryptedtag);
        if (version.major < 2)
            store.tiddlers[tiddler.title] = tiddler;
        else
            store.addTiddler(tiddler);
        story.refreshTiddler(tiddler.title,1,true);
        store.notifyAll();
    }
};
config.macros.encrypt.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
if (tiddler.tags.find(this.cryptedtag)==null && tiddler.tags.find(this.donotcrypttag)==null)
createTiddlyButton(place, this.label, this.tooltip, function () {config.macros.encrypt.action(tiddler); return false;}, null, null, null);
}
//}}}
// // Decrypt Command Definition
//{{{
config.macros.decrypt = {
    label: '-§-',
    tooltip: 'Decrypt this tiddler',
    cryptedtag:'crypted',
    donotdecrypttag:'EncryptionPlugin',
    getkeydialog: 'Enter encryption key'
};
config.macros.decrypt.action = function(tiddler) {
    var key = prompt(this.getkeydialog,'');
    if (key)
    {
        tiddler.text = TEAdecrypt(tiddler.text,key);
        tiddler.tags.splice(tiddler.tags.find(this.cryptedtag),1);
        if (version.major < 2)
            store.tiddlers[tiddler.title] = tiddler;
        else
            store.addTiddler(tiddler);
        story.refreshTiddler(tiddler.title,1,true);
        store.notifyAll();
    }
};
config.macros.decrypt.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
if (tiddler.tags.find(this.cryptedtag)!=null && tiddler.tags.find(this.donotdecrypttag)==null)
createTiddlyButton(place, this.label, this.tooltip, function () {config.macros.decrypt.action(tiddler); return false;}, null, null, null);
}
//}}}
// //Shadow tiddlers definition
//{{{
config.shadowTiddlers.ViewTemplate="<div class='toolbar' macro='toolbar -closeTiddler closeOthers +editTiddler permalink references jump'><span macro='encrypt'></span><span macro='decrypt'></span></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>";
config.shadowTiddlers.EncryptionPluginDocumentation="Documentation for this plugin is available [[here|" + version.extensions.EncryptionPlugin.source +"Documentation]]";
//}}}
|Name|EncryptionPlugin|
|Author|YannPerrin|
|Location|http://yann.perrin.googlepages.com/twkd.html#EncryptionPlugin|
|Version|1.0.1|
|Requires|~TW2.x|

!Description
This plugin allow you to encrypt and decrypt individual tiddlers.

!Installation
*import (or copy/paste in edit mode) the following tiddlers into your document:<<br>>EncryptionPlugin<<br>>[[TEA]] (tag them with systemConfig)
*if you want to have offline access to this plugin documentation, import (or copy/paste in edit mode) the following tiddlers into your document:<<br>>EncryptionPluginDocumentation
*if your ViewTemplate isn't a ShadowTiddler anymore, you will have to add
{{{
<span macro='encrypt'></span><span macro='decrypt'></span>
}}}
inside the 'toolbar' div

!Usage
''Once properly installed'' (see above), this plugin should add a '§' command to the toolbar. Clicking on it will ask for a key and then trigger the tiddler encryption.
Crypted tiddler will have the '-§-' command instead. It will trigger tiddler decryption once clicked.
''an invalid decription key will destroy your tiddler data, so be carefull !''

!Revision History
2006.18.03-1.0.1
>added empty key detection
2006.18.03-1.0.0
>Initial release
!Epitaphes  «&nbsp;familiales&nbsp;»
1
&nbsp;V(IVI) F(ECERVNT) CN(AEVS) BAEBIVS EROS
CHILONIANVS
OPPIA MONTANA VXOR
IN SVIS HORTEIS SITI SVNT
H(OC) M(ONVMENTVM) H(EREDEM) N(ON) S(EQVETVR)
IN F(RONTE) P(EDES) XXIII IN A(GRO) P(EDES) XX
CIL 02, 14, 407
De leur vivant, Gnaeus Baebius Eros Chilonianus et Oppia Montana, son épouse, ont fait élever ce monument. Ils reposent sur leurs terres. Ce monument ne fait pas partie de l’héritage. En façace&nbsp;: 23 pieds&nbsp;; en profondeur, 20 pieds.
&nbsp;

2
DIS EST SACRATVS MANIBVS
HIC TVMVLVS
QVI TEGIT OSSA PIAE
C[. . .]AE NVMISIAE
MARCELL[IN]AE QVINTI
[. . .]O[. . .]RIS
QVORVM QVOT SIC SVNT
CONIVNCTA SEPVLCRA
TESTANTVR QVAM CONCOR
DES EXEGERINT AEVOM(!)
QVOS NEC MORS POTVIT
SEIVNGERE LONGE
CRVDELIS QVAE SOLA POTEST
DISIVNGERE AMANTES
AE 1915, 0073.
Dis est sacratus Manibus hic tumulus
qui tegit ossa piae Claudiae Numisiae Marcellinae Quinti
...o...ris quorum quot sic sunt coniuncta sepulcra
testantur quam concordes exegerint
aevom quos nec mors potuit seiungere longe
crudelis quae sola potest disiungere amantes
Il est consacré aux dieux mânes, ce tombeau qui abrite les ossements de la pieuse Claudia Numisia Marcellina et de Quintus ... dont les pierres tombales, puisqu’elles sont ainsi réunies, attestent à quel point ils ont passé leurs vies en bonne entente, eux que la mort n’a pas pu séparer en les éloignant, la mort qui seule peut séparer ceux qui s’aiment.


3
CLAVDIA
FORTVNAT[.]
XII LIBERO
RVM MATER
V ANN L
HIC SITA EST
Claudia Fortunata XII liberorum mater vixit annos L hic sita est
AE 1934, 0067
Claudia Fortunata, mère de douze enfants repose ici&nbsp;; elle a vécu cinquante ans.

4
D M
TI CLAVDIVS DIADVMENVS
PATRONAE B M F
SI TV BIBIS ET MIHI DA
AE 1976, 1030.
Aux dieux Mânes. Tiberius Claudius Diadumenus a fait construire ce tombeau pour sa patronne avec une grande reconnaissance. Et toi, si tu bois, donne-m’en aussi.

!Epitaphes de magistrats

1
M(&nbsp;) C(&nbsp;) Q(&nbsp;) AVITO
SVPERFLVENTI PECVNIA
QVAM IN MAVSOLEVM
SIBI FACIENDVM ET
STATVAM MARMOREAM
PONENDAM TESTAMENTO
IMPENDI IVSSIT
CIL 2, 14, 198
&nbsp;
Marcus C Q Avito, a ordonné par testament de consacrer l’excédent du budget qu’il a prévu pour la construction de son tombeau à faire élever également sa statue en marbre.

2
QVINTIA PROBA
SIBI ET PORCIO
RVFO ET PORCIO
RVFINO ARCVM
FECIT ET STATVAS
SVPERIMPO(SVIT) HS N(VMMVM) XL ET P(OSTERIS)
CIL 02, 14, 237
&nbsp;
Quintia Proba a fait construire ce caveau pour elle-même, pour Porcius Rufus et Porcius Rufinus. Elle a fait poser par-dessus une statue de 40 mille sesterces. Et aussi pour ses descendants.

3
C VESTORIO PRISCO AEDIL
VIXIT ANNIS XXII
LOCVS SEPVLTVRAE DATVS ET IN
FVNERE HS M M
D D
MVLVIA PRISCA MATER P S
C.&nbsp;Vestorio Prisco aedili. Vixit annis XXII. Locus sepulturae datus et in funere sestertium duo milia decreto decurionum. Mulvia Prisca mater pecunia sua.
AE 1911, 0072
À Gaius Vestorius Priscus, édile. Il a vécu vingt-deux ans. Un décret des décurions a attribué l’emplacement de la tombe et deux mille sesterces pour les funérailles. Sa mère, Mulvia Prisca, a élevé ce monument à ses frais.

!Epitaphes d'enfants

1
D M PRISCVS
V A XIIII M VIIII
TI CLAVDIVS MOSCHVS
ET CLAVDIA NICOPOLIS
FILIO PIISSIMO
Dis Manibus. Priscus vixit annos XIIII menses VIIII. Tiberius Claudius Moschus et Claudia Nicopolis filio piissimo.
AE 1989, 94
Aux dieux Mânes. Priscus «&nbsp;l’Ancien&nbsp;» a vécu quatorze ans neuf mois. Tiberius Claudius Moschus et Claudia Nicopolis à leur fils si respectueux.
Narbonne, musée archéologique 

2
M CAREIEVS M L ASISABISIO
VIVOS SIBI FECIT ET CAREIE
NIGELLAE ET CAREIEÆ M F TERTIAE
[.]NOR VI MATER CVM GNATA
[.]ACEO MISERABILE FATO QVA[.]
PVRA ET VNA DIES DETVLT A[.]
CINERE[. . .]
Marcus Careieus Marci libertus Asisabisio vivus sibi [hoc monumentum] fecit... et Careieae Nigellae et Careiae Marci filiae Tertiae annorum sex&nbsp;:
–&nbsp;Mater cum gnata jaceo.
Miserabili fato&nbsp;: quas pura et una dies detulit ad cineres&nbsp;!
AE 1908, 186
Marcus Careius Asisabisio, affranchi de Marcus [Careius], a fait construire ce tombeau de son vivant pour lui-même et pour Careia Nigella et Careia Tertia, fille de Marcus, âgée de 6 ans.
–&nbsp;Moi, la mère, je repose avec ma fille.
Par un sort funeste, une journée sans nuages, une seule, les a vues réduites en cendres.

3
TE TERRA OPTESTOR LEVITER SVPER OSSA QVIESCAS ET TENERAE AETATI NE GRAVIS ESSE VELIS.
Toi, terre, je t’en supplie, ne repose pas trop lourdement ces ossements et pour cet âge tendre, ne sois pas trop lourde si tu le veux bien.

5
QVOD EDI BIBI MECVM HABEO QVOD RELIQVI PERDIDI
CIL 6, 18131
Ce que j’ai mangé, ce que j’ai bu, je l’ai emporté avec moi. Ce que j’ai laissé sur la terre, c’est perdu pour toujours.

!Souligne les adjectifs épithètes de ce passage et entoure les noms qu'ils complètent.

Alors, le subtil Ulysse, se dépouillant de ses haillons, et tenant dans ses mains l'arc et le carquois plein de flèches, sauta du large seuil, répandit les flèches rapides à ses pieds et dit aux Prétendants :

Voici que cette épreuve tout entière est accomplie. Maintenant, je viserai un autre but qu'aucun homme n'a jamais touché. Qu'Apollon me donne la gloire de l'atteindre !

Il parla ainsi, et il dirigea la flèche amère contre Antinoos. Et celui-ci allait soulever à deux mains une belle coupe d'or à deux anses afin de boire du vin, et la mort n'était point présente à son esprit. Et, en effet, qui eût pensé qu'un homme, seul au milieu de convives nombreux, eût osé, quelle que fût sa force, lui envoyer la mort et la Kère noire ? Mais Ulysse le frappa de sa flèche à la gorge, et la pointe traversa le cou délicat. Il tomba à la renverse, et la coupe s'échappa de sa main inerte, et un jet de sang sortit de sa narine, et il repoussa des pieds la table, et les mets roulèrent épars sur la terre, et le pain et la chair rôtie furent souillés. Les Prétendants frémirent dans la demeure quand ils virent l'homme tomber. Et, se levant en tumulte de leurs sièges, ils regardaient de tous côtés sur les murs sculptés, cherchant à saisir des boucliers et des lances, et ils crièrent à Ulysse en paroles furieuses :

[...]

!J'ai enlevé les adjectifs épithètes dans la suite du texte. Trouves-en qui peuvent convenir (en faisant attention de les accorder):

Ils parlaient ainsi, croyant qu'il avait tué involontairement, et les insensés ne devinaient pas que les Kères de la mort étaient sur leurs têtes. Et, les regardant d'un œil ........................, le............................. Ulysse leur dit :

- Chiens ! vous ne pensiez pas que je reviendrais jamais du pays des Troyens dans ma demeure.  [...]

Il parla ainsi, et la terreur les prit, et chacun regardait de tous côtés, cherchant par où il fuirait la  .............................. destinée. Et, seul, Eurymaque, lui répondant, dit :

- S'il est vrai que tu sois Ulysse d'Ithaque revenu ici, tu as bien parlé en disant que les Achéens ont commis des actions........................... dans tes demeures et dans tes champs. Mais le voici gisant celui qui a été cause de tout. C'est Antinoos qui a été cause de tout, non parce qu'il désirait ses noces, mais ayant d'autres desseins que le Kroniôn ne lui a point permis d'accomplir. Il voulait régner sur le peuple d'Ithaque bien bâtie et tendait des embûches à ton fils pour le tuer. Maintenant qu'il a été tué justement, aie pitié de tes concitoyens. Bientôt nous t'apaiserons devant le peuple. Nous te payerons tout ce que nous avons bu et mangé dans tes demeures.

Et, le regardant d'un œil sombre, le  ............................Ulysse lui dit :

[...]

Ayant ainsi parlé, il tira son épée aiguë à deux tranchants, et se rua sur Ulysse en criant horriblement ; mais le divin Ulysse le prévenant, lança une flèche et le perça dans la poitrine auprès de la mamelle, et le trait rapide s'enfonça dans le foie. Et l'épée tomba de sa main contre terre, et il tournoya près d'une table, dispersant les mets et les coupes pleines : et lui-même se renversa en se tordant et en gémissant, et il frappa du front la terre, repoussant un trône de ses deux pieds, et l'obscurité se répandit sur ses yeux.

Alors Amphipodes se rua sur le magnanime Ulysse, après avoir tiré son épée aiguë, afin de l'écarter des portes ; mais Télémaque le prévint en le frappant dans le dos, entre les épaules, et la lance d'airain traversa la poitrine ; et le Prétendant tomba avec bruit et frappa la terre du front. Et Télémaque revint à la hâte, ayant laissé sa longue lance dans le corps d'Amphinomos, car il craignait qu'un des Achéens l'atteignît, tandis qu'il l'approcherait, et le frappât de l'épée sur sa tête penchée. Et, en courant, il revint promptement auprès de son cher père, et il lui dit ces paroles .............................. :

- Ô père, je vais t'apporter un bouclier et deux lances et un casque d'airain adapté à tes tempes. Moi-même je m'armerai, ainsi que le porcher et le bouvier, car il vaut mieux nous armer.

Et le prudent Ulysse lui répondit :

- Apporte-les en courant ; tant que j'aurai des flèches pour combattre, ils ne m'éloigneront pas des portes, bien que je sois seul.

Il parla ainsi, et Télémaque obéit à son cher père, et il se hâta de monter dans la chambre haute où étaient les armes illustres, et il saisit quatre boucliers, huit lances et quatre casques épais d'airain, et il revint …..


!Continue le récit de bataille sur une feuille. 
!!Il faut écrire au passé simple.  Remplis le texte d'adjectifs épithètes que tu souligneras. Soigne l'orthographe et la ponctuation (il faut plusieurs paragraphes).
+1 point si tu écris 2 épithètes homériques (entourés)
Éviter les répétitions

Pour éviter de répéter un mot ou un groupe de mots dans tes rédactions, tu peux utiliser des reprises nominales et des reprises pronominales.
!Les reprises nominales
Tu as le choix entre différentes reprises nominales :
•  les synonymes sont des mots de sens voisin. Ils ont toujours la même nature :
''la tête inclinée / penchée''
•  les mots génériques sont des termes dont le sens englobe toute une catégorie de personnes ou d'objets :
''Rongeur'' désigne la catégorie à laquelle appartiennent ''souris, rat, mulot.''
•  la périphrase est une expression qui désigne une personne ou une chose à travers certaines de ses caractéristiques. La désignation est alors moins précise qu'avec le nom approprié mais elle apporte une information complémentaire :
''Le petit animal gris aux longues moustaches est une périphrase de la souris''.
Tu peux également utiliser :
•  des mots de la même famille (ayant le même radical) qui reprennent l'idée énoncée auparavant :
''Ce petit jeu aurait pu durer encore longtemps si personne n'était venu l'interrompre : cette interruption fut très brutale''.
•  la reprise de certains mots complétés :
''Le petit garçon imitait la souris. Ce très étonnant petit garçon pouvait même lui parler''.
!Les reprises pronominales
N'hésite pas à employer aussi :
•  des pronoms personnels (il, elle, la, lui, les...) ou adverbiaux (en, y) ;
•  des pronoms démonstratifs (ceci, celles-ci, ceux-là, cela...) ;
•  des pronoms possessifs (le mien, la tienne, les siens, le nôtre, les vôtres, la leur...).

!exercices
!Les synonymes
!!1. Remplace les mots en gras par des synonymes que tu choisiras dans la liste suivante : //provoquer au combat - s'adresser - voir - désirer -mener - retirer - délivrer - sembler//
Don  Quichotte  et  Sancho  Panca parcourent  lu campagne à cheval, en quête d'aventure.
C'est alors qu'ils ''découvrirent'' dans la plaine trente ou quarante moulins à vent ; dès que Don Quichotte les aperçut, il ''dit'' à son écuyer :
"La chance ''conduit'' nos affaires mieux que nous ne pourrions le ''souhaiter''. Vois-tu là-bas, Sancho, cette bonne trentaine de géants démesurés ? Eh bien, je m'en vais les ''défier'' l'un après l'autre et leur ''ôter'' à tous la vie. Nous commencerons à nous enrichir de leurs dépouilles, ce qui ''est'' de bonne guerre ; d'ailleurs, c'est servir Dieu que de ''débarrasser'' la face de la terre de cette ivraie."

!!2a. Rends à chaque mot son synonyme, 
//épuisé, agréable, plaisant, joyeux, soucieux, varié, passionnant, exténué, inquiet, captivant//
!!2b. Emploie ces couples de synonymes dans une même phrase où leur sens apparaîtra clairement
EX: «&nbsp;le cycliste est épuisé après avoir monté ce 'col, et les supporters qui l'ont suivi pour l'encourager ont exténués !&nbsp;»

!!3. A l'aide des mots suivants, forme trois groupes de trois synonymes. Consulte le dictionnaire !
//enter, heurter, commander, choquer, enjoindre, attirer, ordonner, inciter, irriter//

!!4. Même exercice, plus difficile : 
//méchant, calme, serein, courageux, vaillant, mauvais, rêveur, brave, distrait, étourdi, tranquille, malveillant//
!!5. Propose un synonyme pour chacun des mots suivants. La première lettre est donnée pour t'aider. Souviens-toi que les synonymes sont des mots de même nature !
amuser : d...........  ;   regarder : o.............. ; éreintant ; é.................; incessamment : b............... ; afin de : p........ ; complet: e............ ; dévaliser ;  c................... ; satisfait : c.............. ; objectif : b....... ; fierté :  o........... ;  fictif : i............ ; indispensable : n................. .

!!6. Trouve  deux  synonymes  pour  chaque mot en gras.
1. Je vais vous relater ce qui m'est arrivé hier.
2. Tout le monde sait que les dragons sont des animaux fabuleux !
3. En sortant du bois, le chevalier rencontra une misérable vieille femme couverte de haillons.
4. Ils ont installé une statue colossale sur la place du marché.

!!7. Évite les répétitions en utilisant un synonyme qui reprenne le sens des mots en gras.
1.  As-tu mangé du faisan ? Le prince noir doit adorer ce plat car il en a mangé goulûment trois !
2.  Ce chevalier monte très bien à cheval mais quand il a tenté de monter sur la jument du roi, elle l'a désarçonné !
3. La fée Mélusine est fatiguée ces temps-ci ; hier, elle était très fatiguée.., à tel point qu'elle n'a pas pu redonner une apparence humaine au crapaud que je lui avais confié.
4. Attention, un dragon s'est enfui dans les bois, il a réussi a s'enfuir par les airs de la plus haute tour.

!Les mots génériques
!!8. Dans ces listes de synonymes, un intrus s'est glissé : retrouve-le et explique pourquoi tu ne pourrais pas l'employer à la place des trois autres.
1. destrier- monture - cheval - palefrenier
2.  maison - habitation - bureau - demeure
3. douceur - gentillesse - confiserie - bonbon
4.  belligérant - opposant - ennemi -fortification
5. belliqueux - agressif - batailleur – rancunier
6. 
!!9. Dans chacune de ces listes, quel mot peut englober tous les autres ?
1.  cardigan - short - vêtement - jupe - chemise
2.  promettre - assurer - prétendre - dire - avouer î. chai - félin - guépard - lynx - lion
4.  mule - âne - cheval - équidé - zèbre
5. pamplemousse - orange - agrume - citron - mandarine
6. manoir - demeure - maison - villa – château
7. pont - édifice -- château - beffroi – cathédral

!!10a. Cherche un mot générique qui reprenne et regroupe tous les mots de chaque liste.
1. libellule - moustique - moucheron - mouche
2. zèbre - homme - méduse - coccinelle
3. merlan - anguille - truite - brocher
4. piranha - lion - loup - tigre
5. incisives - canines - molaires - prémolaires
!!10b. Invente une phrase où tu emploieras ce mot.

!!11. Emploie un mot générique pour éviter les répétitions.
Son pull et son pantalon sont blancs ; je crains que ses ............... ne soient bien salissants !
2. Le rugby est assez violent mais ce .................. favorise l'esprit d'équipe.
3. L'ailier droit a marqué deux buts ; ce n'est pas étonnant car c'est un excellent.................... 
4. Je préfère me déplacer à vélo plutôt qu'en voiture, même si ce ................... est beaucoup moins rapide.
5. Ces cumulonimbus ne sont pas signe de beau temps ; de toute façon, quand je vois des ................., je prévois toujours un parapluie !
6. As-tu goûté les ................... qu'elle a rapportés ? Ces mille-feuilles sont excellents !
7. Ne compte pas sur moi pour porter des vêtements rosés ou jaunes ! D'ailleurs, ces .................... sont démodées !

!!12. Dans cette fable de La Fontaine, des mots génériques ont été remplacés par d'autres termes plus précis (soulignés dans le texte), ce qui donne une allure bien étrange à cette fable. Retrouve les mots d'origine !
Maître Corbeau, sur un __chêne__ perché,
Tenait en son bec un __comté__.
Maître Renard, par l'odeur alléché,
Lui tint à peu près ce langage :
"Hé ! bonjour, monsieur du Corbeau.
Que vous êtes joli ! Que vous me semblez beau !
Sans mentir, si votre __sifflet__
Se rapporte à votre __duvet__,
Vous êtes le phénix des hôtes de ces bois."
''D'après Jean de La Fontaine, "Le corbeau et le renard"''

!!13. Les périphrases
Voici des périphrases que tu pourras lire dans les Fables de La Fontaine : retrouve l'animal qu'elles désignent.
1. Dans : "Le corbeau et le renard", qui est "le phénix des hôtes de ces bois" ?
2. Dans : "La grenouille qui veut se faire aussi grosse que le bœuf", qui est "la chétive pécore" ?
3. Dans : "Le lion et le rat", qui est "le roi des animaux" ? 
4. Dans : "La mouche et la fourmi", qui est "la fille de l'air" ?
5. Dans :  "Le soleil et les grenouilles", qui sont "les citoyennes des étangs" ?
6. Dans :   "La vieille et les deux servantes",  qui  est "le réveille-matin" ?

!!14. Recopie les phrases suivantes en remplaçant les mots en gras par trois des périphrases proposées dans l'exercice 14.
1. À travers la paroi du bocal, Adrien contemplait la grenouille pour laquelle il éprouvait déjà de la tendresse.
2. D'un rugissement, le lion salua le lever du soleil.
3. Voici un produit miracle pour ne plus être importuné par les mouches dès que vous ouvrez la fenêtre.

!!15a. Ces périphrases sont si connues qu'elles sont devenues des expressions figées... Que désignent-elles ?
1. Le 7e art
2. Le séjour des dieux
3. L'oncle Sam
4. L'astre de la nuit
5. L'île de beauté
6. L'auteur de l'Odyssée
7. Le plancher des vaches
8. La grande bleue
!!15b. Invente huit phrases dans lesquelles tu emploieras ces périphrases en veillant à ce que leur sens apparaisse clairement.

!!16. Inventer une périphrase pour désigner :
1. des poules
2. un coq
3. un renard
4. un chien
5. un fermier
6. la pluie
7. des nuages
!!16b. Rédige un récit de quinze lignes dans lequel tu raconteras une mésaventure à la ferme en y insérant les sept périphrases que tu viens d'inventer. Écris à la 3e pers. et ou présent.

!Les mots de la même famille

!!17. Reprends l'idée suggérée par les termes en gras à l'aide d'un mot de la même famille (formé à partir du même radical).
1.  Sur l'île de Calypso, Ulysse pleurait en contemplant la mer ; ses ..................   émurent Hermès.
2.  Durant son périple, Ulysse eut souvent l'occasion de nager ! Heureusement que la .............. était jadis son sport favori !
3.  Le roi Alkinoos fut un hôte irréprochable,  Ulysse savait qu'il se souviendrait toujours de son ....................
4.  Près de Charybde, la mer bouillonnait ; six compagnons d'Ulysse disparurent, engloutis dans les gigantesques .........................
5.  Quand il retrouva enfin son palais et sa famille, Ulysse fut le plus heureux des hommes ; son ................. rendit presque jaloux les dieux.

!!18. Même exercice.
l. Le chevalier attendit le combat du lendemain très calmement, à tel point que son .................... impressionna beaucoup son ennemi.
2.  Merlin adorait plaisanter,  mais il arrivait que ses victimes n'apprécient pas ses ...................... !
3. On aurait pu croire que Lancelot serait fatigué après cette folle course dans la forêt, mais nulle trace de ... n'apparaissait sur son visage !
4.  Un jour, une épée apparut, plantée dans un roc ; tous les chevaliers ne parièrent plus que cette .... pouvait être retirée
5. Arthur est resté serein quand on l'a désigné comme le futur roi. Cette ............... fut considérée comme une preuve supplémentaire qu'il avait été élu par Dieu.
6. Le dragon roux tenta de s'envoler au-dessus de la tour mais il fut atteint dans son .......... par les flammes du dragon blanc.

!Les reprises nominales

!!19. Quelle est la nature des mots en gras ? De quel mot évitent-ils la répétition ?
1. Je ne crois pas aux fantômes ! Et vous, ''y'' croyez-vous ? 
2. Je me contente de raconter des histoires fantastiques à mes cousines pour ''leur'' faire peur.
3. Celles-ci ''les'' adorent !
4. Un soir où je venais de raconter une histoire épouvantable avec une demi-douzaine de revenants qui allaient à l'assaut d'un village, celle qui parie tout le temps, Caroline, prétendit qu'elle ''en'' avait vus dans le jardin.
5. La nuit avait déjà peuplé les alentours d'ombres menaçantes quoiqu' imaginaires mais je ''la'' mis au défi de me prouver qu'elle disait vrai.
6. Ses sœurs tremblaient... Je jetai un coup d'œil rapide dans le jardin, per­suadé que ''cela'' n'était que le fruit de son imagination.
7. Mais stupeur, ce que j'''y'' aperçus me glaça le sang...

!!20. Remplace ces groupes nominaux par les pronoms possessifs correspondants.
Pour t'aider, observe bien les déterminants possessifs qui composent ces groupes nominaux !
1. vos lunettes.............. -2. votre amie............... -3. ses chaussures.................. -4. ma préférence............ -S. votre vélo ............... - 6. tes dessins .................... -7. mes livres..................... -8. leur chat ................ - 9. son cheval.................... -10. mon bateau.............. - 11. nos soucis........... -12. ta sœur.............. - 13. sa maison ... - 14. notre jardin...........

!!21.Complète ces phrases à l'aide d'un pronom démonstratif qui évitera une répétition.
1. Le directeur m'a proposé un poste à Lille mais ......... ne m'intéresse pas. - 2. Je n'aime pas la couleur de cette voiture, je préfère ............... - 3. J'ai invité Pierre à mon anniversaire mais ............ a un match de rugby le même jour ! -4.  Faire le tour du monde ? ............  me plairait beaucoup ! - 5. Olivier adore jouer du piano,   ............ le décontracte.

!!22.Recopie les phrases suivantes en remplaçant les mots soulignés par le pronom personnel ou adverbial qui convient.
1.  Le chevalier promit une récompense à son écuyer.
2.  __Le chevalier__ promit une récompense __à son écuyer__.
3.  __Le chevalier__ promit __une récompense__ __à son écuyer__. 
4.  __Le prisonnier__ réclame de l'eau.
5. __Le prisonnier__ réclame __de l'eau__. 
6. J'ai raconté ton secret __au professeur__ !
7. J'ai raconté __ton secret__ __à tes camarades__ !
8. __Pauline et moi__ arriverons à cinq heures.
9. Pierre et Hélène sont allés __au Mexique__.
10. À quelle heure __Juliette et toi__ comptez-vous revenir de Paris ?

!!23. Recopie ces phrases en remplaçant les répétitions par le pronom qui convient.
1. Mon voisin m'a proposé de surveiller ma maison pendant les vacances mais je ne fais pas confiance à mon voisin ! - 2. Je peux t'indiquer quelques bonnes adresses à Madrid ; je reviens de Madrid. - 3. J'ai oublié mon stylo, peux-tu me prêter ton stylo ? - 4. La première fois que Simon rencontra Laurie, Latine ne daigna même pas adresser la parole à Simon. - 5. Laisse la trappe du grenier ouverte, je monte au grenier

!!24. Ces mots, groupés deux par deux, désignent la même chose mais s'emploient dans des circonstances différentes.
!!!a. Propose à chaque fois un synonyme cou­rant.
1. un destrier/  un canasson
2.  mon homme / l'homme de ma vie
3.  ma moitié / mon épouse
4. félon / balance
!!!b. Dans   une   rédaction,   par   quel   genre  de personnage   pourrais-tu   faire   prononcer   les substituts qui te sont proposés ?

!!25a. Récris ce texte en évitant la répétition du mot "histoire" : tu utiliseras des reprises nominales et pronominales. Réfléchis bien au sens du mot "histoire" ici:
Je tiens cette histoire d'un homme qui raconte des histoires. Je lui ai dit plus d'une fois que son histoire, je n'y croyais pas.
"Vous méritez, lui dis-je un jour, vous racontez des boniments, vous divaguez, vous vous fichez du monde !"
Cela ne l'impressionna pas. Il continua tranquillement son histoire, et lorsque je lui criai : "Espèce de menteur, bonimenteur, songe-creux, imposteur !" il me regarda longuement, hocha la tête, sourit d'un air triste et dit, d'une voix si basse que j'eus presque honte : "L'Amérique n'existe pas."
''Peter Bichsel, Histoires enfantines''.
!!25b. Quels sont les synonymes de "menteur" dans le texte ? Invente trois phrases où tu décriras le comportement d'un menteur, en utilisant ces synonymes pour éviter toute répétition.

!!26.Remplace "j'ai mis" et "j'ai fait" par des verbes qui éviteront une répétition.
Lundi 9 mars
Journée du Commonwealth
J'ai nettoyé les W.-C, lavé le lavabo et la baignoire avant de partir faire ma tournée. Je suis rentré à la maison, j'ai préparé le petit déjeuner, mis le linge dans la machine à laver, et je suis
parti eii classe. J'ai remis à Harry Kent l'argent de son racket, je suis allé chez Bert Baxter, j'ai attendu l'assistante sociale qui n'est pas venue, je suis retourne déjeuner à l'école. J'ai eu cours d'enseignement ménager, j'ai fait une charlotte aux pommes. Je suis revenu à la maison. J'ai passé l'aspirateur dans le hall, le salon et la salle à manger. J'ai épluché les pommes de terre, émincé le chou, je me suis coupé un doigt et j'ai rincé le sang qui avait coulé sur le chou. J'ai mis les côtelettes sur le gril et j'ai regardé dans le livre de cuisine pour trouver une recette de sauce. J'ai fait la sauce. J'ai enlevé les grumeaux avec une passoire. J'ai [...] fait la vaisselle.
''Sue Towsend, Journal secret d'Adrien 13 ans, © Hachette.''

!!27. Repère dans le texte toutes les façons de désigner "les nains de jardin".
Haut les mains !
Cette nouvelle délinquance a commencé par un gag, ou alors par un signe d'intolérance. De l'Alsace aux pelouses méditerranéennes en passant par la Vienne et Saint-Amand-Montrond (Cher), l'espèce est menacée. Il ne se passe guère de jours sans qu'un mécréant ne fasse main basse sur ces figurines posées au ras des pâquerettes. Assises sur une valeur plus sentimentale que marchande. Aux couleurs pétulantes certes. En tout cas pas méchantes. Alors, quelle idée d'aller Kidnapper des nains de jardin pour les relâcher en pleine nature ?
"Perdu nains de jardin : récompense"
Le larcin de lutins fait fureur. Or, la rigolade du voleur n'a d'égale que la détresse du propriétaire floué. Et les plaintes affluent dans les maréchaussées, déjà encombrées d'attouchements suspects. Blois ne parlait-elle pas de piéger ses nains pour dissuader la vague de ravisseurs !
Il arrive que Grincheux et ses copains écopent pour des querelles de voisinage. [...]
''La Nouvelle République du ~Centre-Ouest, 4/07/1997.''
!!!b- Les avis sont très partagés au sujet de ces lutins de plâtre... En une dizaine de lignes, donne ton avis sans jamais employer l'expression "nains de jardin".
!Exercices

!!1.Utiliser les synonymes de voir, sentir, entendre, toucher, goûter
Elle avait clairement ... des bruits de chaîne dans le couloir. Elle avait ..., croyant rêver, et à sa grande stupeur elle avait à nouveau ... les bruits, accompagnés cette fois d'un ricanement effroyable.
!!2.Remplace les verbes "voir" ou "regarder" ainsi que les expressions qui les accompagnent par le synonyme approprié, choisi dans cette liste :
avoir sous les yeux - apercevoir - contempler - découvrir - distinguer - embrasser du regard - être fasciné -examiner - observer – remarquer

Lorsque Pierre est entré dans la maison, il a d'abord regardé toute la pièce principale : c'était grand et il faisait froid. Il s'est avancé et il a vu, dans le coin sombre, un piano. Il l'a regardé de près, l'a regardé sous toutes les coutures et, soudain, il a vu un minuscule fil d'or qui sortait de la dernière touche. Il a tiré dessus et une musique merveilleuse a retenti dans tout le salon. C'est alors qu'il a vu une faible lueur derrière la fenêtre, puis un scintillement, et enfin une lumière aveuglante qui s'est répandue partout. Il voyait maintenant devant lui une salle de bal ! Il a alors vu des formes colorées qui se glissaient le long des murs. Pierre regardait ce spectacle avec étonnement et admiration ! Il regardait sans pouvoir détourner les yeux...

!!3. Complète ces phrases avec des synonymes du verbe "sentir".
La première lettre t'est donnée pour t'aider !
1. La chienne a f................... l'odeur d'une souris.
2. Les pivoines e...................... le jardin. 
3. Le soir, le jasmin e................... un parfum sucré.
4. Après être tombé dans cette flaque, Aurélien e.......................... la vase .
5. Avec cet adoucissant, le linge f....................... bon la lavande.

!!4. Place au bon endroit ces verbes ou expressions :
entendre - troubler - distinguer -- déchirer - percevoir -tendre l'oreille
Samedi dernier, nous nous étions tous couches de bonne heure. Aucun bruit ne venait ….............. notre quiétude. On ne …................... que les sifflements du vent sur les grands sapins du jardin. Un bruit strident …................ tout à coup la nuit. 

!!5. Donne la définition précise de ces verbes puis emploie chacun d'eux dans une phrase où II prendra tout son sens.
exemple: Le chat ronronne quand je le caresse. 
caresser - modeler - presser - pétrir - frôler – frotter

!!6a.Quelle différence fais-tu entre les verbes "avaler" et "déguster" ? Emploie-les dans une phrase où leur sens apparaîtra clairement.
!!6b. Classe les verbes "manger", "grignoter", "dévorer" dans l'ordre de ton choix et justifie ton classement en les employant dans trois phrases où ils prendront tout leur sens.

!!6c. Les verbes en rapport avec les cinq sens ont été mélangés : rétablis-les au bon endroit.
Au loin, on pouvait inspecter le sommet du mont Blanc. Mais Sophie constatait la grâce des chamois qui lui sautaient aux yeux. Les animaux apercevaient les alentours, vigilants, afin d'échapper à toute menace éventuelle. Elle put admirer l'existence d'un peut lac où les cervidés venaient se désaltérer. La fillette |jetait un coup d'œil depuis un bon moment déjà ; en observant dans sa direction, je me rendis compte tout de suite que petit à petit, les chamois, mis en confiance par son immobilité, s'étaient approchés d'elle.

!!7. Souligne les verbes liés aux cinq sens et propose un synonyme pour chacun d'entre eux.
Dans la taïga figée, comme pétrifiée, couverte d'une épaisse pelisse de neige, Enfant-sans-âme errait, affamé encore une fois. Il avait beau courir les rivières et les lacs gelés, sur de grandes distances, il ne trouvait rien à se mettre sous la dent. L'autre jour [...] il était tombé sut un lièvre presque paralysé de froid, qu'il avait avidement dévoré. […] Tous ces jours où il avait craint pour sa vie, car les hommes, ses cousins, ses oncles, son père même, ne l'auraient sûrement pas reconnu s'ils l'avaient aperçu et auraient lancé contre lui leurs flèches les plus acérées... Tous ces jours de torture, à humer dans l'air froid l'odeur alléchante des mets que l'on apprêtait sur les feux de bois, à écouter les rires des enfants de son ancienne race qui s'amusaient dans la neige, lui rappelant l'heureux temps où il était comme eux, à entr'apercevoir de loin la silhouette de Source-Chantante parmi les troncs gris, en ne pouvant l'appeler à son secours... Grand Manitou, quelle cruauté !
Le soleil se couchait de nouveau quand il respira le puissant effluve de l'urine d'un loup dominant [...] Il les trouva au bord d'un lac [...] Ils retroussaient horriblement leurs babines sur leurs crocs [...] et leurs petits yeux mauvais le fixaient, pleins de menaces...
Claude Marceau, Enfant-sans-âme, © Hachette.
*En dix lignes, poursuis ce texte en décrivant les perceptions des loups.
Consigne: Écris à la 3e pers. et garde le passé. N'oublie pas que les loups ont des sens plus aiguisés que les nôtres !

!!8a. Complète   ce   texte   en   utilisant   des verbes de perception.
*Attention, tu n'as pas le droit de répéter le même verbe !
Une après-midi, je suis allée à la foire de la Saint-Jean. Quand on se tient sur la place du village, on peut déjà …............... le sommet de la grande roue ! j'ai commencé par un tour d'autos-tamponneuses : j'ai bien ….................... chaque voiture avant de me décider pour une rouge avec des étoiles chromées. Un garçon dans une voiture bleue ….................................. sans arrêt mon bras en me croisant et nous avons fait une course.
En descendant de mon véhicule, j'ai …..................... la bonne odeur de la barbe à papa et des croustillons, j'ai finalement... une gaufre au sucre. Tout en goûtant cette douceur, je me suis approchée du train fantôme, je pouvais …................................ les hurlements des gens à l'intérieur, j'ai attendu un peu pour ….................................. leurs visages effrayés à la sortie. J'ai alors …............................ des claquements et je me suis dirigée vers le stand de tir. J'ai …............................... plusieurs carabines avant de garder celle qui me convenait ; j'ai bien …............................. les ballons et l'ai …......................... sur la gâchette. J'ai gagné un singe en peluche !
J'ai longuement …........................ sa fourrure qui était très douce. Fière de mes exploits, je suis rentrée à la maison en me retournant encore une fois pour …................................. les lumières de fa fête et... les effluves de guimauve. Maintenant, j'exige que l'on me ... avec respect et que l'on m'appelle Calamity Jane .

!!8b. En réemployant ces mêmes verbes, décris une visite au zoo en quinze lignes environ.
* Utilise le passé composé et l'imparfait.
* Écris à la 1ERE pers.
* Relie tes paragraphes au moyen de connecteurs temporels .

!Définir un goût, un toucher, un son, une odeur, une forme
!!Caractériser un goût
!!9. Relie les antonymes puis propose une phrase où tu les associeras en les opposant.
Exemple : Je n'aime pas cette confiture de dattes qui est beaucoup trop sucrée, je préfère la confiture d'oranges amères.
''relevé;doux ; goûteux ; sucré ; aigre ; insipide; amer; fade''

!!Caractériser le toucher 
!!10. Classe ces adjectifs en deux catégories selon qu'ils sont associés à quelque chose d'agréable ou de désagréable. Propose ensuite pour chacun d'eux une phrase où il prendra tout son sens.
Exemple: poudreux — J'aime skier dans la neige poudreuse.
''doux; lisse; moelleux; moite; poisseux; poli; rêche; visqueux''
!!Caractériser un son
!!11a. Cherche le sens précis de ces mots dans le dictionnaire et raconte en cinq lignes un accident de voiture.
''vrombissement - crissement - fracas - cliquetis''
!!11b. Même recherche, pour décrire cette fois en six  lignes  un paysage de campagne,  où tu insisteras sur les perceptions auditives.
''bruissement - clapotis - gazouillis – strident''

!!Caractériser une odeur 
!!12. Deux descriptions de parfums très différents (l'un est capiteux, l'autre frais ) se sont mélangées : rétablis les deux textes en rassemblant les phrases ou parties de phrases qui vont ensemble. Pour t'aider, repère les mots qui caractérisent !es parfums.
Il est torride grâce à la présence du piment et du safran saupoudrés de cannelle.
De la  bergamote  et  de l'orange font  pétiller  la fragrance.
Sensuel avec la fleur de giroflier et le jasmin.
Avec un zeste d'originalité, dès son envolée.
De la fraîcheur encore avec une rosé du matin.
Après quoi les notes cuivrées et boisées l'embrasent pour de bon.
Le patchouli et le vétiver ajoutent un brin de modernité.

!!Distinguer les sensations
!!13a. Classe ces mots en  cinq rubriques, selon le sens qu'ils évoquent.
''rond, cacophonie, oblique, allongé, murmure, capiteux, moiteur, rugueux, exhalaison, clapotis, volumineux, fumet, ébréché, effleurement''
!!13b. Utilise chacun d'eux dans une phrase où il prendra tout son sens.
!!14a. Trouve des exemples d'objets, de sons, de plats, d'odeurs et de matières correspondant à ces caractéristiques.
1.  rectangulaire, lisse et froid
2.  humide, mou et nauséabond
3.  consistant, brûlant et épicé
4.  strident, répétitif et prolongé
5.  épais, lourd, cassé et sale
6.  minuscule, rond et doux
!!14b. Invente maintenant une histoire en vingt lignes dans laquelle tu utiliseras trois des six termes que tu viens de trouver. (Rédige au présent et à la 3ème pers.  Développe tes descriptions.)

!!15a. Souligne les mots (13 en tout) qui renvoient aux cinq sens et cherche leur signification précise.
Le sol était encore gelé et enfoui sous une bonne couche de neige, mais bientôt ce serait la toundra magnifique... [...] les tourbières au vert e-t spongieux tapis de mousse ; les marais bordés de joncs et d'iris versicolores ; les collines rondes habillées de lichen verdâtre presque aussi blanc que la neige ; les bouleaux et les saules nains dont les chatons embaument l'air, et les ruisseaux limpides roulant des cailloux dans un bruit joyeux et presque musical...
Claude Marceau, Enfant-sans-Âme, © Hachette.
!!15b. Réutilise-les ensuite pour décrire  en  dix lignes un jardin au petit matin.
N'oublie pas de modifier les éléments du paysage !
!!16a. Propose un synonyme pour chaque mot en gras.
Il voyagea avec les paysans qui partaient à la ville vendre leurs poules ou leurs cochons, entassés sur le pont du Barcelos, une grosse vedette toute neuve dont la cheminée dégageait une épaisse fumée noire. Il découvrit les abords de la ville, les maisons sur pilotis au bord du rio Negro, où s'entassent des gens miséreux [...]
Il faisait une chaleur étouffante et il s'arrêta dans un bar pour boite un Coca. Il y avait de la musique, et un gros ventilateur pendu au plafond brassait l'air moite. C'est là que, pour la première fois, il aperçut Kurt.
Kurt buvait, accoudé au comptoir. Son crâne chauve luisait de sueur, et sa chemise était auréolée de taches de transpiration. Kurt s'amusait à agacer un perroquet auquel il jetait les cendres de son cigare.
Thierry Jonquet, l'aolu Sw/o, D il.
!!16b. Reprends la description du bar dans le 2e paragraphe en ajoutant des détails pour qualifier la musique et les odeurs qui y règnent.

!Établir des relations entre les cinq sens
!!17a. Peut-on parler :
1. d'un parfum vert ? - 2. d'un yaourt velouté ? -3. d'un son feutré ? - 4. d'un jaune criard ? - 5. d'une étoffe mousseuse ?
!!17b. Propose un synonyme pour chaque adjectif.
!!17c. Écris un paragraphe de cinq lignes dans lequel tu utiliseras trois de ces expressions.
!!18Lis ce texte.
Tu ne peux rien comprendre à l'Amérique avant d'avoir goûté un sundae. [...J Lorsque je portai la première cuillerée à ma bouche, j'eus l'impression que quelque chose de très important commençait au niveau de mes gencives. Mes papilles subissaient une joie violente, un opéra gustatif se déroulait sur ma langue. À la dernière cuillerée, je n'en pouvais plus, je demandai grâce.
Henri Troyat, La Case de l'onde Sam.
!!!a. Quel sens principal évoque habituellement un opéra ? Est-ce le même que celui qui est évoqué ici ? Explique la métaphore "opéra gustatif".
!!!b. Inspire-toi de ce texte et, en gardant la même structure, adapte-le au récit d'une expérience olfactive (concernant les odeurs). Cela te conduira à évoquer l'expression "opéra olfactif".
!!19. Voici des expressions en rapport avec les cinq sens. Explique-les puis emploie-les dans des phrases où leur sens apparaîtra clairement.
1. être en odeur de sainteté - 2. ne pas pouvoir sentir quelqu'un - 3. des paroles qui touchent - 4. n'entendre qu'un son de cloche - 5. annoncer la couleur
!!20. "La confiture de prunes sent le jardin de Grand-Mère. Le poulet rôti sent le dimanche
matin."
Comme Philippe Delerm, associe deux odeurs à un moment ou un endroit bien précis et explique en une phrase comment le rapport s'établit.
Exemple: Le poulet rôti sent le dimanche: tous les dimanches matins, on prépare pour le déjeuner un poulet dont l'odeur se répand dons toute la maison.
!!21. "Un petit fruit rond, moelleux comme du velours " (Lida Durdikova).
!!!Sur ce modèle, propose en une phrase la description d'un fruit qui associera deux des cinq sens.
Exemple : "un petit fruit rouge et juteux" pour "une cerise".
!!!Explique en deux lignes ce que tu ressens en le mangeant.
!!22. Choisis    l'une    des    friandises    que Mr. Wonka a mises au point dans sa chocolaterie.
1. les oreillers mangeables en pâte de guimauve
2.  le papier peint qui se lèche pour chambre d'enfant î- les crèmes glacées chaudes pour les jours de grand froid
4. les boissons gazeuses aérodynamiques
5.  les bonbons carrés qui ont l'air d'être ronds
6. les caramels à cheveux
7.  la gomme aux goûts d'un menu entier
d'après Roald Dahl, Charlie et la chocolaterie, © Gallimard
!!!Imagine que tu achètes une de ces friandises incroyables et que tu la goûtes... Raconte en quelques lignes les curieux effets qu'elle produit sur toi.
Écris au présent et à la 1ere pers. Insiste sur la description de la sucrerie, puis sur son odeur, sa saveur, les sons qu'elle émet peut-être, et enfin sur tes réactions imprévues.
/***
|Name|ExportTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#ExportTiddlersPlugin|
|Documentation|http://www.TiddlyTools.com/#ExportTiddlersPluginInfo|
|Version|2.8.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|select and extract tiddlers from your ~TiddlyWiki documents and save them to a separate file|
This plugin provides a control panel to select/export tiddlers to another TiddlyWiki document.  You can also save just the selected tiddlers as a TiddlyWiki '~PureStore' file (much smaller files!), or create plain-text output for manual copy/paste into other applications or XML files that can be used to publish an ~RSS news feed.
!!!!!Documentation
>see [[ExportTiddlersPluginInfo]]
!!!!!Inline control panel (live):
><<exportTiddlers inline>>
!!!!!Revisions
<<<
2009.02.26 [2.8.5] use macro-specific definition of $() function abbreviation (avoids conflict with JQuery)
|please see [[ExportTiddlersPluginInfo]] for additional revision details|
2005.10.09 [0.0.0] development started
<<<
!!!!!Code
***/
//{{{
// version
version.extensions.ExportTiddlersPlugin= {major: 2, minor: 8, revision: 5, date: new Date(2009,2,26)};

// default shadow definition
config.shadowTiddlers.ExportTiddlers='<<exportTiddlers inline>>';

// add 'export' backstage task (following built-in import task)
if (config.tasks) { // TW2.2 or above
	config.tasks.exportTask = {
		text:'export',
		tooltip:'Export selected tiddlers to another file',
		content:'<<exportTiddlers inline>>'
	}
	config.backstageTasks.splice(config.backstageTasks.indexOf('importTask')+1,0,'exportTask');
}

config.macros.exportTiddlers = {
	$: function(id) { return document.getElementById(id); }, // abbreviation
	label: 'export tiddlers',
	prompt: 'Copy selected tiddlers to an export document',
	okmsg: '%0 tiddlers written to %1',
	failmsg: 'An error occurred while creating %1',
	mergeprompt: '%0\nalready contains tiddler definitions.\n'
		+'\nPress OK to add new/revised tiddlers to current file contents.'
		+'\nPress Cancel to completely replace file contents',
	mergestatus: 'Merged %0 new/revised tiddlers with %1 previously saved tiddlers',
	statusmsg: '%0 tiddler%1 - %2 selected for export',
	newdefault: 'export.html',
	datetimefmt: '0MM/0DD/YYYY 0hh:0mm:0ss',  // for 'filter date/time' edit fields
	type_TW: 'tw', type_PS: 'ps', type_TX: 'tx', type_NF: 'nf', // file type tokens
	type_map: { // map filetype param alternatives/abbreviations to token values
		tiddlywiki:'tw', tw:'tw', wiki: 'tw',
		purestore: 'ps', ps:'ps', store:'ps',
		plaintext: 'tx', tx:'tx', text: 'tx',
		newsfeed:  'nf', nf:'nf', xml:  'nf', rss:'nf'
	},
	handler: function(place,macroName,params) {
		if (params[0]!='inline')
			{ createTiddlyButton(place,this.label,this.prompt,this.togglePanel); return; }
		var panel=this.createPanel(place);
		panel.style.position='static';
		panel.style.display='block';
	},
	createPanel: function(place) {
		var panel=this.$('exportPanel');
		if (panel) { panel.parentNode.removeChild(panel); }
		setStylesheet(this.css,'exportTiddlers');
		panel=createTiddlyElement(place,'span','exportPanel',null,null)
		panel.innerHTML=this.html;
		this.initFilter();
		this.refreshList(0);
		var fn=this.$('exportFilename');
		if (window.location.protocol=='file:' && !fn.value.length) {
			// get new target path/filename
			var newPath=getLocalPath(window.location.href);
			var slashpos=newPath.lastIndexOf('/'); if (slashpos==-1) slashpos=newPath.lastIndexOf('\\'); 
			if (slashpos!=-1) newPath=newPath.substr(0,slashpos+1); // trim filename
			fn.value=newPath+this.newdefault;
		}
		return panel;
	},
	togglePanel: function(e) { var e=e||window.event;
		var cme=config.macros.exportTiddlers; // abbrev
		var parent=resolveTarget(e).parentNode;
		var panel=cme.$('exportPanel');
		if (panel==undefined || panel.parentNode!=parent)
			panel=cme.createPanel(parent);
		var isOpen=panel.style.display=='block';
		if(config.options.chkAnimate)
			anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,'none'));
		else
			panel.style.display=isOpen?'none':'block' ;
		if (panel.style.display!='none') { // update list and set focus when panel is made visible
			cme.refreshList(0);
			cme.$('exportFilename').focus(); 
			cme.$('exportFilename').select();
		}
		e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);
	},
	css: '\
		#exportPanel {\
			display: none; position:absolute; z-index:12; width:35em; right:105%; top:6em;\
			background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
			border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
			padding: 0.5em; margin:0em; -moz-border-radius:1em;-webkit-border-radius:1em;\
		}\
		#exportPanel a, #exportPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\
		#exportPanel table { \
			width:100%; border:0px; padding:0px; margin:0px;\
			font-size:8pt; line-height:110%; background:transparent;\
		}\
		#exportPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\
		#exportPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\
		#exportPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\
		#exportPanel input  { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%; }\
		#exportPanel textarea  { width:98%;padding:0px;margin:0px;overflow:auto;font-size:8pt; }\
		#exportPanel .box { \
			border:1px solid black; padding:3px; margin-bottom:5px; \
			background:#f8f8f8; -moz-border-radius:5px;-webkit-border-radius:5px; }\
		#exportPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\
		#exportPanel .rad { width:auto;border:0 }\
		#exportPanel .chk { width:auto;border:0 }\
		#exportPanel .btn { width:auto; }\
		#exportPanel .btn1 { width:98%; }\
		#exportPanel .btn2 { width:48%; }\
		#exportPanel .btn3 { width:32%; }\
		#exportPanel .btn4 { width:24%; }\
		#exportPanel .btn5 { width:19%; }\
	',
	html: '\
		<!-- target path/file  -->\
		<div>\
		export to path/filename:<br>\
		<input type="text" id="exportFilename" size=40 style="width:93%"><input \
			type="button" id="exportBrowse" value="..." title="select or enter a local folder/file..." style="width:5%" \
			onclick="var fn=config.macros.exportTiddlers.askForFilename(this); if (fn.length) this.previousSibling.value=fn; ">\
		</div>\
		<!-- output format -->\
		<div>\
		output file format:\
		<select id="exportFormat" size=1>\
			<option value="TW">TiddlyWiki HTML document (includes core code)</option>\
			<option value="PS">TiddlyWiki "PureStore" HTML file (tiddler data only)</option>\
			<option value="TX">TiddlyWiki plain text TXT file (tiddler source listing)</option>\
			<option value="NF">RSS NewsFeed XML file</option>\
		</select>\
		</div>\
		<!-- notes -->\
		<div>\
		notes:<br>\
		<textarea id="exportNotes" rows=3 cols=40 style="height:4em;margin-bottom:5px;" onfocus="this.select()"></textarea> \
		</div>\
		<!-- list of tiddlers -->\
		<table><tr align="left"><td>\
			select:\
			<a href="JavaScript:;" id="exportSelectAll"\
				onclick="config.macros.exportTiddlers.process(this)" title="select all tiddlers">\
				&nbsp;all&nbsp;</a>\
			<a href="JavaScript:;" id="exportSelectChanges"\
				onclick="config.macros.exportTiddlers.process(this)" title="select tiddlers changed since last save">\
				&nbsp;changes&nbsp;</a> \
			<a href="JavaScript:;" id="exportSelectOpened"\
				onclick="config.macros.exportTiddlers.process(this)" title="select tiddlers currently being displayed">\
				&nbsp;opened&nbsp;</a> \
			<a href="JavaScript:;" id="exportSelectRelated"\
				onclick="config.macros.exportTiddlers.process(this)" title="select tiddlers related to the currently selected tiddlers">\
				&nbsp;related&nbsp;</a> \
			<a href="JavaScript:;" id="exportToggleFilter"\
				onclick="config.macros.exportTiddlers.process(this)" title="show/hide selection filter">\
				&nbsp;filter&nbsp;</a>  \
		</td><td align="right">\
			<a href="JavaScript:;" id="exportListSmaller"\
				onclick="config.macros.exportTiddlers.process(this)" title="reduce list size">\
				&nbsp;&#150;&nbsp;</a>\
			<a href="JavaScript:;" id="exportListLarger"\
				onclick="config.macros.exportTiddlers.process(this)" title="increase list size">\
				&nbsp;+&nbsp;</a>\
		</td></tr></table>\
		<select id="exportList" multiple size="10" style="margin-bottom:5px;"\
			onchange="config.macros.exportTiddlers.refreshList(this.selectedIndex)">\
		</select><br>\
		</div><!--box-->\
		<!-- selection filter -->\
		<div id="exportFilterPanel" style="display:none">\
		<table><tr align="left"><td>\
			selection filter\
		</td><td align="right">\
			<a href="JavaScript:;" id="exportHideFilter"\
				onclick="config.macros.exportTiddlers.process(this)" title="hide selection filter">hide</a>\
		</td></tr></table>\
		<div class="box">\
		<input type="checkbox" class="chk" id="exportFilterStart" value="1"\
			onclick="config.macros.exportTiddlers.showFilterFields(this)"> starting date/time<br>\
		<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\
			<select size=1 id="exportFilterStartBy" \
				onchange="config.macros.exportTiddlers.showFilterFields(this);">\
				<option value="0">today</option>\
				<option value="1">yesterday</option>\
				<option value="7">a week ago</option>\
				<option value="30">a month ago</option>\
				<option value="file">file date</option>\
				<option value="other">other (mm/dd/yyyy hh:mm)</option>\
			</select>\
		</td><td width="50%">\
			<input type="text" id="exportStartDate" onfocus="this.select()"\
				onchange="config.macros.exportTiddlers.$(\'exportFilterStartBy\').value=\'other\';">\
		</td></tr></table>\
		<input type="checkbox" class="chk" id="exportFilterEnd" value="1"\
			onclick="config.macros.exportTiddlers.showFilterFields(this)"> ending date/time<br>\
		<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">\
			<select size=1 id="exportFilterEndBy" \
				onchange="config.macros.exportTiddlers.showFilterFields(this);">\
				<option value="0">today</option>\
				<option value="1">yesterday</option>\
				<option value="7">a week ago</option>\
				<option value="30">a month ago</option>\
				<option value="file">file date</option>\
				<option value="other">other (mm/dd/yyyy hh:mm)</option>\
			</select>\
		</td><td width="50%">\
			<input type="text" id="exportEndDate" onfocus="this.select()"\
				onchange="config.macros.exportTiddlers.$(\'exportFilterEndBy\').value=\'other\';">\
		</td></tr></table>\
		<input type="checkbox" class="chk" id=exportFilterTags value="1"\
			onclick="config.macros.exportTiddlers.showFilterFields(this)"> match tags<br>\
		<input type="text" id="exportTags" onfocus="this.select()">\
		<input type="checkbox" class="chk" id=exportFilterText value="1"\
			onclick="config.macros.exportTiddlers.showFilterFields(this)"> match titles/tiddler text<br>\
		<input type="text" id="exportText" onfocus="this.select()">\
		</div> <!--box-->\
		</div> <!--panel-->\
		<!-- action buttons -->\
		<div style="text-align:center">\
		<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"\
			id="exportFilter" value="apply filter">\
		<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"\
			id="exportStart" value="export tiddlers">\
		<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"\
			id="exportDelete" value="delete tiddlers">\
		<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"\
			id="exportClose" value="close">\
		</div><!--center-->\
	',
	process: function(which) { // process panel control interactions
		var theList=this.$('exportList'); if (!theList) return;
		var count = 0;
		var total = store.getTiddlers('title').length;
		switch (which.id) {
			case 'exportFilter':
				count=this.filterExportList();
				var panel=this.$('exportFilterPanel');
				if (count==-1) { panel.style.display='block'; break; }
				this.$('exportStart').disabled=(count==0);
				this.$('exportDelete').disabled=(count==0);
				this.displayStatus(count,total);
				if (count==0) { alert('No tiddlers were selected'); panel.style.display='block'; }
				break;
			case 'exportStart':
				this.go();
				break;
			case 'exportDelete':
				this.deleteTiddlers();
				break;
			case 'exportHideFilter':
			case 'exportToggleFilter':
				var panel=this.$('exportFilterPanel')
				panel.style.display=(panel.style.display=='block')?'none':'block';
				break;
			case 'exportSelectChanges':
				var lastmod=new Date(document.lastModified);
				for (var t = 0; t < theList.options.length; t++) {
					if (theList.options[t].value=='') continue;
					var tiddler=store.getTiddler(theList.options[t].value); if (!tiddler) continue;
					theList.options[t].selected=(tiddler.modified>lastmod);
					count += (tiddler.modified>lastmod)?1:0;
				}
				this.$('exportStart').disabled=(count==0);
				this.$('exportDelete').disabled=(count==0);
				this.displayStatus(count,total);
				if (count==0) alert('There are no unsaved changes');
				break;
			case 'exportSelectAll':
				for (var t = 0; t < theList.options.length; t++) {
					if (theList.options[t].value=='') continue;
					theList.options[t].selected=true;
					count += 1;
				}
				this.$('exportStart').disabled=(count==0);
				this.$('exportDelete').disabled=(count==0);
				this.displayStatus(count,count);
				break;
			case 'exportSelectOpened':
				for (var t=0; t<theList.options.length; t++) theList.options[t].selected=false;
				var tiddlerDisplay=this.$('tiddlerDisplay');
				for (var t=0; t<tiddlerDisplay.childNodes.length;t++) {
					var tiddler=tiddlerDisplay.childNodes[t].id.substr(7);
					for (var i=0; i<theList.options.length; i++) {
						if (theList.options[i].value!=tiddler) continue;
						theList.options[i].selected=true; count++; break;
					}
				}
				this.$('exportStart').disabled=(count==0);
				this.$('exportDelete').disabled=(count==0);
				this.displayStatus(count,total);
				if (count==0) alert('There are no tiddlers currently opened');
				break;
			case 'exportSelectRelated':
				// recursively build list of related tiddlers
				function getRelatedTiddlers(tid,tids) {
					var t=store.getTiddler(tid); if (!t || tids.contains(tid)) return tids;
					tids.push(t.title);
					if (!t.linksUpdated) t.changed();
					for (var i=0; i<t.links.length; i++)
						if (t.links[i]!=tid) tids=getRelatedTiddlers(t.links[i],tids);
					return tids;
				}
				// for all currently selected tiddlers, gather up the related tiddlers (including self) and select them as well
				var tids=[];
				for (var i=0; i<theList.options.length; i++)
					if (theList.options[i].selected) tids=getRelatedTiddlers(theList.options[i].value,tids);
				// select related tiddlers (includes original selected tiddlers)
				for (var i=0; i<theList.options.length; i++)
					theList.options[i].selected=tids.contains(theList.options[i].value);
				this.displayStatus(tids.length,total);
				break;
			case 'exportListSmaller':	// decrease current listbox size
				var min=5;
				theList.size-=(theList.size>min)?1:0;
				break;
			case 'exportListLarger':	// increase current listbox size
				var max=(theList.options.length>25)?theList.options.length:25;
				theList.size+=(theList.size<max)?1:0;
				break;
			case 'exportClose':
				this.$('exportPanel').style.display='none';
				break;
		}
	},
	displayStatus: function(count,total) {
		var txt=this.statusmsg.format([total,total!=1?'s':'',!count?'none':count==total?'all':count]);
		clearMessage();	displayMessage(txt);
		return txt;
	},
	refreshList: function(selectedIndex) {
		var theList = this.$('exportList'); if (!theList) return;
		// get the sort order
		var sort;
		if (!selectedIndex)   selectedIndex=0;
		if (selectedIndex==0) sort='modified';
		if (selectedIndex==1) sort='title';
		if (selectedIndex==2) sort='modified';
		if (selectedIndex==3) sort='modifier';
		if (selectedIndex==4) sort='tags';

		// unselect headings and count number of tiddlers actually selected
		var count=0;
		for (var t=5; t < theList.options.length; t++) {
			if (!theList.options[t].selected) continue;
			if (theList.options[t].value!='')
				count++;
			else { // if heading is selected, deselect it, and then select and count all in section
				theList.options[t].selected=false;
				for ( t++; t<theList.options.length && theList.options[t].value!=''; t++) {
					theList.options[t].selected=true;
					count++;
				}
			}
		}

		// disable 'export' and 'delete' buttons if no tiddlers selected
		this.$('exportStart').disabled=(count==0);
		this.$('exportDelete').disabled=(count==0);

		// show selection count
		var tiddlers = store.getTiddlers('title');
		if (theList.options.length) this.displayStatus(count,tiddlers.length);

		// if a [command] item, reload list... otherwise, no further refresh needed
		if (selectedIndex>4) return;

		// clear current list contents
		while (theList.length > 0) { theList.options[0] = null; }
		// add heading and control items to list
		var i=0;
		var indent=String.fromCharCode(160)+String.fromCharCode(160);
		theList.options[i++]=
			new Option(tiddlers.length+' tiddlers in document', '',false,false);
		theList.options[i++]=
			new Option(((sort=='title'   )?'>':indent)+' [by title]', '',false,false);
		theList.options[i++]=
			new Option(((sort=='modified')?'>':indent)+' [by date]', '',false,false);
		theList.options[i++]=
			new Option(((sort=='modifier')?'>':indent)+' [by author]', '',false,false);
		theList.options[i++]=
			new Option(((sort=='tags'    )?'>':indent)+' [by tags]', '',false,false);

		// output the tiddler list
		switch(sort) {
			case 'title':
				for(var t = 0; t < tiddlers.length; t++)
					theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
				break;
			case 'modifier':
			case 'modified':
				var tiddlers = store.getTiddlers(sort);
				// sort descending for newest date first
				tiddlers.sort(function (a,b) {if(a[sort] == b[sort]) return(0); else return (a[sort] > b[sort]) ? -1 : +1; });
				var lastSection = '';
				for(var t = 0; t < tiddlers.length; t++) {
					var tiddler = tiddlers[t];
					var theSection = '';
					if (sort=='modified') theSection=tiddler.modified.toLocaleDateString();
					if (sort=='modifier') theSection=tiddler.modifier;
					if (theSection != lastSection) {
						theList.options[i++] = new Option(theSection,'',false,false);
						lastSection = theSection;
					}
					theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
				}
				break;
			case 'tags':
				var theTitles = {}; // all tiddler titles, hash indexed by tag value
				var theTags = new Array();
				for(var t=0; t<tiddlers.length; t++) {
					var title=tiddlers[t].title;
					var tags=tiddlers[t].tags;
					if (!tags || !tags.length) {
						if (theTitles['untagged']==undefined) { theTags.push('untagged'); theTitles['untagged']=new Array(); }
						theTitles['untagged'].push(title);
					}
					else for(var s=0; s<tags.length; s++) {
						if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
						theTitles[tags[s]].push(title);
					}
				}
				theTags.sort();
				for(var tagindex=0; tagindex<theTags.length; tagindex++) {
					var theTag=theTags[tagindex];
					theList.options[i++]=new Option(theTag,'',false,false);
					for(var t=0; t<theTitles[theTag].length; t++)
						theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
				}
				break;
			}
		theList.selectedIndex=selectedIndex; // select current control item
		this.$('exportStart').disabled=true;
		this.$('exportDelete').disabled=true;
		this.displayStatus(0,tiddlers.length);
	},
	askForFilename: function(here) {
		var msg=here.title; // use tooltip as dialog box message
		var path=getLocalPath(document.location.href);
		var slashpos=path.lastIndexOf('/'); if (slashpos==-1) slashpos=path.lastIndexOf('\\'); 
		if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
		var filetype=this.$('exportFormat').value.toLowerCase();
		var defext='html';
		if (filetype==this.type_TX) defext='txt';
		if (filetype==this.type_NF) defext='xml';
		var file=this.newdefault.replace(/html$/,defext);
		var result='';
		if(window.Components) { // moz
			try {
				netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
				var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
				var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
				picker.init(window, msg, nsIFilePicker.modeSave);
				var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
				thispath.initWithPath(path);
				picker.displayDirectory=thispath;
				picker.defaultExtension=defext;
				picker.defaultString=file;
				picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
				if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
			}
			catch(e) { alert('error during local file access: '+e.toString()) }
		}
		else { // IE
			try { // XPSP2 IE only
				var s = new ActiveXObject('UserAccounts.CommonDialog');
				s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|XML files|*.xml|';
				s.FilterIndex=defext=='txt'?2:'html'?3:'xml'?4:1;
				s.InitialDir=path;
				s.FileName=file;
				if (s.showOpen()) var result=s.FileName;
			}
			catch(e) {  // fallback
				var result=prompt(msg,path+file);
			}
		}
		return result;
	},
	initFilter: function() {
		this.$('exportFilterStart').checked=false; this.$('exportStartDate').value='';
		this.$('exportFilterEnd').checked=false;  this.$('exportEndDate').value='';
		this.$('exportFilterTags').checked=false; this.$('exportTags').value='';
		this.$('exportFilterText').checked=false; this.$('exportText').value='';
		this.showFilterFields();
	},
	showFilterFields: function(which) {
		var show=this.$('exportFilterStart').checked;
		this.$('exportFilterStartBy').style.display=show?'block':'none';
		this.$('exportStartDate').style.display=show?'block':'none';
		var val=this.$('exportFilterStartBy').value;
		this.$('exportStartDate').value
			=this.getFilterDate(val,'exportStartDate').formatString(this.datetimefmt);
		if (which && (which.id=='exportFilterStartBy') && (val=='other'))
			this.$('exportStartDate').focus();

		var show=this.$('exportFilterEnd').checked;
		this.$('exportFilterEndBy').style.display=show?'block':'none';
		this.$('exportEndDate').style.display=show?'block':'none';
		var val=this.$('exportFilterEndBy').value;
		this.$('exportEndDate').value
			=this.getFilterDate(val,'exportEndDate').formatString(this.datetimefmt);
		 if (which && (which.id=='exportFilterEndBy') && (val=='other'))
			this.$('exportEndDate').focus();

		var show=this.$('exportFilterTags').checked;
		this.$('exportTags').style.display=show?'block':'none';

		var show=this.$('exportFilterText').checked;
		this.$('exportText').style.display=show?'block':'none';
	},
	getFilterDate: function(val,id) {
		var result=0;
		switch (val) {
			case 'file':
				result=new Date(document.lastModified);
				break;
			case 'other':
				result=new Date(this.$(id).value);
				break;
			default: // today=0, yesterday=1, one week=7, two weeks=14, a month=31
				var now=new Date(); var tz=now.getTimezoneOffset()*60000; now-=tz;
				var oneday=86400000;
				if (id=='exportStartDate')
					result=new Date((Math.floor(now/oneday)-val)*oneday+tz);
				else
					result=new Date((Math.floor(now/oneday)-val+1)*oneday+tz-1);
				break;
		}
		return result;
	},
	filterExportList: function() {
		var theList  = this.$('exportList'); if (!theList) return -1;
		var filterStart=this.$('exportFilterStart').checked;
		var val=this.$('exportFilterStartBy').value;
		var startDate=config.macros.exportTiddlers.getFilterDate(val,'exportStartDate');
		var filterEnd=this.$('exportFilterEnd').checked;
		var val=this.$('exportFilterEndBy').value;
		var endDate=config.macros.exportTiddlers.getFilterDate(val,'exportEndDate');
		var filterTags=this.$('exportFilterTags').checked;
		var tags=this.$('exportTags').value;
		var filterText=this.$('exportFilterText').checked;
		var text=this.$('exportText').value;
		if (!(filterStart||filterEnd||filterTags||filterText)) {
			alert('Please set the selection filter');
			this.$('exportFilterPanel').style.display='block';
			return -1;
		}
		if (filterStart&&filterEnd&&(startDate>endDate)) {
			var msg='starting date/time:\n'
			msg+=startDate.toLocaleString()+'\n';
			msg+='is later than ending date/time:\n'
			msg+=endDate.toLocaleString()
			alert(msg);
			return -1;
		}
		// if filter by tags, get list of matching tiddlers
		// use getMatchingTiddlers() (if MatchTagsPlugin is installed) for full boolean expressions
		// otherwise use getTaggedTiddlers() for simple tag matching
		if (filterTags) {
			var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
			var t=fn.apply(store,[tags]);
			var tagged=[];
			for (var i=0; i<t.length; i++) tagged.push(t[i].title);
		}
		// scan list and select tiddlers that match all applicable criteria
		var total=0;
		var count=0;
		for (var i=0; i<theList.options.length; i++) {
			// get item, skip non-tiddler list items (section headings)
			var opt=theList.options[i]; if (opt.value=='') continue;
			// get tiddler, skip missing tiddlers (this should NOT happen)
			var tiddler=store.getTiddler(opt.value); if (!tiddler) continue; 
			var sel=true;
			if ( (filterStart && tiddler.modified<startDate)
			|| (filterEnd && tiddler.modified>endDate)
			|| (filterTags && !tagged.contains(tiddler.title))
			|| (filterText && (tiddler.text.indexOf(text)==-1) && (tiddler.title.indexOf(text)==-1)))
				sel=false;
			opt.selected=sel;
			count+=sel?1:0;
			total++;
		}
		return count;
	},
	deleteTiddlers: function() {
		var list=this.$('exportList'); if (!list) return;
		var tids=[];
		for (i=0;i<list.length;i++)
			if (list.options[i].selected && list.options[i].value.length)
				tids.push(list.options[i].value);
		if (!confirm('Are you sure you want to delete these tiddlers:\n\n'+tids.join(', '))) return;
		store.suspendNotifications();
		for (t=0;t<tids.length;t++) {
			var tid=store.getTiddler(tids[t]); if (!tid) continue;
			var msg="'"+tid.title+"' is tagged with 'systemConfig'.\n\n";
			msg+='Removing this tiddler may cause unexpected results.  Are you sure?'
			if (tid.tags.contains('systemConfig') && !confirm(msg)) continue;
			store.removeTiddler(tid.title);
			story.closeTiddler(tid.title);
		}
		store.resumeNotifications();
		alert(tids.length+' tiddlers deleted');
		this.refreshList(0); // reload listbox
		store.notifyAll(); // update page display
	},
	go: function() {
		if (window.location.protocol!='file:') // make sure we are local
			{ displayMessage(config.messages.notFileUrlError); return; }
		// get selected tidders, target filename, target type, and notes
		var list=this.$('exportList'); if (!list) return;
		var tids=[]; for (var i=0; i<list.options.length; i++) {
			var opt=list.options[i]; if (!opt.selected||!opt.value.length) continue;
			var tid=store.getTiddler(opt.value); if (!tid) continue;
			tids.push(tid);
		}
		if (!tids.length) return; // no tiddlers selected
		var target=this.$('exportFilename').value.trim();
		if (!target.length) {
			displayMessage('A local target path/filename is required',target);
			return;
		}
		var filetype=this.$('exportFormat').value.toLowerCase();
		var notes=this.$('exportNotes').value.replace(/\n/g,'<br>');
		var total={val:0};
		var out=this.assembleFile(target,filetype,tids,notes,total);
		var link='file:///'+target.replace(/\\/g,'/');
		var samefile=link==decodeURIComponent(window.location.href);
		var p=getLocalPath(document.location.href);
		if (samefile) {
			if (config.options.chkSaveBackups) { var t=loadOriginal(p);if(t)saveBackup(p,t); }
			if (config.options.chkGenerateAnRssFeed && saveRss instanceof Function) saveRss(p);
		}
		var ok=saveFile(target,out);
		displayMessage((ok?this.okmsg:this.failmsg).format([total.val,target]),link);
	},
	plainTextHeader:
		 '// Source'+':\n//\t%0\n'
		+'// Title:\n//\t%1\n'
		+'// Subtitle:\n//\t%2\n'
		+'// Created:\n//\t%3 by %4\n'
		+'// Application:\n//\tTiddlyWiki %5 / %6 %7\n',
	plainTextTiddler:
		'\n// ----- %0 (by %1 on %2) -----\n\n%3',
	plainTextFooter:
		'',
	newsFeedHeader:
		 '<'+'?xml version="1.0"?'+'>\n'
		+'<rss version="2.0">\n'
		+'<channel>\n'
		+'<title>%1</title>\n'
		+'<link>%0</link>\n'
		+'<description>%2</description>\n'
		+'<language>en-us</language>\n'
		+'<copyright>Copyright '+(new Date().getFullYear())+' %4</copyright>\n'
		+'<pubDate>%3</pubDate>\n'
		+'<lastBuildDate>%3</lastBuildDate>\n'
		+'<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n'
		+'<generator>TiddlyWiki %5 / %6 %7</generator>\n',
	newsFeedTiddler:
		'\n%0\n',
	newsFeedFooter:
		'</channel></rss>',
	pureStoreHeader:
		 '<html><body>'
		+'<style type="text/css">'
		+'	#storeArea {display:block;margin:1em;}'
		+'	#storeArea div {padding:0.5em;margin:1em;border:2px solid black;height:10em;overflow:auto;}'
		+'	#pureStoreHeading {width:100%;text-align:left;background-color:#eeeeee;padding:1em;}'
		+'</style>'
		+'<div id="pureStoreHeading">'
		+'	TiddlyWiki "PureStore" export file<br>'
		+'	Source'+': <b>%0</b><br>'
		+'	Title: <b>%1</b><br>'
		+'	Subtitle: <b>%2</b><br>'
		+'	Created: <b>%3</b> by <b>%4</b><br>'
		+'	TiddlyWiki %5 / %6 %7<br>'
		+'	Notes:<hr><pre>%8</pre>'
		+'</div>'
		+'<div id="storeArea">',
	pureStoreTiddler:
		'%0\n%1',
	pureStoreFooter:
		'</div><!--POST-BODY-START-->\n<!--POST-BODY-END--></body></html>',
	assembleFile: function(target,filetype,tids,notes,total) {
		var revised='';
		var now = new Date().toLocaleString();
		var src=convertUnicodeToUTF8(document.location.href);
		var title = convertUnicodeToUTF8(wikifyPlain('SiteTitle').htmlEncode());
		var subtitle = convertUnicodeToUTF8(wikifyPlain('SiteSubtitle').htmlEncode());
		var user = convertUnicodeToUTF8(config.options.txtUserName.htmlEncode());
		var twver = version.major+'.'+version.minor+'.'+version.revision;
		var v=version.extensions.ExportTiddlersPlugin; var pver = v.major+'.'+v.minor+'.'+v.revision;
		var headerargs=[src,title,subtitle,now,user,twver,'ExportTiddlersPlugin',pver,notes];
		switch (filetype) {
			case this.type_TX: // plain text
				var header=this.plainTextHeader.format(headerargs);
				var footer=this.plainTextFooter;
				break;
			case this.type_NF: // news feed (XML)
				headerargs[0]=store.getTiddlerText('SiteUrl','');
				var header=this.newsFeedHeader.format(headerargs);
				var footer=this.newsFeedFooter;
				break;
			case this.type_PS: // PureStore (no code)
				var header=this.pureStoreHeader.format(headerargs);
				var footer=this.pureStoreFooter;
				break;
			case this.type_TW: // full TiddlyWiki
			default:
				var currPath=getLocalPath(window.location.href);
				var original=loadFile(currPath);
				if (!original) { displayMessage(config.messages.cantSaveError); return; }
				var posDiv = locateStoreArea(original);
				if (!posDiv) { displayMessage(config.messages.invalidFileError.format([currPath])); return; }
				var header = original.substr(0,posDiv[0]+startSaveArea.length)+'\n';
				var footer = '\n'+original.substr(posDiv[1]);
				break;
		}
		var out=this.getData(target,filetype,tids);
		var revised = header+convertUnicodeToUTF8(out.join('\n'))+footer;
		// if full TW, insert page title and language attr, and reset all MARKUP blocks...
		if (filetype==this.type_TW) {
			var newSiteTitle=convertUnicodeToUTF8(getPageTitle()).htmlEncode();
			revised=revised.replaceChunk('<title'+'>','</title'+'>',' ' + newSiteTitle + ' ');
			revised=updateLanguageAttribute(revised);
			var titles=[]; for (var i=0; i<tids.length; i++) titles.push(tids[i].title);
			revised=updateMarkupBlock(revised,'PRE-HEAD',
				titles.contains('MarkupPreHead')? 'MarkupPreHead' :null);
			revised=updateMarkupBlock(revised,'POST-HEAD',
				titles.contains('MarkupPostHead')?'MarkupPostHead':null);
			revised=updateMarkupBlock(revised,'PRE-BODY',
				titles.contains('MarkupPreBody')? 'MarkupPreBody' :null);
			revised=updateMarkupBlock(revised,'POST-SCRIPT',
				titles.contains('MarkupPostBody')?'MarkupPostBody':null);
		}
		total.val=out.length;
		return revised;
	},
	formatItem: function(s,f,t,u) {
		if (f==this.type_TW)
			var r=s.getSaver().externalizeTiddler(s,t);
		if (f==this.type_PS)
			var r=config.macros.exportTiddlers.pureStoreTiddler.format([t.title,s.getSaver().externalizeTiddler(s,t)]);
		if (f==this.type_NF)
			var r=this.newsFeedTiddler.format([t.saveToRss(u)]);
		if (f==this.type_TX)
			var r=this.plainTextTiddler.format([t.title,t.modifier,t.modified.toLocaleString(),t.text]);
		return r||'';
	},
	getData: function(target,filetype,tids) {
		// output selected tiddlers and gather list of titles (for use with merge)
		var out=[]; var titles=[];
		var url=store.getTiddlerText('SiteUrl','');
		for (var i=0; i<tids.length; i++) {
			out.push(this.formatItem(store,filetype,tids[i],url));
			titles.push(tids[i].title);
		}
		// if TW or PureStore format, ask to merge with existing tiddlers (if any)
		if (filetype==this.type_TW || filetype==this.type_PS) {
			var text=loadFile(target);
			if (text && text.length) {
				var remoteStore=new TiddlyWiki();
				if (remoteStore.importTiddlyWiki(convertUTF8ToUnicode(text))
					&& confirm(this.mergeprompt.format([target]))) {
					var existing=remoteStore.getTiddlers('title');
					for (var i=0; i<existing.length; i++)
						if (!titles.contains(existing[i].title))
							out.push(this.formatItem(remoteStore,filetype,existing[i],url));
					displayMessage(this.mergestatus.format([tids.length,out.length-tids.length]));
				}
			}
		}
		return out;
	}
}
//}}}
Scanné et adapté de MagnardCollège
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2  (Win32)">
	<META NAME="CREATED" CONTENT="20060131;21394100">
	<META NAME="CHANGEDBY" CONTENT="Mathieu Cartailler">
	<META NAME="CHANGED" CONTENT="20060131;21460900">
	<META NAME="Info 1" CONTENT="">
	<META NAME="Info 2" CONTENT="">
	<META NAME="Info 3" CONTENT="">
	<META NAME="Info 4" CONTENT="">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 21.01cm 29.69cm; margin-left: 3.59cm; margin-right: 4.13cm; margin-top: 2.54cm; margin-bottom: 1.27cm }
		P { margin-bottom: 0.21cm; font-family: "Arial", sans-serif; font-size: 10pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="fr-FR" DIR="LTR" STYLE="border: none; padding: 0cm">
<P STYLE="margin-left: 0.1cm; margin-right: 2.23cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; font-weight: normal; line-height: 1.13cm">
<FONT COLOR="#414141"><FONT SIZE=6 STYLE="font-size: 30pt">Exprimer
la cause et la cons&eacute;quence</FONT></FONT></P>
<P STYLE="margin-left: 1cm; margin-right: 1.22cm; text-indent: -0.93cm; margin-top: 0.63cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
<FONT SIZE=1 STYLE="font-size: 8pt"><FONT COLOR="#058c9c">La cause et
la cons&eacute;quence sont li&eacute;es ; </FONT><FONT COLOR="#00a3d1">on
</FONT><FONT COLOR="#468a95">choisit </FONT><FONT COLOR="#058c9c">de
mettre </FONT><FONT COLOR="#00a3d1">en </FONT><FONT COLOR="#468a95">valeur
</FONT><FONT COLOR="#00a3d1">l'une ou l'autre </FONT><FONT COLOR="#414141"><FONT FACE="Arial, sans-serif"><SPAN STYLE="font-weight: normal">Je
ne me </SPAN></FONT></FONT><FONT COLOR="#414141"><FONT FACE="Arial, sans-serif"><I><SPAN STYLE="font-weight: normal">baignerai
pas</SPAN></I></FONT></FONT><FONT COLOR="#414141"><I> </I></FONT><FONT COLOR="#414141"><I><U>parce
que l'eau est trop froide.  </U></I></FONT><FONT COLOR="#414141"><I> 
</I></FONT><FONT COLOR="#414141">Cause </FONT></FONT>
</P>
<P STYLE="margin-left: 1cm; margin-right: 1.22cm; text-indent: -0.93cm; margin-top: 0.63cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
<FONT COLOR="#414141">           <FONT SIZE=1 STYLE="font-size: 8pt">L'eau
est trop <I>froide </I><I><U>si bien que je ne me baignerai pas.</U></I><I>
</I>Cons&eacute;quence</FONT></FONT></P>
<P STYLE="text-indent: 0.05cm; margin-top: 1.03cm; margin-bottom: 0.54cm; background: #000000">
<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>EXPRIMER
LA CAUSE</B></FONT></FONT></P>
<MULTICOL ID="Section1" DIR="LTR" COLS=2 GUTTER=33>
	<P STYLE="margin-bottom: 0cm; background: #ffffff; font-style: normal; font-weight: normal">
	<FONT COLOR="#058c9c"><FONT SIZE=1 STYLE="font-size: 8pt">1. Dans
	les phrases simples :</FONT></FONT></P>
	<OL>
		<LI><P STYLE="margin-top: 0.12cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=1 STYLE="font-size: 8pt">groupes
		nominaux pr&eacute;positionnels</FONT></FONT></P>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=1 STYLE="font-size: 8pt">infinitifs
		pr&eacute;positionnels</FONT></FONT></P>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=1 STYLE="font-size: 8pt">g&eacute;rondifs</FONT></FONT></P>
	</OL>
	<P STYLE="margin-top: 0.49cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.47cm">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><I>A cause
	de son &eacute;tourderie, nous </I>sommes <I>perdus ! &Agrave; force
	d'h&eacute;siter, nous sommes arriv&eacute;s trop tard, </I><I>En
	h&eacute;sitant, nous sommes arriv&eacute;s trop tard.</I></FONT></FONT></P>
</MULTICOL>
<DIV ID="Section2" DIR="LTR">
	<P STYLE="margin-left: 0.02cm; margin-top: 0.64cm; margin-bottom: 0cm; background: #ffffff; font-weight: normal">
	<FONT COLOR="#058c9c"><FONT SIZE=1 STYLE="font-size: 8pt"><I>2. </I><SPAN STYLE="font-style: normal">Dans
	les phrases complexes :</SPAN></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.25cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt">	propositions
	subordonn&eacute;es conjonctives</FONT></FONT></P>
	<P STYLE="margin-left: 0.98cm; margin-top: 0.14cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt">Parce que
	nous avons <I>h&eacute;sit&eacute;, nous sommes arriv&eacute;s trop
	tard.</I></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.22cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt"><I>	</I>proposition
	subordonn&eacute;es participiales</FONT></FONT></P>
	<P STYLE="margin-left: 0.98cm; margin-top: 0.15cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt"><I>La
	voiture n'ayant pas d&eacute;marr&eacute;, nous sommes arriv&eacute;s
	trop tard.</I></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.22cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt"><I>	</I>propositions
	subordonn&eacute;es relatives</FONT></FONT></P>
	<P STYLE="margin-left: 0.98cm; margin-top: 0.14cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt"><I>La
	voiture, qui n'a pas d&eacute;marr&eacute;, a provoqu&eacute; notre
	retard.</I></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.08cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt"><I>	</I>propositions
	ind&eacute;pendantes</FONT></FONT></P>
	<OL START=4>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=1 STYLE="font-size: 8pt">coordonn&eacute;es
		       <I>Nous sommes arriv&eacute;s trop tard car la voiture n'a
		pas d&eacute;marr&eacute;.</I></FONT></FONT></P>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt"><SPAN STYLE="font-style: normal">juxtapos&eacute;es
		        </SPAN><I>Nous sommes arriv&eacute;s trop tard ; la voiture
		n'a pas d&eacute;marr&eacute;.</I></FONT></FONT></P>
	</OL>
	<P STYLE="text-indent: 0.02cm; margin-top: 1.34cm; margin-bottom: 0cm; background: #000000">
	<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>EXPRIMER
	LA CONSEQUENCE</B></FONT></FONT></P>
	<P STYLE="margin-top: 0.66cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#058c9c"><FONT SIZE=1 STYLE="font-size: 8pt"><B>1.	Dans
	les phrases simples ;</B></FONT></FONT></P>
	<OL START=6>
		<LI><P STYLE="margin-top: 0.24cm; margin-bottom: 0cm; background: #ffffff">
		<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt">infinitifs
		pr&eacute;positionnels       <I>II est b&ecirc;te &agrave; manger
		du foin ! </I>(= au <I>point de...)</I></FONT></FONT></P>
		<LI><P STYLE="margin-top: 0.14cm; margin-bottom: 0cm; background: #ffffff">
		<FONT COLOR="#414141"><FONT SIZE=1 STYLE="font-size: 8pt">groupes
		nominaux	// <I>rit aux larmes.</I></FONT></FONT></P>
	</OL>
	<P STYLE="margin-top: 0.85cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#058c9c"><FONT SIZE=1 STYLE="font-size: 8pt"><B><I>2.</I><I>	</I>Dans
	les phrases complexes :</B></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.25cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt">	propositions
	subordonn&eacute;es conjonctives</FONT></FONT></P>
	<P STYLE="margin-left: 0.98cm; margin-top: 0.14cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt">ta <I>voiture
	n'a pas d&eacute;marr&eacute; si bien que nous sommes arriv&eacute;s
	trop tard.</I></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.22cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt"><I>	</I>propositions
	subordonn&eacute;es relatives</FONT></FONT></P>
	<P STYLE="margin-left: 0.95cm; margin-top: 0.15cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt">Je <I>cherche
	quelqu'un qui puisse me d&eacute;panner.</I></FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.08cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
	<FONT COLOR="#414141">&bull;<FONT SIZE=1 STYLE="font-size: 8pt"><I>	</I>propositions
	ind&eacute;pendantes</FONT></FONT></P>
	<OL START=8>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt">coordonn&eacute;es
		      ta voiture n'a pas <I>d&eacute;marr&eacute; donc nous sommes
		arriv&eacute;s trop tard,</I></FONT></FONT></P>
		<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
		<FONT COLOR="#414141"><FONT SIZE=2 STYLE="font-size: 9pt"><SPAN STYLE="font-style: normal">juxtapos&eacute;es
		        ta </SPAN><I>voiture n'a pas d&eacute;marr&eacute; : nous
		sommes arriv&eacute;s trop tard.</I></FONT></FONT></P>
	</OL>
</DIV>
</BODY>
</HTML>
Scanné et adapté de MagnardCollège
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2  (Win32)">
	<META NAME="CREATED" CONTENT="20060201;14390500">
	<META NAME="CHANGEDBY" CONTENT="Mathieu Cartailler">
	<META NAME="CHANGED" CONTENT="20060201;14472900">
	<META NAME="Info 1" CONTENT="">
	<META NAME="Info 2" CONTENT="">
	<META NAME="Info 3" CONTENT="">
	<META NAME="Info 4" CONTENT="">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 21.01cm 29.69cm; margin-left: 3.53cm; margin-right: 3.49cm; margin-top: 2.54cm; margin-bottom: 1.27cm }
		P { margin-bottom: 0.21cm; font-family: "Arial", sans-serif; font-size: 10pt; font-style: italic }
	-->
	</STYLE>
</HEAD>
<BODY LANG="fr-FR" DIR="LTR" STYLE="border: none; padding: 0cm">
<P STYLE="margin-left: 0.07cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; font-weight: normal">
<FONT SIZE=6 STYLE="font-size: 30pt"><FONT COLOR="#000000">Exprimer
le </FONT><FONT COLOR="#3d3d3d">temps et le lieu</FONT></FONT></P>
<P STYLE="text-indent: 0.03cm; margin-top: 1.69cm; margin-bottom: 0cm; background: #000000; font-style: normal">
<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>EXPRIMER
LE TEMPS</B></FONT></FONT></P>
<P STYLE="margin-left: 0.03cm; margin-top: 0.47cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; line-height: 0.39cm">
<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt">Les
compl&eacute;ments circonstanciels de temps peuvent situer un fait
dans le temps (date / r&eacute;p&eacute;tition / dur&eacute;e) ou par
rapport &agrave; un autre fait (simultan&eacute;it&eacute; /
ant&eacute;riorit&eacute; / post&eacute;riorit&eacute;).</FONT></FONT></P>
<P STYLE="margin-left: 0.07cm; margin-top: 0.66cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
<FONT COLOR="#0196ad"><FONT SIZE=2 STYLE="font-size: 9pt">1. Dans les
phrases simples</FONT></FONT></P>
<UL>
	<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; font-style: normal; line-height: 0.68cm">
	<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt">groupes
	nominaux avec ou sans pr&eacute;position      <I>Sauve-toi </I><FONT COLOR="#008000"><I><B>avant
	son retour</B></I></FONT></FONT></FONT></P>
	<LI><P STYLE="margin-bottom: 0cm; background: #ffffff; line-height: 0.68cm">
	<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt"><SPAN STYLE="font-style: normal">adverbes
	ou locutions adverbiales</SPAN><SPAN STYLE="font-style: normal">	   
	         </SPAN>II est parti <FONT COLOR="#008000"><B>hier.</B></FONT></FONT></FONT></P>
	<LI><P STYLE="margin-top: 0.02cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; line-height: 0.68cm">
	<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt">infinitifs
	pr&eacute;positionnels	             <I>Range ta chambre </I><FONT COLOR="#008000"><I><B>avant
	de partir.</B></I></FONT></FONT></FONT></P>
	<LI><P STYLE="margin-right: 1.22cm; margin-top: 0.17cm; margin-bottom: 1.02cm; background: #ffffff; line-height: 0.47cm">
	<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt"><SPAN STYLE="font-style: normal">participes
	ou g&eacute;rondifs	        </SPAN><I>   </I><FONT COLOR="#008000"><I><B>En
	me</B></I></FONT><FONT COLOR="#008000"><SPAN STYLE="font-style: normal"><B>
	</B></SPAN></FONT><FONT COLOR="#008000"><B>promenant</B></FONT>,
	j'ai trouv&eacute; <BR><SPAN STYLE="font-style: normal">(m&ecirc;me
	sujet que le verbe de la principale)                                
	       </SPAN><I>   [ des c&egrave;pes</I></FONT></FONT></P>
</UL>
<MULTICOL ID="Section1" DIR="LTR" COLS=2 GUTTER=41>
	<P STYLE="margin-bottom: 0cm; background: #ffffff; font-style: normal; font-weight: normal">
	<FONT SIZE=2 STYLE="font-size: 9pt"><FONT COLOR="#329391">2. Dans
	les </FONT><FONT COLOR="#0196ad">phrases complexes</FONT></FONT></P>
	<P STYLE="margin-left: 0.03cm; margin-top: 0.22cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<FONT COLOR="#3d3d3d">&bull; <FONT SIZE=2 STYLE="font-size: 9pt">propositions
	subordonn&eacute;es conjonctives</FONT></FONT></P>
	<P STYLE="margin-left: 0.31cm; text-indent: -0.25cm; margin-top: 1.64cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; line-height: 0.39cm">
	<FONT COLOR="#000000">&bull; <FONT SIZE=2 STYLE="font-size: 9pt">propositions
	subordonn&eacute;es participiales (sujet du verbe au participe
	diff&eacute;rent du sujet du verbe principal)</FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.59cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.37cm">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><FONT COLOR="#008000"><B>Alors
	que j'&eacute;tais couch&eacute;,</B></FONT> j'entendis un bruit
	&eacute;trange.</FONT></FONT></P>
	<P STYLE="margin-right: 1.35cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt">Sauve-toi
	<FONT COLOR="#008000"><B>avant qu'il ne revienne !</B></FONT> <FONT COLOR="#008000"><B>Apr&egrave;s
	qu'il est parti</B></FONT>, ils ont bien ri.</FONT></FONT></P>
	<P STYLE="margin-left: 0.03cm; margin-top: 0.31cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><FONT COLOR="#008000"><B>Le
	bateau arrivant au port</B></FONT>, un orage &eacute;clata.</FONT></FONT></P>
</MULTICOL>
<DIV ID="Section2" DIR="LTR">
	<P STYLE="margin-top: 1.63cm; margin-bottom: 0.53cm; background: #000000; font-style: normal">
	<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>EXPRIMER
	LE LIEU</B></FONT></FONT></P>
</DIV>
<MULTICOL ID="Section3" DIR="LTR" COLS=2 GUTTER=72>
	<P STYLE="margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<FONT COLOR="#329391"><FONT SIZE=1 STYLE="font-size: 8pt"><B>1. Dans
	les phrases simples</B></FONT></FONT></P>
	<P STYLE="margin-top: 0.1cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<FONT COLOR="#3d3d3d">&bull;<FONT SIZE=2 STYLE="font-size: 9pt">	groupes
	nominaux pr&eacute;positionnels</FONT></FONT></P>
	<P STYLE="margin-top: 0.1cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<BR>
	</P>
	<P STYLE="margin-top: 0.1cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<FONT COLOR="#3d3d3d"><FONT SIZE=2 STYLE="font-size: 9pt">.   
	adverbes</FONT></FONT></P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.46cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.49cm">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><SPAN STYLE="font-style: normal">//
	</SPAN>r&ocirc;de <FONT COLOR="#008000">autour de la maison.</FONT><FONT COLOR="#008000">
	</FONT></FONT></FONT>
	</P>
	<P STYLE="margin-left: 0.02cm; margin-top: 0.46cm; margin-bottom: 0cm; background: #ffffff; font-style: normal; line-height: 0.49cm">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt">Il est <FONT COLOR="#008000">ici</FONT></FONT></FONT></P>
</MULTICOL>
<DIV ID="Section4" DIR="LTR">
	<P STYLE="margin-top: 1.03cm; margin-bottom: 0cm"> 
	</P>
</DIV>
<MULTICOL ID="Section5" DIR="LTR" COLS=2 GUTTER=64>
	<P STYLE="margin-bottom: 0cm; background: #ffffff"><FONT SIZE=1 STYLE="font-size: 8pt"><B><FONT COLOR="#329391">2.
	</FONT><FONT COLOR="#329391"><SPAN STYLE="font-style: normal">Dans
	</SPAN></FONT><FONT COLOR="#0196ad"><SPAN STYLE="font-style: normal">les
	</SPAN></FONT><FONT COLOR="#329391"><SPAN STYLE="font-style: normal">phrases
	</SPAN></FONT><FONT COLOR="#0196ad"><SPAN STYLE="font-style: normal">complexes</SPAN></FONT></B></FONT></P>
	<P STYLE="margin-left: 0.03cm; margin-top: 0.24cm; margin-bottom: 0cm; background: #ffffff; font-style: normal">
	<FONT COLOR="#3d3d3d">&bull; <FONT SIZE=2 STYLE="font-size: 9pt">propositions
	subordonn&eacute;es relatives</FONT></FONT></P>
	<P STYLE="margin-top: 0.58cm; margin-bottom: 0cm; background: #ffffff">
	<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><FONT COLOR="#008000"><SPAN STYLE="font-style: normal"><B>O&ugrave;
	</B></SPAN></FONT><FONT COLOR="#008000"><B>tu iras</B></FONT>,
	j'irai.</FONT></FONT></P>
</MULTICOL>
</BODY>
</HTML>
/***
|Name|FontSizePlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#FontSizePlugin|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Resize tiddler text on the fly. The text size is remembered between sessions by use of a cookie.
You can customize the maximum and minimum allowed sizes.
(only affects tiddler content text, not any other text)

Also, you can load a TW file with a font-size specified in the url.
Eg: http://lewcid.googlepages.com/lewcid.html#font:110

!Demo:
Try using the font-size buttons in the sidebar, or in the MainMenu above.

!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Then put {{{<<fontSize "font-size:">>}}} in your SideBarOptions tiddler, or anywhere else that you might like.

!Usage
{{{<<fontSize>>}}} results in <<fontSize>>
{{{<<fontSize font-size: >>}}} results in <<fontSize font-size:>>

!Customizing:
The buttons and prefix text are wrapped in a span with class fontResizer, for easy css styling.
To change the default font-size, and the maximum and minimum font-size allowed, edit the config.fontSize.settings section of the code below.

!Notes:
This plugin assumes that the initial font-size is 100% and then increases or decreases the size by 10%. This stepsize of 10% can also be customized.

!History:
*27-07-06, version 1.0 : prevented double clicks from triggering editing of containing tiddler.
*25-07-06,  version 0.9

!Code
***/

//{{{
config.fontSize={};

//configuration settings
config.fontSize.settings =
{
            defaultSize : 100,  // all sizes in %
            maxSize : 200,
            minSize : 40,
            stepSize : 10
};

//startup code
var fontSettings = config.fontSize.settings;

if (!config.options.txtFontSize)
            {config.options.txtFontSize = fontSettings.defaultSize;
            saveOptionCookie("txtFontSize");}
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");

//macro
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{

               var sp = createTiddlyElement(place,"span",null,"fontResizer");
               sp.ondblclick=this.onDblClick;
               if (params[0])
                           createTiddlyText(sp,params[0]);
               createTiddlyButton(sp,"+","increase font-size",this.incFont);
               createTiddlyButton(sp,"=","reset font-size",this.resetFont);
               createTiddlyButton(sp,"–","decrease font-size",this.decFont);
}

config.macros.fontSize.onDblClick = function (e)
{
             if (!e) var e = window.event;
             e.cancelBubble = true;
             if (e.stopPropagation) e.stopPropagation();
             return false;
}

config.macros.fontSize.setFont = function ()
{
               saveOptionCookie("txtFontSize");
               setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
}

config.macros.fontSize.incFont=function()
{
               if (config.options.txtFontSize < fontSettings.maxSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1)+fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.decFont=function()
{

               if (config.options.txtFontSize > fontSettings.minSize)
                  config.options.txtFontSize = (config.options.txtFontSize*1) - fontSettings.stepSize;
               config.macros.fontSize.setFont();
}

config.macros.fontSize.resetFont=function()
{

               config.options.txtFontSize=fontSettings.defaultSize;
               config.macros.fontSize.setFont();
}

config.paramifiers.font =
{
               onstart: function(v)
                  {
                   config.options.txtFontSize = v;
                   config.macros.fontSize.setFont();
                  }
};
//}}}
FontSizePlugin has been updated to prevent double clicks of the button from triggering editing of the containing tiddler.
/***
|''Name:''|FrenchTranslationPlugin-TW241 |
|''Description:''|Translation of TiddlyWiki 2.4.1 into French |
|''Author:''|ocalTW ( FrenchTranslationPlugin (at) ocalTW (dot) com ) |
|''Source:''|http://www.tiddlywiki.fr#FrenchTranslationPlugin-TW241 |
|''Code Repository:''|http://svn.tiddlywiki.org/Trunk/association/locales/core/fr/locale.fr.js (to be posted) |
|''Version:''|''2.4.1'' |
|''Date:''|August 5th, 2008 |
|''History:''|Translations of v2.1.3 by __Jacques Turbé__, v2.2 by __~BidiX__, v2.3 & v2.4.0 by __ocalTW__ |
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]] |
***/
//{{{

//--
//-- Translateable strings
//--
// Strings in "double quotes" should be translated; strings in 'single quotes' should be left alone
if (config.options.txtUserName == 'YourName') // do not translate this line, but do translate the next line
 merge(config.options,{txtUserName: "VotreNom"});

merge(config.tasks,{
 save: {text: "sauvegarder", tooltip: "Sauvegarde vos modifications dans ce bloc-notes TiddlyWiki", action: saveChanges},
 sync: {text: "synchroniser", tooltip: "Synchronise les modifications avec d'autres fichiers ou d'autres serveurs TiddlyWiki", content: '<<sync>>'},
 importTask: {text: "importer", tooltip: "Importe des éléments et des extensions depuis d'autres fichiers ou d'autres serveurs TiddlyWiki", content: '<<importTiddlers>>'},
 tweak: {text: "réglages", tooltip: "Adapte l'apparence et le comportement de ce bloc-notes TiddlyWiki", content: '<<options>>'},
 upgrade: {text: "mettre à jour", tooltip: "Met à jour le code du noyau TiddlyWiki", content: '<<upgrade>>'},
 plugins: {text: "extensions", tooltip: "Gère les extensions déjà installées", content: '<<plugins>>'}
 });

// Options that can be set in the options panel and/or cookies
merge(config.optionsDesc,{
 txtUserName: "Nom d'utilisateur qui signe les modifications", 
 chkRegExpSearch: "Activer les expressions régulières pour les recherches", 
 chkCaseSensitiveSearch: "La recherche est sensible à la casse des mots", 
 chkIncrementalSearch: "Recherche incremental en mode pas-à-pas",
 chkAnimate: "Activer les animations", 
 chkSaveBackups: "Générer un fichier backup lors de l'enregistrement des modifications", 
 chkAutoSave: "Enregistrer automatiquement les modifications", 
 chkGenerateAnRssFeed: "Générer un flux RSS lors de l'enregistrement des modifications", 
 chkSaveEmptyTemplate: "Générer un fichier de démarrage initial 'empty.html' lors de l'enregistrement des modifications", 
 chkOpenInNewWindow: "Ouvrir un lien externe dans une nouvelle fenêtre", 
 chkToggleLinks: "Fermer les éléments lorsque l'on clique sur des liens qu'ils contiennent", 
 chkHttpReadOnly: "Masquer les caractéristiques d'édition lorsqu'il est accédé par HTTP", 
 chkForceMinorUpdate: "Ne modifier ni le nom de l'utilisateur ni la date lors de l'édition des éléments", 
 chkConfirmDelete: "Demander une confirmation lors d'une suppression d'un élément", 
 chkInsertTabs: "Utiliser la touche 'tab' pour insérer une tabulation au lieu de changer de champs", 
 txtBackupFolder: "Nom du dossier dans lequel seront conservés les backups", 
 txtMaxEditRows: "Nombre maximum de lignes dans les zones d'édition", 
 txtFileSystemCharSet: "Jeux de caractères à utiliser lors de l'enregistrement des modifications (uniquement pour Firefox/Mozilla)"});

merge(config.messages,{
 customConfigError: "Problèmes rencontrés lors du chargement d'extensions. Consulter le 'PluginManager' (menu 'extensions') pour les détails", 
 pluginError: "Erreur : %0", 
 pluginDisabled: "L'extension a été désactivée par positionnement du mot-clé 'systemConfigDisable'", 
 pluginForced: "L'exécution a été forcée à cause du mot-clé 'systemConfigForce'", 
 pluginVersionError: "L'extension a été désactivée car elle nécessite une version plus récente de TiddlyWiki", 
 nothingSelected: "Aucune sélection faite. Il vous faut d'abord sélectionner au moins un item", 
 savedSnapshotError: "Ce bloc-notes TiddlyWiki ne semble pas conforme. Reportez-vous à http://www.tiddlywiki.com/#DownloadSoftware ", 
 subtitleUnknown: "(inconnu)", 
 undefinedTiddlerToolTip: "L'élément '%0' n'est pas encore créé.",
 shadowedTiddlerToolTip: "L'élément '%0' n'est pas encore créé, mais a un contenu par défaut.", 
 tiddlerLinkTooltip: "%0 - %1, %2", 
 externalLinkTooltip: "Lien externe vers %0", 
 noTags: "Il n'y a pas d'éléments avec mot-clés.", 
 notFileUrlError: "Vous devez sauvegarder ce bloc-notes TiddlyWiki dans un fichier avant de pouvoir enregistrer vos modifications", 
 cantSaveError: "Sauvegarde impossible : \n- soit votre navigateur ne permet pas de sauvegarder les sauvegardes (FireFox, Internet Explorer, Safari et Opera fonctionnent s'ils sont configurés correctement),\n- soit le chemin d'accès à votre fichier contient des caractères invalides\n- soit le fichier de ce bloc-notes TiddlyWiki a été déplacé ou renommé", 
 invalidFileError: "Le fichier '%0' choisi ne semble pas être un TiddlyWiki valide", 
 backupSaved: "Sauvegarde effectuée", 
 backupFailed: "Echec de l'enregistrement du fichier de backup", 
 rssSaved: "Flux RSS sauvegardé", 
 rssFailed: "Echec de l'enregistrement du fichier de flux RSS", 
 emptySaved: "Fichier de démarrage initial 'empty.html' enregistré", 
 emptyFailed: "Echec de l'enregistrement du fichier de démarrage initial 'empty.html'", 
 mainSaved: "Fichier principal du bloc-notes TiddlyWiki enregistré", 
 mainFailed: "Echec de l'enregistrement du fichier principal TiddlyWiki. Vos modifications n'ont pas été enregistrées",
 macroError: "Erreur dans la macro <<\%0>>", 
 macroErrorDetails: "Erreur d'exécution de la macro <<\%0>>:\n%1", 
 missingMacro: "Macro non trouvée", 
 overwriteWarning: "Il y a déjà un élément nommé '%0'. Confirmez pour le remplacer", 
 unsavedChangesWarning: "ATTENTION! Les dernières modifications de ce bloc-notes TiddlyWiki n'ont pas été enregistrées.\n\nOK pour les enregistrer\nANNULER pour les abandonner", 
 confirmExit: "--------------------------------\n\nCertaines modifications n'ont pas été enregistrées dans ce bloc-notes TiddlyWiki.\n\n Si vous quittez maintenant vous les perdrez définitievement.\n\n--------------------------------", 
 saveInstructions: "Sauvegarder", 
 unsupportedTWFormat: "Format de TiddlyWiki non supporté '%0'", 
 tiddlerSaveError: "Erreur lors de l'enregistrement de l'élément '%0'", 
 tiddlerLoadError: "Erreur lors du chargement de l'élément '%0'", 
 wrongSaveFormat: "Impossible d'enregistrer avec le format '%0'. Le format standard est utilisé pour sauvegarder.", 
 invalidFieldName: "Nom de champ invalide %0", 
 fieldCannotBeChanged: "Le champ '%0' ne peut être changé", 
 loadingMissingTiddler: "Tentative de récupération de l'élément '%0' à partir du serveur '%1' server à :\n\n'%2' dans l'espace de travail '%3'",
 upgradeDone: "La mise à jour en version %0 est maintenant terminée\n\nCliquez 'OK' pour recharger le TiddlyWiki que vous venez de mettre à jour"});

merge(config.messages.messageClose,{
 text: "fermer",
 tooltip: "fermer cette zone de messages"});

config.messages.backstage = {
 open: {text: "barre de services", tooltip: "Ouvre la barre de services pour effectuer des tâches de rédaction et d'édition"},
 close: {text: "fermer", tooltip: "Fermer la barre de services"},
 prompt: "services : ",
 decal: {
  edit: {text: "éditer", tooltip: "Editer l'élément '%0'"}
 }
};

config.messages.listView = {
 tiddlerTooltip: "Cliquer pour une vue complète de cet élément",
 previewUnavailable: "(aperçu non disponible)"
};

config.messages.dates.months = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre","décembre"];
config.messages.dates.days = ["dimanche", "lundi","mardi", "mercredi", "jeudi", "vendredi", "samedi"]; 
config.messages.dates.shortDays = ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."]; 
// suffixes pour les dates, par exemple "1er",  
config.messages.dates.daySuffixes = ["er","","","","","","","","","", 
  "","","","","","","","","","", 
  "","","","","","","","","","", 
  ""];
config.messages.dates.am = "matin";
config.messages.dates.pm = "après-midi";

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

merge(config.views.wikified.tag,{
 labelNoTags: "pas de mot-clé",
 labelTags: "Mot-clé : ",
 openTag: "Ouvrir le mot-clé '%0'",
 tooltip: "Afficher les éléments ayant pour mot-clé '%0'",
 openAllText: "Tout ouvrir",
 openAllTooltip: "Ouvrir tous les éléments avec ce mot-clé",
 popupNone: "Pas d'autres éléments ayant pour mot-clé '%0'"});

merge(config.views.wikified,{
 defaultText: "L'élément '%0' n'a pas encore été créé. Double-cliquer pour le créer.",
 defaultModifier: "(manquant)",
 shadowModifier: "(élément masqué installé par défaut)",
 dateFormat: "DD MMM YYYY", // Utilisé pour changer le format de la date (ici : "YYYY MMM DD"), ne pas changer les lettres D (jour), M (mois) ou Y (année)
 createdPrompt: "créé le"}); 

merge(config.views.editor,{
 tagPrompt: "Mettre un espace entre chaque mot-clé, si nécessaire [[entre doubles crochets]], ou associer un mot-clé existant",
 defaultText: "Entrer le texte de '%0'"});

merge(config.views.editor.tagChooser,{
 text: "mot-clé",
 tooltip: "Sélectionner les mot-clés existants à associer à cet élément",
 popupNone: "Aucun mot-clé n'a encore été défini",
 tagTooltip: "Associer le mot-clé '%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: "chercher",
 prompt: "Rechercher dans ce bloc-notes TiddlyWiki",
 accessKey: "F",
 successMsg: "%0 éléments répondent au critère %1",
 failureMsg: "Aucun élément ne répond au critère %0"});

merge(config.macros.tagging,{
 label: "éléments ayant pour mot-clé : ",
 labelNotTag: "pas de mot-clé",
 tooltip: "Afficher les éléments ayant pour mot-clé '%0'"});

merge(config.macros.timeline,{
 dateFormat: "DD MMM YYYY"}); // Utilisé pour changer le format de la date (ici : "YYYY MMM DD"), ne pas changer les lettres D (jour), M (mois) ou Y (année)

merge(config.macros.allTags,{
 tooltip: "Afficher les éléments ayant pour mot-clé '%0'",
 noTags: "Aucun élément n'a de mot-clé"});
config.macros.list.all.prompt = "Tous les éléments classés par ordre alphabétique";
config.macros.list.missing.prompt = "Eléments référencés par un lien mais qui ne sont pas non créés";
config.macros.list.orphans.prompt = "Eléments orphelins qui ne pas référencés par un lien dans d'autres éléments";
config.macros.list.shadowed.prompt = "Eléments masqués avec toujours leur contenu initial du modèle de référence TiddlyWiki";
config.macros.list.touched.prompt = "Eléments ayant été modifiés localement";

merge(config.macros.closeAll,{
 label: "tout fermer",
 prompt: "Fermer tous les éléments affichés (sauf ceux en cours d'édition)"});

merge(config.macros.permaview,{
 label: "permalien",
 prompt: "Lien vers l'URL qui référence la page avec tous les éléments actuellement affichés"});

merge(config.macros.saveChanges,{
 label: "sauvegarde des modifications",
 prompt: "Sauvegarde tous les éléments du bloc-notes TiddlyWiki",
 accessKey: "S"});

merge(config.macros.newTiddler,{
 label: "nouvel élément",
 prompt: "Crée un nouvel élément",
 title: "Nouvel Elément",
 accessKey: "N"});

merge(config.macros.newJournal,{
 label: "nouveau journal",
 prompt: "Crée un nouvel élément avec la date courante",
 accessKey: "J"});

merge(config.macros.options,{
 wizardTitle: "Réglage des options avancées",
 step1Title: "Ces options sont enregistrées dans des cookies de votre navigateur",
 step1Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='false' name='chkUnknown'>Afficher les options inconnues</input>",
 unknownDescription: "//(inconnu)//",
 listViewTemplate: {
  columns: [
   {name: 'Option', field: 'option', title: "Option", type: 'String'},
   {name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
   {name: 'Name', field: 'name', title: "Nom", type: 'String'}
   ],
  rowClasses: [
   {className: 'lowlight', field: 'lowlight'}
   ]}
 });

merge(config.macros.plugins,{
 wizardTitle: "Gestionnaire des extensions",
 step1Title: "Extensions actuellement chargées",
 step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
 skippedText: "(Cette extension n'a pas été éxecutée car elle a été ajoutée après le démarrage de ce bloc-notes TiddlyWiki)",
 noPluginText: "Aucune extension n'est installée",
 confirmDeleteText: "Etes vous sûr(e) de vouloir supprimer ces extensions :\n\n%0",
 removeLabel: "Supprimer le mot-clé 'systemConfig'",
 removePrompt: "Supprime le mot-clé 'systemConfig'",
 deleteLabel: "supprimer",
 deletePrompt: "Suppression définitive de ces éléments",
 listViewTemplate: {
  columns: [
   {name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
   {name: 'Tiddler', field: 'tiddler', title: "Elément", type: 'Tiddler'},
   {name: 'Size', field: 'size', tiddlerLink: 'size', title: "Taille", type: 'Size'},
   {name: 'Forced', field: 'forced', title: "Exécution forcée", tag: 'systemConfigForce', type: 'TagCheckbox'},
   {name: 'Disabled', field: 'disabled', title: "Désactivé", tag: 'systemConfigDisable', type: 'TagCheckbox'},
   {name: 'Executed', field: 'executed', title: "Chargé", type: 'Boolean', trueText: "Yes", falseText: "No"},
   {name: 'Startup Time', field: 'startupTime', title: "Durée de lancement", type: 'String'},
   {name: 'Error', field: 'error', title: "Etat", type: 'Boolean', trueText: "Error", falseText: "OK"},
   {name: 'Log', field: 'log', title: "Log", type: 'StringList'}
   ],
  rowClasses: [
   {className: 'error', field: 'error'},
   {className: 'warning', field: 'warning'}
   ]}
 });

merge(config.macros.toolbar,{
 moreLabel: "(suite)",
 morePrompt: "Affichage de commandes supplémentaires"
 });

merge(config.macros.refreshDisplay,{
 label: "réafficher",
 prompt: "Réaffichage du contenu complet du bloc-notes TiddlyWiki"
 });

merge(config.macros.importTiddlers,{
 readOnlyWarning: "Il n'est pas possible d'importer dans un bloc-notes TiddlyWiki qui n'est qu'en lecture seule. Essayez de l'ouvrir en local à partir d'une URL 'file://'",
 wizardTitle: "Importer des éléments depuis un autre fichier ou un serveur",
 step1Title: "Etape 1 : localiser le serveur ou le ficher du bloc-notes TiddlyWiki à importer",
 step1Html: "Spécifier le type du serveur : <select name='selTypes'><option value=''>Choisir ...</option></select><br>Indiquer l'URL ou le chemin : <input type='text' size=50 name='txtPath'><br>... ou rechercher un fichier en local : <input type='file' size=50 name='txtBrowse'><br><hr>... ou selectionner une source pré-définie : <select name='selFeeds'><option value=''>Choisir ...</option></select>",
 openLabel: "ouvrir",
 openPrompt: "Ouvre la connexion vers ce fichier ou ce serveur",
 openError: "Il y a des erreurs lors de l'accès au fichier contenant le bloc-notes TiddlyWiki",
 statusOpenHost: "Hôte en cours d'ouverture",
 statusGetWorkspaceList: "Obtenir la liste des espaces de travail disponibles",
 step2Title: "Etape 2 : choisir l'espace de travail",
 step2Html: "Entrer le nom d'un espace de travail : <input type='text' size=50 name='txtWorkspace'><br>... ou selectionner un espace de travail : <select name='selWorkspace'><option value=''>Choisir ...</option></select>",
 cancelLabel: "annuler",
 cancelPrompt: "Annule cette importation",
 statusOpenWorkspace: "Ouverture de l'espace de travail",
 statusGetTiddlerList: "Obtenir la liste des éléments disponibles",
 errorGettingTiddlerList: "Erreur lors de la récupération de la liste des éléments, cliquer sur 'Annuler' pour recommencer l'opération",
 step3Title: "Etape 3: Choisir les éléments à importer",
 step3Html: "<input type='hidden' name='markList'></input><br><input type='checkbox' checked='true' name='chkSync'>Conserver ces éléments liés à ce serveur pour pouvoir synchroniser avec les changements ultérieurs</input><br><input type='checkbox' name='chkSave'>Enregistrer les détails de ce serveur dans un élément 'systemServer' nommé :</input> <input type='text' size=25 name='txtSaveTiddler'>",
 importLabel: "importer",
 importPrompt: "Importe ces éléments",
 confirmOverwriteText: "Etes-vous sûr de vouloir remplacer ces éléments :\n\n%0",
 step4Title: "Etape 4 : Importe %0 élément(s)",
 step4Html: "<input type='hidden' name='markReport'></input>", // DO NOT TRANSLATE
 doneLabel: "fait",
 donePrompt: "Ferme cet assistant",
 statusDoingImport: "Importe ces éléments",
 statusDoneImport: "Tous les éléments ont été importés",
 systemServerNamePattern: "%2 sur %1",
 systemServerNamePatternNoWorkspace: "%1",
 confirmOverwriteSaveTiddler: "Cet élément '%0' existe déjà. Cliquer sur 'OK' pour le remplacer avec les caractéristiques de ce serveur ou 'Annule' pour les conserver en l'état",
 serverSaveTemplate: "|''Type :''|%0|\n|''URL :''|%1|\n|''Espace de travail :''|%2|\n\nCet élément avait été automatiquement créé pour enregistrer les détails de ce serveur",
 serverSaveModifier: "(Système)",
 listViewTemplate: {
  columns: [
   {name: 'Selected', field: 'Selected', rowName: 'title', type: 'Selector'},
   {name: 'Tiddler', field: 'tiddler', title: "Elément", type: 'Tiddler'},
   {name: 'Size', field: 'size', tiddlerLink: 'size', title: "Taille", type: 'Size'},
   {name: 'Tags', field: 'tags', title: "Mot-clé", type: 'Tags'}
   ],
  rowClasses: [
   ]}
 });

merge(config.macros.upgrade,{
	wizardTitle: "Mettre à jour le code du noyau TiddlyWiki",
	step1Title: "Mettre à jour ou réparer ce bloc-notes TiddlyWiki avant de lancer le processus de mise à jour",
	step1Html: "Vous allez démarrer la mise à jour du code du noyau TiddlyWiki (depuis <a href='%0' class='externalLink' target='_blank'>%1</a>). Le contenu de votre document sera préservé lors de cette mise à jour.<br><br>Il est important de savoir que des mises à jour du code du noyau ont par le passé, déjà eu pour effet de provoquer des effets de bords et des problèmes de compatibilités avec d'autres extensions (plugins). Si vous rencontrez des problèmes lors de cette mise à jour, consultez le site <a href='http://www.tiddlywiki.org/wiki/CoreUpgrades' class='externalLink' target='_blank'>http://www.tiddlywiki.org/wiki/CoreUpgrades</a>",
	errorCantUpgrade: "Impossible d'effectuer la mise à jour de ce bloc-notes TiddlyWiki. Vous ne pouvez effectuer des mises à jour que sur des bloc-notes TiddlyWiki stockés sur un disque local accessible en écriture",
	errorNotSaved: "Vous devez effectuer une sauvegarde de vos modifications avant de lancer le processus de mise à jour",
	step2Title: "Confirmer les détails du processus de mise à jour",
	step2Html_downgrade: "Vous êtes sur le point de faire un retour arrière vers TiddlyWiki version %0 depuis la version %1.<br><br>Faire un tel retour arrière vers une version précédente du code du noyau n'est pas recommandé.",
	step2Html_restore: "Il semble que ce bloc-notes TiddlyWiki utilise déjà la dernière version du code du noyau (%0).<br><br>Vous pouvez tout de même continuer à effectuer la mise à jour, afin de vous assurer que le code du noyau n'a été ni corrompu, ni endommagé",
	step2Html_upgrade: "Vous êtes sur le point de faire la mise à jour vers TiddlyWiki version %0 depuis la version %1",
	upgradeLabel: "mettre à jour",
	upgradePrompt: "Préparation du processus de mise à jour",
	statusPreparingBackup: "Préparation de la sauvegarde",
	statusSavingBackup: "Mise en sécurité du fichier de sauvegarde",
	errorSavingBackup: "Un problème a été rencontré lors de la mise en sécurité du fichier de sauvegarde",
	statusLoadingCore: "Chargement du code du noyau",
	errorLoadingCore: "Erreur lors du chargement du code du noyau",
	errorCoreFormat: "Erreur avec le nouveau code du noyau",
	statusSavingCore: "Sauvegarde du nouveau code du noyau",
	statusReloadingCore: "Rechargement du nouveau code du noyau",
	startLabel: "lancer",
	startPrompt: "Lancer le processus de mise à jour",
	cancelLabel: "annuler",
	cancelPrompt: "Annuler le processus de mise à jour",
	step3Title: "Mise à jour annulée",
	step3Html: "Vous avez annulé le processus de mise à jour"
	});

merge(config.macros.sync,{
 listViewTemplate: {
  columns: [
   {name: 'Selected', field: 'selected', rowName: 'title', type: 'Selector'},
   {name: 'Tiddler', field: 'tiddler', title: "Elément", type: 'Tiddler'},
   {name: 'Server Type', field: 'serverType', title: "Type de serveur", type: 'String'},
   {name: 'Server Host', field: 'serverHost', title: "Hôte serveur", type: 'String'},
   {name: 'Server Workspace', field: 'serverWorkspace', title: "Espace de travail du serveur", type: 'String'},
   {name: 'Status', field: 'status', title: "Etat de la synchronisation", type: 'String'},
   {name: 'Server URL', field: 'serverUrl', title: "URL du serveur", text: "View", type: 'Link'}
   ],
  rowClasses: [
   ],
  buttons: [
   {caption: "Synchronise ces éléments", name: 'sync'}
   ]},
 wizardTitle: "Synchronisation avec des serveurs externes et des fichiers",
 step1Title: "Choisir les éléments à synchroniser",
 step1Html: "<input type='hidden' name='markList'></input>", // DO NOT TRANSLATE
 syncLabel: "synchroniser",
 syncPrompt: "Synchronise ces éléments",
 hasChanged: "Modifié pendant la déconnection",
 hasNotChanged: "Non modifié pendant la déconnexion",
 syncStatusList: {
  none: {text: "...", color: "transparent"},
  changedServer: {text: "Modifié sur le serveur", color: '#80ff80'},
  changedLocally: {text: "Modifié pendant la déconnexion", color: '#80ff80'},
  changedBoth: {text: "Changé pendant la déconnexion et sur le serveur", color: '#ff8080'},
  notFound: {text: "Non trouvé sur le serveur", color: '#ffff80'},
  putToServer: {text: "Modifications enregistrées sur le serveur", color: '#ff80ff'},
  gotFromServer: {text: "Récupéré les modifications depuis le serveur", color: '#80ffff'}
  }
 });

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

merge(config.commands.closeTiddler,{
 text: "fermer",
 tooltip: "Fermeture de cet élément"});

merge(config.commands.closeOthers,{
 text: "isoler",
 tooltip: "Fermeture de tous les autres éléments"});

merge(config.commands.editTiddler,{
 text: "éditer",
 tooltip: "Edition de cet élément",
 readOnlyText: "voir",
 readOnlyTooltip: "Affichage de la source de cet élément"});

merge(config.commands.saveTiddler,{
 text: "valider",
 tooltip: "Validation des modifications effectuées sur cet élément"});

merge(config.commands.cancelTiddler,{
 text: "annuler",
 tooltip: "Abandon des modifications effectuées sur cet élément",
 warning: "Confirmez-vous l'abandon de vos modifications de l'élément '%0'?",
 readOnlyText: "retour",
 readOnlyTooltip: "Retour à l'affichage normal de cet élément"});

merge(config.commands.deleteTiddler,{
 text: "supprimer",
 tooltip: "Suppression de cet élément",
 warning: "Confirmez-vous la suppression de '%0'?"});

merge(config.commands.permalink,{
 text: "permalien",
 tooltip: "Création d'un permalien pour cet élément"});

merge(config.commands.references,{
 text: "références",
 tooltip: "Affichage des éléments qui font référence à l'élément courant",
 popupNone: "Pas de référent(s)"});

merge(config.commands.jump,{
 text: "aller vers",
 tooltip: "Possibilité d'accès direct à l'un des éléments déjà ouverts dans le bloc-notes TiddlyWiki courant"});

merge(config.commands.syncing,{
 text: "synchronisation",
 tooltip: "Contrôle de la synchronisation de cet élément avec un serveur ou un fichier externe",
 currentlySyncing: "<div>Actuellement en cours de synchronisation avec <span class='popupHighlight'>'%0'</span> vers :</"+"div><div>host: <span class='popupHighlight'>%1</span></"+"div><div>workspace: <span class='popupHighlight'>%2</span></"+"div>", // Note escaping of closing <div> tag
 notCurrentlySyncing: "Pas de synchronisation en cours",
 captionUnSync: "Arrête la synchronisation de cet élément",
 chooseServer: "Synchronise cet élément avec un autre serveur :",
 currServerMarker: "\u25cf ",
 notCurrServerMarker: "  "});

merge(config.commands.fields,{
 text: "champs",
 tooltip: "Affichage des champs supplémentaires de cet élément",
 emptyText: "Il n'y a pas de champs supplémentaires pour cet élément",
 listViewTemplate: {
  columns: [
   {name: 'Field', field: 'field', title: "Champ", type: 'String'},
   {name: 'Value', field: 'value', title: "Valeur", type: 'String'}
   ],
  rowClasses: [
   ],
  buttons: [
   ]}});

merge(config.shadowTiddlers,{
 DefaultTiddlers: "PourCommencer",
 MainMenu: "PourCommencer",
 TranslatedGettingStarted: "Pour utiliser ce //bloc-notes// TiddlyWiki, commencez par modifier les //éléments// suivants (''//tiddlers//'' dans le jargon TiddlyWiki) :\n* __SiteTitle__ et __SiteSubtitle__ : Le titre et le sous-titre de ce //bloc-notes// TiddlyWiki. Après modification, ils apparaîtront aussi dans la barre de titre du navigateur)\n* __MainMenu__: Le menu principal (généralement à gauche)\n* __DefaultTiddlers__ : La liste les noms des //éléments// que vous voulez voir s'afficher à l'ouverture de ce //bloc-notes// TiddlyWiki. \n* Entrez également le ''nom d'utilisateur'' avec lequel seront signés vos ajouts ou vos modifications dans les //éléments// :\n** <<option txtUserName>>",
 SiteTitle: "Mon TiddlyWiki",
 SiteSubtitle: "organiseur personnel web interactif et autoporteur",
 SiteUrl: "http://www.tiddlywiki.com/",
 OptionsPanel: "Les options de configuration de ce bloc-notes TiddlyWiki sont sauvegardées dans des cookies de votre navigateur.\n\nNom d'utilisateur avec lequel seront signés vos ajouts ou vos modifications dans les éléments (par exemple Jeremy_Ruston).\n\n<<option txtUserName>>\n<<option chkSaveBackups>> Backup de chaque version\n<<option chkAutoSave>> Backup à chaque modification\n<<option chkRegExpSearch>> Expression régulières dans les recherches\n<<option chkCaseSensitiveSearch>> Respecter la casse dans les recherches\n<<option chkAnimate>> Animations à l'ouverture des éléments\n\n----\nVoir aussi [[Options Avancées|AdvancedOptions]]",
 SideBarOptions: '<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal "DD MMM YYYY" "journal">><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel "options  »" "Modifie les options supplémentaires de ce bloc-notes TiddlyWiki">>',
 SideBarTabs: '<<tabs txtMainTab "Chrono" "Affichage chronologique" TabTimeline "Alpha" "Liste alphabétique des éléments" TabAll "Mot-clé" "Liste de tous les mot-clés" TabTags "Autres" "Autres listes" TabMore>>',
 TabMore: '<<tabs txtMoreTab "Manquants" "Eléments manquants" TabMoreMissing "Orphelins" "Eléments orphelins" TabMoreOrphans "Masqués" "Eléments masqués" TabMoreShadowed>>'});

merge(config.annotations,{
 AdvancedOptions: "Cet élément masqué permet d'accéder à différentes options avancées",
 ColorPalette: "Les valeurs de cet élément masqué détermine la palette des couleurs utilisées pour l'interface utilisateur de TiddlyWiki",
 DefaultTiddlers: "Les éléments enumérés dans cet élément seront automatiquement affichés au démarrage de TiddlyWiki",
 EditTemplate: "Le gabarit HTML dans cet élément masqué détermine la manière dont les éléments sont présentés lorsqu'ils sont édités",
 GettingStarted: "Cet élément fournit quelques instructions basiques pour utiliser un bloc-notes TiddlyWiki",
 ImportTiddlers: "Cet élément par défaut fournit l'accès à l'interface d'importation d'éléments",
 MainMenu: "Le contenu de cet élément défini le menu de la colonne de gauche de cette feuille HTML",
 MarkupPreHead: "Le contenu de cet élément est inséré au début de la section <head> du fichier HTML de ce bloc-notes TiddlyWiki",
 MarkupPostHead: "Le contenu de cet élément est inséré à la fin de la section <head> du fichier HTML de ce bloc-notes TiddlyWiki",
 MarkupPreBody: "Le contenu de cet élément est inséré au début de la section <body> du fichier HTML de ce bloc-notes TiddlyWiki",
 MarkupPostBody: "Le contenu de cet élément est inséré à la fin de la section <body> du fichier HTML de ce bloc-notes TiddlyWiki, immédiatement avant le bloc 'script'",
 OptionsPanel: "Le contenu de cet élément par défaut est utilisé par le panneau déroulant des options dans la colonne de droite de cette feuille HTML",
 PageTemplate: "Le gabarit HTML de cet élément masqué détermine la mise en page générale de ce bloc-notes TiddlyWiki",
 PluginManager: "Cet élément masqué permet d'accéder au gestionnaire d'extensions",
 SideBarOptions: "Le contenu de cet élément par défaut est utilisé par le panneau des options dans la barre de droite de la feuille HTML",
 SideBarTabs: "Le contenu de cet élément par défaut est utilisé par le panneau des onglets dans la barre de droite de la feuille HTML",
 SiteSubtitle: "Cet élément est utilisé comme deuxième partie du titre de la page",
 SiteTitle: "Cet élément est utilisé comme première partie du titre de la page",
 SiteUrl: "Cet élément par défaut doit contenir l'URL complet du site utilisé pour la publication",
 StyleSheetColours: "Cet élément par défaut contient des définitions CSS concernant les couleurs des composants de page",
 StyleSheet: "Cet éléments par défaut contient des définitions CSS personnalisées",
 StyleSheetLayout: "Cet éléments par défaut contient des définitions CSS concernant la mise en page de composants",
 StyleSheetLocale: "Cet élément par défaut contient des définitions CSS concernant la traduction ",
 StyleSheetPrint: "Cet élément par défaut contient des définitions CSS pour l'impression",
 TabAll: "Le contenu de cet élément par défaut est utilisé par le panneau de l'onglet 'Alpha' dans la colonne de droite de cette feuille HTML",
 TabMore: "Cet élément par défaut contient le contenu de l'onglet 'Suite' dans la barre de droite de l'écran",
 TabMoreMissing: "Cet élément par défaut contient le contenu de l'onglet 'Manquants' dans la colonne de droite de cette feuille HTML",
 TabMoreOrphans: "Cet élément par défaut contient le contenu de l'onglet 'Orphelins' dans la colonne de droite de cette feuille HTML",
 TabMoreShadowed: "Cet élément par défaut contient le contenu de l'onglet 'Défaut' dans la colonne de droite de cette feuille HTML",
 TabTags: "Cet élément par défaut contient le contenu de l'onglet 'Mot-clé' dans la colonne de droite de cette feuille HTML",
 TabTimeline: "Cet élément par défaut contient le contenu de l'onglet 'Chrono' dans la colonne de droite de cette feuille HTML",
 ViewTemplate: "Le gabarit HTML dans cet élément par défaut determine comment sont présentés les éléments"
 });
//}}}
Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt. Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt. Eorum una, pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones. Belgae ab extremis Galliae finibus oriuntur, pertinent ad inferiorem partem fluminis Rheni, spectant in septentrionem et orientem solem. Aquitania a Garumna flumine ad Pyrenaeos montes et eam partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis et septentriones.
<<fontSize "font-size:">>

<<closeAll>><<permaview>><<newTiddler>><<upload >>UploadForm<<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
Autour de Harrius Potter et philosophi lapis (extrait) de J.K.Rowling (translation by Peter Needham, Bloomsbury ed.) 

Dies natalis Dudlei – num eum oblitus erat ? Harrius lente e lecto surrexit et tibialia quaerere coepit. Bina sub lecto invenit et, cum araneum ab uno detraxisset, ea induit. Harrius assuetus erat araneis quod armarium sub scalis situm erat plenum eorum, et ibi Harrius dormiebat. 
Vestitus per atrium iit in culinam. Mensa paene celata est donis quae plurima die natali Dudley accepturus erat. Dudley visus est habere novum instrumentum computatorium quod volebat, ne dicam alterum instrumentum televisificum et birotulam cursoriam. Veram causam cur Dudley birotulam cursoriam vellet Harrius nesciebat quod Dudley obesissimus erat et exercitationem omnem oderat –scilicet nisi occasionem habebat aliquem pulsandi. Praesertim placebat ei pulsare Harrium, sed raro eum capiebat. Harrius, quamquam speciem cursoris non habebat, re vera erat celerrimus. 
 

L’anniversaire de Dudley&nbsp;! Comment avait-il pu l’oublier&nbsp;? Harry se glissa lentement hors du lit et chercha ses chaussettes. Il en trouva une paire sous le lit, et après avoir chassé l’araignée qui s’était installée dans l’une d’elles, il les enfila. Harry était habitué aux araignées. Le placard sous l’escalier en était plein. Or c’était là qu’il dormait. 
Lorsqu’il eut fini de s’habiller, il sortit dans le couloir et alla dans la cuisine. La table  avait presque entièrement disparu sous une montagne de cadeaux. Apparemment, Dudley avait eu le nouvel ordinateur qu’il désirait tant, sans parler de la deuxième télévision et du vélo de course. La raison pour laquelle Dudley voulait un vélo de course restait mystérieuse aux yeux de Harry (mot à mot : Harry ne savait pas la véritable cause pour laquelle Dudley voulait un vélo de course), car Dudley était très gros et détestait faire du sport – sauf bien sûr lorsqu’il s’agissait de boxer quelqu’un. Son punching-ball préféré, c’était Harry, mais il était rare qu’il parvienne à l’attraper. Même s’il n’en avait pas l’air, Harry était très rapide.  

(Traduction Folio Junior) 
 

Vocabulaire : 
 
Araneus, -i, m. : araignée 
Birotus, -a, -um : qui a deux roues 
Cursor, -oris, m. : coureur 
Instrumentum, -i, n. : matériel, outillage 
Lectum ,-i, n. : lit 
Mensa ,-ae, f. : la table 
Natalis ,-e : de naissance, d’anniversaire 
Odi ,odisti, odisse (verbe à la forme de parfait mais se traduisant par un présent) : haïr 
Placeo, -es, -ere, -ui, -itum : plaire, être agréable à (+ datif) : placet ei : il lui plaît de… 
Praesertim : surtout 
Pulso, -as, -are, -avi, -atum : bousculer, heurter 
Quamquam : même si, bien que 
Scalae, -arum, f. pl . : escaliers 
Species, -ei, f. : aspect, apparence. 
Tibiale, -is, n. : sorte de bas, bandes qui enveloppaient la jambe pour la tenir chaude. 
 

 
Activités sur le texte d’Harry Potter traduit en latin 


Chaque réponse vaut 1 point. 

1) Comment le mot « atrium » a-t-il été traduit ici ? 

2) Comment le mot « ordinateur » a-t-il été traduit en latin ? 

3) Comment le mot « télévision » a-t-il été traduit en latin ? 

4) Comment l’expression « vélo de course » a-t-elle été traduite en latin ? 

5) Quel est le cas de « speciem » ? 

6) Quel est le cas de « cursoris » ? 

7) A quelle déclinaison appartient le mot « speciem » ? 

8) Déclinez le mot « speciem » en entier, au singulier et au pluriel. (3 points, -1 pt par erreur) 




9) Trouvez dans le texte un mot qui appartient à la même déclinaison que « speciem ». 

10) A quelle déclinaison appartient le mot « cursoris » ? 

11) Déclinez le mot « cursoris » en entier, au singulier et au pluriel. (3 points, -1 point par erreur). 




12) Trouvez les mots latins qui correspondent à la traduction « détestait faire du sport ». 


13) Proposez pour le passage trouvé à la question précédente une traduction plus proche du texte. 





14) Récrivez les 2 dernières phrases du texte latin en mettant les verbes au présent, c’est-à-dire en commençant par : praesertim placet ei….(3 points)
!!Du Bellay

Heureux qui, comme Ulysse, a fait un beau voyage, Du bellay
Heureux qui, comme Ulysse, a fait un beau voyage,
Ou comme cestuy-là qui conquit la toison,
Et puis est retourné, plein d'usage et raison,
Vivre entre ses parents le reste de son âge !

Quand reverrai-je, hélas, de mon petit village
Fumer la cheminée, et en quelle saison
Reverrai-je le clos de ma pauvre maison,
Qui m'est une province, et beaucoup davantage ?

Plus me plaît le séjour qu'ont bâti mes aïeux,
Que des palais Romains le front audacieux,
Plus que le marbre dur me plaît l'ardoise fine :

Plus mon Loir gaulois, que le Tibre latin,
Plus mon petit Liré, que le mont Palatin,
Et plus que l'air marin la doulceur angevine.


!!Parole de chanson Heureux qui comme Ulysse , Brassens


Heureux qui comme Ulysse
A fait un beau voyage
Heureux qui comme Ulysse
A vu cent paysages
Et puis a retrouvé après
Maintes traversées
Le pays des vertes allées

Par un petit matin d'été
Quand le soleil vous chante au cœur
Qu'elle est belle la liberté
La liberté

Quand on est mieux ici qu'ailleurs
Quand un ami fait le bonheur
Qu'elle est belle la liberté
La liberté

Avec le soleil et le vent
Avec la pluie et le beau temps
On vivait bien contents
Mon cheval, ma Provence et moi
Mon cheval, ma Provence et moi

Heureux qui comme Ulysse
A fait un beau voyage
Heureux qui comme Ulysse
A vu cent paysages
Et puis a retrouvé après
Maintes traversées
Le pays des vertes allées

Par un joli matin d'été
Quand le soleil vous chante au cœur
Qu'elle est belle la liberté
La liberté

Quand c'en est fini des malheurs
Quand un ami sèche vos pleurs
Qu'elle est belle la liberté
La liberté

Battus de soleil et de vent
Perdus au milieu des étangs
On vivra bien contents
Mon cheval, ma Camargue et moi
Mon cheval, ma Camargue et moi

!!Ulysse par Ridan: Parole de Ulysse:

Heureux qui, comme Ulysse, a fait un beau voyage, 
Ou comme cestuy-là qui conquit la toison, 
Et puis est retourné, plein d'usage et raison, 
Vivre entre ses parents le reste de son âge ! 

Quand reverrai-je, hélas, de mon petit village, 
Fumer la cheminée et en quelle saison 

Mais quand reverrai-je, de mon petit village, 
fumer la cheminée et en quelle saison, 
Mais quand reverrai-je ? 

Reverrai-je le clos de ma pauvre maison 
Qui m'est une province, et beaucoup davantage ? 
Plus me plaît le séjour qu'ont bâti mes aïeux, 
Que des palais Romains le front audacieux, 
Plus que le marbre dur me plaît l'ardoise fine, 

Plus mon Loir Gaulois, que le Tibre latin, 
Plus mon petit Liré, que le mont Palatin, 
Et plus que l'air marin la douceur angevine. 

Mais quand reverrai-je, de mon petit village, 
fumer la cheminée et en quelle saison, 
Mais quand reverrai-je ? 

J'ai traversé les mers à la force de mes bras, 
Seul contre les Dieux, perdu dans les marais 
Retranché dans une cale, et mes vieux tympans percés, 
Pour ne plus jamais entendre les sirènes et leurs voix. 

Nos vies sont une guerre où il ne tiens qu'à nous 
De nous soucier de nos sorts, de trouver le bon choix, 
De nous méfier de nos pas, et de toute cette eau qui dort, 
Qui pollue nos chemins, soit disant pavés d'or. 

Mais quand reverrai-je, de mon petit village, 
fumer la cheminée et en quelle saison, mais quand reverrai-je ? 

Mais quand reverrai-je ? 
Mais quand reverrai-je ? 
Mais quand reverrai-je ? 
Mais quand reverrai-je ?
/***
|Name:|HideWhenMacro|
|Author:|SimonBaird|
|Source:|http://tiddlyspot.com/mptw/#HideWhenMacro|
|Version:|1.0.1|
|Date:|30-Jul-2006|

!Description
Implements hideWhen and showWhen macros for use in ViewTemplate

!Example
{{{<div macro="showWhen tiddler.tags.contains('Task')">[[TaskToolbar]]</div>}}}

***/
//{{{

merge(config.macros,{

	hideWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		if (eval(paramString)) {
			removeChildren(place);
			place.parentNode.removeChild(place);
		}
	}},

	showWhen: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
		config.macros.hideWhen.handler(place,macroName,params,wikifier,'!('+paramString+')',tiddler);
	}}

});

//}}}
!Les héros romains. 
Lucrèce
Lucius Junius Brutus
Horatius Coclès
Caius Mucius Scaevola
Clélie
Titus Manlius Torquatus
Menenius Agrippa
Coriolan
Cincinnatus
Camille

!Sitographie
# [[Site d'un collège|http://www.etab.ac-caen.fr/college-lefavrais/latin/4eme/heros/index.html]]
# [[Document de travail d'une classe de lycée|http://www.ac-grenoble.fr/lycee/diois/Latin/IMG/Expose%20-%20heros%20de%20la%20Republique%20romaine.pdf]], avec des liens très utiles
# Une [[séquence|http://lettres.ac-dijon.fr/archives/espapro/pedago/langanc/col/heroms/heroms.htm]] sur les héros romains et leur représentation.

!!Historicisation du héros romain
//Tiré d'un [[exposition de la BNF sur les héros|http://classes.bnf.fr/heros/arret/02_1.htm]]//

Le héros semble à la fois plus rare et plus répandu à Rome qu’en Grèce. Le terme de héros est entré dans le latin classique avec le sens de demi-dieu pour acquérir rapidement celui d’homme de valeur supérieure, comme chez Cicéron. À la différence des Grecs, les Romains ont, du moins dans un premier temps, accepté plus difficilement l’existence de personnages intermédiaires entre les hommes et les dieux.
Le héros romain présente une caractéristique essentielle : même s’il vient de contrées lointaines (Hercule, Énée), il est fortement historicisé. Rome a fondu et amalgamé des matériaux mythologiques hétéroclites dans ce qui pourrait ressembler à un "melting pot héroïque". Les cultes héroïques s’adressent à des figures humaines comme des bergers, des bouviers (Romulus, Hercule), des chefs d’armée (Énée), des rois (Romulus, Servius Tullius), qui participent et organisent la vie des hommes, les initient à l’humanitas, souvent après avoir grandi à l’écart, dans la nature sauvage Les héros mythiques se métamorphosent en grands hommes de l’histoire romaine. Ainsi, d’Homère à Virgile, la légende d’Énée s’est-elle élaborée sur plusieurs siècles, transformant le personnage de guerrier troyen en "pieux Énée", un "passeur" qui transporte les Pénates de Troie dans le Latium et fonde Lavinium. Les anciens ne pensent aucune rupture entre le temps mythique et le temps historique. Dans l’Énéide, Virgile appelle le fils d’Énée Ascagne ou Iule, car il en fait l’ancêtre de la famille Julia, celle de Jules César, qui prétend ainsi descendre de Vénus. Les grandes figures héroïques de Rome sont autant d’exempla, anecdotes édifiantes qui mettent en scène des personnages célèbres, conservées précieusement dans les archives de chaque gens, famille unie par un même nom et formant un lignage aristocratique. À Rome, le héros devient un citoyen modèle qui participe à un événement historique. Loin des chevauchements de temps et de lieux propres aux héros mythologiques, il est, à l’image de Cincinnatus – qui délaisse seize jours ses labours, le temps de repousser l’ennemi, puis revient cultiver ses champs –, l’homme d’une seule mission et dont la virtus est toute patriotique.
Mais le passage de la République à l’Empire coïncide avec une confiscation de l’héroïsme par le souverain, qui est divinisé après sa mort. Si Romulus, roi des temps légendaires ainsi que Jules César furent admis parmi les dieux, Auguste est, en 14, le premier empereur à bénéficier, de la part du Sénat, d’une consecratio, équivalent latin de l’apothéose. Dire d’un empereur qu’il est divus signifie que le défunt passe de l’humanité à la divinité. Le culte des divi, étendu à la famille de l’empereur, s’est prolongé pendant trois siècles à Rome, occupant une place centrale dans la religion impériale.
//{{{
// version: beta 1.1
//replace macro buttons with icons
// params[0] = image location
//params[1] = image width
//params[2] = image height
//params[3] = image title (optional)
config.macros.icon={};
config.macros.icon.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{

               if (place.lastChild.tagName!="BR")
                     {
                     var tempTitle = place.lastChild.firstChild.title;
                     removeChildren(place.lastChild);
                     place.lastChild.className = "imgLink";
                     var img = createTiddlyElement(place.lastChild,"img");
                     img.src = params[0];
                     if (params[3])
                         img.title = params[3];
                     img.width= params[1];
                     img.height =params[2];
                     }
};

//use icons for toolbar commands.
// used in view template like:
// <span macro='commandIcon jump jump.bmp'></span>
//params[0] = command name
//params[1] = image location
config.macros.commandIcon={};
config.macros.commandIcon.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{if(!e) var e = window.event;
    var img = createTiddlyElement(place,"img",null,"toolbarImg");
    img.src = params[1];
    img.onclick = function(){config.commands[params[0]].handler(e,place,story.findContainingTiddler(place).getAttribute("tiddler"));};
    img.title = config.commands[params[0]].tooltip;
}

setStylesheet(".toolbarImg {vertical-align: middle; cursor:pointer;}\n","commandIconStyles"); 

//}}}
Tentative version of IconMacro, meant to replace buttons created by macros with images. Will only work for some macros and not at all for commands.... In use in the HoverMenu on the right.

Update: commandIcon macro added, that can be used to create Image icons that launch toolbar commands
<<include "http://www.cartailler.net/TW/stock.html">>
<<include "http://www.cartailler.net/TW/lecture.html">>
<<include "file:///C:/Documents and Settings/mathieu/Bureau/stock.html">>
<<include "file:///C:/Documents%20and%20Settings/mathieu/Bureau/lecture.html">>
/***
|''Name:''|abego.IncludePlugin|
|''Version:''|1.0.0 (2007-02-08)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IncludePlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IncludePlugin Documentation|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]]|
|''Community:''|([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23IncludePlugin]]) ([[Support|http://groups.google.com/group/TiddlyWiki]])|
|''Copyright:''|&copy; 2007 [[abego Software|http://www.abego-software.de]]|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''~CoreVersion:''|2.1.3|
|''Browser:''|Firefox 1.5.0.9 or better; Internet Explorer 6.0|
***/
/***
This plugin's source code is compressed (and hidden). Use this [[link|http://tiddlywiki.abego-software.de/archive/IncludePlugin/Plugin-Include-src.1.0.0.js]] to get the readable source code.
***/
///%
if(!window.abego){window.abego={};}var invokeLater=function(_1,_2,_3){return abego.invokeLater?abego.invokeLater(_1,_2,_3):setTimeout(_1,_2);};abego.loadFile=function(_4,_5,_6){var _7=function(_8,_9,_a,_b,_c){return _8?_5(_a,_b,_9):_5(undefined,_b,_9,"Error loading %0".format([_b]));};if(_4.search(/^((http(s)?)|(file)):/)!=0){if(_4.search(/^((.\:\\)|(\\\\)|(\/))/)==0){_4="file://"+_4;}else{var _d=document.location.toString();var i=_d.lastIndexOf("/");_4=_d.substr(0,i+1)+_4;}_4=_4.replace(/\\/mg,"/");}loadRemoteFile(_4,_7,_6);};abego.loadTiddlyWikiStore=function(_f,_10,_11,_12){var _13=function(_14,_15){if(_12){_12(_14,"abego.loadTiddlyWikiStore",_15,_f,_11);}};var _16=function(_17,_18){var _19=_18.indexOf(startSaveArea);var _1a=_18.indexOf("<!--POST-BODY-END--"+">");var _1b=_18.lastIndexOf(endSaveArea,_1a==-1?_18.length:_1a);if((_19==-1)||(_1b==-1)){return config.messages.invalidFileError.format([_f]);}var _1c="<html><body>"+_18.substring(_19,_1b+endSaveArea.length)+"</body></html>";var _1d=document.createElement("iframe");_1d.style.display="none";document.body.appendChild(_1d);var doc=_1d.document;if(_1d.contentDocument){doc=_1d.contentDocument;}else{if(_1d.contentWindow){doc=_1d.contentWindow.document;}}doc.open();doc.writeln(_1c);doc.close();var _1f=doc.getElementById("storeArea");_17.loadFromDiv(_1f,"store");_1d.parentNode.removeChild(_1d);return null;};var _20=function(_21){_13("Error when loading %0".format([_f]),"Failed");_10(undefined,_f,_11,_21);return _21;};var _22=function(_23){_13("Loaded %0".format([_f]),"Done");_10(_23,_f,_11);return null;};var _24=function(_25,_26,_27,_28){if(_25===undefined){_20(_28);return;}_13("Processing %0".format([_f]),"Processing");var _29=config.messages.invalidFileError;config.messages.invalidFileError="The file '%0' does not appear to be a valid TiddlyWiki file";try{var _2a=new TiddlyWiki();var _2b=_16(_2a,_25);if(_2b){_20(_2b);}else{_22(_2a);}}catch(ex){_20(exceptionText(ex));}finally{config.messages.invalidFileError=_29;}};_13("Start loading %0".format([_f]),"Started");abego.loadFile(_f,_24,_11);};(function(){if(abego.TiddlyWikiIncluder){return;}var _2c="waiting";var _2d="loading";var _2e=1000;var _2f=-200;var _30=-100;var _31=-300;var _32;var _33=[];var _34={};var _35=[];var _36;var _37=[];var _38;var _39=function(){if(_32===undefined){_32=config.options.chkUseInclude===undefined||config.options.chkUseInclude;}return _32;};var _3a=function(url){return "No include specified for %0".format([url]);};var _3c=function(){var _3d=_35;_35=[];if(_3d.length){for(var i=0;i<_37.length;i++){_37[i](_3d);}}};var _3f;var _40=function(){if(_36!==undefined){clearInterval(_36);}_3f=0;var _41=function(){abego.TiddlyWikiIncluder.sendProgress("","","Done");};_36=setInterval(function(){_3f++;if(_3f<=10){return;}clearInterval(_36);_36=undefined;abego.TiddlyWikiIncluder.sendProgress("Refreshing...","","");refreshDisplay();invokeLater(_41,0,_2f);},0);};var _42=function(_43){var _44;for(var i=0;i<_33.length;i++){var _46=abego.TiddlyWikiIncluder.getStore(_33[i]);if(_46&&(_44=_43(_46,_33[i]))){return _44;}}};var _47=function(){if(!window.store){return invokeLater(_47,100);}var _48=store.fetchTiddler;store.fetchTiddler=function(_49){var t=_48.apply(this,arguments);if(t){return t;}if(config.shadowTiddlers[_49]!==undefined){return undefined;}if(_49==config.macros.newTiddler.title){return undefined;}return _42(function(_4b,url){var t=_4b.fetchTiddler(_49);if(t){t.includeURL=url;}return t;});};if(_33.length){_40();}};var _4e=function(){if(!window.store){return invokeLater(_4e,100);}var _4f=store.getTiddlerText("IncludeList");if(_4f){wikify(_4f,document.createElement("div"));}};var _50=function(_51){var _52=function(){var _53=store.forEachTiddler;var _54=function(_55){var _56={};var _57;var _58=function(_59,_5a){if(_56[_59]){return;}_56[_59]=1;if(_57){_5a.includeURL=_57;}_55.apply(this,arguments);};_53.call(store,_58);for(var n in config.shadowTiddlers){_56[n]=1;}_56[config.macros.newTiddler.title]=1;_42(function(_5c,url){_57=url;_5c.forEachTiddler(_58);});};store.forEachTiddler=_54;try{return _51.apply(this,arguments);}finally{store.forEachTiddler=_53;}};return _52;};var _5e=function(_5f,_60){return _5f[_60]=_50(_5f[_60]);};abego.TiddlyWikiIncluder={};abego.TiddlyWikiIncluder.setProgressFunction=function(_61){_38=_61;};abego.TiddlyWikiIncluder.getProgressFunction=function(_62){return _38;};abego.TiddlyWikiIncluder.sendProgress=function(_63,_64,_65){if(_38){_38.apply(this,arguments);}};abego.TiddlyWikiIncluder.onError=function(url,_67){displayMessage("Error when including '%0':\n%1".format([url,_67]));};abego.TiddlyWikiIncluder.hasPendingIncludes=function(){for(var i=0;i<_33.length;i++){var _69=abego.TiddlyWikiIncluder.getState(_33[i]);if(_69==_2c||_69==_2d){return true;}}return false;};abego.TiddlyWikiIncluder.getIncludes=function(){return _33.slice();};abego.TiddlyWikiIncluder.getState=function(url){var s=_34[url];if(!s){return _3a(url);}return typeof s=="string"?s:null;};abego.TiddlyWikiIncluder.getStore=function(url){var s=_34[url];if(!s){return _3a(url);}return s instanceof TiddlyWiki?s:null;};abego.TiddlyWikiIncluder.include=function(url,_6f){if(!_39()||_34[url]){return;}var _70=this;_33.push(url);_34[url]=_2c;var _71=function(_72,_73,_74,_75){if(_72===undefined){_34[url]=_75;_70.onError(url,_75);return;}_34[url]=_72;_35.push(url);invokeLater(_3c);};var _76=function(){_34[url]=_2d;abego.loadTiddlyWikiStore(url,_71,null,_38);};if(_6f){invokeLater(_76,_6f);}else{_76();}};abego.TiddlyWikiIncluder.forReallyEachTiddler=function(_77){var _78=function(){store.forEachTiddler(_77);};_50(_78).call(store);};abego.TiddlyWikiIncluder.getFunctionUsingForReallyEachTiddler=_50;abego.TiddlyWikiIncluder.useForReallyEachTiddler=_5e;abego.TiddlyWikiIncluder.addListener=function(_79){_37.push(_79);};abego.TiddlyWikiIncluder.addListener(_40);if(config.options.chkUseInclude===undefined){config.options.chkUseInclude=true;}config.shadowTiddlers.AdvancedOptions+="\n<<option chkUseInclude>> Include ~TiddlyWikis (IncludeList | IncludeState | [[help|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]])\n^^(Reload this ~TiddlyWiki to make changes become effective)^^";config.shadowTiddlers.IncludeState="<<includeState>>";var _7a=function(e,_7c,_7d){if(!anim||!abego.ShowAnimation){e.style.display=_7c?"block":"none";return;}anim.startAnimating(new abego.ShowAnimation(e,_7c,_7d));};abego.TiddlyWikiIncluder.getDefaultProgressFunction=function(){setStylesheet(".includeProgressState{\n"+"background-color:#FFCC00;\n"+"position:absolute;\n"+"right:0.2em;\n"+"top:0.2em;\n"+"width:7em;\n"+"padding-left:0.2em;\n"+"padding-right:0.2em\n"+"}\n","abegoInclude");var _7e=function(){var e=document.createElement("div");e.className="includeProgressState";e.style.display="none";document.body.appendChild(e);return e;};var _80=_7e();var _81=function(_82){removeChildren(_80);createTiddlyText(_80,_82);_7a(_80,true,0);};var _83=function(){invokeLater(function(){_7a(_80,false,_2e);},100,_30);};var _84=function(_85,_86,_87,url,_89){if(_87=="Done"||_87=="Failed"){_83();return;}if(_86=="abego.loadTiddlyWikiStore"){_3f=0;if(_87=="Processing"){_81("Including...");}}else{_81(_85);}};return _84;};abego.TiddlyWikiIncluder.setProgressFunction(abego.TiddlyWikiIncluder.getDefaultProgressFunction());config.macros.include={};config.macros.include.handler=function(_8a,_8b,_8c,_8d,_8e,_8f){_8c=_8e.parseParams("url",null,true,false,true);var _90=parseInt(getParam(_8c,"delay","0"));var _91=_8c[0]["url"];var _92=getFlag(_8c,"hide",false);if(!_92){createTiddlyText(createTiddlyElement(_8a,"code"),_8d.source.substring(_8d.matchStart,_8d.nextMatch));}for(var i=0;_91&&i<_91.length;i++){abego.TiddlyWikiIncluder.include(_91[i],_90);}};config.macros.includeState={};config.macros.includeState.handler=function(_94,_95,_96,_97,_98,_99){var _9a=function(){var s="";var _9c=abego.TiddlyWikiIncluder.getIncludes();if(!_9c.length){return "{{noIncludes{\nNo includes or 'include' is disabled (see AdvancedOptions)\n}}}\n";}s+="|!Address|!State|\n";for(var i=0;i<_9c.length;i++){var inc=_9c[i];s+="|{{{"+inc+"}}}|";var t=abego.TiddlyWikiIncluder.getState(inc);s+=t?"{{{"+t+"}}}":"included";s+="|\n";}s+="|includeState|k\n";return s;};var _a0=function(){removeChildren(div);wikify(_9a(),div);if(abego.TiddlyWikiIncluder.hasPendingIncludes()){invokeLater(_a0,500,_31);}};var div=createTiddlyElement(_94,"div");invokeLater(_a0,0,_31);};var _a2=Tiddler.prototype.isReadOnly;Tiddler.prototype.isReadOnly=function(){return _a2.apply(this,arguments)||this.isIncluded();};Tiddler.prototype.isIncluded=function(){return this.includeURL!=undefined;};Tiddler.prototype.getIncludeURL=function(){return this.includeURL;};var _a3={getMissingLinks:1,getOrphans:1,getTags:1,reverseLookup:1,updateTiddlers:1};for(var n in _a3){_5e(TiddlyWiki.prototype,n);}var _a5=function(){if(abego.IntelliTagger){_5e(abego.IntelliTagger,"assistTagging");}};_47();invokeLater(_4e,100);invokeLater(_a5,100);})();
//%/
!About the ~IncludePlugin
Include other ~TiddlyWikis in your (main) TiddlyWiki, link to included tiddlers, view them in your (main) TiddlyWiki, without opening another TiddlyWiki. Even „search“ looks for included tiddlers. 

A great way to share tiddlers, to speed up "save changes" and to keep your ~TiddlyWikis small.
!Smaller ~TiddlyWikis
Other than „imported“ tiddlers, included tiddlers are not copied into your main ~TiddlyWiki. This keeps your individual ~TiddlyWikis small. 

Since your TiddlyWikis will become smaller (if you reorganize your TiddlyWikis using the IncludePlugin) also "save changes" become faster. You may even consider switching on "AutoSave" or "SaveBackups" again.
!Sharing ~TiddlyWikis
You may include one ~TiddlyWiki in several other ~TiddlyWikis. Changes you make to this shared ~TiddlyWiki are automatically reflected the next time you open the other ~TiddlyWikis, without any extra „import“ step or so.

''Examples''
* you may want to have a single „~TiddlyWikiHelp“ ~TiddlyWiki that you include in all your ~TiddlyWikis. So you can quickly find help information without looking into other files, and without blowing up your ~TiddlyWikis.
* You "archive" your old journal tiddlers into an extra TiddlyWiki (e.g. one per month) and just include the archived journals in you "current month diary/blog". This way you still have access to the old information (e.g. to reference historic information) but you avoid your diary/blog will get to large.
* ...

See also:
* [[How to use the IncludePlugin]]
* [[How Tiddlers are found]]
* [[IncludePlugin Options]]
* [[The "include" Macro]]
* [[The "includeState" Macro]]
* [[Troubleshooting the IncludePlugin]]
Using the AdvancedOptions page you have an easy way to configure the IncludePlugin options. 

You will find a section like this:
{{optionsBlock{
<<option chkUseInclude>> Include ~TiddlyWikis (IncludeList | IncludeState | [[help|http://tiddlywiki.abego-software.de/#%5B%5BIncludePlugin%20Documentation%5D%5D]])
^^(Reload this ~TiddlyWiki to make changes become effective)^^
}}}
* By default the IncludePlugin is enabled. If you uncheck the checkbox external TiddlyWikis are not included.
* The IncludeList is the preferred place for your {{{<<include ...>>}}} lines.
* The IncludeState page gives you can an overview what TiddlyWikis are included etc.
* The help directs you to the online documentation of the Include Plugin.
<<includeState>>
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Version|1.6.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|

''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Usage
<<<
When installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.

''Deferred execution from an 'onClick' link''
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.  You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text

''External script source files:''
You can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}).  This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins.  The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.

''Display script source in tiddler output''
By including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.

''Defining javascript functions and libraries:''
Although the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed.  Thus, you cannot load a library and //immediately// use it's functions within the same tiddler.  However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).

To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened.  For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.

Since the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines.  Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.

''Creating dynamic tiddler content''
An important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:
* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.
* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.
* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.

If your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display.  For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.

//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler.  To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//

''Accessing the ~TiddlyWiki DOM''
The plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.

Access to this DOM element allows you to create scripts that can:
* vary their actions based upon the specific location in which they are embedded
* access 'tiddler-relative' information (use findContainingTiddler(place))
* perform direct DOM manipulations (when returning wikified text is not enough)
<<<
!!!!!Examples
<<<
an "alert" message box:
><script show>
	alert('InlineJavascriptPlugin: this is a demonstration message');
</script>
dynamic output:
><script show>
	return (new Date()).toString();
</script>
wikified dynamic output:
><script show>
	return "link to current user: [["+config.options.txtUserName+"]]";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
   if (!window.story) window.story=window;
   var title=story.findContainingTiddler(place).id.substr(7);
   return title+" is using "+store.getTiddlerText(title).length+" bytes";
</script>
creating an 'onclick' button/link that runs a script:
><script label="click here" title="clicking this link will show an 'alert' box" show>
   if (!window.story) window.story=window;
   alert("Hello World!\nlinktext='"+place.firstChild.data+"'\ntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");
</script>
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}
>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}
><script src="demo.js" show>
	return "loading demo.js..."
</script>
><script label="click to execute demo() function" show>
	demo()
</script>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2007.02.19 [1.6.0]'' added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
''2006.10.16 [1.5.2]'' add newline before closing '}' in 'function out_' wrapper.  Fixes error caused when last line of script is a comment.
''2006.06.01 [1.5.1]'' when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
''2006.04.19 [1.5.0]'' added 'show' parameter to force display of javascript source code in tiddler output
''2006.01.05 [1.4.0]'' added support 'onclick' scripts.  When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked.  'place' value is set to match the clicked button/link element.
''2005.12.13 [1.3.1]'' when catching eval error in IE, e.description contains the error text, instead of e.toString().  Fixed error reporting so IE shows the correct response text.  Based on a suggestion by UdoBorkowski
''2005.11.09 [1.3.0]'' for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content.  Based on a suggestion by BradleyMeck
''2005.11.08 [1.2.0]'' handle loading of javascript from an external URL via src="..." syntax
''2005.11.08 [1.1.0]'' pass 'place' param into scripts to provide direct DOM access 
''2005.11.08 [1.0.0]'' initial release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
//{{{
version.extensions.inlineJavascript= {major: 1, minor: 6, revision: 0, date: new Date(2007,2,19)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",

	handler: function(w) {
		var lookaheadRegExp = new RegExp(this.lookahead,"mg");
		lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			if (lookaheadMatch[1]) { // load a script library
				// make script tag, set src, add to body to execute, then remove for cleanup
				var script = document.createElement("script"); script.src = lookaheadMatch[1];
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (lookaheadMatch[5]) { // there is script code
				if (lookaheadMatch[4]) // show inline script code in tiddler output
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (lookaheadMatch[2]) { // create a link to an 'onclick' script
					// add a link, define click handler, save code in link (pass 'place'), set link attributes
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);
					link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}
					link.code="function _out(place){"+lookaheadMatch[5]+"\n};_out(this);"
					link.setAttribute("title",lookaheadMatch[3]?lookaheadMatch[3]:"");
					link.setAttribute("href","javascript:;");
					link.style.cursor="pointer";
				}
				else { // run inline script code
					var code="function _out(place){"+lookaheadMatch[5]+"\n};_out(w.output);"
					code=code.replace(/document.write\(/gi,'place.innerHTML+=(');
					try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
				}
			}
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} )
//}}}
/***
|''Name:''|~IntelliTaggerPlugin|
|''Version:''|1.0.0 (2006-04-26)|
|''Type:''|plugin|
|''Source:''|http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin|
|''Author:''|Udo Borkowski (ub [at] abego-software [dot] de)|
|''Documentation:''|[[IntelliTaggerPlugin Documentation]]|
|''Source Code:''|[[IntelliTaggerPlugin SourceCode]]|
|''Licence:''|[[BSD open source license (abego Software)]]|
|''~TiddlyWiki:''|Version 2.0.8 or better|
|''Browser:''|Firefox 1.5.0.2 or better|

***/
// /%
if(!version.extensions.IntelliTaggerPlugin){if(!window.abego){window.abego={};}if(!abego.internal){abego.internal={};}abego.alertAndThrow=function(s){alert(s);throw s;};if(version.major<2){abego.alertAndThrow("Use TiddlyWiki 2.0.8 or better to run the IntelliTagger Plugin.");}version.extensions.IntelliTaggerPlugin={major:1,minor:0,revision:0,date:new Date(2006,3,26),type:"plugin",source:"http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin",documentation:"[[IntelliTaggerPlugin Documentation]]",sourcecode:"[[IntelliTaggerPlugin SourceCode]]",author:"Udo Borkowski (ub [at] abego-software [dot] de)",licence:"[[BSD open source license (abego Software)]]",tiddlywiki:"Version 2.0.8 or better",browser:"Firefox 1.5.0.2 or better"};abego.isPopupOpen=function(_2){return _2&&_2.parentNode==document.body;};abego.openAsPopup=function(_3){if(_3.parentNode!=document.body){document.body.appendChild(_3);}};abego.closePopup=function(_4){if(abego.isPopupOpen(_4)){document.body.removeChild(_4);}};abego.getWindowRect=function(){return {left:findScrollX(),top:findScrollY(),height:findWindowHeight(),width:findWindowWidth()};};abego.moveElement=function(_5,_6,_7){_5.style.left=_6+"px";_5.style.top=_7+"px";};abego.centerOnWindow=function(_8){if(_8.style.position!="absolute"){throw "abego.centerOnWindow: element must have absolute position";}var _9=abego.getWindowRect();abego.moveElement(_8,_9.left+(_9.width-_8.offsetWidth)/2,_9.top+(_9.height-_8.offsetHeight)/2);};abego.isDescendantOrSelf=function(_a,e){while(e){if(_a==e){return true;}e=e.parentNode;}return false;};abego.toSet=function(_c){var _d={};for(var i=0;i<_c.length;i++){_d[_c[i]]=true;}return _d;};abego.filterStrings=function(_f,_10,_11){var _12=[];for(var i=0;i<_f.length&&(_11===undefined||_12.length<_11);i++){var s=_f[i];if(s.match(_10)){_12.push(s);}}return _12;};abego.arraysAreEqual=function(a,b){var n=a.length;if(n!=b.length){return false;}for(var i=0;i<n;i++){if(a[i]!=b[i]){return false;}}return true;};abego.moveBelowAndClip=function(_19,_1a){if(!_1a){return;}var _1b=findPosX(_1a);var _1c=findPosY(_1a);var _1d=_1a.offsetHeight;var _1e=_1b;var _1f=_1c+_1d;var _20=findWindowWidth();if(_20<_19.offsetWidth){_19.style.width=(_20-100)+"px";}var _21=_19.offsetWidth;if(_1e+_21>_20){_1e=_20-_21-30;}if(_1e<0){_1e=0;}_19.style.left=_1e+"px";_19.style.top=_1f+"px";_19.style.display="block";};abego.compareStrings=function(a,b){return (a==b)?0:(a<b)?-1:1;};abego.sortIgnoreCase=function(arr){var _25=[];var n=arr.length;for(var i=0;i<n;i++){var s=arr[i];_25.push([s.toString().toLowerCase(),s]);}_25.sort(function(a,b){return (a[0]==b[0])?0:(a[0]<b[0])?-1:1;});for(i=0;i<n;i++){arr[i]=_25[i][1];}};abego.getTiddlerField=function(_2b,_2c,_2d){var _2e=document.getElementById(_2b.idPrefix+_2c);var e=null;if(_2e!=null){var _30=_2e.getElementsByTagName("*");for(var t=0;t<_30.length;t++){var c=_30[t];if(c.tagName.toLowerCase()=="input"||c.tagName.toLowerCase()=="textarea"){if(!e){e=c;}if(c.getAttribute("edit")==_2d){e=c;}}}}return e;};abego.setRange=function(_33,_34,end){if(_33.setSelectionRange){_33.setSelectionRange(_34,end);var max=0+_33.scrollHeight;var len=_33.textLength;var top=max*_34/len,bot=max*end/len;_33.scrollTop=Math.min(top,(bot+top-_33.clientHeight)/2);}else{if(_33.createTextRange!=undefined){var _39=_33.createTextRange();_39.collapse();_39.moveEnd("character",end);_39.moveStart("character",_34);_39.select();}else{_33.select();}}};abego.internal.TagManager=function(){var _3a=null;var _3b=function(){if(_3a){return;}_3a={};store.forEachTiddler(function(_3c,_3d){for(var i=0;i<_3d.tags.length;i++){var tag=_3d.tags[i];var _40=_3a[tag];if(!_40){_40=_3a[tag]={count:0,tiddlers:{}};}_40.tiddlers[_3d.title]=true;_40.count+=1;}});};var _41=TiddlyWiki.prototype.saveTiddler;TiddlyWiki.prototype.saveTiddler=function(_42,_43,_44,_45,_46,_47){var _48=this.fetchTiddler(_42);var _49=_48?_48.tags:[];var _4a=(typeof _47=="string")?_47.readBracketedList():_47;_41.apply(this,arguments);if(!abego.arraysAreEqual(_49,_4a)){abego.internal.getTagManager().reset();}};var _4b=TiddlyWiki.prototype.removeTiddler;TiddlyWiki.prototype.removeTiddler=function(_4c){var _4d=this.fetchTiddler(_4c);var _4e=_4d&&_4d.tags.length>0;_4b.apply(this,arguments);if(_4e){abego.internal.getTagManager().reset();}};this.reset=function(){_3a=null;};this.getTiddlersWithTag=function(tag){_3b();var _50=_3a[tag];return _50?_50.tiddlers:null;};this.getAllTags=function(_51){_3b();var _52=[];for(var i in _3a){_52.push(i);}for(i=0;_51&&i<_51.length;i++){_52.pushUnique(_51[i],true);}abego.sortIgnoreCase(_52);return _52;};this.getTagInfos=function(){_3b();var _54=[];for(var _55 in _3a){_54.push([_55,_3a[_55]]);}return _54;};var _56=function(a,b){var a1=a[1];var b1=b[1];var d=b[1].count-a[1].count;return d!=0?d:abego.compareStrings(a[0].toLowerCase(),b[0].toLowerCase());};this.getSortedTagInfos=function(){_3b();var _5c=this.getTagInfos();_5c.sort(_56);return _5c;};this.getPartnerRankedTags=function(_5d){var _5e={};for(var i=0;i<_5d.length;i++){var _60=this.getTiddlersWithTag(_5d[i]);for(var _61 in _60){var _62=store.getTiddler(_61);if(!(_62 instanceof Tiddler)){continue;}for(var j=0;j<_62.tags.length;j++){var tag=_62.tags[j];var c=_5e[tag];_5e[tag]=c?c+1:1;}}}var _66=abego.toSet(_5d);var _67=[];for(var n in _5e){if(!_66[n]){_67.push(n);}}_67.sort(function(a,b){var d=_5e[b]-_5e[a];return d!=0?d:abego.compareStrings(a.toLowerCase(),b.toLowerCase());});return _67;};};abego.internal.getTagManager=function(){if(!abego.internal.gTagManager){abego.internal.gTagManager=new abego.internal.TagManager();}return abego.internal.gTagManager;};(function(){var _6c=2;var _6d=1;var _6e=30;var _6f;var _70;var _71;var _72;var _73;var _74;if(!abego.IntelliTagger){abego.IntelliTagger={};}var _75=function(){return _70;};var _76=function(tag){return _73[tag];};var _78=function(s){var i=s.lastIndexOf(" ");return (i>=0)?s.substr(0,i):"";};var _7b=function(_7c){var s=_7c.value;var len=s.length;return (len>0&&s[len-1]!=" ");};var _7f=function(_80){var s=_80.value;var len=s.length;if(len>0&&s[len-1]!=" "){_80.value+=" ";}};var _83=function(tag,_85,_86){if(_7b(_85)){_85.value=_78(_85.value);}story.setTiddlerTag(_86.title,tag,0);_7f(_85);abego.IntelliTagger.assistTagging(_85,_86);};var _87=function(n){if(_74){if(_74.length>n){return _74[n];}n-=_74.length;}return (_72&&_72.length>n)?_72[n]:null;};var _89=function(n,_8b,_8c){var _8d=_87(n);if(_8d){_83(_8d,_8b,_8c);}};var _8e=function(_8f){var pos=_8f.value.lastIndexOf(" ");var _91=(pos>=0)?_8f.value.substr(++pos,_8f.value.length):_8f.value;return new RegExp(_91.escapeRegExp(),"i");};var _92=function(_93,_94){var _95=0;for(var i=0;i<_93.length;i++){if(_94[_93[i]]){_95++;}}return _95;};var _97=function(_98,_99,_9a){var _9b=1;var c=_98[_99];for(var i=_99+1;i<_98.length;i++){if(_98[i][1].count==c){if(_98[i][0].match(_9a)){_9b++;}}else{break;}}return _9b;};var _9e=function(_9f,_a0){var _a1=abego.internal.getTagManager().getSortedTagInfos();var _a2=[];var _a3=0;for(var i=0;i<_a1.length;i++){var c=_a1[i][1].count;if(c!=_a3){if(_a0&&(_a2.length+_97(_a1,i,_9f)>_a0)){break;}_a3=c;}if(c==1){break;}var s=_a1[i][0];if(s.match(_9f)){_a2.push(s);}}return _a2;};var _a7=function(_a8,_a9){return abego.filterStrings(abego.internal.getTagManager().getAllTags(_a9),_a8);};var _aa=function(){if(!_6f){return;}var _ab=store.getTiddlerText("IntelliTaggerMainTemplate");if(!_ab){_ab="<b>Tiddler IntelliTaggerMainTemplate not found</b>";}_6f.innerHTML=_ab;applyHtmlMacros(_6f,null);refreshElements(_6f,null);};var _ac=function(e){if(!e){var e=window.event;}var tag=this.getAttribute("tag");if(_71){_71.call(this,tag,e);}return false;};var _af=function(_b0,_b1,_b2,_b3){if(!_b1){return;}var _b4=_b3?abego.toSet(_b3):{};var n=_b1.length;for(var i=0;i<n;i++){var tag=_b1[i];if(_b4[tag]){continue;}if(i>0){createTiddlyElement(_b0,"span",null,"tagSeparator"," | ");}var _b8="";var _b9=_b0;if(_b2<10){_b9=createTiddlyElement(_b0,"span",null,"numberedSuggestion");_b2++;var key=_b2<10?""+(_b2):"0";createTiddlyElement(_b9,"span",null,"suggestionNumber",key+") ");var _bb=_b2==1?"Ctrl-Space or ":"";_b8=" (Shortcut: %1Alt-%0)".format([key,_bb]);}var _bc=config.views.wikified.tag.tooltip.format([tag]);var _bd=(_76(tag)?"Remove tag '%0'%1":"Add tag '%0'%1").format([tag,_b8]);var _be="%0; Shift-Click: %1".format([_bd,_bc]);var btn=createTiddlyButton(_b9,tag,_be,_ac,_76(tag)?"currentTag":null);btn.setAttribute("tag",tag);}};var _c0=function(){if(_6f){window.scrollTo(0,ensureVisible(_6f));}if(_75()){window.scrollTo(0,ensureVisible(_75()));}};var _c1=function(e){if(!e){var e=window.event;}if(!_6f){return;}var _c3=resolveTarget(e);if(_c3==_75()){return;}if(abego.isDescendantOrSelf(_6f,_c3)){return;}abego.IntelliTagger.close();};addEvent(document,"click",_c1);var _c4=Story.prototype.gatherSaveFields;Story.prototype.gatherSaveFields=function(e,_c6){_c4.apply(this,arguments);var _c7=_c6.tags;if(_c7){_c6.tags=_c7.trim();}};var _c8=function(_c9){story.focusTiddler(_c9,"tags");var _ca=abego.getTiddlerField(story,_c9,"tags");if(_ca){var len=_ca.value.length;abego.setRange(_ca,len,len);window.scrollTo(0,ensureVisible(_ca));}};var _cc=config.macros.edit.handler;config.macros.edit.handler=function(_cd,_ce,_cf,_d0,_d1,_d2){_cc.apply(this,arguments);var _d3=_cf[0];if((_d2 instanceof Tiddler)&&_d3=="tags"){var _d4=_cd.lastChild;_d4.onfocus=function(e){abego.IntelliTagger.assistTagging(_d4,_d2);setTimeout(function(){_c8(_d2.title);},100);};_d4.onkeyup=function(e){if(!e){var e=window.event;}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.keyCode>=48&&e.keyCode<=57)){_89(e.keyCode==48?9:e.keyCode-49,_d4,_d2);}else{if(e.ctrlKey&&e.keyCode==32){_89(0,_d4,_d2);}}setTimeout(function(){abego.IntelliTagger.assistTagging(_d4,_d2);},100);return false;};_7f(_d4);}};var _d7=function(e){if(!e){var e=window.event;}var _d9=resolveTarget(e);var _da=_d9.getAttribute("tiddler");if(_da){story.displayTiddler(_d9,_da,"IntelliTaggerEditTagsTemplate",false);_c8(_da);}return false;};var _db=config.macros.tags.handler;config.macros.tags.handler=function(_dc,_dd,_de,_df,_e0,_e1){_db.apply(this,arguments);abego.IntelliTagger.createEditTagsButton(_e1,createTiddlyElement(_dc.lastChild,"li"));};var _e2=function(){if(_6f&&_70&&!abego.isDescendantOrSelf(document,_70)){abego.IntelliTagger.close();}};setInterval(_e2,100);abego.IntelliTagger.displayTagSuggestions=function(_e3,_e4,_e5,_e6,_e7){_72=_e3;_73=abego.toSet(_e4);_74=_e5;_70=_e6;_71=_e7;if(!_6f){_6f=createTiddlyElement(document.body,"div",null,"intelliTaggerSuggestions");_6f.style.position="absolute";}_aa();abego.openAsPopup(_6f);if(_75()){var w=_75().offsetWidth;if(_6f.offsetWidth<w){_6f.style.width=(w-2*(_6c+_6d))+"px";}abego.moveBelowAndClip(_6f,_75());}else{abego.centerOnWindow(_6f);}_c0();};abego.IntelliTagger.assistTagging=function(_e9,_ea){var _eb=_8e(_e9);var s=_e9.value;if(_7b(_e9)){s=_78(s);}var _ed=s.readBracketedList();var _ee=_ed.length>0?abego.filterStrings(abego.internal.getTagManager().getPartnerRankedTags(_ed),_eb,_6e):_9e(_eb,_6e);abego.IntelliTagger.displayTagSuggestions(_a7(_eb,_ed),_ed,_ee,_e9,function(tag,e){if(e.shiftKey){onClickTag.call(this,e);}else{_83(tag,_e9,_ea);}});};abego.IntelliTagger.close=function(){abego.closePopup(_6f);_6f=null;return false;};abego.IntelliTagger.createEditTagsButton=function(_f1,_f2,_f3,_f4,_f5,id,_f7){if(!_f3){_f3="[edit]";}if(!_f4){_f4="Edit the tags";}if(!_f5){_f5="editTags";}var _f8=createTiddlyButton(_f2,_f3,_f4,_d7,_f5,id,_f7);_f8.setAttribute("tiddler",(_f1 instanceof Tiddler)?_f1.title:String(_f1));return _f8;};config.macros.intelliTagger={label:"intelliTagger",handler:function(_f9,_fa,_fb,_fc,_fd,_fe){var _ff=_fd.parseParams("list",null,true);var _100=_ff[0]["action"];for(var i=0;_100&&i<_100.length;i++){var _102=_100[i];var _103=config.macros.intelliTagger.subhandlers[_102];if(!_103){abego.alertAndThrow("Unsupported action '%0'".format([_102]));}_103(_f9,_fa,_fb,_fc,_fd,_fe);}},subhandlers:{showTags:function(_104,_105,_106,_107,_108,_109){_af(_104,_72,_74?_74.length:0,_74);},showFavorites:function(_10a,_10b,_10c,_10d,_10e,_10f){_af(_10a,_74,0);},closeButton:function(_110,_111,_112,_113,_114,_115){var _116=createTiddlyButton(_110,"close","Close the suggestions",abego.IntelliTagger.close);},version:function(_117){var t="IntelliTagger %0.%1.%2".format([version.extensions.IntelliTaggerPlugin.major,version.extensions.IntelliTaggerPlugin.minor,version.extensions.IntelliTaggerPlugin.revision]);var e=createTiddlyElement(_117,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">"+t+"<font>";},copyright:function(_11a){var e=createTiddlyElement(_11a,"a");e.setAttribute("href","http://tiddlywiki.abego-software.de");e.innerHTML="<font color=\"black\" face=\"Arial, Helvetica, sans-serif\">&copy; 2006 <b><font color=\"red\">abego</font></b> Software<font>";}}};})();config.shadowTiddlers["IntelliTaggerStyleSheet"]="/***\n"+"!~IntelliTagger Stylesheet\n"+"***/\n"+"/*{{{*/\n"+".intelliTaggerSuggestions {\n"+"\tposition: absolute;\n"+"\twidth: 600px;\n"+"\n"+"\tpadding: 2px;\n"+"\tlist-style: none;\n"+"\tmargin: 0;\n"+"\n"+"\tbackground: #eeeeee;\n"+"\tborder: 1px solid DarkGray;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .currentTag   {\n"+"\tfont-weight: bold;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .suggestionNumber {\n"+"\tcolor: #808080;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .numberedSuggestion{\n"+"\twhite-space: nowrap;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .intelliTaggerFooter {\n"+"\tmargin-top: 4px;\n"+"\tborder-top-width: thin;\n"+"\tborder-top-style: solid;\n"+"\tborder-top-color: #999999;\n"+"}\n"+".intelliTaggerSuggestions .favorites {\n"+"\tborder-bottom-width: thin;\n"+"\tborder-bottom-style: solid;\n"+"\tborder-bottom-color: #999999;\n"+"\tpadding-bottom: 2px;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .normalTags {\n"+"\tpadding-top: 2px;\n"+"}\n"+"\n"+".intelliTaggerSuggestions .intelliTaggerFooter .button {\n"+"\tfont-size: 10px;\n"+"\n"+"\tpadding-left: 0.3em;\n"+"\tpadding-right: 0.3em;\n"+"}\n"+"\n"+"/*}}}*/\n";config.shadowTiddlers["IntelliTaggerMainTemplate"]="<!--\n"+"{{{\n"+"-->\n"+"<div class=\"favorites\" macro=\"intelliTagger action: showFavorites\"></div>\n"+"<div class=\"normalTags\" macro=\"intelliTagger action: showTags\"></div>\n"+"<!-- The Footer (with the Navigation) ============================================ -->\n"+"<table class=\"intelliTaggerFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n"+"  <tr>\n"+"\t<td align=\"left\">\n"+"\t\t<span macro=\"intelliTagger action: closeButton\"></span>\n"+"\t</td>\n"+"\t<td align=\"right\">\n"+"\t\t<span macro=\"intelliTagger action: version\"></span>, <span macro=\"intelliTagger action: copyright \"></span>\n"+"\t</td>\n"+"  </tr>\n"+"</tbody></table>\n"+"<!--\n"+"}}}\n"+"-->\n";config.shadowTiddlers["IntelliTaggerEditTagsTemplate"]="<!--\n"+"{{{\n"+"-->\n"+"<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+"<div class='title' macro='view title'></div>\n"+"<div class='tagged' macro='tags'></div>\n"+"<div class='viewer' macro='view text wikified'></div>\n"+"<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler'></div>\n"+"<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>\n"+"<!--\n"+"}}}\n"+"-->\n";config.shadowTiddlers["BSD open source license (abego Software)"]="See [[Licence|http://tiddlywiki.abego-software.de/#%5B%5BBSD%20open%20source%20license%5D%5D]].";config.shadowTiddlers["IntelliTaggerPlugin Documentation"]="[[Documentation on abego Software website|http://tiddlywiki.abego-software.de/doc/IntelliTagger.pdf]].";config.shadowTiddlers["IntelliTaggerPlugin SourceCode"]="[[Plugin source code on abego Software website|http://tiddlywiki.abego-software.de/src/Plugin-IntelliTagger-src.js]]";setStylesheet(store.getTiddlerText("IntelliTaggerStyleSheet"),"intelliTagger");}
//%/
Réponds directement à ces questions sur une feuille.

1. Quel est le nom de famille de Margot&nbsp;?
2. Quel langue a-t-elle choisi d'étudier&nbsp;?
3. Dans quelle classe de sixième est-elle&nbsp;?
4. Qui est le seul professeur qui aime bien la classe de Margot&nbsp;?
5. Comment s'appelle la déléguée&nbsp;?
6. Quand la classe note les professeurs, lesquels obtiennent la meilleure note&nbsp;?
7. Dans quel pays la classe part-elle en voyage scolaire&nbsp;?
8. Que font les élèves de la classe pendant la grève des professeurs&nbsp;?
9. Ce livre t'a-t-il plu&nbsp;? Justifie ton avis (5 lignes).
Réponds directement à ces questions sur une feuille.

10. Quel est le nom de famille de Margot&nbsp;? Melo
11. Quel langue a-t-elle choisi d'étudier&nbsp;? anglais
12. Dans quelle classe de sixième est-elle&nbsp;? 6.6
13. Qui est le seul professeur qui aime bien la classe de Margot&nbsp;? Mme Luron, Hist Geo
14. Comment s'appelle la déléguée&nbsp;? C'est elle avec ????
15. Quand la classe note les professeurs, lesquels obtiennent la meilleure note&nbsp;? Angl/EMT, avec l'appréciation «&nbsp;sympa&nbsp;»
16. Dans quel pays la classe part-elle en voyage scolaire&nbsp;? Italie
17. Que font les élèves de la classe pendant la grève des professeurs&nbsp;? Pique-nique et cinéma
18. Ce livre t'a-t-il plu&nbsp;? Justifie ton avis (5 lignes).


qui organise une boum: Danielle
elle a peur de rentrer en sixième, mais ne sait pas pourquoi (p17)
Margot devient délégué provisoire d'abord, parce qu'il n'y avait pas de volontaire.
Pour évoquer une sensation, tu peux utiliser des verbes, des noms ou des adjectifs variés.

!Les verbes de perception
!!Voir
-  avec attention ; fixer, espionner, examiner, guetter, inspecter, observer, regarder, scruter, surveiller, toiser, viser...
- avec émerveillement : admirer, contempler, dévorer des yeux...
- sans pouvoir détacher les yeux : être fasciné, hypnotisé par...
- avec difficulté : apercevoir, deviner, distinguer, entrevoir...
-  brutalement : constater, découvrir, remarquer, sauter aux yeux...
- rapidement : jeter un coup d'œil, lorgner, saisir à la dérobée, viser du coin de l'œil...
 
!!Entendre : écouter, ouïr, percevoir, tendre /'oreille, venir aux oreilles... Un bruit agréable peut : bercer, caresser, charmer, réjouir...
Un bruit désagréable peut : agresser, déchirer les tympans...

!!Sentir : aspirer, flairer, humer, renifler,, respirer...
 
!!Goûter : avaler, déguster, se délecter, se rassasier, dévorer, faire bombance, croquer...

!!Toucher
- avec brutalité : appuyer, cogner, frotter, heurter...
- avec douceur : caresser, câliner, enlacer, flatter...
- avec insistance : palper, pétrir, presser, tâter... -avec légèreté : effleurer, frôler...

!Nommer une sensation et la qualifier

!!Formes, volumes et dimensions
#noms : rond, carré, rectangle, triangle, cylindre, masse, pic, points...
#adjectifs : uniforme, difforme, plat, épais, long, a/longé, large, pointu, haut, profond...

!!Bruits
#noms : brouhaha, rumeur, cacophonie, clameur, fracas, vacarme, chant, mélodie, chuchotement, clapotis, frémissement, murmure...
#adjectifs : cristallin, feutré, harmonieux, léger, mélodieux, aigu, grave, assourdissant, perçant, percutant, strident, violent, bref, prolongé, sec...

!!Odeurs et saveurs
#noms : parfum, senteur, bouffée, effluve, émanation, exhalaison, puanteur...
#adjectifs : délicat, délicieux, velouté, acre, aigre, amer, agressif, capiteux, écœurant...

!!Impressions tactiles
#noms : choc, coup, heurt, pression, caresse, effleurement, sécheresse, moiteur...
#adjectifs : doux, lisse, mou, ferme, dur, piquant, rêche, rugueux, tiède, collant, gluant...
/***
|''Name:''|LegacyStrikeThroughPlugin|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Version:''|1.0.2|
|''Date:''|Jul 21, 2006|
|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.0|
***/

//{{{
// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};

config.formatters.push(
{
	name: "legacyStrikeByChar",
	match: "==",
	termRegExp: /(==)/mg,
	element: "strike",
	handler: config.formatterHelpers.createElementAndWikify
});

} //# end of "install only once"
//}}}
!Séance 3: Écouter puis réécrire un conte.

Un mythe grec: Apollon et Marsyas.

15 septembre

!Séance 4: Le petit chaperon rouge
Tout le monde a écrit la même histoire, dans des styles différents.
A quoi reconnaît-on que c'est la même histoire?
Ce sont les mêmes personnages.
Ils ont les mêmes caractères (petit chaperon naïf) et les mêmes comportements.
Les actions sont les mêmes, dans le même ordre.

Tout le monde aime bien PCR
PCR doit porter une panier à MG
Rencontre avec leloup
Course pour arriver chez MG
Le loup se déguise
«&nbsp;que vous avez de grands...&nbsp;»
Le loup mange PCR
PCR est mort

Réécrire un conte connu en changeant les personnages, mais pas les actions.

Complément:
Vous avez modifié les personnages mais pas les actions. 
On peut faire l'inverse: garder les personnages mais modifier les actions (ou le comportement habituel des personnages). C'est une parodie (comme Shrek ou le dessin animé de Tex Avery).


!Séance 5: Conjuguer le passé simple

Le PS sert à raconter une histoire.

Comment le conjuguer?
Être: je fus, tu fus, il fut, nous fûmes, vous fûtes, ils furent.
Avoir: j'eus, tu eus, il eut, nous eûmes, vous eûtes, ils eurent.
Tuer: je tuai, tu tuas, il tua, nous tuâmes, vous tuâtes, ils tuèrent.
Manger: je mangeai, tu mangeas, il mangea...ils mangèrent
appeler: j'appelai, tu appelas, il appela, nous appelâmes, vous appelâtes, ils appelèrent. (j'appelle)

ex 2, 3 et 4 p59

mardi 20 septembre
Séance 6: Conjuguer au passé simple (niveau 2)

Tous les verbes autres que ceux du 1er groupe (-ER), se terminent par 
-s
-s
-t
-^mes
-^tes
-rent

Problème: quelle voyelle? I ou U

attention: 
écrire → il écrivit
voir → il vit
mourir → il mourut
apercevoir →il aperçut
s'assoir → il s'assit
pouvoir → je pus
vouloir → il voulut

tenir/venir (+ devenir, retenir...)
je tins, tu tins, il tint, nous tînmes, vous tîntes, ils tinrent.

EX 5, 6, 7 8 p60

Conjuguer au passé simple
être
ronger
dormir
pouvoir
prévenir

26 septembre

!Séance 7: Le schéma narratif
Le schéma narratif est le schéma dans lequel on marque les 5 étapes d'une histoire. Toutes les versions de Blanche Neige suivent par exemple le même schéma narratif.
 Ces 5 étapes sont:
la situation initiale: Tout est stable et normal.
Perturbation: un événement perturbe ce calme (ou le héros part en mission)
Péripéties (=aventures)
Résolution: le héros fait une action (ou trouve un objet) qui résout les problèmes.
Situation finale: Tout est normal.

Mardi 27
relire un conte de votre choix (sinon pensez à un que vous connaissez). En faire le schéma narratif.

Ad quosdam conjectores nimis stulte curritur.
Cursor , qui ad Olympia ire cogitabat, se curru vehi somniavit. Mane ad conjectorem cucurrit narravitque: «&nbsp; Quadragis, ut mihi videbatur, per campum vehebar&nbsp;». At ille: «&nbsp;  Vinces, inquit; id enim equorum celeritate significatur !&nbsp;». Deinde idem Antiphonem interrogavit. Is autem: «&nbsp; Vinceris, inquit; nonne intellegis quattuor cursores ante te cucurrisse ?&nbsp;»
Quidam cursor conjectori  dixit se somniis aquilam vidisse. Tum ille: «&nbsp; Ceteros vinces, inquit; satis enim scis nullam avem ista vehementiorem judicari&nbsp;»; huic eidem sic respondit Antipho: «&nbsp; A ceteris vinceris, ista enim avis, aves insectans, semper ipsa postrema est!&nbsp;». 



Vocabulaire.
Antipho, onis, m.' : Antiphon (devin célèbre)
aquila, ae, f. : l'aigle
conjector, oris, m. : interprète de songes, devin
currus, us, m. : char
cursor, oris, m. : coureur à pied
insecto, as, are, avi, atum : poursuivre
Olympia, orum, n. : les jeux olympiques
postremus, a, um : le dernier
quadrigae, arum, f. : quadrige (attelage de quatre chevaux)
somnio, as, are, avi, atum : rêver
somnium, ii, n. : songe, rêve
veho, is, ère, vexi, vectum : porter, transporter

D'après CICÉRON, extrait de Salvete ! latin 3 de COUSTEIX, BARRILLON, GAILLARD et alii. © Scodel Nathan, Paris, 1988, p. 5

!!Quelques idées 
Traduire les songes, demander aux élèves de formuler les interprétations: positive, puis négative.
Demander d'inventer 2 rêves et leurs interprétations en gardant la structure du texte.
Exposé sur les Monstres.

1) Qu'est-ce qui est monstrueux (pour vous, par définition)
http://www.cnrtl.fr
2) Dressez une liste de monstres mythologiques. Quelles sont leurs caractéristiques communes ?
3) Trouvez des monstres modernes.
4) Associez des monstres et des héros.


Enfin, expliquez, à la lumière de votre recherche, ces deux images.

Les épithètes homériques.

Un adjectif épithète est un adjectif «&nbsp;collé au nom&nbsp;». EX: Le rusé Ulysse.
Un nom ou un groupe de mots peuvent être épithète.
EX: un bateau fantôme. (= fantomatique)

Liste d'épithètes homériques:
Ulysse aux milles ruses. (=rusé)
Achille aux pieds rapides. (rapide)
la déesse (Athéna) aux yeux pers.
Circé aux cheveux bouclés.
l'aurore aux doigts de rose.
Ulysse, fils de Laërte.

En grec, les expressions soulignées sont souvent un seul adjectif.

Fabrique d'épithètes homériques.
le professeur à la voix forte.
Le chien aux crocs acérés.
José à la stratégie fine.

L'Odyssée n'était pas écrite, mais orale; on ne la lisait pas, on la récitait.
Les épithètes homériques étaient un moyen mnémotechnique, qui rythmait le récit.

Vendredi 18:
Leçon
Ex p30 n 2, 4, 6,  1

Demain.
inventer 10 noms suivis de 10 épithètes homériques.
«&nbsp;la cerise sur le gâteau&nbsp;»
«&nbsp;le vent en poupe&nbsp;»
«&nbsp;grincer des dents&nbsp;»
«&nbsp;la cour des grands&nbsp;»
«&nbsp;un pavé dans la mare&nbsp;»
«&nbsp;la croisée des chemins&nbsp;»
«&nbsp;caracoler en tête&nbsp;»
«&nbsp;l'ironie de l'histoire&nbsp;»
«&nbsp;revoir sa copie&nbsp;»
«&nbsp;attendu au tournant&nbsp;»
«&nbsp;ne connaît pas la crise&nbsp;»
«&nbsp;la balle est dans le camp&nbsp;»
«&nbsp;botte en touche&nbsp;»
«&nbsp;la partie émergée de l'iceberg&nbsp;»
«&nbsp;renverser la vapeur&nbsp;»
«&nbsp;les quatre coins de l'Hexagone&nbsp;»
«&nbsp;à qui profite le crime&nbsp;»
«&nbsp;s'enfoncer dans la crise&nbsp;»
«&nbsp;le risque zéro n'existe pas&nbsp;»
«&nbsp;une affaire à suivre&nbsp;»
«&nbsp;ces images ont fait le tour monde&nbsp;»
1. Qu'est ce qu'une «&nbsp;magistrature&nbsp;» à Rome ?
2. Citez les et mettez les dans l'ordre du «&nbsp;cursus honorum&nbsp;».
3. Quelle est la fonction du Sénat ? 
4. Qu'est-ce qu'un consul ? Comment est-il choisi ? Pour combien de temps ?
5. Qu'est-ce qu'un consul dans l'administration française ?
6. Quand, dans la République Française, des consuls ont-ils eu le pouvoir ?
[[Latin]]<<tag Liens>> <<tag Lecture>><<fontSize "font-size:">> <<toggleSideBar menu tooltip hide>>
Fin du Malade Imaginaire de Molière

ENTRÉE DE BALLET
Tous les chirurgiens et les apothicaires dansent au son des intruments et des voix, et des battements de mains, et des mortiers d’apothicaires.

CHIRURGUS
Puisse-t-il voir doctas
Suas ordonnancias,
Omnium chirurgorum
Et apothicarum
Remplire boutiquas!

CHORUS
Vivat, vivat, vivat, vivat, cent fois vivat,
Novus doctor, qui tam bene parlat!
Mille, mille annis, et manget et bibat,
Et seignet et tuat!

CHIRURGUS
Puissent toti anni
Lui essere boni
Et favorabiles,
Et n'habere jamais
Quam pestas, verolas,
Fievras, pluresias,
Pluxus de sang, et dysenterias!

CHORUS
Vivat, vivat, vivat, vivat, cent fois vivat,
Novus doctor, qui tam bene parlat!
Mille, mille annis, et manget et bibat,
Et seignet et tuat!


Intro
Pourquoi apprend-on encore le latin? Qui parle le latin quand c'est déjà une langue morte,;
En quelle langue écrit Molière? Quelle langue comprend son public?

relevez le champs lexical de la médecine.
Soulignez les mots, expressions phrases, qui vous semblent immédiatement compréhensibles par un francophone.

Ce qui fait qu'il a l'air latin:
1. les terminaisons
-re pour l'infinitif
-t pour la 3personne
um: pour les mots

2. mots connus: esse (être), habere (avoir)
3. l'ordre est un peu changé (génitif)
/***
''NestedSlidersPlugin for TiddlyWiki version 1.2.x and 2.0''
^^author: Eric Shulman
source: http://www.TiddlyTools.com/#NestedSlidersPlugin
license: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^

Quickly make any tiddler content into an expandable 'slider' panel, without needing to create a separate tiddler to contain the slider content. Optional syntax allows ''default to open'', ''custom button label/tooltip'' and ''automatic blockquote formatting.''

You can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.

For more details, please click on a section headline below:
++++!!!!![Configuration]>
Debugging messages for 'lazy sliders' deferred rendering:
<<option chkDebugLazySliderDefer>> show debugging alert when deferring slider rendering
<<option chkDebugLazySliderRender>> show debugging alert when deferred slider is actually rendered
===
++++!!!!![Usage]>
When installed, this plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content. Use {{{+++}}} and {{{===}}} to delimit the slider content. Additional optional syntax elements let you specify
*default to open
*cookiename
*heading level
*floater
*rollover
*custom label/tooltip
*automatic blockquote
*deferred rendering
The complete syntax, using all options, is:
//{{{
++++(cookiename)!!!!!^*[label|tooltip]>...
content goes here
===
//}}}
where:
* {{{+++}}} (or {{{++++}}}) and {{{===}}}^^
marks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.^^
* {{{(cookiename)}}}^^
saves the slider opened/closed state, and restores this state whenever the slider is re-rendered.^^
* {{{!}}} through {{{!!!!!}}}^^
displays the slider label using a formatted headline (Hn) style instead of a button/link style^^
* {{{"^"}}} //(without the quotes)//^^
makes the slider 'float' on top of other content rather than shifting that content downward^^
* {{{"*"}}} //(without the quotes)//^^
automatically opens/closes slider on "rollover" as well as when clicked^^
* {{{[label]}}} or {{{[label|tooltip]}}}^^
uses custom label/tooltip. (defaults are: ">" (more) and "<" (less)^^
* {{{">"}}} //(without the quotes)//^^
automatically adds blockquote formatting to slider content^^
* {{{"..."}}} //(without the quotes)//^^
defers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//^^

//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//
===
++++!!!!![Examples]>
simple in-line slider: 
{{{
+++
 content
===
}}}
+++
 content
===
----
use a custom label and tooltip: 
{{{
+++[label|tooltip]
 content
===
}}}
+++[label|tooltip]
 content
===
----
content automatically blockquoted: 
{{{
+++>
 content
===
}}}
+++>
 content
===
----
all options combined //(default open, cookie, heading, floater, rollover, label/tooltip, blockquoted, deferred)//
{{{
++++(testcookie)!!!^*[label|tooltip]>...
 content
===
}}}
++++(testcookie)!!!^*[label|tooltip]>...
 content
===
----
complex nesting example:
{{{
+++^[get info...|click for information]
 put some general information here, plus a floating slider with more specific info:
 +++^[view details...|click for details]
 put some detail here, which could include a rollover with a +++^*[glossary definition]explaining technical terms===
 ===
===
}}}
+++^[get info...|click for information]
 put some general information here, plus a floating slider with more specific info:
 +++^[view details...|click for details]
 put some detail here, which could include a rollover with a +++^*[glossary definition]explaining technical terms===
 ===
===
----
nested floaters
>menu: <<tiddler NestedSlidersExample>>
(see [[NestedSlidersExample]] for definition)
----
===
+++!!!!![Installation]>
import (or copy/paste) the following tiddlers into your document:
''NestedSlidersPlugin'' (tagged with <<tag systemConfig>>)
===
+++!!!!![Revision History]>

++++[2006.02.16 - 1.7.7]
corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie
===

++++[2006.02.15 - 1.7.6]
in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)
===

++++[2006.02.04 - 1.7.5]
add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals
===

++++[2006.01.18 - 1.7.4]
only define adjustSliderPos() function if it has not already been provided by another plugin. This lets other plugins 'hijack' the function even when they are loaded first.
===

++++[2006.01.16 - 1.7.3]
added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels. While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels. Short-term workaround is to only adjust the position for 'top-level' floaters.
===

++++[2006.01.16 - 1.7.2]
added button property to slider panel elements so that slider panel can tell which button it belongs to. Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
===

++++[2006.01.14 - 1.7.1]
added optional "^" syntax for floating panels. Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.
===

++++[2006.01.14 - 1.7.0]
added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)
===

+++[2006.01.03 - 1.6.2]
When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)
===

+++[2005.12.15 - 1.6.1]
added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders
removed checkbox option for 'global' application of lazy sliders
===

+++[2005.11.25 - 1.6.0]
added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)
===

+++[2005.11.21 - 1.5.1]
revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.
===

+++[2005.11.20 - 1.5.0]
 added (cookiename) syntax for optional tracking and restoring of slider open/close state
===

+++[2005.11.11 - 1.4.0]
 added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style
===

+++[2005.11.07 - 1.3.0]
 removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other
 formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines
===

+++[2005.11.05 - 1.2.1]
 changed name to NestedSlidersPlugin
 more documentation
===

+++[2005.11.04 - 1.2.0]
 added alternative character-mode syntax {{{(((}}} and {{{)))}}}
 tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax
===

+++[2005.11.03 - 1.1.1]
 fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used
 code cleanup, added documentation
===

+++[2005.11.03 - 1.1.0]
 changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}
 changed name to EasySlidersPlugin
===

+++[2005.11.03 - 1.0.0]
 initial public release
===

===
+++!!!!![Credits]>
This feature was implemented by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]] with research, programming and suggestions from RodneyGomes, GeoffSlocock, and PaulPetterson
===
***/
// //+++!!!!![Code]
//{{{
version.extensions.nestedSliders = {major: 1, minor: 7, revision: 7, date: new Date(2006,2,16)};
//}}}

//{{{
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkDebugLazySliderDefer==undefined) config.options.chkDebugLazySliderDefer=false;
if (config.options.chkDebugLazySliderRender==undefined) config.options.chkDebugLazySliderRender=false;

// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
 background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");
//}}}

//{{{
config.formatters.push( {
 name: "nestedSliders",
 match: "\\n?\\+{3}",
 terminator: "\\s*\\={3}\\n?",
 lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^)?(\\*)?(\\[[^\\]]*\\])?(\\>)?(\\.\\.\\.)?\\s*",
 handler: function(w)
 {
 var lookaheadRegExp = new RegExp(this.lookahead,"mg");
 lookaheadRegExp.lastIndex = w.matchStart;
 var lookaheadMatch = lookaheadRegExp.exec(w.source)
 if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
 {
 // location for rendering button and panel
 var place=w.output;

 // default to closed, no cookie
 var show="none"; var title=">"; var tooltip="show"; var cookie="";

 // extra "+", default to open
 if (lookaheadMatch[1])
 { show="block"; title="<"; tooltip="hide"; }

 // cookie, use saved open/closed state
 if (lookaheadMatch[2]) {
 cookie=lookaheadMatch[2].trim().substr(1,lookaheadMatch[2].length-2);
 cookie="chkSlider"+cookie;
 if (config.options[cookie]==undefined)
 { config.options[cookie] = (show=="block") }
 if (config.options[cookie])
 { show="block"; title="<"; tooltip="hide"; }
 else
 { show="none"; title=">"; tooltip="show"; }
 }

 // custom label/tooltip
 if (lookaheadMatch[6]) {
 title = lookaheadMatch[6].trim().substr(1,lookaheadMatch[6].length-2);
 var pos=title.indexOf("|");
 if (pos!=-1)
 { tooltip = title.substr(pos+1,title.length); title = title.substr(0,pos); }
 else
 { tooltip += " "+title; }
 }

 // create the button
 if (lookaheadMatch[3]) { // use "Hn" header format instead of button/link
 var lvl=(lookaheadMatch[3].length>6)?6:lookaheadMatch[3].length;
 var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,null,title);
 btn.onclick=onClickNestedSlider;
 btn.setAttribute("href","javascript:;");
 btn.setAttribute("title",tooltip);
 }
 else
 var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider);
 btn.sliderCookie = cookie; // save the cookiename (if any) in the button object

 // "non-click" MouseOver open/close slider
 if (lookaheadMatch[5]) btn.onmouseover=onClickNestedSlider;

 // create slider panel
 var panelClass=lookaheadMatch[4]?"floatingPanel":"sliderPanel";
 var panel=createTiddlyElement(place,"div",null,panelClass,null);
 panel.style.display = show;
 panel.button = btn; // so the slider panel know which button it belongs to
 btn.sliderPanel=panel;

 // render slider (or defer until shown) 
 w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
 if ((show=="block")||!lookaheadMatch[8]) {
 // render now if panel is supposed to be shown or NOT deferred rendering
 w.subWikify(lookaheadMatch[7]?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
 // align slider/floater position with button
 adjustSliderPos(place,btn,panel,panelClass);
 }
 else {
 var src = w.source.substr(w.nextMatch);
 var endpos=findMatchingDelimiter(src,"+++","===");
 panel.setAttribute("raw",src.substr(0,endpos));
 panel.setAttribute("blockquote",lookaheadMatch[7]?"true":"false");
 panel.setAttribute("rendered","false");
 w.nextMatch += endpos+3;
 if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
 if (config.options.chkDebugLazySliderDefer) alert("deferred '"+title+"':\n\n"+panel.getAttribute("raw"));
 }
 }
 }
 }
)

// TBD: ignore 'quoted' delimiters (e.g., "{{{+++foo===}}}" isn't really a slider)
function findMatchingDelimiter(src,starttext,endtext) {
 var startpos = 0;
 var endpos = src.indexOf(endtext);
 // check for nested delimiters
 while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
 // count number of nested 'starts'
 var startcount=0;
 var temp = src.substring(startpos,endpos-1);
 var pos=temp.indexOf(starttext);
 while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
 // set up to check for additional 'starts' after adjusting endpos
 startpos=endpos+endtext.length;
 // find endpos for corresponding number of matching 'ends'
 while (startcount && endpos!=-1) {
 endpos = src.indexOf(endtext,endpos+endtext.length);
 startcount--;
 }
 }
 return (endpos==-1)?src.length:endpos;
}
//}}}

//{{{
function onClickNestedSlider(e)
{
 if (!e) var e = window.event;
 var theTarget = resolveTarget(e);
 var theLabel = theTarget.firstChild.data;
 var theSlider = theTarget.sliderPanel
 var isOpen = theSlider.style.display!="none";
 // if using default button labels, toggle labels
 if (theLabel==">") theTarget.firstChild.data = "<";
 else if (theLabel=="<") theTarget.firstChild.data = ">";
 // if using default tooltips, toggle tooltips
 if (theTarget.getAttribute("title")=="show")
 theTarget.setAttribute("title","hide");
 else if (theTarget.getAttribute("title")=="hide")
 theTarget.setAttribute("title","show");
 if (theTarget.getAttribute("title")=="show "+theLabel)
 theTarget.setAttribute("title","hide "+theLabel);
 else if (theTarget.getAttribute("title")=="hide "+theLabel)
 theTarget.setAttribute("title","show "+theLabel);
 // deferred rendering (if needed)
 if (theSlider.getAttribute("rendered")=="false") {
 if (config.options.chkDebugLazySliderRender)
 alert("rendering '"+theLabel+"':\n\n"+theSlider.getAttribute("raw"));
 var place=theSlider;
 if (theSlider.getAttribute("blockquote")=="true")
 place=createTiddlyElement(place,"blockquote");
 wikify(theSlider.getAttribute("raw"),place);
 theSlider.setAttribute("rendered","true");
 }
 // show/hide the slider
 if(config.options.chkAnimate)
 anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
 else
 theSlider.style.display = isOpen ? "none" : "block";
 if (this.sliderCookie && this.sliderCookie.length)
 { config.options[this.sliderCookie]=!isOpen; saveOptionCookie(this.sliderCookie); }
 // align slider/floater position with target button
 adjustSliderPos(theSlider.parentNode,theTarget,theSlider,theSlider.className);
 return false;
}

// hijack animation handler 'stop' handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function() { this.coreStop(); this.element.style.overflow = "visible"; }

// adjust panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel,panelClass) {
 ///////////////////////////////////////////////////////////////////////////////
 /// EXPERIMENTAL HACK - WORKS IN SOME CASES, NOT IN OTHERS
 ///////////////////////////////////////////////////////////////////////////////
 // "if this panel is floating and the parent is not also a floating panel"...
 if (panelClass=="floatingPanel" && place.className!="floatingPanel") {
 var left=0; var top=btn.offsetHeight;
 if (place.style.position!="relative") { left+=findPosX(btn); top+=findPosY(btn); }
 if (left+panel.offsetWidth > getWindowWidth()) left=getWindowWidth()-panel.offsetWidth-10;
 panel.style.left=left+"px"; panel.style.top=top+"px";
 }
}

function getWindowWidth() {
 if(document.width!=undefined)
 return document.width; // moz (FF)
 if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
 return document.documentElement.clientWidth; // IE6
 if(document.body && ( document.body.clientWidth || document.body.clientHeight ) )
 return document.body.clientWidth; // IE4
 if(window.innerWidth!=undefined)
 return window.innerWidth; // IE - general
 return 0; // unknown
}
//}}}
// //===
BetterTimelineMacro replaces the core timeline macro, and offers more features:
*optionally list only tiddlers with a particular tag
*exclude a tag of your liking
*set a start date for the timeline
*limit timeline to a certain number of days, eg: 7
*of course the old features like sorting by tiddler modified or created, and limiting to a maximum number of entries are both still there
/***
|Name|NewHereCommand|
|Source|http://simonbaird.com/mptw/#NewHereCommand|
|Version|1.0|

Code originally by ArphenLin. Small tweak by SimonBaird
http://aiddlywiki.sourceforge.net/NewHere_demo.html#NewHereCommand
To use this you must edit your ViewTemplate and add newHere to the toolbar div, eg
{{{<div class='toolbar' macro='toolbar ... newHere'></div>}}}
***/
//{{{

config.commands.newHere = {
	text: 'new here',
	tooltip: 'Create a new tiddler tagged as this tiddler',
	handler: function(e,src,title) {
		if (!readOnly) {
			clearMessage();
			var t=document.getElementById('tiddler'+title);
			story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);
			story.setTiddlerTag(config.macros.newTiddler.title, title, 0);
			story.focusTiddler(config.macros.newTiddler.title,"title");
			return false;
		}
	}
};

config.commands.newJournalHere = {
	//text: 'new journal here',  // too long
	text: 'new journal',
	dataFormat: 'YYYY-0MM-0DD 0hh:0mm', // adjust to your preference
	tooltip: 'Create a new journal tiddler tagged as this tiddler',
	handler: function(e,src,title) {
		if (!readOnly) {
			clearMessage();
			var now = new Date();
			var t=document.getElementById('tiddler'+title);
			var newtitle = now.formatString(this.dataFormat)
			story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);
			story.setTiddlerTag(newtitle, title, 0);
			story.focusTiddler(newtitle,"title");
			return false;
		}
	}
};


//}}}
//{{{
merge(config.macros,{   
    newHere: { 
        handler: function(place,macroName,params,wikifier,paramString,tiddler) { 
                wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler); 
        } 
    } 
}); 
//}}}
    Google reconnaît des opérateurs logiques. Les plus utiles sont les suivants:
    - OU -
    Pour rechercher les pages qui contiennent les mots "ancêtres" ou "Gaulois", utilisez l'opérateur "ancêtres|gaulois":
    - SAUF -
    Pour rechercher les pages qui contiennent le mot "ancêtres" mais pas le mot "Gaulois", utilisez "ancêtres -gaulois":
    - TOUS LES MOTS -
    Pour rechercher les pages qui contiennent "ancêtres" et "gaulois", utilisez "ancêtres+gaulois"
    Il faut parfois combiner les opérateurs.

    Plutôt que rechercher des mots, il vaut mieux rechercher des expressions. Si on saisit "nos ancêtres les gaulois" entre guillemets, Google cherchera l'expression elle-même et non les mots

    Faire reformuler la recherche à l'élève par des synonymes

    Limiter la recherche au titre de la page, avec intitle"...", avec l'idée qu'une page dont le titre contient notre recherche, la page ne peut parler que de ce que l'on cherche. ex: intitle:"nos ancêtres les gaulois"

    Limiter la recherche à l'adresse de la page: inurl:"nos ancêtres les gaulois"
    Utiliser son joker *, pour une recherche élargie. Exemple: quel * êtes vous
    Pour les films ou la music, google a des opérateurs directs. film: gaulois music:gaulois (ce second ne donne rien)
    Des types précis de fichiers, avec filetype: . Exemple "ancêtres+gaulois filetype:pdf"

*allinurl:MOTS = Ne montre que les pages avec tous les mots de la recherche dans l'url.
*inurl:MOT = pareil que allinurl: mais filtre l'url avec le premier terme seulement.
*allintitle:MOT = Ne montre que les pages avec tous les mots de la recherche dans le titre.
*intitle:MOT = pareil que allintitle: mais avec le premier terme seulement.
*filetype:TYPEDEFICHIER = restreint la recherche à un type de fichier (pdf, odt, ppt, mp3 ...)
*filetype:TYPEDEFICHIER = exclue un type de fichiers de la recherche.
*link:URL = Liste des pages qui renvoient à cette URL.
*related:URL = Listes des autres pages qui sont liées à cette URL (je ne vous cache pas que je ne comprends pas trop).
*site:domaine.com “termes recherchés" = restreint les résultats de la recherche à un domaine. Très pratique pour les grands sites.
*cache:URL = montrera la version de la page stockée en cache par Google.
*info:URL = montre un page affichant les liens vers les recherches liées (?), les rétroliens, les pages contenant l'url. Même résultat en saisissant l'url dans la barre de recherche.
*site:www.monsite.net ( ou "www.monsite.net”) = montre combien de pages de votre site sont indexées par Google.
*allintext: = Cherche dans le texte de la page, en ignorant les liens ou le titre.
*allinlinks: = Cherche seulement dans les liens


    MotA OR MotB
    “Mot” OR “Phrase”
    MotA -MotB
    MotA +MotB
!Séquence 3: Sur les traces d'Ulysse.

!Séance 1: Qu'est ce qu'un mythe&nbsp;?

Au sens propre, un mythe est une légende grecque.
Au sens courant, un mythe est une histoire qui est beaucoup reprise, imitée (et parfois déformée).
«&nbsp;Uryzmaeg et le géant borgne&nbsp;» est une adaptation de Ulysse et le cyclope.

Ulysse est le personnage principal de l'Odyssée, composée par Homère au VIIIème siècle av JC.

En grec, Ulysse se dit Odysseus. 
Il est aussi Personne (enfin, c'est comme ça qu'il se présente au Cyclope). Ce nom donne Capitaine Nemo, puis Nemo.

Apprendre ce qui est en rouge PAR COEUR.
Faire les 3 pages d'exercices.
Résumer l'aventure de Ulysse et le cyclope (à votre façon).

!Séance 5: Les sirènes:
Lecture du passage, arrêt avant le chant des Sirènes. Les élèves doivent imaginer ce chant des sirènes.
Ce que je sais des sirènes:

<!--{{{-->
<div id='header' class='header'>

<div class='headerShadow'>
<span class='searchBar' macro='search'></span>

<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span></div>

<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
</div>

<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='HaemoSideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2  (Win32)">
	<META NAME="AUTHOR" CONTENT="mathieu ">
	<META NAME="CREATED" CONTENT="20110313;10042900">
	<META NAME="CHANGEDBY" CONTENT="M EN">
	<META NAME="CHANGED" CONTENT="20110318;16560500">
	<STYLE TYPE="text/css">
	<!--
		@page { margin: 2cm }
		P { margin-bottom: 0.21cm }
		TD P { margin-bottom: 0cm }
		A:link { so-language: zxx }
	-->
	</STYLE>
</HEAD>
<BODY LANG="fr-FR" DIR="LTR">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><U><B>Pan&eacute;gyrique
de Trajan, Pline le Jeune.</B></U></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">Ac primum, qui dies ille,
quo exspectatus desideratusque urbem tuam ingressus es! Iam hoc
ipsum, quod ingressus es, quam mirum laetumque! Nam priores invehi et
importari solebant: non dico quadriiugo curru, et albentibus equis,
sed humeris hominum, quod arrogantius erat. Tu sola corporis
proceritate elatior aliis et excelsior, non de patientia nostra
quemdam triumphum, sed de superbia principum egisti. Ergo non aetas
quemquam, non valetudo, non sexus retardavit, quo minus oculos
insolito spectaculo impleret. Te parvuli noscere, ostentare iuvenes,
mirari senes; aegri quoque, neglecto medentium imperio, ad conspectum
tui, quasi ad salutem sanitatemque prorepere. Inde alii, se satis
vixisse te viso, te recepto; alii, nunc magis esse vivendum,
praedicabant. Feminas etiam tunc fecunditatis suae maxima voluptas
subiit, cum cernerent, cui principi cives, cui imperatori milites
peperissent. Videres referta tecta ac laborantia, ac ne eum quidem
vacantem locum, qui non nisi suspensum et instabile vestigium
caperet; oppletas undique vias, angustumque tramitem relictum tibi;
alacrem hinc atque inde populum, ubique par gaudium paremque
clamorem. Tam aequaliter ab omnibus ex adventu tuo laetitia percepta
est, quam omnibus venisti: quae tamen ipsa cum ingressu tuo crevit,
ac prope in singulos gradus adaucta est. 
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=RIGHT STYLE="margin-bottom: 0cm"><FONT SIZE=2 STYLE="font-size: 10pt">Pline
le Jeune (61-114 ap J.C.) Pan&eacute;gyrique de Trajan, 22. </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><U><B>Traduction :</B></U>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">Et d'abord quel jour que
celui, o&ugrave; attendu et d&eacute;sir&eacute; tu es entr&eacute;
dans ta ville ! D&eacute;j&agrave;, la fa&ccedil;on m&ecirc;me dont
tu as fait ton entr&eacute;e, comme elle &eacute;tait admirable et
plaisante ! Car tes pr&eacute;d&eacute;cesseurs avaient l'habitude de
se faire porter : je ne dis pas sur un quadrige, tir&eacute; par des
chevaux blancs, mais sur des &eacute;paules d&rsquo;hommes, ce qui
&eacute;tait plus arrogant. Toi sup&eacute;rieur aux autres seulement
par ta taille impressionnante, tu as remport&eacute; un certain
triomphe, non sur notre soumission, mais sur l&rsquo;orgueil des
princes. Donc ni l&rsquo;&acirc;ge, ni l&rsquo;&eacute;tat de sant&eacute;,
ni le sexe n'a emp&ecirc;ch&eacute; personne d'emplir ses yeux de cet
insolite spectacle. Les enfants apprenaient &agrave; te reconna&icirc;tre,
les jeunes te montraient, les anciens t&rsquo;admiraient ; les
malades aussi, n&eacute;gligeant les ordres du m&eacute;decin, se
tra&icirc;naient dehors pour te voir, comme si tu apportais gu&eacute;rison
et sant&eacute;. Et les uns, affirmaient qu'ils avaient assez v&eacute;cu
apr&egrave;s t&rsquo;avoir vu, apr&egrave;s t&rsquo;avoir accueilli ;
les autres, que c'&eacute;tait maintenant que l'on allait vivre
mieux. Les femmes m&ecirc;me &eacute;taient tr&egrave;s heureuses de
leur f&eacute;condit&eacute; quand elles voyaient &agrave; quel
prince elles avaient donn&eacute; des citoyens, &agrave; quel g&eacute;n&eacute;ral
elles avaient donn&eacute; des soldats. On voyait les toits qui
ployaient sous la charge et il n'y avait pas m&ecirc;me un espace
libre, o&ugrave; poser le pied si ce n'est en &eacute;quilibre
instable sur une jambe ; partout des rues bond&eacute;es, et un
passage &eacute;troit laiss&eacute; libre pour toi ; ici et l&agrave;
le peuple en liesse, partout la m&ecirc;me joie et la m&ecirc;me
clameur. Aussi vrai que tous ont ressenti de la joie &agrave; ta
venue, aussi vrai tu es venu pour tous ; et cependant cette joie
s'est accrue avec ton arriv&eacute;e et pour ainsi dire a augment&eacute;
&agrave; chacun de tes pas. 
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>Questionnaire fran&ccedil;ais
suivant l'ordre du texte </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>(ici avec les r&eacute;ponses
attendues, extraites du texte latin) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<TABLE WIDTH=641 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
	<COL WIDTH=311>
	<COL WIDTH=312>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P ALIGN=CENTER><FONT SIZE=4><B>Questions en fran&ccedil;ais </B></FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P ALIGN=CENTER><FONT SIZE=4><B>Citations du texte</B></FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>1) Quels adjectifs sont utilis&eacute;s pour
			d&eacute;finir la  mani&egrave;re dont Trajan a fait son entr&eacute;e
			dans la ville ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Mirum laetumque </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>2) Quel est le moyen de locomotion classique d'un
			g&eacute;n&eacute;ral triomphateur ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>quadrijugo curru et albentibus equis </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>3) Quel moyen plus arrogant les pr&eacute;d&eacute;cesseurs
			de Trajan ont-ils utilis&eacute; ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Humeris hominum </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>4) Qu'est-ce qui permettait de reconna&icirc;tre
			Trajan au milieu de la foule ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Sola corporis proceritate elatior aliis. </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>5) Qui assistait &agrave; ce triomphe ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Parvuli, senes, juvenes, feminas, aegri</FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>6) Que disaient certains apr&egrave;s avoir vu
			Trajan ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Se satis vixisse Trajano viso (praedicabant). </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>7) Que disaient les autres ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Alii nunc magis esse vivendum (praedicabant)</FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>8) Pourquoi les femmes sont-elles heureuses
			d'avoir fait des enfants ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Cum cernerent cui principi cives, cui imperatori
			milites peperissent.</FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>9) O&ugrave; se trouvait la foule ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Tecta / vias </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>10) Comment &eacute;taient les rues ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Oppletas undique </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>11) Est-ce que le passage r&eacute;serv&eacute; &agrave;
			Trajan &eacute;tait large ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Angustum tramitem. </FONT>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>12) Que manifestait la foule de toute part ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Ubique par gaudium paremque clamorem.</FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=311>
			<P><FONT SIZE=4>13) A quel moment la joie s'est-elle accrue ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><FONT SIZE=4>Cum ingressu tuo crevit.</FONT></P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm; page-break-before: always"><FONT SIZE=4>Questionnaire
fran&ccedil;ais suivant l'ordre du texte </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>(ici avec les r&eacute;ponses
attendues, extraites du texte latin) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<TABLE WIDTH=639 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
	<COL WIDTH=309>
	<COL WIDTH=312>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P ALIGN=CENTER><FONT SIZE=4><B>Questions en fran&ccedil;ais </B></FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P ALIGN=CENTER><FONT SIZE=4><B>Citations du texte</B></FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>1) Quels adjectifs sont utilis&eacute;s pour
			d&eacute;finir la  mani&egrave;re dont Trajan a fait son entr&eacute;e
			dans la ville ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>2) Quel est le moyen de locomotion classique d'un
			g&eacute;n&eacute;ral triomphateur ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>3) Quel moyen plus arrogant les pr&eacute;d&eacute;cesseurs
			de Trajan ont-ils utilis&eacute; ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>4) Qu'est-ce qui permettait de reconna&icirc;tre
			Trajan au milieu de la foule ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>5) Qui assistait &agrave; ce triomphe ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>6) Que disaient certains apr&egrave;s avoir vu
			Trajan ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>7) Que disaient les autres ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>8) Pourquoi les femmes sont-elles heureuses
			d'avoir fait des enfants ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>9) O&ugrave; se trouvait la foule ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>10) Comment &eacute;taient les rues ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>11) Est-ce que le passage r&eacute;serv&eacute; &agrave;
			Trajan &eacute;tait large ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>12) Que manifestait la foule de toute part&nbsp;? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=309>
			<P><FONT SIZE=4>13) A quel moment la joie s'est-elle accrue ? </FONT>
			</P>
		</TD>
		<TD WIDTH=312>
			<P><BR>
			</P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"> <FONT SIZE=4>Relevez le champ lexical
du triomphe, en suivant sa progression (qui est celle du texte).</FONT></P>
<OL>
	<LI><P STYLE="margin-bottom: 0cm"><FONT SIZE=4>L'attente : </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<OL START=2>
	<LI><P STYLE="margin-bottom: 0cm"><FONT SIZE=4>L'entr&eacute;e, la
	marche : </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<OL START=3>
	<LI><P STYLE="margin-bottom: 0cm"><FONT SIZE=4>Le c&eacute;r&eacute;monial&nbsp;:</FONT></P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<OL START=4>
	<LI><P STYLE="margin-bottom: 0cm"><FONT SIZE=4>L'exaltation du
	peuple :</FONT></P>
</OL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm; page-break-before: always"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><U><B>Champ lexical du
triomphe :</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><U><B>1.</B></U> <U><B>L'attente
:</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>exspecto, as, are, avi,
atum : attendre </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>desidero, as, are, avi,
atum : d&eacute;sirer </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><U><B>2. l'entr&eacute;e,
la marche :</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>ingredior, eris, i,
ingressus sum : entrer </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>adventus, us, m :
l'arriv&eacute;e </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>ingressus, us, m :
l'entr&eacute;e </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>gradus, us, m : le pas </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><U><B>3. Le c&eacute;r&eacute;monial
: </B></U></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>inveho, is, ere, vexi,
vectum : transporter, amener </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>importo, as, are, avi,
atum : porter dans </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>quadrijugus, a, um :
attel&eacute; de quatre chevaux </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>currus, us, m : le char </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>albens, ntis : blanc </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>humerus, i, m : l'&eacute;paule
</FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>triumphum agere de aliquo
: remporter le triomphe sur quelqu'un </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>Triumphus, i, m : le
triomphe = entr&eacute;e solennelle &agrave; Rome du g&eacute;n&eacute;ral
victorieux qui monte au Capitole sur un char tra&icirc;n&eacute; par
des chevaux blancs, rev&ecirc;tu lui-m&ecirc;me de la toga picta et
de la tunica palmata et la t&ecirc;te ceinte de lauriers (tenue de
Jupiter Capitolin), cependant que les soldats qui l'accompagnent
chantent des chants </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>&eacute;logieux ou
satiriques &agrave; l'adresse de leur g&eacute;n&eacute;ral. </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><U><B>4. L'exaltation du
peuple </B></U></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>oculos impleo, es, ere,
evi, etum : emplir ses yeux </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>nosco, is, ere, novi,
notum : apprendre &agrave; conna&icirc;tre </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>ostento, as, are, avi,
atum : faire voir, pr&eacute;senter </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>miror, aris, ari, atus sum
: admirer </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>aeger, aegra, aegrum :
malade </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>prorepo, is, ere,
prorepsi, proreptum : s'avancer en rampant, en se tra&icirc;nant </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>undique : de toutes parts </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>oppletus, a, um : plein </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>gaudium, ii, n : la joie </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>alacer, cris, cre : plein
d'entrain, de gaiet&eacute; </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>clamor, oris, m : le cri </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4>laetitia, ae, f :
l'all&eacute;gresse, la joie d&eacute;bordante </FONT>
</P>
<P STYLE="margin-bottom: 0cm; page-break-before: always"><FONT SIZE=3><U><B>Pan&eacute;gyrique
de Trajan : entrer dans le texte par des images avec l&eacute;gendes
en latin </B></U></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>L&rsquo;&eacute;tude de
quelques images am&egrave;ne les &eacute;l&egrave;ves &agrave;
r&eacute;fl&eacute;chir sur la situation du texte : le triomphe. </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Les l&eacute;gendes
latines de ces images sont emprunt&eacute;es au texte de Pline le
Jeune (phrases l&eacute;g&egrave;rement simplifi&eacute;es ou
am&eacute;nag&eacute;es). L'entr&eacute;e dans le texte original sera
facilit&eacute;e par cette pr&eacute;paration. L&agrave; encore,
cette approche peut &ecirc;tre compl&eacute;t&eacute;e par d'autres
approches propos&eacute;es, en particulier l'&eacute;tude du
vocabulaire (champ lexical du triomphe) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Quelques r&eacute;f&eacute;rences
d'images de triomphe qui peuvent &ecirc;tre utilis&eacute;es avec des
phrases du texte : </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>Imperatores quadrijugo
curru et albentibus equis invehi solebant.</B> </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Images : ces images de
diff&eacute;rentes &eacute;poques, pr&eacute;sentant des souverains
triomphants (romains, russes, fran&ccedil;ais) permettent de rep&eacute;rer
les invariants du genre et de travailler sur la permanence de ces
repr&eacute;sentations. Cela peut donc rejoindre l'&eacute;tude du
groupement de textes sur le pan&eacute;gyrique. </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>- coupe de Boscoreale
repr&eacute;sentant le triomphe de Tib&egrave;re (1er si&egrave;cle
ap. J.-C., Paris, </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><FONT SIZE=3>mus&eacute;e
du Louvre).
</FONT><A HREF="http://cartelfr.louvre.fr/cartelfr/visitesrv=car_not_frame&amp;idNotice=9230"><FONT SIZE=3>http://cartelfr.louvre.fr/cartelfr/visitesrv=car_not_frame&amp;idNotice=9230</FONT></A><FONT SIZE=3>
</FONT></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>- le triomphe de Titus et
Vespasien, peinture de G Pippi dit Romano (16&egrave;me si&egrave;cle,
Paris, mus&eacute;e du Louvre) Accessible par la base Joconde (site
du minist&egrave;re de la culture). </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><A HREF="http://www.culture.gouv.fr/Wave/image/joconde/0001/m503604_88ee2057_p.jpg"><FONT SIZE=3>http://www.culture.gouv.fr/Wave/image/joconde/0001/m503604_88ee2057_p.jpg</FONT></A><FONT SIZE=3>
</FONT></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>- le triomphe de Louis
XIII sur les ennemis de la religion, J Stella (17&egrave;me si&egrave;cle,
</FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Versailles, mus&eacute;e
du ch&acirc;teau). Accessible par la base Joconde (site du minist&egrave;re
de la culture) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><A HREF="http://www.culture.gouv.fr/Wave/image/joconde/0019/m502004_78ee208_p.jpg"><FONT SIZE=3>http://www.culture.gouv.fr/Wave/image/joconde/0019/m502004_78ee208_p.jpg</FONT></A><FONT SIZE=3>
</FONT></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>- le triomphe du tsar ou
la Paix, L.L. Boilly (19&egrave;me si&egrave;cle, Paris, mus&eacute;e
du Louvre). Accessible par la base Joconde (site du minist&egrave;re
de la culture) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=4><A HREF="http://www.culture.gouv.fr/public/mistral/joconde_fr"><FONT SIZE=3>http://www.culture.gouv.fr/public/mistral/joconde_fr</FONT></A><FONT SIZE=3>
</FONT></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>~ <B>Totus populus oculos
triumphi spectaculo implebat. </B></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>Et parvuli et juvenes
et senes et feminae et aegri aderant </B></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>Viae undique oppletae
erant. </B></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>Populus alacer erat :
ubique par gaudium parque clamor videbatur. </B></FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>Images : ici, toute image
de foule en liesse peut convenir (la sc&egrave;ne du triomphe de
Commode </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>dans Gladiator ou des
extraits d'Ast&eacute;rix et les lauriers de C&eacute;sar, par
exemple) </FONT>
</P>
<P STYLE="margin-bottom: 0cm"><FONT SIZE=3>- dessin de couverture du
manuel de Latin 3&egrave;me, Latin en s&eacute;quences, &eacute;dition
Magnard 2003 </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 200%; page-break-before: always">
<FONT SIZE=4><U><B>Version simplifi&eacute;e possible du texte ,</B></U><SPAN STYLE="text-decoration: none"><B>
&agrave; traduire...</B></SPAN></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 200%; text-decoration: none">
<BR>
</P>
<OL>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Ac
	primum qui dies ille quo urbem tuam ingressus es ! </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<OL START=2>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Nam
	priores invehi solebant humeris hominum, quod arrogantius erat. </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<OL START=3>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Tu
	sola corporis proceritate elatior aliis eras. </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<OL START=4>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Ergo
	totus populus oculos insolito spectaculo implere cupiebat. </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<OL START=5>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Te
	parvuli noscere, ostentare juvenes, mirari senes, aegri quoque, ad
	conspectum tui, prorepere. </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<OL START=6>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Inde
	quidam se satis vixisse, te viso, praedicabant. </FONT>
	</P>
</OL>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%; page-break-before: always">
<FONT SIZE=4><U><B>Texte caviard&eacute;</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 200%"><FONT SIZE=4>Et
d'abord quel <B>dies</B> que celui, o&ugrave; <B>exspectatus
desideratusque urbem tuam ingressus es</B> ! <B>Iam</B> la fa&ccedil;on
m&ecirc;me dont <B>ingressus es</B>, comme elle &eacute;tait <B>mirum
laetumque</B> ! <B>Nam</B> tes pr&eacute;d&eacute;cesseurs avaient
l'habitude de se faire porter :<B> non dico quadriiugo curru, et
albentibus equis, sed humeris hominum</B>, ce qui &eacute;tait plus
arrogant. Toi sup&eacute;rieur aux autres seulement par ta taille
impressionnante, tu as remport&eacute; <B>quemdam triumphum</B>, non
sur notre soumission, <B>sed de superbia principum. Ergo non aetas,
non valetudo</B>, <B>non sexus</B> n'a emp&ecirc;ch&eacute; personne
d'emplir <B>oculos insolito spectaculo</B>. Les enfants apprenaient &agrave;
te reconna&icirc;tre, <B>ostentare iuvenes, mirari senes; aegri
quoque</B>, n&eacute;gligeant les ordres du m&eacute;decin, <B>ad
conspectum tui prorepere</B>, comme si tu apportais gu&eacute;rison
et sant&eacute;. <B>Inde alii</B>, affirmaient qu'ils avaient assez
v&eacute;cu <B>te viso, te recepto; alii</B>, que c'&eacute;tait
maintenant que l'on allait vivre mieux. <B>Feminas etiam </B>&eacute;taient
tr&egrave;s heureuses de leur f&eacute;condit&eacute; quand elles
voyaient &agrave; quel <B>principi </B>elles avaient donn&eacute;
<B>cives</B>, &agrave; quel <B>imperatori</B> elles avaient donn&eacute;
<B>milites</B>. On voyait les toits qui ployaient sous la charge et
il n'y avait pas m&ecirc;me <B>vacantem locum</B>, o&ugrave; poser le
pied si ce n'est en &eacute;quilibre instable sur une jambe ;
<B>oppletas undique vias, angustumque tramitem relictum tibi ;
alacrem hinc atque inde populum, ubique</B> . Aussi vrai que tous ont
ressenti de la joie &agrave; ta <B>par gaudium paremque clamorem</B>.
venue, aussi vrai tu es venu pour tous ; et cependant cette joie
s'est accrue avec ton arriv&eacute;e et pour ainsi dire a augment&eacute;
&agrave; chacun de tes pas. </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%; page-break-before: always">
<FONT SIZE=4>Traduction &agrave; compl&eacute;ter en regard.</FONT></P>
<DIV ALIGN=RIGHT>
	<TABLE WIDTH=639 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=4 CELLSPACING=0>
		<COL WIDTH=309>
		<COL WIDTH=312>
		<TR VALIGN=TOP>
			<TD WIDTH=309>
				<P ALIGN=LEFT><FONT SIZE=3>Ac primum, qui <FONT SIZE=3 STYLE="font-size: 13pt"><B>dies</B></FONT>
				ille, quo <FONT SIZE=3 STYLE="font-size: 13pt"><B>exspectatus
				desideratusque urbem tuam ingressus es</B></FONT> ! <FONT SIZE=3 STYLE="font-size: 13pt"><B>Iam</B></FONT>
				hoc ipsum, quod <FONT SIZE=3 STYLE="font-size: 13pt"><B>ingressus
				es</B></FONT>, quam <FONT SIZE=3 STYLE="font-size: 13pt"><B>mirum
				laetumque </B></FONT>! <FONT SIZE=3 STYLE="font-size: 13pt"><B>Nam</B></FONT>
				priores invehi et importari solebant : <FONT SIZE=3 STYLE="font-size: 13pt"><B>non
				dico quadriiugo curru, et albentibus equis, sed humeris hominum</B></FONT>,
				quod arrogantius erat. Tu sola corporis proceritate elatior aliis
				et excelsior, non de patientia nostra <FONT SIZE=3 STYLE="font-size: 13pt"><B>quemdam
				triumphum, sed de superbia principum</B></FONT> egisti. <FONT SIZE=3 STYLE="font-size: 13pt"><B>Ergo
				non aetas</B></FONT> quemquam, <FONT SIZE=3 STYLE="font-size: 13pt"><B>non
				valetudo, non sexus</B></FONT> retardavit, quo minus <FONT SIZE=3 STYLE="font-size: 13pt"><B>oculos
				insolito spectaculo</B></FONT> impleret. Te parvuli noscere,
				<FONT SIZE=3 STYLE="font-size: 13pt"><B>ostentare iuvenes, mirari
				senes</B></FONT> ; <FONT SIZE=3 STYLE="font-size: 13pt"><B>aegri
				quoque</B></FONT>, neglecto medentium imperio, <FONT SIZE=3 STYLE="font-size: 13pt"><B>ad
				conspectum tui</B></FONT>, quasi ad salutem sanitatemque
				<FONT SIZE=3 STYLE="font-size: 13pt"><B>prorepere. Inde alii,</B></FONT>
				se satis vixisse te viso, te recepto ; alii, nunc magis esse
				vivendum, praedicabant. <FONT SIZE=3 STYLE="font-size: 13pt"><B>Feminas
				etiam</B></FONT> tunc fecunditatis suae maxima voluptas subiit,
				cum cernerent, cui <FONT SIZE=3 STYLE="font-size: 13pt"><B>principi
				cives</B></FONT>, cui <FONT SIZE=3 STYLE="font-size: 13pt"><B>imperatori
				milites</B></FONT> peperissent. Videres referta tecta ac
				laborantia, ac ne eum quidem <FONT SIZE=3 STYLE="font-size: 13pt"><B>vacantem
				locum</B></FONT>, qui non nisi suspensum et instabile vestigium
				caperet ; <FONT SIZE=3 STYLE="font-size: 13pt"><B>oppletas
				undique vias, angustumque tramitem relictum tibi ; alacrem hinc
				atque inde populum, ubique par gaudium paremque clamorem</B></FONT>.
				Tam aequaliter ab omnibus ex adventu tuo laetitia percepta est,
				quam omnibus venisti: quae tamen ipsa cum ingressu tuo crevit, ac
				prope in singulos gradus adaucta est. </FONT>
				</P>
			</TD>
			<TD WIDTH=312>
				<P><FONT SIZE=3>Et d'abord quel ________ que celui, o&ugrave;
				_____ _____________________________________
				_________________________ ! ___________ la fa&ccedil;on m&ecirc;me
				dont __________________, comme elle &eacute;tait 
				______________________! _________ tes pr&eacute;d&eacute;cesseurs
				avaient l'habitude de se faire porter : _____________
				_____________________________________
				________________________________, ce qui &eacute;tait plus
				arrogant. Toi sup&eacute;rieur aux autres seulement par ta taille
				impressionnante, tu as remport&eacute; ________________________,
				non sur notre soumission.
				___________________________________________________________________________________________________________________________________________________________________________________
				n'a emp&ecirc;ch&eacute; personne d'emplir
				____________________________ _______________________________. Les
				enfants apprenaient &agrave; te reconna&icirc;tre, _____
				_____________________________________
				_____________________________________
				_____________________________________, n&eacute;gligeant les
				ordres du m&eacute;decin, _________
				_____________________________________, comme si tu apportais
				gu&eacute;rison et sant&eacute;.___ ________________, affirmaient
				qu'ils avaient assez v&eacute;cu ___________________________
				_______________;____________, que c'&eacute;tait maintenant que
				l'on allait vivre mieux. ______ ________________&eacute;taient
				tr&egrave;s heureuses de leur f&eacute;condit&eacute; quand elles
				voyaient &agrave; quel ____________ elles avaient donn&eacute;
				__________, &agrave; quel ______________ elles avaient donn&eacute;
				_________________. On voyait les toits qui ployaient sous la
				charge et il n'y avait pas m&ecirc;me ___________________
				________________, o&ugrave; poser le pied si ce n'est en
				&eacute;quilibre instable sur une jambe ;
				_________________________________________________________
				_______________________________________________________________________________________________________________
				__________________. Aussi vrai que tous ont ressenti de la joie &agrave;
				ta venue, aussi vrai tu es venu pour tous ; et cependant cette
				joie s'est accrue avec ton arriv&eacute;e et pour ainsi dire a
				augment&eacute; &agrave; chacun de tes pas. </FONT>
				</P>
			</TD>
		</TR>
	</TABLE>
</DIV>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%; page-break-before: always">
<FONT SIZE=4><U><B>Pan&eacute;gyrique de Trajan : travail autour du
texte par un groupement de textes ; le genre du pan&eacute;gyrique </B></U></FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>extrait
du prologue du <B>Malade imaginaire de Moli&egrave;re. </B></FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=3>&laquo;
Apr&egrave;s les glorieuses fatigues et exploits victorieux de notre
auguste monarque, il est bien juste que tous ceux qui se m&ecirc;lent
d&rsquo;&eacute;crire travaillent ou &agrave; ses louanges ou &agrave;
son </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=3>divertissement.
C&rsquo;est ce qu&rsquo;ici l&rsquo;on a voulu faire, et ce prologue
est un essai des louanges de ce grand prince, qui donne entr&eacute;e
&agrave; la com&eacute;die du Malade imaginaire dont le projet a &eacute;t&eacute;
fait pour le d&eacute;lasser de ses nobles travaux. &raquo; </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>questions
:</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>1. Qui
est d&eacute;sign&eacute; par l'expression &quot;notre auguste
monarque&quot; ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>2.
Relevez l'autre expression qui le d&eacute;signe. Que remarquez-vous
? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>3.
Quelles expressions d&eacute;signent les activit&eacute;s du prince ?
</FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>4. Que
doit faire l'artiste quand il est au service d'un tel prince ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>5. Quel
mot, r&eacute;p&eacute;t&eacute; deux fois dans le texte, d&eacute;finit
ce que Moli&egrave;re fait dans son prologue&nbsp;? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>Textes
compl&eacute;mentaires : le ton et le style du pan&eacute;gyrique</B></U></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>Texte
1</B></U> </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U>Flore
</U>: </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Vos
v&oelig;ux sont exauc&eacute;s, Louis est de retour ;  </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>il
ram&egrave;ne en ces lieux les plaisirs et l &lsquo;amour, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>et
vous voyez finir vos mortelles alarmes ; </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>par
ses vastes exploits son bras voit tout soumis, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>il
quitte les armes </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>faute
d&rsquo;ennemis. </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U>Tous
ensemble </U>: </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Ah
quelle douce nouvelle ! </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Qu&rsquo;elle
est grande ! qu&rsquo;elle est belle ! </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>que
de plaisirs, que de ris, que de jeux ! </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>que
de succ&egrave;s heureux ! </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Et
que le ciel a rempli nos v&oelig;ux ! (...) </FONT>
</P>
<P ALIGN=RIGHT STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><FONT SIZE=3><I>Le
malade imaginaire, prologue v. 8 &agrave; 18</I></FONT> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>Texte
2</B></U> </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>&laquo;
<U>Tircis </U>: </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Quand
la neige fondue enfle en un torrent fameux </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>contre
l&rsquo;effort soudain de ses flots &eacute;cumeux </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>il
n&rsquo;est rien d&rsquo;assez solide ; </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>digues,
ch&acirc;teaux, villes et bois, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Hommes
et troupeaux &agrave; la fois, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>tout
c&egrave;de au courant qui le guide. </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Tel
et plus fier et plus rapide, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Marche
LOUIS dans ses exploits.</FONT></P>
<P ALIGN=RIGHT STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><FONT SIZE=3><I>Le
malade imaginaire, prologue v. 43 &agrave; 48</I></FONT> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>Texte
3</B></U> </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"> <FONT SIZE=4><U>Tous</U>
: </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Joignons
tous dans ces bois </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"> <FONT SIZE=4>nos
fl&ucirc;tes et nos voix </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>ce
jour nous y convie, </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>et
faisons aux &eacute;chos redire mille fois :</FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>LOUIS
est le plus grand des rois. </FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Heureux,
heureux qui peut lui consacrer sa vie. </FONT>
</P>
<P ALIGN=RIGHT STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><FONT SIZE=3><I>Le
malade imaginaire, prologue, autre entr&eacute;e, v. 7 &agrave; 12</I></FONT>
</FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Texte 4
</FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=3>&laquo;
Il y a des choses dont nous esp&eacute;rons infiniment davantage : ce
sont, MONSEIGNEUR, les qualit&eacute;s que notre invincible monarque
vous a donn&eacute;es avec la naissance ; c&rsquo;est l&rsquo;exemple
que tous les jours il vous donne. Quand vous le voyez former de si
grands desseins ; quand vous le consid&eacute;rez qui regarde sans
s&rsquo;&eacute;tonner l&rsquo;agitation de l&rsquo;Europe et les
machines qu&rsquo;elle remue pour le d&eacute;tourner de son
entreprise ; quand il p&eacute;n&egrave;tre d&egrave;s sa premi&egrave;re
d&eacute;marche jusque dans le c&oelig;ur d&rsquo;une province o&ugrave;
l&rsquo;on trouve &agrave; chaque pas des barri&egrave;res
insurmontables et qu&rsquo;il en </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><FONT SIZE=3>subjugue
une autre en huit jours, pendant la saison la plus ennemie de la
guerre, lorsque le repos et les plaisirs r&egrave;gnent dans les
cours des autres princes ; quand, non content de dompter les hommes,
il veut triompher aussi des &eacute;l&eacute;ments et quand au retour
de cette exp&eacute;dition, o&ugrave; il a vaincu comme un Alexandre,
vous le voyez gouverner ses peuples comme un Auguste ; avouez le
vrai, MONSEIGNEUR, vous soupirez pour la gloire aussi bien que lui,
malgr&eacute; l&rsquo;impuissance de vos ann&eacute;es ; vous
attendez avec impatience le temps o&ugrave; vous pourrez vous
d&eacute;clarer son Rival dans l&rsquo;amour de cette divine
ma&icirc;tresse. Vous ne l&rsquo;attendez pas, MONSEIGNEUR , vous le
pr&eacute;venez... &raquo;</FONT> </FONT>
</P>
<P ALIGN=RIGHT STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><FONT SIZE=3><I>La
Fontaine, Fables, extrait de la pr&eacute;face &agrave; Monseigneur
le Dauphin</I></FONT> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>Questions
:</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>1) Dans
le texte 1, comment se manifeste la joie de la foule ? A quoi
est-elle due ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>2) Dans
le texte 2, quelle est la figure de style employ&eacute;e ? Quelles
qualit&eacute;s du roi sont ainsi mises en valeur ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>3) Dans
le texte 3, expliquez l'expression &quot;ce jour nous y convie&quot;
; que se passe-t-il ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Pourquoi
? Comment ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>4) Dans
le texte 4, combien y a-t-il de phrases ? Que remarquez-vous sur leur
structure ? </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>5) Dans
le texte, surlignez le champ lexical du pan&eacute;gyrique. </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4><U><B>R&eacute;flexion
critique : citation de Voltaire</B></U> </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>&quot;Il
est toujours &agrave; craindre que le pan&eacute;gyrique d'un
monarque ne passe pour une flatterie int&eacute;ress&eacute;e&quot;. </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>Questions
: </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>1)
Expliquez cette pens&eacute;e. </FONT>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4>2)
R&eacute;digez le pan&eacute;gyrique de votre illustre professeur de
latin !... </FONT>
</P>
</BODY>
</HTML>
1.  De qui Persée est-il le fils&nbsp;?
2.  Pourquoi son grand-père n'est-il pas content de sa naissance&nbsp;?
3.  Pour quelle raison est-il allé affronter la Méduse&nbsp;?
4.  Qui sont les Grées&nbsp;?
5.  Quels sont les 3 objets magiques de Persée et à quoi lui servent-ils&nbsp;?
6.  Comment Pégase est-il né&nbsp;?
7.  Quel est le lien entre Pégase et les Muses&nbsp;?
8.  Pourquoi Andromède est-elle sacrifiée&nbsp;?
9.  Comment Persée a-t-il tué son grand-père Acrisios sans le faire exprès&nbsp;?
|<<siteMap cours . sliders>>|<<siteMap orthographe . sliders>>|<<siteMap  grammaire . sliders>>|<<siteMap  exercices . sliders>>|<<siteMap  leçons . popups>>|
|<<siteMap  questionnaires . sliders>>|<<siteMap  Lecture . sliders>>|<<siteMap séquences . sliders>>|||
// --------------------------------------------------------------------
// Calendar
// --------------------------------------------------------------------

config.macros.calendar = {holidays: []};
config.macros.calendar.options = {
 // day week starts from (normally 0-Su or 1-Mo)
 calendarWeekStart: 1,
 calendarToday: "Today",
 calendarHoliday: "Holiday: ",
 calendarLongDateFormat: "0MM/0DD/YYYY",
 calendarShortDateFormat: "0MM/0DD",
 calendarTag: ["schedule"]
};

/***************************************************************************
** Internal functions
***************************************************************************/
var cldTag;

config.macros.calendar.calendarIsHoliday = function(date) {
 var cm = config.macros.calendar;
 var longHoliday = date.formatString(cm.options.calendarLongDateFormat);
 var shortHoliday = date.formatString(cm.options.calendarShortDateFormat);
 for(var i = 0; i < cm.holidays.length; i++) {
 if(cm.holidays[i][0] == longHoliday || cm.holidays[i][0] == shortHoliday) {
 return cm.holidays[i];
 }
 }
 return null;
}

config.macros.calendar.onClickOtherDay = function() {
 var day = this.getAttribute('tiddlylink');
 story.displayTiddler(null,day,DEFAULT_EDIT_TEMPLATE);
 for(var i=0; i<cldTag.length;i++){
 Story.prototype.setTiddlerTag(day, cldTag[i], 1);
 }
 Story.prototype.focusTiddler(day,"text");
}

config.macros.calendar.getPopupText = function(title) {
 var popup_entries = store.getTiddlerText(title).split("\n");
 var popup = popup_entries[0];
 if(popup_entries.length>1) popup += " ...";
 return popup;
}

config.macros.calendar.findCalendar = function(child) {
 var parent;
 while (child && child.parentNode) {
 parent = child.parentNode;
 if (parent.id == "calendarWrapper") {
 return parent;
 }
 child = parent;
 }
 return null;
}

config.macros.calendar.selectDate = function(e) {
 if (!e) var e = window.event;
 var cm = config.macros.calendar;
 var calendar = cm.findCalendar(this);
 if (calendar) {
 var d = this.getAttribute("date");
 if (d != null) cm.makeCalendar(calendar, new Date(new Number(d)));
 }
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
}

config.macros.calendar.makeCalendar = function(calendar, dt_current) {
 var cm = config.macros.calendar;
 var dt_today = new Date(new Number(calendar.getAttribute("today")));
 var currentDay = new Date(new Number(calendar.getAttribute("currentDay")));
 var setControls = calendar.getAttribute("setControls");
 calendar.setAttribute("date", dt_current.valueOf());

 while (calendar.hasChildNodes())
 calendar.removeChild(calendar.firstChild);

if(setControls==1){
 // get same date in the previous year
 var dt_prev_year = new Date(dt_current);
 dt_prev_year.setFullYear(dt_prev_year.getFullYear() - 1);
 if (dt_prev_year.getDate() != dt_current.getDate())
 dt_prev_year.setDate(0);

 // get same date in the next year
 var dt_next_year = new Date(dt_current);
 dt_next_year.setFullYear(dt_next_year.getFullYear() + 1);
 if (dt_next_year.getDate() != dt_current.getDate())
 dt_next_year.setDate(0);

 // get same date in the previous month
 var dt_prev_month = new Date(dt_current);
 dt_prev_month.setMonth(dt_prev_month.getMonth() - 1);
 if (dt_prev_month.getDate() != dt_current.getDate())
 dt_prev_month.setDate(0);

 // get same date in the next month
 var dt_next_month = new Date(dt_current);
 dt_next_month.setMonth(dt_next_month.getMonth() + 1);
 if (dt_next_month.getDate() != dt_current.getDate())
 dt_next_month.setDate(0);
}

 // get first day to display in the grid for current month
 var dt_firstday = new Date(dt_current);
 dt_firstday.setDate(1);
 dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - cm.options.calendarWeekStart) % 7);

 var area, header;
 var line, cell, i;

 // 1 - calendar header table
 // 2 - print weekdays titles
 // 3 - calendar days table 
calendar.cellPadding = 0;
calendar.cellSpacing = 0;
area = createTiddlyElement(calendar, "tbody");

 // 1 - calendar header table
 header = createTiddlyElement(area,"tr", "calendarHeader");
 header.cellPadding = 0;
 header.cellSpacing = 0;

if(setControls==1){ 
var headerValues = [
 [ "<<", "selectYear", dt_prev_year.valueOf() ],
 [ "<", "selectMonth", dt_prev_month.valueOf() ],
 [ config.messages.dates.months[dt_current.getMonth()] + ' ' + dt_current.getFullYear(),
 "selectToday", dt_today.valueOf() ],
 [ ">", "selectMonth", dt_next_month.valueOf() ],
 [ ">>", "selectYear", dt_next_year.valueOf() ]
 ];

 for (i = 0; i < headerValues.length; ++i) {
 var link = createTiddlyElement(header,"td", null, null, headerValues[i][0]);
 if(i==2) link.colSpan=3;
 link.onclick = cm.selectDate;
 link.setAttribute("date", headerValues[i][2]);
 }
} else {
 var link = createTiddlyElement(header,"td", null, null, 
config.messages.dates.months[dt_current.getMonth()] + ' ' + dt_current.getFullYear());
//cm.options.calendarMonths
link.colSpan=7;
}

 // 2 - print weekdays titles
 line = createTiddlyElement(area, "tr", "weekNames");
 for (var n = 0; n < 7; ++n) {
 createTiddlyElement(line, "td", null, null, config.messages.dates.shortDays[(cm.options.calendarWeekStart + n)%7]);
//cm.options.calendarWeekDays
 }

 // 3 - calendar days table
 var dt_current_day = new Date(dt_firstday);
 var day_class;
 var title;
 var holiday;
 var popup;
 var clickHandler;

 while (dt_current_day.getMonth() == dt_current.getMonth() ||
 dt_current_day.getMonth() == dt_firstday.getMonth()) {

 // print row header
 line = createTiddlyElement(area, "tr", "calendarLine", null, null);
 for (var n_current_wday = 0; n_current_wday < 7; ++n_current_wday) {
 title = dt_current_day.formatString(cm.options.calendarLongDateFormat);
 clickHandler = cm.onClickOtherDay;
 popup = null;
 holiday = cm.calendarIsHoliday(dt_current_day);

 if (holiday != null) {
 // holidays
 day_class = (holiday.length==3)? holiday[2]: "holiDay";
 popup = cm.options.calendarHoliday + holiday[1];
 } else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6) {
 // weekend days
 day_class = "weekDay";
 } else {
 // print working days of current month
 day_class = "workingDay";
 }

if(dt_current_day.getMonth() == dt_current.getMonth()){
 if (currentDay.valueOf() == dt_current_day.valueOf()) {
 // print current date
 if (store.tiddlerExists(title)){
 // day has a tiddler associated with it
 day_class += " currentscheduledDay";
 clickHandler = onClickTiddlerLink;
 popup = cm.options.calendarToday + ": "+ cm.getPopupText(title);
 } else {
 day_class += " currentDay";
 popup = cm.options.calendarToday;
}
}

 if (store.tiddlerExists(title) && store.getTiddler(title).isTagged(cldTag[0]) && dt_current_day.valueOf() != dt_today.valueOf()) {
 // day has a tiddler associated with it
 day_class += " scheduledDay";
 clickHandler = onClickTiddlerLink;
 popup = cm.getPopupText(title);
 }
}

 // extra formatting for days of previous or next month
 if (dt_current_day.getMonth() != dt_current.getMonth()) {
 day_class += " otherMonthDay";
 }

 var text = dt_current_day.getDate();
 var cell = createTiddlyElement(line, "td", null, day_class, text);
 cell.onclick=clickHandler;
 cell.setAttribute("date", dt_current_day.valueOf());
 cell.setAttribute("tiddlyLink", title);
 if(popup) cell.setAttribute("title", popup);

 dt_current_day.setDate(dt_current_day.getDate()+1);
 }
 }
}

config.macros.calendar.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var start_date = new Array();
 var date = new Date();
 var cldParams = paramString.parseParams('calendarParams', null, true);
 var cldYear = (cldParams[0].year)?parseFloat(cldParams[0].year[0]): date.getFullYear();
 var cldMonth = (cldParams[0].month)?parseFloat(cldParams[0].month[0]): date.getMonth();
 var n_months = (cldParams[0].numberMonths)?parseFloat(cldParams[0].numberMonths[0]): 1;
 var n_cols = (cldParams[0].numberColumns)?parseFloat(cldParams[0].numberColumns[0]): 3;
 cldTag = (cldParams[0].tag)?cldParams[0].tag[0].split("#"): config.macros.calendar.options.calendarTag;
 for(var i = 0; i < n_months; i++){
 start_date[i] = new Date(cldYear, cldMonth+i, 1);
 }
 var n_rows = Math.max(1,Math.ceil(n_months/n_cols));
 n_cols = Math.min(n_cols,n_months);
 var setControls=(n_months>1)? 0: 1;
 var currentDay = new Date();
 currentDay = new Date(currentDay.getFullYear(), currentDay.getMonth(), currentDay.getDate());
 var holder = createTiddlyElement(place, "table", null,"calendarHolder");
 var holderTable = createTiddlyElement(holder, "tbody");
 for(var i = 0; i < n_rows; i++){
 var holderLine = createTiddlyElement(holderTable, "tr");
 for(var j = 0; j < n_cols; j++){
 var holderCell = createTiddlyElement(holderLine, "td");
 if(n_cols*i+j+1<=n_months){
 var calendar = createTiddlyElement(holderCell, "table", "calendarWrapper");
 calendar.setAttribute("name", "calendarWrapper");
 calendar.setAttribute("setControls", setControls);
 calendar.setAttribute("today", start_date[n_cols*i+j].valueOf());
 calendar.setAttribute("currentDay", currentDay.valueOf());
 config.macros.calendar.makeCalendar(calendar, start_date[n_cols*i+j]);
 }
 }
 }
}

function refreshCalendars(hint) {
 var calendars = document.getElementsByName("calendarWrapper");
 var i, c;
 for (i = 0; i < calendars.length; ++i) {
 c = calendars.item(i);
 if (c.id == "calendarWrapper") {
 config.macros.calendar.makeCalendar(c, new Date(new Number(c.getAttribute("date"))));
 }
 }
}

store.addNotification(null, refreshCalendars);

setStylesheet("/***\n!Calendar Styles\n***/\n/*{{{*/\n .viewer .calendarHolder {\n margin-left: auto;\n margin-right: auto;\n border: none;\n}\n\n .viewer .calendarHolder table {\n border: none;\n margin: 0;\n}\n\n .viewer .calendarHolder tr {\n border: none;\n vertical-align: top;\n}\n\n .viewer .calendarHolder td {\n border: none;\n vertical-align: top;\n}\n\n .viewer #calendarWrapper {\n width: 21em;\n border: 2px solid #4682b4;\n cursor: pointer;\n}\n\n #calendarWrapper #calendarLine td {\n height: 2.5em;\n}\n\n #calendarWrapper tr {\n border:none;\n}\n\n #calendarWrapper td {\n text-align: center;\n vertical-align: middle;\n width: 14.28%;\n border:none;\n}\n\n #calendarWrapper #calendarHeader td{\n color: #CFCFCF;\n background-color: #FFF;\n height: 2em;\n}\n\n #calendarWrapper #weekNames td {\n color: #CFCFCF;\n background-color: #FFF;\n height: 2em;\n}\n\n #calendarWrapper .weekDay {\n background-color: #FFF;\n}\n\n #calendarWrapper .holiDay {\n background-color: #CFCFCF;\n}\n\n #calendarWrapper .currentDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .currentscheduledDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .workingDay {\n background-color: #FFF;\n}\n\n #calendarWrapper .scheduledDay {\n border: solid orange 2px;\n}\n\n #calendarWrapper .otherMonthDay {\n background-color: #CFCFCF;\n}\n\n/*}}}*/","CalendarStyles");
Pour utiliser ce //carnet// //~TiddlyWiki//, commencez par modifier les //éléments// suivants (''//tiddlers//'' dans le jargon //~TiddlyWiki//) :
* __SiteTitle__ et __SiteSubtitle__ : Le titre et le sous-titre de ce //carnet// //~TiddlyWiki//. Après modification, ils apparaîtront aussi dans la barre de titre du navigateur)
* __MainMenu__: Le menu principal (généralement à gauche)
* __DefaultTiddlers__ : La liste les noms des //éléments// que vous voulez voir s'afficher à l'ouverture de ce //carnet// //~TiddlyWiki//. 
* Entrez également le ''nom d'utilisateur'' avec lequel seront signés vos ajouts ou vos modifications dans les //éléments// :
** <<option txtUserName>>

Ce même //élément// en anglais : [[GettingStarted]]
<div class='viewer' id='contentWrapper'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1><h2>%1</h2>
<ul>%2
</ul>
<small>Published: %6</small>
</div>
/***
|''Name:''|Publish Macro|
|''Version:''|2.4.1 (2 July 2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#PublishMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23PublishMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
!Description
<<doPublish>> tiddlers tagged with these tags <<option txtPublishTags>> (comma seperated) as HTML pages to the subfolder 'publish' (you must create this). Use the [[PublishTemplateHead]] and [[PublishTemplateBody]] templates to style your pages and the [[PublishIndexTemplate]] to define an index page. For publishing individual tiddlers the [[PublishTemplateBodySingle]] template is used.
!Usage
To publish all tagged tiddlers:
{{{<<doPublish>>}}} <<doPublish>>
To publish a single tiddler, use the {{{<<publishTiddler>>}}} macro or add the "publishTiddler" command to your ViewTemplate
!Template placeholders
|!Placeholder|!Meaning|
|%0|Your SiteTitle "<<tiddler SiteTitle>>"|
|%1|The current tiddler title|
|%2|The rendered tiddler HTML|
|%3|CSV list of tags|
|%4|Tiddler modifier|
|%5|Tiddler modified date|
|%6|Tiddler creation date|
|%7|Tiddler wiki text|
!Revision History
* Original by [[Jack]] 24 May 2006
* Updated 2 Jan 2007
* Refactored 4 Jan 2007
* Small improvements
* Publish single tiddlers
* Template placeholder %7 for tiddler's wiki text

!Code
***/
//{{{
version.extensions.doPublish = {
 major: 2,
 minor: 4,
 revision: 1,
 date: new Date("July 2, 2008")
};
config.macros.doPublish = {
 label: "publish",
 prompt: "Publish Tiddlers as HTML files"
};
if (config.options.txtPublishTags == undefined) config.options.txtPublishTags = "Publish";
config.shadowTiddlers.PublishTemplateHead = '<title>%0 - %1</title>\n<link rel="stylesheet" type="text/css" href="style.css"/>\n<meta name="keywords" content="%3"/>'
config.shadowTiddlers.PublishTemplateBody = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href=\"./publish/index.html\">Home</a> > %1</small><h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5&nbsp;(created %6)\n</div>\n'
config.shadowTiddlers.PublishTemplateBodySingle = '<h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5&nbsp;(created %6)\n</div>\n'
config.shadowTiddlers.PublishIndexTemplate = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1><h2>%1</h2>\n<ul>%2\n</ul>\n<small>Published: %6</small>\n</div>\n';
config.macros.doPublish.handler = function(place)
 {
 if (!readOnly)
 createTiddlyButton(place, this.label, this.prompt, 
 function() {
  doPublish();
  return false;
 },
 null, null, this.accessKey);

}
config.macros.publishTiddler = {
 label : 'publish',
 prompt : 'Publish this tiddler as an HTML file.',
 handler : function(place,macroName,params,wikifier,paramString,tiddler)
 {
  var btn = createTiddlyButton(place, this.label, this.prompt, 
  function(e) {
   if(!e) var e = window.event;
   publishTiddler(this.getAttribute('tiddler'))
   return false;
  },
  null, null, this.accessKey);
  btn.setAttribute('tiddler', tiddler.title);
}}
config.commands.publishTiddler = {handler : function(event,src,title) {publishTiddler(title);},text: "publish", tooltip: "Publish this tiddler as HTML"};
function publishTiddler(title) {
 //debugger
 
 var PublishFolder = getWikiPath('publish');
 var place = document.getElementById(story.container)
 var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
 var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBodySingle") || store.getTiddlerText("PublishTemplateBody");
 HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
 HTMLTemplateBody = wiki2Web(HTMLTemplateBody);
 
 var tiddler = store.getTiddler(title);
 var tiddlerText = store.getValue(tiddler, 'text');
 var tiddlerHTML = wikifyStatic(tiddlerText);
 var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
 HTML = HTML.format([
  wikifyPlain("SiteTitle").htmlEncode(), 
  tiddler.title.htmlEncode(), 
  wiki2Web(tiddlerHTML), 
  tiddler.tags.join(", "), 
  tiddler.modifier, 
  tiddler.modified.toLocaleString(), 
  tiddler.created.toLocaleString(),
  tiddlerText
 ]);
 saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
 //story.closeTiddler(tiddler.title);
 var indexWin = window.open((PublishFolder + title.filenameEncode() + ".html").replace(/\\/g, "/"), null);
 indexWin.focus();
}
function doPublish() {
 var savedTiddlers = [];
 var tiddlers = store.getTiddlers("title");
 var place = document.getElementById(story.container)
 var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
 var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBody");
 HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
 HTMLTemplateBody = wiki2Web(HTMLTemplateBody);

 var PublishTags = config.options.txtPublishTags || "publish";
 PublishTags = PublishTags.split(",")
 var PublishFolder = getWikiPath('publish');
 if (!PublishFolder) return;
 var indexFile = "";

 var indexFileTemplate = store.getTiddlerText("PublishIndexTemplate");
 // This does not allow <<myMacro>> but wants <div macro="myMacro">
 indexFileTemplate = renderTemplate(indexFileTemplate)
 // This option allows WIKI-syntax but is limited in it's HTML capabilities
 //indexFileTemplate = wikifyStatic(indexFileTemplate)

 for (var t = 0; t < tiddlers.length; t++) {
  var tiddler = tiddlers[t];
  if (tiddler.tags.containsAny(PublishTags)) {
   var tiddlerText = store.getValue(tiddler, 'text');
   var tiddlerHTML = wikifyStatic(tiddlerText);
   var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
   HTML = HTML.format([
   wikifyPlain("SiteTitle").htmlEncode(), 
   tiddler.title.htmlEncode(), 
   wiki2Web(tiddlerHTML), 
   tiddler.tags.join(", "), 
   tiddler.modifier, 
   tiddler.modified.toLocaleString(), 
   tiddler.created.toLocaleString(),
  tiddlerText
   ]);
   //saveFile(PublishFolder + tiddler.created.formatString("YYYY0MM0DD") + ".html", HTML);
   saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
   indexFile += "<li><a href=\"" + tiddler.title.filenameEncode() + ".html" + "\" class=\"tiddlyLink tiddlyLinkExisting\">" + tiddler.title + "</a></li>\n";
   story.closeTiddler(tiddler.title);

  }

 }
 indexFileTemplate = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + indexFileTemplate + '\n</body>\n</html>';
 indexFileTemplate = indexFileTemplate.format([wikifyPlain("SiteTitle").htmlEncode(), wikifyPlain("SiteSubtitle").htmlEncode(), "%2", "", "", "", (new Date()).toLocaleString()])

 indexFile = indexFileTemplate.replace("%2", indexFile)
 indexFile = wiki2Web(indexFile);
 saveFile(PublishFolder + "index.html", indexFile)
 saveFile(PublishFolder + "style.css", store.getTiddlerText("StyleSheet") + store.getTiddlerText("StyleSheetLayout") + store.getTiddlerText("StyleSheetColors"))
 var indexWin = window.open("file://" + PublishFolder.replace(/\\/g, "/") + "index.html", null);
 indexWin.focus();

}

function renderTemplate(html) {
 var result = document.createElement("div");
 result.innerHTML = html;
 applyHtmlMacros(result, null);
 var temp = result.innerHTML;
 //result.parentNode.removeChild(result);
 return temp;

}

// Convert wikified text to html
function wiki2Web(wikiHTML) {
 //var regexpLinks = new RegExp("<a tiddlylink=.*?</a>", "img");
 var regexpLinks = /<a[^>]+tiddlylink\s*=\s*["']?\s*?([^ "'>]*)\s*["']?[^>]*>[^<]+<\/a>/img;
 var result = wikiHTML.match(regexpLinks);
 if (result) {
  for (i = 0; i < result.length; i++) {
   var className = result[i].match(/ class="(.*?)"/i) ? result[i].match(/ class="(.*?)"/i)[1] : "";
   var tiddlerName = result[i].match(/ tiddlylink="(.*?)"/i)[1]; 
   var url = tiddlerName.htmlDecode().filenameEncode() + ".html"; 
   var tiddlerLabel = result[i].match(/">(.*?)<\/a>/i)[1]; 
   if (!className.match(/tiddlyLinkNonExisting/i)) 
   wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" href=\"" + url + "\">" + tiddlerLabel + "</a>"); 
   else
   wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" title=\"Page does not exist\" href=\"#\">" + tiddlerName + "</a>");

  }
  wikiHTML = wikiHTML.replace(/ href="http:\/\//gi, " target=\"_blank\" href=\"http://");

 }
 return wikiHTML

}
function getWikiPath(folderName) {
 var originalPath = document.location.toString();
 if (originalPath.substr(0, 5) != 'file:') {
  alert(config.messages.notFileUrlError);
  if (store.tiddlerExists(config.messages.saveInstructions))
  story.displayTiddler(null, config.messages.saveInstructions);
  return;

 }
 var localPath = getLocalPath(originalPath);
 var backSlash = localPath.lastIndexOf('\\') == -1 ? '/': '\\';
 var dirPathPos = localPath.lastIndexOf(backSlash);
 var subPath = localPath.substr(0, dirPathPos) + backSlash + (folderName ? folderName + backSlash: '');
 return subPath;

}

// Replace without regex
String.prototype.myReplace = function(sea, rep) {
 var t1 = this.indexOf(sea);
 var t2 = parseInt(this.indexOf(sea)) + parseInt(sea.length);
 var t3 = this.length;
 return this.substring(0, t1) + rep + this.substring(t2, t3)

}
// Convert illegal characters to underscores
String.prototype.filenameEncode = function()
 {
 return (this.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));

}
//}}}
<div class='viewer' id='contentWrapper'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1>
<h2>%1</h2>
%2
<pre>%7</pre>
<hr>Tags: %3
<hr>%4, %5&nbsp;(created %6)
</div>
<h1>%0</h1>
<h2>%1</h2>
%2
<hr>Tags: %3
<hr>
<h3>Tiddler WIKI Text</h3>
<pre>
%7
</pre>
<hr>%4, %5&nbsp;(created %6)
</div>
<title>%0 - %1</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta name="keywords" content="%3"/>
Pour un art poétique

1

Un poème c’est bien peu de chose
à peine plus qu’un cyclone aux Antilles
qu’un typhon dans la mer de Chine
un tremblement de terre à Formose

Une inondation du Yang Tse Kiang
ça vous noie cent mille Chinois d’un seul coup
vlan
ça ne fait même pas le sujet d’un poème
Bien peu de chose

On s’amuse bien dans notre petit village
on va bâtir une nouvelle école
on va élire un nouveau maire et changer les jours de marché
on était au centre du monde on se trouve maintenant près du fleuve océan qui ronge l’horizon

Un poème c’est bien peu de chose

2

Adieu ma terre ronde
adieu mes arbres verts
je m’en vais dans la tombe dire bonjour aux vers
— tout poète à la ronde peut saboter un vers
moi j’éteins la calbombe
et m’en vais boire un verre


3

Bien placés bien choisis
quelques mots font une poésie
les mots il suffit qu’on les aime
pour écrire un poème
on sait pas toujours ce qu’on dit
lorsque naît la poésie
faut ensuite rechercher le thème
pour intituler le poème
mais d’autres fois on pleure on rit
en écrivant la poésie
ça a toujours kékchose d’extrême
un poème

4

Nos noms nos mots nos herbes
sèchent en un vocabulaire
que lèche un veau qui a bu la prairie
nos airs nos béhémoths nos monts
épais légers ou lourds mais verts
tandis que grisonne l’affiche à la mairie
que toujours embuent les haines des morts
et que le soleil dans les narines du gnomon
insuffle la nature du haut cresson
à travers quoi courent haletants les zèbres
à la parole ailée à la patte d’oseille
depuis toujours par la rousse baptisés
pour figurer là-bas en bas du dictionnaire

nos noms nos mots et nos malherbes
5

Bon dieu de bon dieu que j'ai envie d'écrire un petit poème.
Tiens, en voilà justement un qui passe
Petit petit petit
viens ici que je t'enfile
sur le collier de mes autres poèmes
viens ici que je t'entube
dans le comprimé de mes œuvres complètes
viens ici que je t'enpapouète
et que je t'enrime
et que je t'enrythme
et que je t'enlyre
et que je t'enpégase
et que je t'enverse
et que&nbsp; je t'enprose

la vache
il a foutu le camp

6

L'encrier noir au clair de lune
l'encrier noir au clair de lune
au clair de la lune un encrier noir
au clair de la lune un encrier noir
un pauvre poète a prêté sa plume
au pauvre poète a prêté sa plume
il fait un peu frais ce soir
au clair de la lune un encrier noir
sur le papier blanc a couru la plume

la plume a couru zen petits traits noirs
une lune blanche un sombre encrier
sont les père et mère de ce nouveau-né
une lune blanche un sombre encrier.

7

Quand les poètes s’ennuient alors il leur ar-
Rive de prendre une plume et d’écrire un po-
Ème on comprend dans ces conditions que ça bar-
Be un peu quelque fois la poésie la po-
Ésie

8

Ousqu’est mon registre à poèmes 
moi qui voulais...
pas de papier pas de plume 
plus de poème
me voici en face de rien 
de rien du tout
du néant
ah que je me sens métaphysique 
sans feu ni chandelle
pour la poétique

9

Ce soir
si j'écrivais un poème
pour la postérité ?

fichtre
la belle idée

je me sens sûr de moi
j'y vas
et

à 
la postérité
j'y dis merde et remerde
et reremerde
drôlement feintée
la postérité
qui attendait son poème

ah mais

10

Sabre de bois de paille et d’herbe et de farine
fusils de sureau creux et canons d’osier brut
toute cette armée attend la naissance 
des petits enfants

ombres et poids et larmes et suées
le lit percuté par la morve et les pots
se traînant à travers les moutons de poussière
errant entre les pieds des chaises lourdement chargées
un être est là bêlant
un enfant un tout petit enfant

les autres ont compris et le ciel a compris
et les moustaches austères et les fonds de culotte
ont compris et les poêles gonflés à blanc à bloc
quisoufflent sans fumer ont compris

ils ont compris les autres et le grand-papa
qui a compris zossi
pour l’enfat dit
sabre de bois de paille et d’herbe et de farine
fusilsur l’épaule et casque en tête

et l’enfant
vaincu
entre 
à 
l’école

plus tard
il
en
sort

il
écrit
des
poèmes
alors
parfois

sur un sujet
qui
en
vaut
bien
un autre

un comme celui-là deux points
sabre de bois
sabre de bois
sabre de bois
sabre de bois de paille et d’herbe et da farine

11

Un train qui siffle dans la nuit
C'est un sujet de poésie
Un train qui siffle en Bohême
C'est là le sujet d'un poème

Un train qui siffle mélod'
Ieusement c'est pour une ode
Un train qui siffle comme un sansonnet
C'est bien un sujet de sonnet

Et un train qui siffle comme un hérisson
Ça fait tout un poème épique
Seul un train sifflant dans la nuit
Fait un sujet de poésie


Raymond Queneau, Pour un art poétique, in L’Instant fatal, 1948, © Gallimard
Entrer le texte de 'Nouvel Elément'
/***
| Name:|QuickOpenTagPlugin|
| Purpose:|Makes tag links into a Taggly style open tag plus a normal style drop down menu|
| Creator:|SimonBaird|
| Source:|http://simonbaird.com/mptw/#QuickOpenTagPlugin|
| Requires:|TW 2.x|
| Version|1.1.1 (19-May-06)|

!History
* Version 1.1.1 (19/05/2006)
** Added a little more CSS so the tags look good in standard main menus and normal tiddlers
* Version 1.1 (07/02/2006)
** Fix Firefox 1.5.0.1 crashes
** Updated by ~BidiX[at]~BidiX.info
* Version 1.0 (?/01/2006)
** First release

***/
//{{{

//⊻ ⊽ ⋁ ▼ 

window.createTagButton_orig_mptw = createTagButton;
window.createTagButton = function(place,tag,excludeTiddler) {
 var sp = createTiddlyElement(place,"span",null,"quickopentag");
 createTiddlyLink(sp,tag,true,"button");
 var theTag = createTiddlyButton(sp,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tag]),onClickTag);
 theTag.setAttribute("tag",tag);
 if(excludeTiddler)
 theTag.setAttribute("tiddler",excludeTiddler);
 return(theTag);
};

config.macros.miniTag = {handler:function(place,macroName,params,wikifier,paramString,tiddler) {
 var tagged = store.getTaggedTiddlers(tiddler.title);
 if (tagged.length > 0) {
 var theTag = createTiddlyButton(place,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
 theTag.setAttribute("tag",tiddler.title);
 theTag.className = "miniTag";
 }
}};

config.macros.miniTag.dropdownchar = (document.all?"▼":"▾"); // the fat one is the only one that works in IE

config.macros.allTags.handler = function(place,macroName,params)
{
 var tags = store.getTags();
 var theDateList = createTiddlyElement(place,"ul",null,null,null);
 if(tags.length === 0)
 createTiddlyElement(theDateList,"li",null,"listTitle",this.noTags);
 for (var t=0; t<tags.length; t++)
 {
 var theListItem =createTiddlyElement(theDateList,"li",null,null,null);
 var theLink = createTiddlyLink(theListItem,tags[t][0],true);
 var theCount = " (" + tags[t][1] + ")";
 theLink.appendChild(document.createTextNode(theCount));

 var theDropDownBtn = createTiddlyButton(theListItem," "+config.macros.miniTag.dropdownchar,this.tooltip.format([tags[t][0]]),onClickTag);
 theDropDownBtn.setAttribute("tag",tags[t][0]);
 }
};


// probably could redo these styles a bit cleaner..
setStylesheet(
 ".tagglyTagged .quickopentag, .tagged .quickopentag \n"+
 "     { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }\n"+
 ".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }\n"+
 ".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}\n"+
// extra specificity to make it work?
 "#displayArea .viewer .quickopentag a.button, \n"+
 "#displayArea .viewer .quickopentag a.tiddyLink, \n"+
 "#mainMenu .quickopentag a.tiddyLink, \n"+
 "#mainMenu .quickopentag a.tiddyLink \n"+
         " { border:0px solid black; }\n"+
 "#displayArea .viewer .quickopentag a.button, \n"+
 "#mainMenu .quickopentag a.button \n"+
    "{ margin-left:0px; padding-left:2px; }\n"+
 "#displayArea .viewer .quickopentag a.tiddlyLink, \n"+
 "#mainMenu .quickopentag a.tiddlyLink \n"+
   " { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }\n"+
 "a.miniTag {font-size:150%;} \n"+
 "#mainMenu .quickopentag a.button \n"+
    "{ margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }\n"+ // looks better in right justified main menus
 "",
"QuickOpenTagStyles");

//}}}

/***
<html>&#x22bb; &#x22bd; &#x22c1; &#x25bc; &#x25be;</html>
***/
The main goals of RSSExtensions are :
*to generate an RSSFeed with plaintext, html and TiddlyWiki content
*to provide a builtin RSSReader (by extending BramChen's RssNewsMacro for):
**HTML support when RSSFeed uses HTML formatting
**TiddlyWikiNamespace support for direct viewing and possibly import a tiddler from an RSSFeed
>Try these <<tag RSSFeeds>>
*to generate a kind of frontpage for a TiddlyWiki from an RSSFeed
RSSExtensions contains :
*TiddlyWikiNamespace: define the TiddlyWikiNamespace 
*GenerateRssHijack: hijack the core generateRSS
*RSSReaderPlugin: provides the RSSReaderMacro for TiddlyWiki
*[[news.php]]: this php script display an RSSFeed
*[[proxy.php]]: when located on the TiddlyWiki site provides OtherSites access
/***
|''Name:''|RSSReaderPlugin|
|''Description:''|This plugin provides a RSSReader for TiddlyWiki|
|''Version:''|0.3.0|
|''Date:''|Aug 24, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#RSSReaderPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#RSSReaderPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''Credit:''|BramChen for RssNewsMacro|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.0.0|
|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|
|''Include:''|none|
|''Require:''|none|
***/
//{{{
version.extensions.RSSReaderPlugin = {
	major: 0, minor: 3, revision: 0,
	date: new Date("Aug 24, 2006"),
	author: "BidiX",
	credit: "BramChen for RssNewsMacro",
	source: "http://TiddlyWiki.bidix.info/#RSSReaderPlugin",
	documentation : "http://TiddlyWiki.bidix.info/#RSSReaderPluginDoc",
	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.0.0',
	browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'	
};

config.macros.rssReader = {
	dateFormat: "DDD, DD MMM YYYY",
	itemStyle: "display: block;border: 1px solid black;padding: 5px;margin: 5px;", //useed  '@@'+itemStyle+itemText+'@@'
	msg:{
		permissionDenied: "Permission to read preferences was denied.",
		noRSSFeed: "No RSS Feed at this address %0",
		urlNotAccessible: " Access to %0 is not allowed"
	},
	cache: [], 	// url => request
	desc: "noDesc",
	// feedURL: "",
	place:"",
	handler: function(place,macroName,params,wikifier,paramString,tiddler){
		var desc = params[0];
		var feedURL = params[1];
		// var toFilter = (params[2] ? params[2] : false);
		var toFilter = false;
		var filterString;
		if (params[2] != undefined) {
			toFilter = true;
			if (params[2].match(/\w+/))
				filterString = params[2];
			else
				filterString = tiddler.title;
		}
		var place = createTiddlyElement(place, "div", "RSSReader");
		wikify("^^<<rssFeedUpdate "+feedURL+" [[" + tiddler.title + "]]>>^^\n",place);
		if (this.cache[feedURL]) {
			this.processResponse(this.cache[feedURL], feedURL, place, desc, toFilter, filterString);
		}
		else {
			this.asyncGet(feedURL, place, desc, toFilter, filterString);
		}
	},

	asyncGet: function (feedURL, place, desc, toFilter, filterString){
		var xmlhttp;
		try {xmlhttp=new XMLHttpRequest();}
		catch (e) {
			try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
			catch (e) {
				try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
				catch (e) { displayMessage(e.description?e.description:e.toString());}
			}
		}
		if (!xmlhttp){
			return;
		}
		if (window.netscape){
			try {
				if (document.location.protocol.indexOf("http") == -1) {
 					netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
				}
			}
			catch (e) { displayMessage(e.description?e.description:e.toString()); }
		}
		xmlhttp.onreadystatechange=function (){
			if (xmlhttp.readyState==4) {
				if (xmlhttp.status==200 || xmlhttp.status===0) {
					config.macros.rssReader.processResponse(xmlhttp, feedURL, place, desc, toFilter, filterString);
				}
				else {
					displayMessage("Problem retrieving XML data:" + xmlhttp.statusText);
				}
			}
		};
		try {
			xmlhttp.open("GET",feedURL,true);
			if (config.browser.isIE) {
				xmlhttp.send();
			}
			else {
				xmlhttp.send(null);
			}
		}
		catch (e) {
			wikify(e.toString()+this.urlNotAccessible.format([feedURL]), place);
		}
	},
	processResponse: function(xmlhttp, feedURL, place, desc, toFilter, filterString){	
		if (window.netscape){
			try {
				if (document.location.protocol.indexOf("http") == -1) {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
				}
			}
			catch (e) { displayMessage(e.description?e.description:e.toString()); }
		}
		if (xmlhttp.responseXML){
			this.cache[feedURL] = xmlhttp;
			this.genRssNews(xmlhttp.responseXML, place, feedURL, desc, toFilter, filterString);
		}
		else {
			var dom = (new DOMParser()).parseFromString(xmlhttp.responseText, "text/xml"); 
			if (dom) {
				this.cache[feedURL] = xmlhttp;
				this.genRssNews(dom, place, feedURL, desc, toFilter, filterString);
			}
			else {
				wikify("<html>"+xmlhttp.responseText+"</html>", place);
				displayMessage(this.msg.noRSSFeed.format([feedURL]));
			}
		}
	},
	genRssNews: function(xml, place, feedURL, desc, toFilter, filterString){
		// Channel
		var chanelNode = xml.getElementsByTagName('channel').item(0);
		var chanelTitleElement = (chanelNode ? chanelNode.getElementsByTagName('title').item(0) : null);
		var chanelTitle = "";
		if ((chanelTitleElement) && (chanelTitleElement.firstChild)) chanelTitle = chanelTitleElement.firstChild.nodeValue;
		var chanelLinkElement = (chanelNode ? chanelNode.getElementsByTagName('link').item(0) : null);
		var chanelLink = "";
		if (chanelLinkElement) chanelLink = chanelLinkElement.firstChild.nodeValue;
		var titleTxt = "!![["+chanelTitle+"|"+chanelLink+"]]\n";
		var title = createTiddlyElement(place,"div",null,"ChanelTitle",null);
		wikify(titleTxt,title);
		// ItemList
		var itemList = xml.getElementsByTagName('item');
		var article = createTiddlyElement(place,"ul",null,null,null);
		var lastDate;
		var re;
		if (toFilter) 
			re = new RegExp(filterString.escapeRegExp());
		for (var i=0; i<itemList.length; i++){
			var titleElm = itemList[i].getElementsByTagName('title').item(0);
			var titleText = (titleElm ? titleElm.firstChild.nodeValue : '');
			if (toFilter && ! titleText.match(re)) {
				continue;
			}
			var descText = '';
			var isWikitext = false;
			var descElem = itemList[i].getElementsByTagName('wikitext').item(0);
			if (descElem){
				try{
					isWikitext = true;
					descText = "\n"+descElem.firstChild.nodeValue;}
					catch(e){}
			}
			else {
				descElem = itemList[i].getElementsByTagName('encoded').item(0);
				if (descElem){
					try{descText = descElem.firstChild.nodeValue;}
						catch(e){}
					descText = "<html>"+descText+"</html>";
				}
				else {
					descElem = itemList[i].getElementsByTagName('description').item(0);
					if (descElem){
						try{descText = descElem.firstChild.nodeValue;}
						catch(e){}
						descText = descText.replace(/<br \/>/g,'\n');
						if (desc == "asHtml")
							descText = "<html>"+descText+"</html>";
					}
				}
			}
			var linkElm = itemList[i].getElementsByTagName("link").item(0);
			var linkURL = linkElm.firstChild.nodeValue;
			var pubElm = itemList[i].getElementsByTagName('pubDate').item(0);
			var pubDate;
			if (!pubElm) {
				pubElm = itemList[i].getElementsByTagName('date').item(0); // for del.icio.us
				if (pubElm) {
					pubDate = pubElm.firstChild.nodeValue;
					pubDate = this.formatDateString(this.dateFormat, pubDate);
					}
					else {
						pubDate = '0';
					}
				}
			else {
				pubDate = (pubElm ? pubElm.firstChild.nodeValue : 0);
				pubDate = this.formatString(this.dateFormat, pubDate);
			}
			titleText = titleText.replace(/\[|\]/g,'');
			var rssText = '** '+'[[' + titleText + '|' + linkURL + ']]' + '\n' ;
			if ((desc != "noDesc") && descText){
				if (version.extensions.nestedSliders){
					rssText = rssText.replace(/\n/g,' ');
					descText = '+++[...]\n'
						+(isWikitext ? '\n<<rssFeedImportTiddler '+ feedURL + ' [['+titleText+']]>>':'')
						+'@@'+this.itemStyle+descText+'\n@@\n'
						+'===';
					}
				rssText = rssText + descText + '\n\n';
			}
			var story;
			if ((lastDate != pubDate) && ( pubDate != '0')) {
				story = createTiddlyElement(article,"li",null,"RSSItem",pubDate);
				lastDate = pubDate;
			}
			else {
				lastDate = pubDate;
			}
			story = createTiddlyElement(article,"div",null,"RSSItem",null);
			wikify(rssText,story);
		}
	},
	formatString: function(template, theDate){
		var dateString = new Date(theDate);
		template = template.replace(/hh|mm|ss/g,'');
		return dateString.formatString(template);
	},
	formatDateString: function(template, theDate){
		var dateString = new Date(theDate.substr(0,4), theDate.substr(5,2) - 1, theDate.substr(8,2)
			/*,  theDate.substr(11,2), theDate.substr(14,2), theDate.substr(17,2)*/
			);
		return dateString.formatString(template);
	}
	
};
//}}}

//{{{
config.macros.rssFeedUpdate = {
	label: "Update",
	prompt: "Clear the cache and redisplay this RssFeed",
	handler: function(place,macroName,params) {
		var feedURL = params[0];
		var tiddlerTitle = params[1];
		createTiddlyButton(place, this.label, this.prompt, 
			function () {
				if (config.macros.rssReader.cache[feedURL]) {
					config.macros.rssReader.cache[feedURL] = null; 
					//story.refreshTiddler(tiddlerTitle,null, true);
			}
			story.refreshTiddler(tiddlerTitle,null, true);
		return false;});
	}
};
//}}}

//{{{
config.macros.rssFeedImportTiddler = {
	label: "Import",
	prompt: "Import this tiddler in this TiddlyWiki",
	askReplaceMsg: "Tiddler already exists, replace it ?",
	handler: function(place,macroName,params) {
		var  feedUrl = params[0];
		var tiddlerTitle = params[1];
		createTiddlyButton(place, this.label, this.prompt, 
			function () {
				if (feedUrl && config.macros.rssReader.cache[feedUrl]) {
					var tiddler = config.macros.rssFeedImportTiddler.parseRssNews(config.macros.rssReader.cache[feedUrl].responseXML, tiddlerTitle);
					if (tiddler && (! store.getTiddler(tiddlerTitle) || confirm(config.macros.rssFeedImportTiddler.askReplaceMsg))) {
						store.addTiddler(tiddler);
						store.notify(tiddler.title, true);
						store.setDirty(true);
					}
				}
			return false;});
	},
	
	// parse a RssFeed for retrieving a Tiddler with title
	parseRssNews: function(xml, title) {
		// ItemList
		if (document.location.protocol.indexOf("http") == -1) {
			netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
		}

		var itemList = xml.getElementsByTagName('item');
		for (var i=0; i<itemList.length; i++){

			var titleElm = itemList[i].getElementsByTagName('title').item(0);
			var titleText = titleElm.firstChild.nodeValue;
			if (titleText == title) {
				//	<tiddlywiki:title>
				//	titleText
				titleText = titleText.htmlDecode();
				//	<tiddlywiki:wikitext>
				var elem = itemList[i].getElementsByTagName('wikitext').item(0);
				var text = elem ? elem.firstChild.nodeValue.htmlDecode() : "";
				//	<tiddlywiki:modifier>
				elem = itemList[i].getElementsByTagName('modifier').item(0);
				var modifier = elem ? elem.firstChild.nodeValue : "";
				//	<tiddlywiki:modified>
				elem = itemList[i].getElementsByTagName('modified').item(0);
				var modified = elem ? Date.convertFromYYYYMMDDHHMM(elem.firstChild.nodeValue) : "";
				//	<tiddlywiki:created>
				elem = itemList[i].getElementsByTagName('created').item(0);
				var created = elem ? Date.convertFromYYYYMMDDHHMM(elem.firstChild.nodeValue) : "";
				//	<tiddlywiki:links>
				//	Links ?
				//	<tiddlywiki:tags>
				elem = itemList[i].getElementsByTagName('tags').item(0);
				var tags = elem ? elem.firstChild.nodeValue.htmlDecode() : "";
				var tiddler = new Tiddler();
				tiddler.assign(titleText,text,modifier,modified,tags,created);
				return tiddler;
			}
		}
		// not found 
		alert("Tiddler \[[" + title +"]] notFound.");
		return null;
	}

};

//}}}
Travail sur les guerres civiles à Rome

1. Qu'est ce que le triumvirat&nbsp;?
2. Qui étaient les 3 premiers triumvirs&nbsp;? Trouve des bustes de ces triumvirs (ou, au pire, des représentations).
3. Fais un portrait de chacun des trois, en montrant leurs différences voire leurs oppostions.
4. A quel moment le triumvirat n'a plus fonctionné, pourquoi ?
5. Comment cela s'est-il terminé&nbsp;?
6. Qui seront les hommes qui formeront le «&nbsp;second triumvirat&nbsp;»&nbsp;?

Si vous avez fini, répondez aux questions de ce «quizz»: http://www.gratumstudium.com/latin/cesar.htm 
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.8 (Mar 9, 2006)|
|''Source:''|http://www.geocities.com/allredfaq/reminderMacros.html|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com)|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|

!Description
This plugin provides macros for tagging a date with a reminder.  Use the {{{reminder}}} macro to do this.  The {{{showReminders}}} and {{{displayTiddlersWithReminder}}} macros automatically search through all available tiddlers looking for upcoming reminders.

!Installation
* Create a new tiddler in your tiddlywiki titled ReminderPlugin and give it the {{{systemConfig}}} tag.  The tag is important because it tells TW that this is executable code.
* Double click this tiddler, and copy all the text from the tiddler's body.
* Paste the text into the body of the new tiddler in your TW.
* Save and reload your TW.
* You can copy some examples into your TW as well.  See [[Simple examples]], [[Holidays]], [[showReminders]] and [[Personal Reminders]]

!Syntax:
|>|See [[ReminderSyntax]] and [[showRemindersSyntax]]|

!Revision history
* v2.3.8 (Mar 9, 2006)
**Bug fix: A global variable had snuck in, which was killing FF 1.5.0.1
**Feature: You can now use TIDDLER and TIDDLERNAME in a regular reminder format
* v2.3.6 (Mar 1, 2006)
**Bug fix: Reminders for today weren't being matched sometimes.
**Feature:  Solidified integration with DatePlugin and CalendarPlugin
**Feature:  Recurring reminders will now return multiple hits in showReminders and the calendar.
**Feature:  Added TIDDLERNAME to the replacements for showReminders format, for plugins that need the title without brackets.
* v2.3.5 (Feb 8, 2006)
**Bug fix: Sped up reminders lots.  Added a caching mechanism for reminders that have already been matched.
* v2.3.4 (Feb 7, 2006)
**Bug fix: Cleaned up code to hopefully prevent the Firefox 1.5.0.1 crash that was causing lots of plugins 
to crash Firefox.  Thanks to http://www.jslint.com
* v2.3.3 (Feb 2, 2006)
**Feature: newReminder now has drop down lists instead of text boxes.
**Bug fix:  A trailing space in a title would trigger an infinite loop.
**Bug fix:  using tag:"birthday !reminder" would filter differently than tag:"!reminder birthday"
* v2.3.2 (Jan 21, 2006)
**Feature: newReminder macro, which will let you easily add a reminder to a tiddler. Thanks to Eric Shulman (http://www.elsdesign.com) for the code to do this.
** Bug fix: offsetday was not working sometimes
** Bug fix: when upgrading to 2.0, I included a bit to exclude tiddlers tagged with excludeSearch.  I've reverted back to searching through all tiddlers
* v2.3.1 (Jan 7, 2006)
**Feature: 2.0 compatibility
**Feature AlanH sent some code to make sure that showReminders prints a message if no reminders are found.
* v2.3.0 (Jan 3, 2006)
** Bug Fix:  Using "Last Sunday (-0)" as a offsetdayofweek wasn't working.
** Bug Fix:  Daylight Savings time broke offset based reminders (for example year:2005 month:8 day:23 recurdays:7 would match Monday instead of Tuesday during DST.

!Code
***/
//{{{

//============================================================================
//============================================================================
//           ReminderPlugin
//============================================================================
//============================================================================

version.extensions.ReminderPlugin = {major: 2, minor: 3, revision: 8, date: new Date(2006,3,9), source: "http://www.geocities.com/allredfaq/reminderMacros.html"};

//============================================================================
// Configuration
// Modify this section to change the defaults for 
// leadtime and display strings
//============================================================================

config.macros.reminders = {};
config.macros["reminder"] = {};
config.macros["newReminder"] = {};
config.macros["showReminders"] = {};
config.macros["displayTiddlersWithReminders"] = {};

config.macros.reminders["defaultLeadTime"] = [0,6000];
config.macros.reminders["defaultReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY";
config.macros.reminders["defaultShowReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY -- TIDDLER";
config.macros.reminders["defaultAnniversaryMessage"] = "(DIFF)";
config.macros.reminders["untitledReminder"] = "Untitled Reminder";
config.macros.reminders["noReminderFound"] = "Couldn't find a match for TITLE in the next LEADTIMEUPPER days."
config.macros.reminders["todayString"] = "Today";
config.macros.reminders["tomorrowString"] = "Tomorrow";
config.macros.reminders["ndaysString"] = "DIFF days";
config.macros.reminders["emtpyShowRemindersString"] = "There are no upcoming events";


//============================================================================
//  Code
// You should not need to edit anything 
// below this.  Make sure to edit this tiddler and copy 
// the code from the text box, to make sure that 
// tiddler rendering doesn't interfere with the copy 
// and paste.
//============================================================================

// This line is to preserve 1.2 compatibility
 if (!story) var story=window; 
//this object will hold the cache of reminders, so that we don't
//recompute the same reminder over again.
var reminderCache = {};

config.macros.showReminders.handler = function showReminders(place,macroName,params)
{
   var now = new Date().getMidnight();
   var paramHash = {};
   var leadtime = [0,14];
   paramHash = getParamsForReminder(params);
   var bProvidedDate = (paramHash["year"] != null) || 
			(paramHash["month"] != null) || 
			(paramHash["day"] != null) || 
			(paramHash["dayofweek"] != null);
   if (paramHash["leadtime"] != null)
   {
      leadtime = paramHash["leadtime"];
      if (bProvidedDate)
      {
         //If they've entered a day, we need to make 
         //sure to find it.  We'll reset the 
         //leadtime a few lines down.
         paramHash["leadtime"] = [-10000, 10000];
      }
   }
   var matchedDate = now;
   if (bProvidedDate)
   {
      var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
      var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
      matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); 
   }

   var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
   var elem = createTiddlyElement(place,"span",null,null, null);
   var mess = "";
   if (arr.length == 0)
   {
      mess += config.macros.reminders.emtpyShowRemindersString; 
   }
   for (var j = 0; j < arr.length; j++)
   {
      if (paramHash["format"] != null)
      {
         arr[j]["params"]["format"] = paramHash["format"];
      }
      else
      {
         arr[j]["params"]["format"] = config.macros.reminders["defaultShowReminderMessage"];
      }
      mess += getReminderMessageForDisplay(arr[j]["diff"], arr[j]["params"], arr[j]["matchedDate"], arr[j]["tiddler"]);
      mess += "\n";
   }
   wikify(mess, elem, null, null);
};


config.macros.displayTiddlersWithReminders.handler = function displayTiddlersWithReminders(place,macroName,params)
{
   var now = new Date().getMidnight();
   var paramHash = {};
   var leadtime = [0,14];
   paramHash = getParamsForReminder(params);
   var bProvidedDate = (paramHash["year"] != null) || 
			(paramHash["month"] != null) || 
			(paramHash["day"] != null) || 
			(paramHash["dayofweek"] != null);
   if (paramHash["leadtime"] != null)
   {
      leadtime = paramHash["leadtime"];
      if (bProvidedDate)
      {
         //If they've entered a day, we need to make 
         //sure to find it.  We'll reset the leadtime 
         //a few lines down.
         paramHash["leadtime"] = [-10000,10000];
      }
   }
   var matchedDate = now;
   if (bProvidedDate)
   {
      var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
      var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
      matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound); 
   }
   var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
   for (var j = 0; j < arr.length; j++)
   {
      displayTiddler(null, arr[j]["tiddler"], 0, null, false, false, false);
   }
};

config.macros.reminder.handler = function reminder(place,macroName,params)
{
   var dateHash = getParamsForReminder(params);
   if (dateHash["hidden"] != null)
   {
      return;
   }
   var leadTime = dateHash["leadtime"];
   if (leadTime == null)
   {
      leadTime = config.macros.reminders["defaultLeadTime"]; 
   }
   var leadTimeLowerBound = new Date().getMidnight().addDays(leadTime[0]);
   var leadTimeUpperBound = new Date().getMidnight().addDays(leadTime[1]);
   var matchedDate = findDateForReminder(dateHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);
   if (!window.story) 
   {
      window.story=window; 
   }
   if (!store.getTiddler) 
   {
      store.getTiddler=function(title) {return this.tiddlers[title];};
   }
   var title = window.story.findContainingTiddler(place).id.substr(7);
   if (matchedDate != null)
   {
      var diff = matchedDate.getDifferenceInDays(new Date().getMidnight());
      var elem = createTiddlyElement(place,"span",null,null, null);
      var mess = getReminderMessageForDisplay(diff, dateHash, matchedDate, title);
      wikify(mess, elem, null, null);
   }
   else
   {
      createTiddlyElement(place,"span",null,null, config.macros.reminders["noReminderFound"].replace("TITLE", dateHash["title"]).replace("LEADTIMEUPPER", leadTime[1]).replace("LEADTIMELOWER", leadTime[0]).replace("TIDDLERNAME", title).replace("TIDDLER", "[[" + title + "]]") );
   }
};

config.macros.newReminder.handler = function newReminder(place,macroName,params)
{
  var today=new Date().getMidnight();
  var formstring = '<html><form>Year: <select name="year"><option value="">Every year</option>';
  for (var i = 0; i < 5; i++)
  {
    formstring += '<option' + ((i == 0) ? ' selected' : '') + ' value="' + (today.getFullYear() +i) + '">' + (today.getFullYear() + i) + '</option>';
  }
  formstring += '</select>&nbsp;&nbsp;Month:<select name="month"><option value="">Every month</option>';
  for (i = 0; i < 12; i++)
  {
    formstring += '<option' + ((i == today.getMonth()) ? ' selected' : '') + ' value="' + (i+1) + '">' + config.messages.dates.months[i] + '</option>';
  }
  formstring += '</select>&nbsp;&nbsp;Day:<select name="day"><option value="">Every day</option>';
  for (i = 1; i < 32; i++)
  {
    formstring += '<option' + ((i == (today.getDate() )) ? ' selected' : '') + ' value="' + i + '">' + i + '</option>';
  }

formstring += '</select>&nbsp;&nbsp;Reminder Title:<input type="text" size="40" name="title" value="please enter a title" onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';

  var panel = config.macros.slider.createSlider(place,null,"New Reminder","Open a form to add a new reminder to this tiddler");
  wikify(formstring ,panel,null,store.getTiddler(params[1]));
};

// onclick: process input and insert reminder at 'marker'
window.addReminderToTiddler = function(form) {
   if (!window.story) 
   {
      window.story=window; 
   }
   if (!store.getTiddler) 
   {
      store.getTiddler=function(title) {return this.tiddlers[title];};
   }
   var title = window.story.findContainingTiddler(form).id.substr(7);
   var tiddler=store.getTiddler(title);
  var txt='\n<<reminder ';
  if (form.year.value != "")
    txt += 'year:'+form.year.value + ' ';
  if (form.month.value != "")
    txt += 'month:'+form.month.value + ' ';
  if (form.day.value != "")
    txt += 'day:'+form.day.value + ' ';
  txt += 'title:"'+form.title.value+'" ';
  txt +='>>';
   tiddler.set(null,tiddler.text + txt);
   window.story.refreshTiddler(title,1,true);
   store.setDirty(true);
};

function hasTag(tiddlerTags, tagFilters)
{
  //Make sure we respond well to empty tiddlerTaglists or tagFilterlists
  if (tagFilters.length==0 || tiddlerTags.length==0)
  {
    return true;
  }

  var bHasTag = false;
  
  /*bNoPos says: "'till now there has been no check using a positive filter"
     Imagine a filterlist consisting of 1 negative filter:
         If the filter isn't matched, we want hasTag to be true.
         Yet bHasTag is still false ('cause only positive filters cause bHasTag to change)
         
     If no positive filters are present bNoPos is true, and no negative filters are matched so we have not returned false
         Thus: hasTag returns true.
      
      If at any time a positive filter is encountered, we want at least one of the tags to match it, so we turn bNoPos to false, which
      means bHasTag must be true for hasTag to return true*/
  var bNoPos=true;
  
for (var t3 = 0; t3 < tagFilters.length; t3++)
  {
      for(var t2=0; t2<tiddlerTags.length; t2++)
      {
           if (tagFilters[t3].length > 1 && tagFilters[t3].charAt(0) == '!') 
           {
              if (tiddlerTags[t2] == tagFilters[t3].substring(1))
              {
                 //If at any time a negative filter is matched, we return false
                  return false;
              }
           }
           else 
           {
              if (bNoPos)
              {
                 //We encountered the first positive filter
                 bNoPos=false;
              }
              if (tiddlerTags[t2] == tagFilters[t3])
              {
                  //A positive filter is matched. As long as no negative filter is matched, hasTag will return true
                  bHasTag=true;
              }
           }
        }
    }
    return (bNoPos || bHasTag);
};

//This function searches all tiddlers for the reminder  //macro.  It is intended that other plugins (like //calendar) will use this function to query for 
//upcoming reminders.
//The arguments to this function filter out reminders //based on when they will fire.
//
//ARGUMENTS:
//baseDate is the date that is used as "now".  
//leadtime is a two element int array, with leadtime[0] 
//         as the lower bound and leadtime[1] as the
//         upper bound.  A reasonable default is [0,14]
//tags is a space-separated list of tags to use to filter 
//         tiddlers.  If a tag name begins with an !, then 
//         only tiddlers which do not have that tag will 
//         be considered.  For example "examples holidays"  
//         will search for reminders in any tiddlers that  
//         are tagged with examples or holidays and 
//         "!examples !holidays" will search for reminders 
//         in any tiddlers that are not tagged with 
//         examples or holidays.  Pass in null to search 
//         all tiddlers.
//limit.  If limit is null, individual reminders can 
//        override the leadtime specified earlier.  
//        Pass in 1 in order to override that behavior.

window.findTiddlersWithReminders = function findTiddlersWithReminders(baseDate, leadtime, tags, limit)
{
//function(searchRegExp,sortField,excludeTag)
//   var macroPattern = "<<([^>\\]+)(?:\\*)([^>]*)>>";
   var macroPattern = "<<(reminder)(.*)>>";
   var macroRegExp = new RegExp(macroPattern,"mg");
   var matches = store.search(macroRegExp,"title","");
   var arr = [];
   var tagsArray = null;
   if (tags != null)
   {
      tagsArray = tags.split(" ");
   }
   for(var t=matches.length-1; t>=0; t--)
   {
      if (tagsArray != null)
      {
         //If they specified tags to filter on, and this tiddler doesn't 
	 //match, skip it entirely.
         if ( ! hasTag(matches[t].tags, tagsArray))
         {
            continue;
         }
      }

      var targetText = matches[t].text;
      do {
         // Get the next formatting match
         var formatMatch = macroRegExp.exec(targetText);
         if(formatMatch && formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")
         {
            //Find the matching date.
            
            var params = formatMatch[2] != null ? formatMatch[2].readMacroParams() : {};
            var dateHash = getParamsForReminder(params);
            if (limit != null || dateHash["leadtime"] == null)
            {
               if (leadtime == null)
                   dateHash["leadtime"] = leadtime;
               else
               {
                  dateHash["leadtime"] = [];
                  dateHash["leadtime"][0] = leadtime[0];
                  dateHash["leadtime"][1] = leadtime[1];
               }
            }
	    if (dateHash["leadtime"] == null)
               dateHash["leadtime"] = config.macros.reminders["defaultLeadTime"]; 
            var leadTimeLowerBound = baseDate.addDays(dateHash["leadtime"][0]);
            var leadTimeUpperBound = baseDate.addDays(dateHash["leadtime"][1]);
            var matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
            while (matchedDate != null)
            {
               var hash = {};
               hash["diff"] = matchedDate.getDifferenceInDays(baseDate);
               hash["matchedDate"] = new Date(matchedDate.getFullYear(), matchedDate.getMonth(), matchedDate.getDate(), 0, 0);
               hash["params"] = cloneParams(dateHash);
               hash["tiddler"] = matches[t].title;
               hash["tags"] = matches[t].tags;
               arr.pushUnique(hash);
	       if (dateHash["recurdays"] != null || (dateHash["year"] == null))
	       {
	         leadTimeLowerBound = leadTimeLowerBound.addDays(matchedDate.getDifferenceInDays(leadTimeLowerBound)+ 1);
                 matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
	       }
	       else matchedDate = null;
            }
         }
      }while(formatMatch);
   }
   if(arr.length > 1)  //Sort the array by number of days remaining.
   {
      arr.sort(function (a,b) {if(a["diff"] == b["diff"]) {return(0);} else {return (a["diff"] < b["diff"]) ? -1 : +1; } });
   }
   return arr;
};

//This function takes the reminder macro parameters and
//generates the string that is used for display.
//This function is not intended to be called by 
//other plugins.
 window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff, params, matchedDate, tiddlerTitle)
{
   var anniversaryString = "";
   var reminderTitle = params["title"];
   if (reminderTitle == null)
   {
      reminderTitle = config.macros.reminders["untitledReminder"];
   }
   if (params["firstyear"] != null)
   {
      anniversaryString = config.macros.reminders["defaultAnniversaryMessage"].replace("DIFF", (matchedDate.getFullYear() - params["firstyear"]));
   }
   var mess = "";
   var diffString = "";
   if (diff == 0)
   {
      diffString = config.macros.reminders["todayString"];
   }
   else if (diff == 1)
   {
      diffString = config.macros.reminders["tomorrowString"];
   }
   else
   {
      diffString = config.macros.reminders["ndaysString"].replace("DIFF", diff);
   }
   var format = config.macros.reminders["defaultReminderMessage"];
   if (params["format"] != null)
   {
      format = params["format"];
   }
   mess = format;
//HACK!  -- Avoid replacing DD in TIDDLER with the date
   mess = mess.replace(/TIDDLER/g, "TIDELER");
   mess = matchedDate.formatStringDateOnly(mess);
   mess = mess.replace(/TIDELER/g, "TIDDLER");
   if (tiddlerTitle != null)
   {
      mess = mess.replace(/TIDDLERNAME/g, tiddlerTitle);
      mess = mess.replace(/TIDDLER/g, "[[" + tiddlerTitle + "]]");
   }
   
   mess = mess.replace("DIFF", diffString).replace("TITLE", reminderTitle).replace("DATE", matchedDate.formatString("DDD MMM DD, YYYY")).replace("ANNIVERSARY", anniversaryString);
   return mess;
};

// Parse out the macro parameters into a hashtable.  This
// handles the arguments for reminder, showReminders and 
// displayTiddlersWithReminders.
window.getParamsForReminder = function getParamsForReminder(params)
{
   var dateHash = {};
   var type = "";
   var num = 0;
   var title = "";
   for(var t=0; t<params.length; t++)
   {
      var split = params[t].split(":");
      type = split[0].toLowerCase();
      var value = split[1];
      for (var i=2; i < split.length; i++)
      {
         value += ":" + split[i];
      }
      if (type == "nolinks" || type == "limit" || type == "hidden")
      {
         num = 1;
      }
      else if (type == "leadtime")
      {
         var leads = value.split("...");
         if (leads.length == 1)
         {
            leads[1]= leads[0];
            leads[0] = 0;
         }
         leads[0] = parseInt(leads[0], 10);
         leads[1] = parseInt(leads[1], 10);
         num = leads;
      }
      else if (type == "offsetdayofweek")
      {
          if (value.substr(0,1) == "-")
          {
             dateHash["negativeOffsetDayOfWeek"] = 1;
	     value = value.substr(1);
          }
          num = parseInt(value, 10);
      }
      else if (type != "title" && type != "tag" && type != "format")
      {
         num = parseInt(value, 10);
      }
      else
      {
         title = value;
         t++;
         while (title.substr(0,1) == '"' && title.substr(title.length - 1,1) != '"' && params[t] != undefined)
         {
            title += " " + params[t++];
         }
         //Trim off the leading and trailing quotes
         if (title.substr(0,1) == "\"" && title.substr(title.length - 1,1)== "\"")
         {
            title = title.substr(1, title.length - 2);
            t--;
         }
         num = title;
      }
      dateHash[type] = num;
   }
   //date is synonymous with day
   if (dateHash["day"] == null)
   {
      dateHash["day"] = dateHash["date"];
   }
   return dateHash;
};

//This function finds the date specified in the reminder 
//parameters.  It will return null if no match can be
//found.  This function is not intended to be used by
//other plugins.
window.findDateForReminder= function findDateForReminder( dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound)
{
   if (baseDate == null)
   {
     baseDate = new Date().getMidnight();
   }
   var hashKey = baseDate.convertToYYYYMMDDHHMM();
   for (var k in dateHash)
   {
      hashKey += "," + k + "|" + dateHash[k];
   }
   hashKey += "," + leadTimeLowerBound.convertToYYYYMMDDHHMM();
   hashKey += "," + leadTimeUpperBound.convertToYYYYMMDDHHMM();
   if (reminderCache[hashKey] == null)
   {
      //If we don't find a match in this run, then we will
      //cache that the reminder can't be matched.
      reminderCache[hashKey] = false;
   }
   else if (reminderCache[hashKey] == false)
   {
      //We've already tried this date and failed
      return null;
   }
   else
   {
      return reminderCache[hashKey];
   }
   
   var bOffsetSpecified = dateHash["offsetyear"] != null || 
				dateHash["offsetmonth"] != null || 
				dateHash["offsetday"] != null || 
				dateHash["offsetdayofweek"] != null || 
				dateHash["recurdays"] != null;
   
   // If we are matching the base date for a dayofweek offset, look for the base date a 
   //little further back.
   var tmp1leadTimeLowerBound = leadTimeLowerBound;  
   if ( dateHash["offsetdayofweek"] != null)
   {
      tmp1leadTimeLowerBound = leadTimeLowerBound.addDays(-6);  
   }
   var matchedDate = baseDate.findMatch(dateHash, tmp1leadTimeLowerBound, leadTimeUpperBound);
   if (matchedDate != null)
   {
      var newMatchedDate = matchedDate;
      if (dateHash["recurdays"] != null)
      {
         while (newMatchedDate.getTime() < leadTimeLowerBound.getTime())
         {
            newMatchedDate = newMatchedDate.addDays(dateHash["recurdays"]);
         }
      }
      else if (dateHash["offsetyear"] != null || 
		dateHash["offsetmonth"] != null || 
		dateHash["offsetday"] != null || 
		dateHash["offsetdayofweek"] != null)
      {
         var tmpdateHash = cloneParams(dateHash);
         tmpdateHash["year"] = dateHash["offsetyear"];
         tmpdateHash["month"] = dateHash["offsetmonth"];
         tmpdateHash["day"] = dateHash["offsetday"];
         tmpdateHash["dayofweek"] = dateHash["offsetdayofweek"];
	 var tmpleadTimeLowerBound = leadTimeLowerBound;
	 var tmpleadTimeUpperBound = leadTimeUpperBound;
	 if (tmpdateHash["offsetdayofweek"] != null)
	 {
	 	if (tmpdateHash["negativeOffsetDayOfWeek"] == 1)
		{
		   tmpleadTimeLowerBound = matchedDate.addDays(-6);
		   tmpleadTimeUpperBound = matchedDate;

		}
		else
		{
		   tmpleadTimeLowerBound = matchedDate;
		   tmpleadTimeUpperBound = matchedDate.addDays(6);
		}

	 }
	 newMatchedDate = matchedDate.findMatch(tmpdateHash, tmpleadTimeLowerBound, tmpleadTimeUpperBound);
         //The offset couldn't be matched.  return null.
         if (newMatchedDate == null)
         {
            return null;
         }
      }
      if (newMatchedDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
      {
         reminderCache[hashKey] = newMatchedDate;
         return newMatchedDate;
      }
   }
   return null;
};

//This does much the same job as findDateForReminder, but
//this one doesn't deal with offsets or recurring 
//reminders.
Date.prototype.findMatch = function findMatch(dateHash, leadTimeLowerBound, leadTimeUpperBound)
{

   var bSpecifiedYear =     (dateHash["year"] != null);
   var bSpecifiedMonth =     (dateHash["month"] != null);
   var bSpecifiedDay =     (dateHash["day"] != null);
   var bSpecifiedDayOfWeek =     (dateHash["dayofweek"] != null);
   if (bSpecifiedYear && bSpecifiedMonth && bSpecifiedDay)
   {
      return new Date(dateHash["year"], dateHash["month"]-1, dateHash["day"], 0, 0);
   }
   var bMatchedYear = !bSpecifiedYear;
   var bMatchedMonth = !bSpecifiedMonth;
   var bMatchedDay = !bSpecifiedDay;
   var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
   if (bSpecifiedDay && bSpecifiedMonth && !bSpecifiedYear && !bSpecifiedDayOfWeek)
   {

      //Shortcut -- First try this year.  If it's too small, try next year.
      var tmpMidnight = this.getMidnight();
      var tmpDate = new Date(this.getFullYear(), dateHash["month"]-1, dateHash["day"], 0,0);
      if (tmpDate.getTime() < leadTimeLowerBound.getTime())
      {
         tmpDate = new Date((this.getFullYear() + 1), dateHash["month"]-1, dateHash["day"], 0,0);
      }
      if ( tmpDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
      {
         return tmpDate;
      }
      else
      {
         return null;
      }
   }

   var newDate = leadTimeLowerBound; 
   while (newDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
   {
      var tmp = testDate(newDate, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek);
      if (tmp != null)
        return tmp;
      newDate = newDate.addDays(1);
   }
};

function testDate(testMe, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek)
{
   var bMatchedYear = !bSpecifiedYear;
   var bMatchedMonth = !bSpecifiedMonth;
   var bMatchedDay = !bSpecifiedDay;
   var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
   if (bSpecifiedYear)
   {
      bMatchedYear = (dateHash["year"] == testMe.getFullYear());
   }
   if (bSpecifiedMonth)
   {
      bMatchedMonth = ((dateHash["month"] - 1)  == testMe.getMonth() );
   }
   if (bSpecifiedDay)
   {
      bMatchedDay = (dateHash["day"] == testMe.getDate());
   }
   if (bSpecifiedDayOfWeek)
   {
      bMatchedDayOfWeek = (dateHash["dayofweek"] == testMe.getDay());
   }

   if (bMatchedYear && bMatchedMonth && bMatchedDay && bMatchedDayOfWeek)
   {
      return testMe;
   }
};

//Returns true if the date is in between two given dates
Date.prototype.isBetween = function isBetween(lowerBound, upperBound)
{
  return (this.getTime() >= lowerBound.getTime() && this.getTime() <= upperBound.getTime());
}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight = function getMidnight()
{
   return new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0);
};
// Add the specified number of days to a date.
Date.prototype.addDays = function addDays(numberOfDays)
{
   return new Date(this.getFullYear(), this.getMonth(), this.getDate() + numberOfDays, 0, 0);
};
//Return the number of days between two dates.
Date.prototype.getDifferenceInDays = function getDifferenceInDays(otherDate)
{
//I have to do it this way, because this way ignores daylight savings
   var tmpDate = this.addDays(0);
   if (this.getTime() > otherDate.getTime())
   {
      var i = 0;
      for (i = 0; tmpDate.getTime() > otherDate.getTime(); i++)
      {
         tmpDate = tmpDate.addDays(-1);
      }
      return i;
   }
   else
   {
      var i = 0;
      for (i = 0; tmpDate.getTime() < otherDate.getTime(); i++)
      {
         tmpDate = tmpDate.addDays(1);
      }
      return i * -1;
   }
   return 0;
};
function cloneParams(what) {
    var tmp = {};
    for (var i in what) {
        tmp[i] = what[i];
    }
    return tmp;
}
// Substitute date components into a string
Date.prototype.formatStringDateOnly = function formatStringDateOnly(template)
{
	template = template.replace("YYYY",this.getFullYear());
	template = template.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
	template = template.replace("MMM",config.messages.dates.months[this.getMonth()]);
	template = template.replace("0MM",String.zeroPad(this.getMonth()+1,2));
	template = template.replace("MM",this.getMonth()+1);
	template = template.replace("DDD",config.messages.dates.days[this.getDay()]);
	template = template.replace("0DD",String.zeroPad(this.getDate(),2));
	template = template.replace("DD",this.getDate());
	return template;
};

//}}}
/***
| Name:|RenameTagsPlugin|
| Purpose:|Allows you to easily rename tags|
| Creator:|SimonBaird|
| Source:|http://simonbaird.com/mptw/#RenameTagsPlugin|
| Version:|1.0.1 (5-Mar-06)|

!Description
If you rename a tiddler/tag that is tagging other tiddlers this plugin will ask you if you want to rename the tag in each tiddler where it is used. This is essential if you use tags and ever want to rename them. To use it, open the tag you want to rename as a tiddler (it's the last option in the tag popup menu), edit it, rename it and click done. You will asked if you want to rename the tag. Click OK to rename the tag in the tiddlers that use it. Click Cancel to not rename the tag.

!Example
Try renaming [[Plugins]] or [[CSS]] on this site.

!History
* 1.0.1 (5-Mar-06) - Added feature to allow renaming of tags without side-effect of creating a tiddler
* 1.0.0 (5-Mar-06) - First working version

!Code
***/
//{{{

version.extensions.RenameTagsPlugin = {
	major: 1, minor: 0, revision: 0,
	date: new Date(2006,3,5),
	source: "http://simonbaird.com/mptw/#RenameTagsPlugin"
};

config.macros.RenameTagsPlugin = {};
config.macros.RenameTagsPlugin.prompt = "Rename the tag '%0' to '%1' in %2 tidder%3?";

// these are very useful, perhaps they should be in the core
if (!store.addTag) {
	store.addTag = function(title,tag) {
		var t=this.getTiddler(title); if (!t || !t.tags) return;
		t.tags.push(tag);
	};
};

if (!store.removeTag) {
	store.removeTag = function(title,tag) {
		var t=this.getTiddler(title); if (!t || !t.tags) return;
		if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);
	};
};

store.saveTiddler_orig_tagrename = store.saveTiddler;
store.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags) {
	if (title != newTitle && this.getTaggedTiddlers(title).length > 0) {
		// then we are renaming a tag
		var tagged = this.getTaggedTiddlers(title);
		if (confirm(config.macros.RenameTagsPlugin.prompt.format([title,newTitle,tagged.length,tagged.length>1?"s":""]))) {
			for (var i=0;i<tagged.length;i++) {
				store.removeTag(tagged[i].title,title);
				store.addTag(tagged[i].title,newTitle);
				// if tiddler is visible refresh it to show updated tag
				story.refreshTiddler(tagged[i].title,false,true);
			}
		}
		if (!this.tiddlerExists(title) && newBody == "") {
			// dont create unwanted tiddler
			return null;
		}
	}
	return this.saveTiddler_orig_tagrename(title,newTitle,newBody,modifier,modified,tags);
}

//}}}

/***
Intended for use in ViewTemplate
!Examples
|{{{<<runMacroIfTagged [[Groceries]] toggleTag Buy>>}}}|<<runMacroIfTagged [[Groceries]] toggleTag Buy>>|
|{{{<<runMacroIfTagged Plugins toggleTag systemConfig>>}}}|<<runMacroIfTagged Plugins toggleTag systemConfig>>|
***/
//{{{

// This function contributed by Eric Shulman
function toggleTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 if (t.tags.find(tag)==null) t.tags.push(tag)
 else t.tags.splice(t.tags.find(tag),1)
}

// This function contributed by Eric Shulman
function isTagged(title,tag) {
 var t=store.getTiddler(title); if (!t) return false;
 return (t.tags.find(tag)!=null);
}

config.macros.runMacroIfTagged = {};
config.macros.runMacroIfTagged.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 if (isTagged(tiddler.title,params[0]))
 config.macros[params[1]].handler(place,params[1],params.slice(2),wikifier,paramString/*fixme*/,tiddler);
}

//}}}
/***
!Todo
* paramString needs to have the first word removed from the front of it at fixme above


***/

<<fontSize "font-size:">>
<<search>><<closeAll>><<permaview>><<newTiddler tag:cours>> <<saveChanges>><<upload >>UploadForm<<slider chkSliderOptionsPanel OptionsPanel "options »" "Change TiddlyWiki advanced options">>
<<tabs txtMainTab Chrono 'Affichage chronologique' TabTimeline Alpha 'Liste alphabétique des éléments' TabAll Index 'Liste des index' TabTags Suite 'Autres listes' TabMore>>
(See also SliderSiteMap)
|<<siteMap crédits>><<siteMap FunStuff>><<siteMap Todo . . . . Done>>|<<siteMap TagglyTagging>><<siteMap More... 2>>|<<siteMap Plugins 2>>|
|noBorder threeCol|k|
/***
| Name:|SiteMapMacro|
| Author:|Simon Baird|
| Location:|http://simonbaird.com/mptw/#SiteMapMacro|
| Version:|1.0.3, 15-Mar-06|

!!Examples
See SiteMap and SliderSiteMap for example usage.

!!Parameters
* Name of tiddler to start at
* Max depth (a number) 
* Format (eg, nested, see formats below)
* Don't show root flag (anything other than null turns it on)
* Tags - a string containing a bracketed list of tags that we are interested in

!!History
* 1.0.3 (15-Mar-06)
** added tag filtering
* 1.0.2 (15-Mar-06)
** Added json format and dontshowroot option
* 1.0.1 (9-Mar-06)
** Added selectable formats and fixed nested slider format
* 1.0.0 (8-Mar-06)
** first release

***/
//{{{

version.extensions.SiteMapMacro = {
 major: 1,
 minor: 0,
 revision: 3,
 date: new Date(2006,3,15),
 source: "http://simonbaird.com/mptw/#SiteMapMacro"
};

config.macros.siteMap = {

 formats: {
 bullets: {
 formatString: "%0[[%1]]\n%2",
 indentString: "*"
 },

 // put this in your StyleSheet to make it look good.
 // .sliderPanel { margin-left: 2em; }

 sliders: {
 formatString: "[[%1]]+++\n%2===\n\n",
 formatStringLeaf: "[[%1]]\n"
 },

 openSliders: {
 formatString: "[[%1]]++++\n%2===\n\n",
 formatStringLeaf: "[[%1]]\n"
 },

 popups: {
 formatString: "[[%1]]+++^\n%2===\n\n",
 formatStringLeaf: "[[%1]]\n"
 },

 // these don't work too well
 openPopups: {
 formatString: "[[%1]]++++^\n%2===\n\n",
 formatStringLeaf: "[[%1]]\n"
 },
 
 // this is a little nuts but it works
 json: {
 formatString: '\n%0{"%1":[%2\n%0]}',
 formatStringLeaf: '\n%0"%1"',
 indentString: " ",
 separatorString: ","
 }


 },

 defaultFormat: "bullets",

 treeTraverse: function(title,depth,maxdepth,format,dontshowroot,tags,excludetags) {

 var tiddler = store.getTiddler(title);
 var tagging = store.getTaggedTiddlers(title);

 if (dontshowroot)
 depth = 0;

 var indent = "";
 if (this.formats[format].indentString)
 for (var j=0;j<depth;j++)
 indent += this.formats[format].indentString;

 var childOutput = "";
 if (!maxdepth || depth < parseInt(maxdepth)) 
 for (var i=0;i<tagging.length;i++)
 if (tagging[i].title != title) {
 if (this.formats[format].separatorString && i != 0)
 childOutput += this.formats[format].separatorString;
 childOutput += this.treeTraverse(tagging[i].title,depth+1,maxdepth,format,null,tags,excludetags);
 }

 if (childOutput == "" && (
 (tags && tags != "" && !tiddler.tags.containsAll(tags.readBracketedList())) ||
 (excludetags && excludetags != "" && tiddler.tags.containsAny(excludetags.readBracketedList()))
 )
 ) {
 // so prune it cos it doesn't have the right tags and neither do any of it's children
 return "";
 }

 if (dontshowroot)
 return childOutput;

 if (this.formats[format].formatStringLeaf && childOutput == "") {
 // required for nestedSliders
 return this.formats[format].formatStringLeaf.format([indent,title,childOutput]);
 }

 return this.formats[format].formatString.format([indent,title,childOutput]);
 },

 handler: function (place,macroName,params,wikifier,paramString,tiddler) {
 wikify(this.treeTraverse(
 params[0] && params[0] != '.' ? params[0] : tiddler.title, 1, 
 params[1] && params[1] != '.' ? params[1] : null, // maxdepth
 params[2] && params[2] != '.' ? params[2] : this.defaultFormat, // format
 params[3] && params[3] != '.' ? params[3] : null, // dontshowroot
 params[4] && params[4] != '.' ? params[4] : null, // tags
 params[5] && params[5] != '.' ? params[5] : null // excludetags
 ),place);
 }

}

//}}}
Site de M.Cartailler
2012
* Sur les Gaulois, à partir d'Astérix, un site synthétique. Voici la maison romaine: http://asterixinteractif.free.fr/informations/articles_domus.htm
==N.B. This works with Paulo Soares' SlideShowPlugin; it doesn't (yet?) work with my set-up here, which uses the SelectStylesheetPlugin.  There's some kind of conflict, because right now if you click on any of the links below you still see title header and rhs tags, which is to say that it's still using the default PageTemplate, not Paulo's SlideShowPageTemplate.==
Now fixed (Nov.14th)

<<slideShow>> - A simple slide show that keeps the TW style 
<<slideShow style:'MySSStyleSheet' clock:'+'>> - A themed slide show with a clock showing the presentation elapsed time
<<slideShow repeat clock:'-20'>> - A looping slide show with a 20 minutes countdown clock
<<slideShow slidePause:1000>> - A timed slideshow that runs once
<<slideShow slidePause:1000 repeat>> - A timed looping slideshow
-s-
!The [[SlideShowPlugin]]
Press F11 to go fullscreen and adjust the font sizes with Ctrl++ Ctrl+- (or Ctrl+mousewheel).

This plugin was developed by Paulo Soares and Clint Checketts.
{{Comment{This block is not shown in the slide show.
@@Don't show me!!!@@}}}
-s-
!How slides are separated
In a tiddler, you start each slide with the markup {{{-s-}}}
-s-
Slides don't have to have titles like this poor one
-s-
!A slide with subsections and a long title
Check to TOC below to see how this slide title is abbreviated.
!!Section 1
This is a section
!!!Subsection 1.1
This is a subsection
!!!Subsection 1.2
This is another subsection
!!!!Subsubsection 1.2.1
This is a subsubsection
-s-
!Using the keyboard
The following keys are defined:
*Left arrow - previous overlay
*Down arrow - previous slide
*Right arrow - next overlay
*Up arrow - next slide
*Home - first slide
*End - last slide
*Escape - exit slide show
*Spacebar - pause/resume slide show in auto advance mode
-s-
!Slide show parameters
*The slide show can be themed by providing a ~StyleSheet ({{{<<slideShow style:'MyStyleSheet'>>}}})
*By default, there is a clock at bottom of the browser window that displays the current time. This clock can also show the presentation elapsed time with {{{<<slideShow clock:'+'>>}}} or a countdown clock with {{{<<slideShow clock:'-20'>>}}} (for 20 minutes). In these two cases, if you click on the clock display it will be restarted
*The slide show can be set to loop ({{{<<slideShow repeat>>}}})
*You can set it so each slide changes after X milliseconds ({{{<<slideShow slidePause:X>>}}}) (auto advance mode)
*Use auto start mode to begin the slideshow the moment the tiddler is opened ({{{<<slideShow autostart>>>}}})
*You can disable overlays with {{{<<slideShow noOverlays>>}}}
*These parameters can be mixed and matched in any order: {{{<<slideShow slidePause:1000 repeat>>}}} is the same as {{{<<slideShow repeat slidePause:1000>>}}}
-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}}}
<!--{{{-->
<div id='displayArea'>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
/***
|''Name:''|SlideShowPlugin|
|''Description:''|Creates a simple slide show type display|
|''Version:''|1.5.1|
|''Date:''|Nov 10, 2006|
|''Source:''|http://www.math.ist.utl.pt/~psoares/addons.html|
|''Author:''|Paulo Soares (psoares (at) math (dot) ist (dot) utl (dot) pt) and [[Clint Checketts|http://www.checkettsweb.com]]|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
<<tiddler SlideShowPluginDoc>>
!Code
***/
//{{{
config.macros.slideShow = {label: "slide show", maxTOCLength: 30};
config.macros.slideShow.messages = {gotoLabel: "Go to slide:"};
config.views.wikified.slideShow = {text: "slide show", tooltip: "Start slide show"};
config.views.wikified.slideShow.quit = {text: "end", tooltip: "Quit the slide show"};
config.views.wikified.slideShow.firstSlide = {text: "<<", tooltip: "first slide"};
config.views.wikified.slideShow.previousSlide = {text: "<", tooltip: "previous slide"};
config.views.wikified.slideShow.nextSlide = {text: ">", tooltip: "next slide"};
config.views.wikified.slideShow.lastSlide = {text: ">>", tooltip: "last slide"};
config.views.wikified.slideShow.resetClock = {text: " ", tooltip: "reset"};

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

function changeStyleSheet(tiddlerName) {
 if (tiddlerName == null) tiddlerName = "StyleSheet";
 setStylesheet(store.getRecursiveTiddlerText("StyleSheetColors"),"StyleSheetColors");
 setStylesheet(store.getRecursiveTiddlerText("StyleSheetLayout"),"StyleSheetLayout");
 var theCSS = store.getRecursiveTiddlerText(tiddlerName,"");
 setStylesheet(theCSS,"StyleSheet");
}

//Excellent (and versatile) reparser created by Paul Petterson for parsing the paramString in a macro
function reparse( params ) {
 var re = /([^:\s]+)(?:\:((?:\d+)|(?:["'](?:[^"']+)["']))|\s|$)/g;
 var ret = new Array() ;
 var m ;
 while( (m = re.exec( params )) != null ) ret[ m[1] ] = m[2]?m[2]:true ;
 return ret ;
}

function getElementsByClass(searchClass,node,tag) {
 var classElements = new Array();
 if ( node == null ) node = document;
 if ( tag == null ) tag = '*';
 var els = node.getElementsByTagName(tag);
 var elsLen = els.length;
 var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
 var j=0;
 for (var i = 0; i < elsLen; i++) {
 if ( pattern.test(els[i].className) ) {
 classElements[j] = els[i];
 j++;
 }
 }
 return classElements;
}

// 'keys' code adapted from S5 which in turn was adapted from MozPoint (http://mozpoint.mozdev.org/)
function keys(key) {
 if (document.getElementById('contentWrapper').className == "slideShowMode"){
 if (!key) {
 key = event;
 key.which = key.keyCode;
 }
 switch (key.which) {
 case 32: // spacebar
 if(time>0){
 if(autoAdvance){
 clearInterval(autoAdvance);
 autoAdvance = null;
 } else {
 autoAdvance=setInterval("GoToSlide(1)", time);
 }
 }
 break;
 case 34: // page down
 case 39: // rightkey
 GoToSlide("n");
 break;
 case 40: // downkey
 GoToSlide(-1);
 break;
 case 33: // page up
 case 37: // leftkey
 GoToSlide("p");
 break;
 case 38: // upkey
 GoToSlide(1);
 break;
 case 36: // home
 GoToSlide("f");
 break;
 case 35: // end
 GoToSlide("l");
 break;
 case 27: // escape
 endSlideShow();
 break;
 }

 }
 return false;
}

function clicker(e) {
 if (!e) var e = window.event;
 var target = resolveTarget(e);
 //Whenever something is clicked that won't advance the slide make sure that the table of contents gets hidden
 if (target.getAttribute('href') != null || isParentOrSelf(target, 'toc') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object') || isParentOrSelf(target, 'pageFooter') || isParentOrSelf(target, 'navigator')){
 //Don't hide the TOC if the indexNumbers (which trigger the index) is clicked
 if(isParentOrSelf(target,'indexNumbers') || isParentOrSelf(target,'jumpInput')){
 return true;
 }
 showHideTOC('none');
 return true;
 }
 
 //Advance a slide if the TOC is visible otherwise make sure that the TOC gets hidden
 if ((!e.which && e.button == 1) || e.which == 1) {
 if (document.getElementById('toc').style.display != 'block'){
 GoToSlide("n");
 } else {
 showHideTOC('none');
 }
 }
 
 if ((!e.which && e.button == 2) || e.which == 3) {
 if (document.getElementById('toc').style.display != 'block'){
 GoToSlide("p");
 } else {
 showHideTOC('none');
 }
 return false;
 }
}

function isParentOrSelf(element, id) {
 if (element == null || element.nodeName=='BODY') return false;
 else if (element.id == id) return true;
 else return isParentOrSelf(element.parentNode, id);
}

GoToSlide=function(step) {
 var new_pos;
 var slideHolder = document.getElementById('slideContainer');
 //The parse float ensures that the attribute is returned as a number and not a string.
 var cur_pos = parseFloat(slideHolder.getAttribute('currentslide'));
 var numberSlides = parseFloat(slideHolder.getAttribute('numberSlides'));
 switch (step) {
 case "f":
 new_pos=0;
 break;
 case "l":
 new_pos=numberSlides-1;
 break;
 case "n":
 var numberOverlays = parseFloat(slideHolder.childNodes[cur_pos].getAttribute('numberOverlays'));
 var currentOverlay = parseFloat(slideHolder.getAttribute('currentOverlay'));
 if(numberOverlays==0 || currentOverlay==numberOverlays){
 new_pos=cur_pos+1;
 } else {
 var className="Overlay"+currentOverlay;
 var overlay=getElementsByClass(className,slideHolder.childNodes[cur_pos]);
 for(var i=0; i<overlay.length; i++) {overlay[i].className=className+' previousOverlay';}
 currentOverlay++;
 slideHolder.setAttribute('currentOverlay',currentOverlay);
 className="Overlay"+currentOverlay;
 overlay=getElementsByClass(className,slideHolder.childNodes[cur_pos]);
 for(i=0; i<overlay.length; i++) {overlay[i].className=className+' currentOverlay';}
 return false;
 }
 break;
 case "p":
 var numberOverlays = parseFloat(slideHolder.childNodes[cur_pos].getAttribute('numberOverlays'));
 var currentOverlay = parseFloat(slideHolder.getAttribute('currentOverlay'));
 if(numberOverlays==0 || currentOverlay==0){
 new_pos=cur_pos-1;
 } else {
 var className="Overlay"+currentOverlay;
 var overlays=getElementsByClass(className,slideHolder.childNodes[cur_pos]);
 for(var i=0; i<overlays.length; i++) {overlays[i].className=className+' nextOverlay';}
 currentOverlay--;
 className="Overlay"+currentOverlay;
 overlays=getElementsByClass(className,slideHolder.childNodes[cur_pos]);
 for(i=0; i<overlays.length; i++) {overlays[i].className=className+' currentOverlay';}
 slideHolder.setAttribute('currentOverlay',currentOverlay);
 return false;
 }
 break;
 default:
 new_pos=cur_pos+step;
 }

 if(slideShowCircularMode && new_pos == numberSlides) new_pos=0;
 if(slideShowCircularMode && new_pos<0) new_pos=(numberSlides - 1);
 if(step!=0 && new_pos>=0 && new_pos<numberSlides) {
 slideHolder.childNodes[cur_pos].style.display='none';
 slideHolder.childNodes[new_pos].style.display='block';
 slideHolder.setAttribute('currentslide',new_pos);
 var numberOverlays = parseFloat(slideHolder.childNodes[new_pos].getAttribute('numberOverlays'));
 if(step=="p"){
 var currentOverlay=numberOverlays;
 var state=' previousOverlay';
 } else {
 var currentOverlay=0;
 var state=' nextOverlay';
 }
 slideHolder.setAttribute('currentOverlay',currentOverlay);
 if(numberOverlays>0) {
 for(var i=1; i<=numberOverlays; i++){
 var className="Overlay"+i;
 var overlays=getElementsByClass(className,slideHolder.childNodes[new_pos]);
 for(var j=0; j<overlays.length; j++) {overlays[j].className=className+state;}
 }
 if(step=="p"){
 var className="Overlay"+numberOverlays;
 var overlays=getElementsByClass(className,slideHolder.childNodes[new_pos]);
 for(var j=0; j<overlays.length; j++) {overlays[j].className=className+' currentOverlay';}
 }
 }
 new_pos++;
 var indexNumbers = document.getElementById('indexNumbers');
 indexNumbers.firstChild.data = new_pos+'/'+numberSlides;
 if((new_pos==numberSlides) && !slideShowCircularMode && autoAdvance) clearInterval(autoAdvance);
 return true;
 }
 return false;
}

function tocShowSlide(e) {
 if (!e) var e = window.event;
 var target = resolveTarget(e);
 var slide = target.getAttribute('slideNumber');
 var cur_pos = document.getElementById('slideContainer').getAttribute('currentslide');
 var step = slide-cur_pos;
 if(step!=0) GoToSlide(step);
 showHideTOC('none');
 return;
}

//Toggle the display of the table of contents
function showHideTOC(display){
 var toc = document.getElementById('toc');
 //Reset the input box
 document.getElementById('jumpInput').value = "";

 if (display == null || display.length == null){
 if (toc.style.display == 'none' || toc.style.display == ''){
 toc.style.display = 'block';
 document.getElementById('jumpInput').focus();
 } else {
 toc.style.display = 'none';
 }
 } else {
 toc.style.display = display;
 if (display == 'block')
 document.getElementById('jumpInput').focus();
 }
}

function makeSignature(title,params){
 var signature = title+store.getTiddler(title).modified;
 if(params['style']) signature += params['style'];
 if(params['repeat']) signature += "repeat";
 if(params['slidePause'] > 0) signature += params['slidePause'];
 if(params['autostart']) signature += "autostart";
 if(params['clock']) signature += params['clock'];
 if(params['noOverlays']) signature += "noOverlays";
 return signature;
}

function padZero(x){
 return (x>=10 || x<0 ? "" : "0")+x;
}

setClock=function(){
 var actualTime = new Date();
 var newTime = actualTime.getTime() - clockStartTime;
 newTime = clockMultiplier*newTime+clockInterval+clockCorrection;
 actualTime.setTime(newTime);
 newTime = padZero(actualTime.getHours()) + ":" + padZero(actualTime.getMinutes())+ ":" + padZero(actualTime.getSeconds());
 var clock = document.getElementById('slideClock');
 clock.firstChild.nodeValue = newTime;
}

resetClock=function(){
 var time = new Date(0);
 if(clockStartTime>time){
 var startTime = new Date();
 clockStartTime=startTime.getTime();
 }
}

var title;
var place;
var autoAdvance=null;
var autoStart=null;
var slideClock=null;
var noOverlays=false;
var time = 0;
var slideShowCircularMode;
var slideShowStyleSheet;
var slideShowParams;
var clockMultiplier;
var clockInterval;
var clockCorrection=0;
var clockStartTime;
var openTiddlers;

config.macros.slideShow.handler = function(aPlace,macroName,params,wikifier,paramString,tiddler){
 if(tiddler instanceof Tiddler){
 var lingo = config.views.wikified.slideShow;
 var autostart = false;
 if (!e) var e = window.event;
 
 place = aPlace;
 title = tiddler.title;
 params = reparse(paramString);
 var onclick = function(){config.macros.slideShow.onClickSlideShow(params);};
 createTiddlyButton(aPlace,lingo.text,lingo.tooltip,onclick);
 
 var slideShowHolder = document.getElementById('slideShowWrapper');
 //If no show exist previously, create it
 if(params['autostart']){
 if(slideShowHolder != null){
 var signature = slideShowHolder.getAttribute('showSignature');
 if(signature.indexOf("autostart")==-1) autostart = true;
 } else {autostart = true;}
 if(autostart){
 slideShowParams = params;
 setTimeout(config.macros.slideShow.onClickSlideShow,100);
 }
 }
 }
}

var disableFunction = function(e){return false;}
var enableFunction = function(e){}

config.macros.slideShow.onClickSlideShow = function(newParams) {
 if(typeof(newParams)=="number") newParams=slideShowParams;
 openTiddlers = new Array;
 var viewer=document.getElementById('tiddlerDisplay');
 for(var i=0; i<viewer.childNodes.length; i++){
 var name = viewer.childNodes[i].getAttribute('tiddler');
 openTiddlers.push(name);
 }
 document.oncontextmenu = disableFunction;
 clockMultiplier = 1;
 clockInterval = 0;
 var startTime = new Date(0);
 slideShowCircularMode = false;
 time = 0;
 slideShowStyleSheet = null;
 if(newParams['style']){
 slideShowStyleSheet = eval(newParams['style']);
 } 
 if(newParams['repeat']){
 slideShowCircularMode = true;
 }
 if(newParams['slidePause'] > 0){
 time = newParams['slidePause'];
 }
 if(newParams['clock']){
 clockCorrection=startTime.getTimezoneOffset()*60000;
 startTime = new Date();
 var clockType= eval(newParams['clock']);
 if(clockType != '+') {
 clockMultiplier = -1;
 clockInterval = -clockType*60000;
 }
 }
 clockStartTime=startTime.getTime();
 if(newParams['noOverlays']){
 noOverlays = true;
 }
 var contentWrapper = document.getElementById('contentWrapper');
 if (contentWrapper.className != "slideShowMode"){
 clearMessage();
 //Attach the key and mouse listeners
 document.onkeyup = keys;
 document.onmouseup = clicker;
 
 var slideShowHolder = document.getElementById('slideShowWrapper');
 story.refreshTiddler(title,"SlideShowViewTemplate",true);
 //If no show exist previously, create it
 if(slideShowHolder == null){
 createSlides(newParams);
 //If there was once waiting in the background and it matches the one we just started, resume it
 } else if (slideShowHolder.getAttribute('showSignature') == makeSignature(title,newParams)){
 
 //Remove dblClick on edit function
 var theTiddler = document.getElementById("tiddler"+title);
 theTiddler.ondblclick = function() {};

 // Grab the 'viewer' element and give it a signature so the show can be resumed if stopped
 var tiddlerElements = theTiddler.childNodes;
 var viewer;
 for (var i = 0; i < tiddlerElements.length; i++){
 if (tiddlerElements[i].className == "viewer") viewer = tiddlerElements[i];
 }
 theTiddler.insertBefore(slideShowHolder,viewer);
 theTiddler.removeChild(viewer);
 slideShowHolder.style.display = 'block';
 document.getElementById("pageFooter").className = "pageFooterOff";
 
 //If the show we started it totally new than the resumable one, create the new one and kill the resumable one
 } else {
 slideShowHolder.parentNode.removeChild(slideShowHolder);
 createSlides(newParams);
 }
 slideClock=setInterval("setClock()", 1000); 
 if(time>0) autoAdvance=setInterval("GoToSlide(1)", time); 
 story.closeAllTiddlers(title);
 toggleSlideStyles();
 } else {
 endSlideShow();
 }
 return ;
 
}

function endSlideShow(){
 //Set aside show so it can be resumed later
 var showHolder = document.getElementById('slideShowWrapper');
 showHolder.style.display = 'none';
 document.getElementById('contentWrapper').parentNode.appendChild(showHolder);
 document.oncontextmenu = enableFunction;
 if(autoAdvance) clearInterval(autoAdvance);
 if(slideClock) clearInterval(slideClock);
 story.refreshTiddler(title,null,true);
 story.closeAllTiddlers();
 toggleSlideStyles();
 story.displayTiddlers(null,openTiddlers,DEFAULT_VIEW_TEMPLATE);
 document.onmouseup = function(){};
}

function isInteger(s){
 var i;
 for (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;
}

function jumpInputToSlide(e){
 if (!e) {
 e = window.event;
 e.which = e.keyCode;
 }
 if(e.which==13){
 var jumpInput= document.getElementById("jumpInput").value;
 if(isInteger(jumpInput)){
 var step=jumpInput-document.getElementById('slideContainer').getAttribute('currentslide')-1;
 if (GoToSlide(step)){
 showHideTOC('none'); 
 }
 }
 }
 return;
}

//Used to shorten the TOC fields
function abbreviateLabel(label){
 var maxTOCLength = config.macros.slideShow.maxTOCLength;
 if(label.length>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)<=maxTOCLength){
 label += " " + temp[j];
 } else {
 label += " ...";
 break;
 }
 }
 }
 return label;
}

createSlides = function(newParams){
 var lingo = config.views.wikified.slideShow;

 //Remove dblClick on edit function
 var theTiddler = document.getElementById("tiddler"+title);
 theTiddler.ondblclick = function() {};

 // Grab the 'viewer' element and give it a signature so the show can be resumed if stopped
 var tiddlerElements = theTiddler.childNodes;
 var viewer;
 for (var i = 0; i < tiddlerElements.length; i++){
 if (tiddlerElements[i].className == "viewer") viewer = tiddlerElements[i];
 }
 viewer.id = 'slideShowWrapper';
 viewer.setAttribute("showSignature",makeSignature(title,newParams));

 //Hide the text that comes before the first H1 element (I think I may put this into a cover page type thing)
 while(viewer.childNodes.length > 0 && viewer.firstChild.nodeName.toUpperCase() != "HR" && viewer.firstChild.className!="slideSeparator") {
 viewer.removeChild(viewer.firstChild);
 }
 
 //Cycle through the content and each time you hit an H1 begin a new slide div
 var slideNumber = 0;
 var slideHolder = document.createElement('DIV');
 slideHolder.id = "slideContainer";
 
 while(viewer.childNodes.length > 0){
 //Create a new slide a append it to the slide holder
 if (viewer.firstChild.nodeName.toUpperCase() == "HR" && viewer.firstChild.className=="slideSeparator"){
 slideNumber++;
 var slide = document.createElement('DIV');
 slide.id = "slideNumber"+slideNumber;
 slide.className = "slide";
 if (slideNumber > 1) {
 slideHolder.setAttribute('currentslide',0);
 slide.style.display='none';
 } else {
 slide.style.display='block';
 }
 slideHolder.appendChild(slide); 
 viewer.removeChild(viewer.firstChild);
 } else {
 if(viewer.firstChild.nodeName=="SPAN" && viewer.firstChild.className=="" && viewer.firstChild.hasChildNodes()) {
 var anchor=viewer.firstChild.nextSibling;
 for (var ii=0;ii<viewer.firstChild.childNodes.length;ii++) {
 var clone=viewer.firstChild.childNodes[ii].cloneNode(true);
 viewer.insertBefore(clone,anchor);
 }
 viewer.removeChild(viewer.firstChild);
 } else {
 slide.appendChild(viewer.firstChild);
 }
 }
 }
 
 //Stick the slides back into the viewer
 viewer.appendChild(slideHolder);
 slideHolder.setAttribute('numberSlides',slideNumber);
 
 //Create the navigation bar
 var pagefooter = createTiddlyElement(viewer,"DIV","pageFooter","pageFooterOff");
 var navigator = createTiddlyElement(pagefooter,"SPAN","navigator");

 //Make it so that when the footer is hovered over the class will change to make it visible
 pagefooter.onmouseover = function () {pagefooter.className = "pageFooterOn"};
 pagefooter.onmouseout = function () {pagefooter.className = "pageFooterOff"};

 //Create the control button for the navigation 
 var onClickQuit = function(){endSlideShow();};
 createTiddlyButton(navigator,lingo.quit.text,lingo.quit.tooltip,onClickQuit);
 createTiddlyButton(navigator,lingo.firstSlide.text,lingo.firstSlide.tooltip,first_slide);
 createTiddlyButton(navigator,lingo.previousSlide.text,lingo.previousSlide.tooltip,previous_slide);
 createTiddlyButton(navigator,lingo.nextSlide.text,lingo.nextSlide.tooltip,next_slide);
 createTiddlyButton(navigator,lingo.lastSlide.text,lingo.lastSlide.tooltip,last_slide); 
 createTiddlyButton(navigator,lingo.resetClock.text,lingo.resetClock.tooltip,resetClock,"button","slideClock"); 

 var indexNumbers = createTiddlyElement(pagefooter,"SPAN","indexNumbers","indexNumbers","1/"+slideNumber)
 indexNumbers.onclick = showHideTOC;
 var toc = createTiddlyElement(pagefooter,"UL","toc");
 var ovl=1;
 for (var i=0;i<slideHolder.childNodes.length;i++) {
 if(!noOverlays) {
 var ovl=1;
 while(1){
 var className="Overlay"+ovl;
 var overlays=getElementsByClass(className,slideHolder.childNodes[i]);
 if(overlays.length>0){
 for(var j=0; j<overlays.length; j++) {overlays[j].className+=' nextOverlay';}
 ovl++;
 } else {break;}
 }
 }
 slideHolder.childNodes[i].setAttribute("numberOverlays",ovl-1);
 slideHolder.setAttribute("currentOverlay",0);

 //Loop through each slide and check the header's content
 var tocLabel = null; 
 for (var j=0;j<slideHolder.childNodes[i].childNodes.length;j++) {
 var node = slideHolder.childNodes[i].childNodes[j];
 if(node.nodeName=="H1" || node.nodeName=="H2" || node.nodeName=="H3" || node.nodeName=="H4") {
 var htstring = node.innerHTML;
 var stripped = htstring.replace(/(<([^>]+)>)/ig,"");
 tocLabel = abbreviateLabel(stripped);
 var tocLevel="tocLevel"+node.nodeName.charAt(1);
 var tocItem = createTiddlyElement(toc,"LI",null,tocLevel);
 var tocLink = createTiddlyElement(tocItem,"A",null,"tocItem",tocLabel);
 tocLink.setAttribute("slideNumber",i);
 tocLink.onclick=tocShowSlide;
 }
 }
 }
 

 //Input box to jump to s specific slide
 var tocItem = createTiddlyElement(toc,"LI",null,"tocJumpItem",config.macros.slideShow.messages.gotoLabel);
 var tocJumpInput = createTiddlyElement(tocItem,"INPUT","jumpInput");
 tocJumpInput.type="text";
 tocJumpInput.onkeyup=jumpInputToSlide;
}

var next_slide= function(e){GoToSlide(1);}
var first_slide= function(e){GoToSlide("f");}
var previous_slide= function(e){GoToSlide(-1);}
var last_slide= function(e){GoToSlide("l");}

function toggleSlideStyles(){
 var contentWrapper = document.getElementById('contentWrapper');
 if (contentWrapper.className == "slideShowMode"){
 contentWrapper.className = "";
 window.applyPageTemplate();
 if(slideShowStyleSheet) changeStyleSheet();
 } else{
 contentWrapper.className = "slideShowMode";
 window.applyPageTemplate("SlideShowPageTemplate");
 if(slideShowStyleSheet) changeStyleSheet(slideShowStyleSheet);
 }
}

setStylesheet("/***\n!Slide Mode Styles\n***/\n/*{{{*/\n#contentWrapper.slideShowMode #slideContainer{\n display: block;\n}\n\n#contentWrapper.slideShowMode .Comment{\n display: none;\n}\n\n#contentWrapper.slideShowMode .nextOverlay{\n visibility: hidden;\n}\n\n#contentWrapper.slideShowMode .currentOverlay{\n visibility: visible;\n}\n\n#contentWrapper.slideShowMode .previousOverlay{\n visibility: visible;\n}\n\n#jump{\n text-align: right;\n}\n\n.pageFooterOff #navigator{\n visibility: hidden;\n}\n\n.pageFooterOn #navigator{\n visibility: visible;\n}\n\n#contentWrapper.slideShowMode #slideClock{\n cursor: pointer; margin: 0 5px 0 5px; border: 1px solid #db4\n}\n\n#contentWrapper.slideShowMode,\n #contentWrapper.slideShowMode #displayArea{\n width: 100%;\n font-size: 1.5em;\n margin: 0 !important;\n padding: 0;\n}\n\n#slideContainer{\n display: none;\n}\n\n.indexNumbers{\n cursor: pointer;\n}\n\n#navigator{\n visibility: hidden;\n bottom: 0;\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\nul#toc, #toc li{\n margin: 0;\n padding: 0;\n list-style: none;\n line-height: 1em;\n}\n\n.tocJumpItem{\n margin-right: 2em;\n}\n\n.tocJumpItem input{\nmargin-right: 1em;\n border: 0;\n}\n\n#toc a,\n#toc a.button{\n display: block;\n padding: .1em;\n}\n\n#toc .tocLevel1{\nfont-size: .8em;\n}\n\n#toc .tocLevel2{\n margin-left: 1em;\n font-size: .75em;\n}\n\n#toc .tocLevel3{\n margin-left: 2em;\nfont-size: .75em;\n}\n\n#toc .tocLevel4{\n margin-left: 3em;\nfont-size: .65em;\n}\n\n#toc a{\n cursor: pointer;\n}\n\nh1{\n min-height: 1em;\n}\n\n.slide h1{\n min-height: 0;\n}\n\n/* The '&gt;' selector is ignored by IE6 and earlier so the proper rules are given */\n#pageFooter{\n position: fixed;\n bottom: 2px;\n right: 2px;\n width: 100%;\n text-align: right;\n}\n\n/* This is a hack to trick IE6 and earlier to put the navbar on the bottom of the page */\n* html #pageFooter {\n position: absolute;\n width: 100%;\n text-align: right;\n right: auto; bottom: auto;\n left: expression( ( -20 - pageFooter.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );\n top: expression( ( -10 - pageFooter.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );\n}\n\n\n\n/*}}}*/","slideShowStyles");
//}}}
!Description
This plugin turns a TiddlyWiki tiddler into a simple slide show type display. Most features that are usually found in presentation software are available. It should work in a way that does not interfere with TiddlyWiki. When you close the slide show you get back to your good old TW. 

This plugin has been tested in Firefox and Internet Explorer. Let me know if something seems broken.
!Usage
To use this plugin you //must// be using TiddlyWiki 2.0. Some optional features (as the incremental display) require version 2.0.8 or higher. To install the plugin copy the tiddlers SlideShowPlugin, SlideShowPageTemplate and SlideShowViewTemplate to your TW, label the first one with the //systemConfig// tag, save the TW and refresh the browser.

To make a slide show simply drop {{{<<slideShow>>}}} at the beginning of a tiddler and use {{{--s--}}} to start each slide. 

If you move your mouse over the bottom of the browser window you will see a few navigation buttons, a clock and a table of contents that shows up when you click the slide number.

Any block of text marked as {{{{{Comment{For my eyes only!}}}}}} will not be displayed in the slide show.

See these and other features in this [[SlideShowExample]].
!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...}}}}}}, ...

To costumize the way overlays are shown you can redefine the following CSS classes
*contentWrapper.slideShowMode .previousOverlay 
*contentWrapper.slideShowMode .currentOverlay 
*contentWrapper.slideShowMode .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 parameters
*The slide show can be themed by providing a ~StyleSheet ({{{<<slideShow style:'MyStyleSheet'>>}}})
*By default, there is a clock at bottom of the browser window that displays the current time. This clock can also show the presentation elapsed time with {{{<<slideShow clock:'+'>>}}} or a countdown clock with {{{<<slideShow clock:'-20'>>}}} (for 20 minutes). In these two cases, if you click on the clock display it will be restarted
*The slide show can be set to loop ({{{<<slideShow repeat>>}}})
*You can set it so each slide changes after X milliseconds ({{{<<slideShow slidePause:X>>}}}) (auto advance mode)
*Use auto start mode to begin the slideshow the moment the tiddler is opened ({{{<<slideShow autostart>>>}}})
*You can disable overlays with {{{<<slideShow noOverlays>>}}}
*These parameters can be mixed and matched in any order: {{{<<slideShow slidePause:1000 repeat>>}}} is the same as {{{<<slideShow repeat slidePause:1000>>}}}
!Slide show navigation
You can navigate through a slide show using the keyboard or the mouse. To quickly move to titled sections you can use the table of contents. 
!!Mouse navigation
Left (right) clicking on a slide jumps to the next (previous) overlay. To move to the beginning of the next or previous slide you must use the navigation bar at the bottom of the browser's window. If there are no overlays defined both operations are equivalent.
!!Keyboard navigation
The following keys are defined:
*Left arrow - previous overlay
*Down arrow - previous slide
*Right arrow - next overlay
*Up arrow - next slide
*Home - first slide
*End - last slide
*Escape - exit slide show
*Spacebar - pause/resume slide show in auto advance mode
!Revision history
*1.5.1 10/11/2006
**added SlideShowPageTemplate and SlideShowViewTemplate. This way, the plugin no longer requires a standard TW layout. Thanks to Andrew Lister for the idea.
*1.5.0 18/09/2006
**fixed restoring stylesheet on exit
**changed (again!) the way how slides are separated (slide shows prepared for previous versions must be fixed)
*1.4.0 20/04/2006
**changed the way how slides are separated (slide shows prepared for previous versions must be fixed)
**now works with content included with the {{{<<tiddler>>}}} macro
**added incremental display (overlays)
**improved documentation
**assorted small fixes
*1.3.1 10/03/2006
**removed empty slide titles
**fixed wrong numberSlides when slides have div's
**fixed wrong time in Windows
*1.3.0 26/02/2006
**restore open tiddlers on exit
**fixed problem with markup in headers (should work with NestedSlidersPlugin)
**added slide comments (blocks of text in the tiddler that don't show up in the presentation)
*1.2.1 28/01/2006
**pause timed slideshow with spacebar
**added clock with 3 different modes
**fixed bugs with style and abbreviation options
**general cleanup
*1.2.0 07/01/2006
**added a resume feature
**added themes support
*1.1.5 14/12/2005
**added mouse support
**cleaned up navbar generation
*1.1.0 12/12/2005
**added support for IE
**added key listeners
*1.0.0 11/12/2005
**initial release
!Todo
*Time code is still very hackerish and unreliable.
<!--{{{-->
<div class='title' macro='view title'></div>
<div class='viewer' macro='view text wikified'></div>
<!--}}}-->
#249F1D/*{{{*/
/*Haemoglobin Theme for TiddlyWiki*/
/*Design and CSS by Saq Imtiaz*/
/*Version 1.0*/
/*}}}*/
/*{{{*/

#sidebarTabs {font-family:arial,helvetica;}

body
{background:#fefefe;}

#contentWrapper {
	font-family: Verdana, Arial, Tahoma, Sans-Serif;
	color: #555555;
margin:1.9em auto 1em ; width:800px;}

#header {background:#fefefe;}

.headerShadow {	padding: 1.4em 0em 0.5em 1em; }

.siteTitle {
			font-family: 'Trebuchet MS' sans-serif;
			font-weight: bold;
			font-size: 36px;
			color: #900FD3;
			background-color: #FFF;
}

.siteSubtitle {
	font-size: 1.0em;
        display: block;
        margin: .5em 3em; color: #999;
}

.clearAll {clear:both;}
.tagClear {clear:none;}
#sidebar {position:relative; float:right; display:inline; right:0;}

a{
color:#900FD3;
text-decoration: none; font-weight:normal;
}

a:hover{
color:#900FD3;
background-color: #fefefe;
border-bottom:1px solid #900FD3;
}

.viewer .button, .editorFooter .button{
color: #555;
border: 1px solid #900FD3;
}

.viewer .button:hover,
.editorFooter .button:hover{
color: #fff;
background: #900FD3;
border-color: #900FD3;
}

.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#CFCFCF;border-color:#CFCFCF;}

#topMenu br {display:none;}

#topMenu {padding:0.45em 1em; background:#900FD3;}

#topMenu a, #topMenu .tiddlyLink, #topMenu .button {color:#f1f1f1; padding:0.3em 0.45em; margin:0 4px;font-size:120%;font-weight:normal;font-variant: small-caps; border:none; background:#900FD3; text-decoration:none; }

#topMenu a:hover, #topMenu .tiddlyLink:hover, #topMenu .button:hover, #topMenu .button:active, #topMenu .highlight {color:#fff;text-decoration:none; background:#CFCFCF; }



#displayArea{margin:0 17em 2em 0.5em;}

.tiddler {padding-left:0;}

.title {color:#900FD3; border-bottom:1px solid#900FD3; }
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#999;}

.toolbar {font-size:85%;}
.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#333; background:transparent;border:1px solid #fff;}

.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#333; background:transparent;border:1px solid #fff;}

    *  html .viewer pre {

margin-left: 0em;
}

    * html .editor textarea, * html .editor input {

width: 98%;
}

/***
!Sidebar
***/
#sidebar {position:relative;float:right; line-height: 1.4em; border-left:0px solid#000; display:inline; background:#fefefe; right:0; margin-bottom:2em !important; margin-bottom:1em;
width: 16em;}

/***
!SidebarOptions
***/
#sidebarOptions {padding-left:0.5em; padding-top:2em;}

#sidebarOptions a {
			color:#999;
			text-decoration: none;}

#sidebarOptions	a:hover, #sidebarOptions a:active {
			color:#CC0000;
			background-color:#f5f5f5;border:1px solid #f5f5f5;
		}

#sidebarOptions input {border:1px solid #999; }



 .listTitle {color:#888;}

#sidebarTabs .tabContents {background:#fefefe;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#CC0000;background:#fefefe; text-decoration:none;border:none;}

#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#CC0000;background:#fefefe}


.tabSelected{color:#fefefe; background:#999;}



 .tabSelected, .tabSelected:hover {
 color: #555;
 background: #fefefe;
 border: solid 1px #ccc;

}

#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#999;}

 .tabUnselected {
 color: #999;
 background: #eee;
 border: solid 1px #ccc;

}

.tabUnselected:hover {text-decoration:none; border:1px solid #ccc;}

#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}

#sidebarOptions .sliderPanel {
	background: #eee; border:1px solid#ccc;
	font-size: .9em;
}

#sidebarOptions .sliderPanel input {border:1px solid #999;}
#sidebarOptions .sliderPanel .txtOptionInput {border:1px solid #999;width:9em;}

#sidebarOptions .sliderPanel a {font-weight:normal; color:#555;background-color: #eee; border-bottom:1px dotted #333;}


#sidebarOptions .sliderPanel a:hover {
color:#111;
background-color: #eee;
border:none;
border-bottom:1px dotted #111;
}

.tabContents {background:#fefefe;}




.tagging, .tagged {
border: 1px solid #eee;
background-color: #F7F7F7;
}

.selected .tagging, .selected .tagged {
background-color: #f7f7f7;
border: 1px solid #ccc;
}

.tagging .listTitle, .tagged .listTitle {
color: #bbb;
}

.selected .tagging .listTitle, .selected .tagged .listTitle {
color: #666;
}

.tagging .button, .tagged .button {
color:#ccc;
}
.selected .tagging .button, .selected .tagged .button {
color:#aaa;
}

.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}

.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
border: none; background:transparent; text-decoration:underline; color:#333;
}

.popup {
background: #900FD3;
border: 1px solid #900FD3;
}

.popup li.disabled {
color: #000;
}

.popup li a, .popup li a:visited {
color: #eee;
border: none;
}

.popup li a:hover {
background: #bf1717;
color: #fff;
border: none;
}



   #messageArea {

border: 4px solid #900FD3;
background: #fefefe;
color: #555;
font-size:90%;
}

   #messageArea a:hover { background:#f5f5f5; border:none;}


   #messageArea .button{
color: #666;
border: 1px solid #900FD3;
}

   #messageArea .button:hover {
color: #fff;
background: #900FD3;
border-color: #900FD3;
}

   #contentFooter {background:#900FD3; color:#DF7D7D; clear: both; padding: 0.5em 1em; }


#contentFooter a {
color: #DF7D7D;
border-bottom: 1px dotted #DF7D7D; font-weight:normal;text-decoration:none;
}



#contentFooter a:hover {
color: #FFFFFF;
background-color:transparent;
border-bottom: 1px dotted #fff; text-decoration:none;
}

.outils  {float:right;}
.HideSideBarButton {float:right;} 
.fontSize {float:right;}

.searchBar {float:right;font-size: 1.0em;position:relative; margin-top:1.3em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fefefe;color:#4F4B45;}
.searchBar input {			
                        background-color: #fefefe;
			color: #999999;
			border: 1px solid #CCC;		margin-right:3px;
}

.tiddler {padding-bottom:10px;}

.viewer blockquote {
border-left: 5px solid #900FD3;
}

.viewer table, .viewer td {
border: 1px solid #900FD3;
}

.viewer th, thead td {
background: #900FD3;
border: 1px solid #900FD3;
color: #fff;
}
.viewer pre {
	border: 1px solid #ccc;
	background: #f5f5f5;
}

.viewer code {
color: #111; background:#f5f5f5;
}

.viewer hr {
border-top: dashed 1px #555;
}

.editor input {
border: 1px solid #888; margin-top:5px;
}

.editor textarea {
border: 1px solid #888;
}

h1,h2,h3,h4,h5 { color: #900FD3; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}
/*}}}*/
@media print {#mainMenu {display: none ! important;}}
@media print {#sidebar {display: none ! important;}}
@media print {#messageArea {display: none ! important;}} 
@media print {#toolbar {display: none ! important;}}
@media print {#contentFooter {display: none ! important;}}
@media print {.header {display: none ! important;}}
@media print {#displayArea {margin: 1em 1em 0em 1em;}}
<<calendar thismonth>>
<<timeline better:true  sortBy:modified maxEntries:15>>
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2  (Win32)">
	<META NAME="AUTHOR" CONTENT="mathieu ">
	<META NAME="CREATED" CONTENT="20111025;11150300">
	<META NAME="CHANGEDBY" CONTENT="mathieu ">
	<META NAME="CHANGED" CONTENT="20111025;11321900">
	<STYLE TYPE="text/css">
	<!--
		@page { size: landscape; margin: 2cm }
		P { margin-bottom: 0.21cm }
		TD P { margin-bottom: 0cm }
	-->
	</STYLE>
</HEAD>
<BODY LANG="fr-FR" DIR="LTR">
<P ALIGN=JUSTIFY>- Activit&eacute;s propos&eacute;es : Compl&eacute;ter
un tableau &agrave; double entr&eacute;e. A partir de ces
informations, demander aux &eacute;l&egrave;ves comment ils se
repr&eacute;sentent la cit&eacute; hom&eacute;rique. 
</P>
<P ALIGN=JUSTIFY>- Dur&eacute;e : deux heures 
</P>
<TABLE WIDTH=965 BORDER=1 CELLPADDING=4 CELLSPACING=3>
	<COL WIDTH=125>
	<COL WIDTH=107>
	<COL WIDTH=75>
	<COL WIDTH=95>
	<COL WIDTH=115>
	<COL WIDTH=95>
	<COL WIDTH=118>
	<COL WIDTH=143>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=107>
			<P>LES LOTOPHAGES</P>
		</TD>
		<TD WIDTH=75>
			<P>LE CYCLOPE</P>
		</TD>
		<TD WIDTH=95>
			<P>EOLE</P>
		</TD>
		<TD WIDTH=115>
			<P>LES LESTRYGONS</P>
		</TD>
		<TD WIDTH=95>
			<P>CIRCE</P>
		</TD>
		<TD WIDTH=118>
			<P>CALYPSO</P>
		</TD>
		<TD WIDTH=143>
			<P>LES PHEACIENS</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>1 - <U>G&eacute;ographie physique</U></P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Vivent-ils sur une &icirc;le?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>2 - <U>Mode de vie</U></P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Ont-ils des liens avec l&rsquo;ext&eacute;rieur ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Cultivent-ils la terre ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Comment se nourissent-ils ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Respectent-ils les dieux ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>3 - <U>Attitude envers les &eacute;trangers</U></P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Pratiquent-ils l&rsquo;hospitalit&eacute;?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Comment attaquent-ils les &eacute;trangers ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>4 - <U>Organisation </U><U>sociale</U></P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Ont-ils une agora ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Ont-ils un roi ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>Sur quel mod&egrave;le fonctionnennent-ils ?</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>* le mod&egrave;le familial</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=125>
			<P>* la vie solitaire</P>
		</TD>
		<TD WIDTH=107>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=75>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=115>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=95>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=118>
			<P>&nbsp;</P>
		</TD>
		<TD WIDTH=143>
			<P>&nbsp;</P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
</BODY>
</HTML>
/***
|Name|TagglyListPlugin|
|Created by|SimonBaird|
|Location|http://simonbaird.com/mptw/#TagglyListPlugin|
|Version|1.1.2 25-Apr-06|
|Requires|See TagglyTagging|

!History
* 1.1.2 (25-Apr-2006) embedded TagglyTaggingStyles. No longer need separated tiddler for styles.
* 1.1.1 (6-Mar-2006) fixed bug with refreshAllVisible closing tiddlers being edited. Thanks Luke Blanshard.

***/

/***
!Setup and config
***/
//{{{

version.extensions.TagglyListPlugin = {
	major: 1, minor: 1, revision: 2,
	date: new Date(2006,4,25),
	source: "http://simonbaird.com/mptw/#TagglyListPlugin"
};

config.macros.tagglyList = {};
config.macros.tagglyListByTag = {};
config.macros.tagglyListControl = {};
config.macros.tagglyListWithSort = {};
config.macros.hideSomeTags = {};

// change this to your preference
config.macros.tagglyListWithSort.maxCols = 6;

config.macros.tagglyList.label = "Tagged as %0:";

// the default sort options. set these to your preference
config.macros.tagglyListWithSort.defaults = {
 sortBy:"title", // title|created|modified
 sortOrder: "asc", // asc|desc
 hideState: "show", // show|hide
 groupState: "nogroup", // nogroup|group
 numCols: 1
};

// these tags will be ignored by the grouped view
config.macros.tagglyListByTag.excludeTheseTags = [
 "systemConfig",
 "TiddlerTemplates"
];

config.macros.tagglyListControl.tags = {
 title:"sortByTitle", 
 modified: "sortByModified", 
 created: "sortByCreated",
 asc:"sortAsc", 
 desc:"sortDesc",
 hide:"hideTagged", 
 show:"showTagged",
 nogroup:"noGroupByTag",
 group:"groupByTag",
 cols1:"list1Cols",
 cols2:"list2Cols",
 cols3:"list3Cols",
 cols4:"list4Cols",
 cols5:"list5Cols",
 cols6:"list6Cols",
 cols7:"list7Cols",
 cols8:"list8Cols",
 cols9:"list9Cols" 
}

// note: should match config.macros.tagglyListControl.tags
config.macros.hideSomeTags.tagsToHide = [
 "sortByTitle",
 "sortByCreated",
 "sortByModified",
 "sortDesc",
 "sortAsc",
 "hideTagged",
 "showTagged",
 "noGroupByTag",
 "groupByTag",
 "list1Cols",
 "list2Cols",
 "list3Cols",
 "list4Cols",
 "list5Cols",
 "list6Cols",
 "list7Cols",
 "list8Cols",
 "list9Cols"
];


//}}}
/***

!Utils
***/
//{{{
// from Eric
function isTagged(title,tag) {
 var t=store.getTiddler(title); if (!t) return false;
 return (t.tags.find(tag)!=null);
}

// from Eric
function toggleTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 if (t.tags.find(tag)==null) t.tags.push(tag);
 else t.tags.splice(t.tags.find(tag),1);
}

function addTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 t.tags.push(tag);
}

function removeTag(title,tag) {
 var t=store.getTiddler(title); if (!t || !t.tags) return;
 if (t.tags.find(tag)!=null) t.tags.splice(t.tags.find(tag),1);
}

// from Udo
Array.prototype.indexOf = function(item) {
 for (var i = 0; i < this.length; i++) {
 if (this[i] == item) {
 return i;
 }
 }
 return -1;
};
Array.prototype.contains = function(item) {
 return (this.indexOf(item) >= 0);
}
//}}}
/***

!tagglyList
displays a list of tagged tiddlers. 
parameters are sortField and sortOrder
***/
//{{{

// not used at the moment...
function sortedListOfOtherTags(tiddler,thisTag) {
 var list = tiddler.tags.concat(); // so we are working on a clone..
 for (var i=0;i<config.macros.hideSomeTags.tagsToHide.length;i++) {
 if (list.find(config.macros.hideSomeTags.tagsToHide[i]) != null)
 list.splice(list.find(config.macros.hideSomeTags.tagsToHide[i]),1); // remove hidden ones
 }
 for (var i=0;i<config.macros.tagglyListByTag.excludeTheseTags.length;i++) {
 if (list.find(config.macros.tagglyListByTag.excludeTheseTags[i]) != null)
 list.splice(list.find(config.macros.tagglyListByTag.excludeTheseTags[i]),1); // remove excluded ones
 }
 list.splice(list.find(thisTag),1); // remove thisTag
 return '[[' + list.sort().join("]] [[") + ']]';
}

function sortHelper(a,b) {
 if (a == b) return 0;
 else if (a < b) return -1;
 else return +1;
}

config.macros.tagglyListByTag.handler = function (place,macroName,params,wikifier,paramString,tiddler) {

 var sortBy = params[0] ? params[0] : "title"; 
 var sortOrder = params[1] ? params[1] : "asc";

 var result = store.getTaggedTiddlers(tiddler.title,sortBy);

 if (sortOrder == "desc")
 result = result.reverse();

 var leftOvers = []
 for (var i=0;i<result.length;i++) {
 leftOvers.push(result[i].title);
 }

 var allTagsHolder = {};
 for (var i=0;i<result.length;i++) {
 for (var j=0;j<result[i].tags.length;j++) {

 if ( 
 result[i].tags[j] != tiddler.title // not this tiddler
 && config.macros.hideSomeTags.tagsToHide.find(result[i].tags[j]) == null // not a hidden one
 && config.macros.tagglyListByTag.excludeTheseTags.find(result[i].tags[j]) == null // not excluded
 ) {
 if (!allTagsHolder[result[i].tags[j]])
 allTagsHolder[result[i].tags[j]] = "";
 allTagsHolder[result[i].tags[j]] += "**[["+result[i].title+"]]\n";

 if (leftOvers.find(result[i].title) != null)
 leftOvers.splice(leftOvers.find(result[i].title),1); // remove from leftovers. at the end it will contain the leftovers...
 }
 }
 }


 var allTags = [];
 for (var t in allTagsHolder)
 allTags.push(t);

 allTags.sort(function(a,b) {
 var tidA = store.getTiddler(a);
 var tidB = store.getTiddler(b);
 if (sortBy == "title") return sortHelper(a,b);
 else if (!tidA && !tidB) return 0;
 else if (!tidA) return -1;
 else if (!tidB) return +1;
 else return sortHelper(tidA[sortBy],tidB[sortBy]);
 });

 var markup = "";

 if (sortOrder == "desc") {
 allTags.reverse();
 }
 else {
 // leftovers first...
 for (var i=0;i<leftOvers.length;i++)
 markup += "*[["+leftOvers[i]+"]]\n";
 } 

 for (var i=0;i<allTags.length;i++)
 markup += "*[["+allTags[i]+"]]\n" + allTagsHolder[allTags[i]];

 if (sortOrder == "desc") {
 // leftovers last...
 for (var i=0;i<leftOvers.length;i++)
 markup += "*[["+leftOvers[i]+"]]\n";
 }

 wikify(markup,place);
}

config.macros.tagglyList.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 var sortBy = params[0] ? params[0] : "title"; 
 var sortOrder = params[1] ? params[1] : "asc";
 var numCols = params[2] ? params[2] : 1;

 var result = store.getTaggedTiddlers(tiddler.title,sortBy);
 if (sortOrder == "desc")
 result = result.reverse();

 var listSize = result.length;
 var colSize = listSize/numCols;
 var remainder = listSize % numCols;

 var upperColsize;
 var lowerColsize;
 if (colSize != Math.floor(colSize)) {
 // it's not an exact fit so..
 lowerColsize = Math.floor(colSize);
 upperColsize = Math.floor(colSize) + 1;
 }
 else {
 lowerColsize = colSize;
 upperColsize = colSize;
 }

 var markup = "";
 var c=0;

 var newTaggedTable = createTiddlyElement(place,"table");
 var newTaggedBody = createTiddlyElement(newTaggedTable,"tbody");
 var newTaggedTr = createTiddlyElement(newTaggedBody,"tr");

 for (var j=0;j<numCols;j++) {
 var foo = "";
 var thisSize;

 if (j<remainder)
 thisSize = upperColsize;
 else
 thisSize = lowerColsize;

 for (var i=0;i<thisSize;i++) 
 foo += ( "*[[" + result[c++].title + "]]\n"); // was using splitList.shift() but didn't work in IE;

 var newTd = createTiddlyElement(newTaggedTr,"td",null,"tagglyTagging");
 wikify(foo,newTd);

 }

};

/* snip for later.....
 //var groupBy = params[3] ? params[3] : "t.title.substr(0,1)";
 //var groupBy = params[3] ? params[3] : "sortedListOfOtherTags(t,tiddler.title)";
 //var groupBy = params[3] ? params[3] : "t.modified";
 var groupBy = null; // for now. groupBy here is working but disabled for now.

 var prevGroup = "";
 var thisGroup = "";

 if (groupBy) {
 result.sort(function(a,b) {
 var t = a; var aSortVal = eval(groupBy); var aSortVal2 = eval("t".sortBy);
 var t = b; var bSortVal = eval(groupBy); var bSortVal2 = eval("t".sortBy);
 var t = b; var bSortVal2 = eval(groupBy);
 return (aSortVal == bSortVal ?
 (aSortVal2 == bSortVal2 ? 0 : (aSortVal2 < bSortVal2 ? -1 : +1)) // yuck
 : (aSortVal < bSortVal ? -1 : +1));
 });
 }

 if (groupBy) {
 thisGroup = eval(groupBy);
 if (thisGroup != prevGroup)
 markup += "*[["+thisGroup+']]\n';
 markup += "**[["+t.title+']]\n';
 prevGroup = thisGroup;
 }



*/


//}}}

/***

!tagglyListControl
Use to make the sort control buttons
***/
//{{{

function getSortBy(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.sortBy;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["title"])) return "title";
 else if (tiddler.tags.contains(usetags["modified"])) return "modified";
 else if (tiddler.tags.contains(usetags["created"])) return "created";
 else return defaultVal;
}

function getSortOrder(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.sortOrder;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["asc"])) return "asc";
 else if (tiddler.tags.contains(usetags["desc"])) return "desc";
 else return defaultVal;
}

function getHideState(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.hideState;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["hide"])) return "hide";
 else if (tiddler.tags.contains(usetags["show"])) return "show";
 else return defaultVal;
}

function getGroupState(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.groupState;
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 if (tiddler.tags.contains(usetags["group"])) return "group";
 else if (tiddler.tags.contains(usetags["nogroup"])) return "nogroup";
 else return defaultVal;
}

function getNumCols(title) {
 var tiddler = store.getTiddler(title);
 var defaultVal = config.macros.tagglyListWithSort.defaults.numCols; // an int
 if (!tiddler) return defaultVal;
 var usetags = config.macros.tagglyListControl.tags;
 for (var i=1;i<=config.macros.tagglyListWithSort.maxCols;i++)
 if (tiddler.tags.contains(usetags["cols"+i])) return i;
 return defaultVal;
}


function getSortLabel(title,which) {
 // TODO. the strings here should be definable in config
 var by = getSortBy(title);
 var order = getSortOrder(title);
 var hide = getHideState(title);
 var group = getGroupState(title);
 if (which == "hide") return (hide == "show" ? "−" : "+"); // 0x25b8;
 else if (which == "group") return (group == "group" ? "normal" : "grouped");
 else if (which == "cols") return "cols±"; // &plusmn;
 else if (by == which) return which + (order == "asc" ? "↓" : "↑"); // &uarr; &darr;
 else return which;
}

function handleSortClick(title,which) {
 var currentSortBy = getSortBy(title);
 var currentSortOrder = getSortOrder(title);
 var currentHideState = getHideState(title);
 var currentGroupState = getGroupState(title);
 var currentNumCols = getNumCols(title);

 var tags = config.macros.tagglyListControl.tags;

 // if it doesn't exist, lets create it..
 if (!store.getTiddler(title))
 store.saveTiddler(title,title,"",config.options.txtUserName,new Date(),null);

 if (which == "hide") {
 // toggle hide state
 var newHideState = (currentHideState == "hide" ? "show" : "hide");
 removeTag(title,tags[currentHideState]);
 if (newHideState != config.macros.tagglyListWithSort.defaults.hideState)
 toggleTag(title,tags[newHideState]);
 }
 else if (which == "group") {
 // toggle hide state
 var newGroupState = (currentGroupState == "group" ? "nogroup" : "group");
 removeTag(title,tags[currentGroupState]);
 if (newGroupState != config.macros.tagglyListWithSort.defaults.groupState)
 toggleTag(title,tags[newGroupState]);
 }
 else if (which == "cols") {
 // toggle num cols
 var newNumCols = currentNumCols + 1; // confusing. currentNumCols is an int
 if (newNumCols > config.macros.tagglyListWithSort.maxCols || newNumCols > store.getTaggedTiddlers(title).length)
 newNumCols = 1;
 removeTag(title,tags["cols"+currentNumCols]);
 if (("cols"+newNumCols) != config.macros.tagglyListWithSort.defaults.groupState)
 toggleTag(title,tags["cols"+newNumCols]);
 }
 else if (currentSortBy == which) {
 // toggle sort order
 var newSortOrder = (currentSortOrder == "asc" ? "desc" : "asc");
 removeTag(title,tags[currentSortOrder]);
 if (newSortOrder != config.macros.tagglyListWithSort.defaults.sortOrder)
 toggleTag(title,tags[newSortOrder]);
 }
 else {
 // change sortBy only
 removeTag(title,tags["title"]);
 removeTag(title,tags["created"]);
 removeTag(title,tags["modified"]);

 if (which != config.macros.tagglyListWithSort.defaults.sortBy)
 toggleTag(title,tags[which]);
 }

 store.setDirty(true); // save is required now.
 story.refreshTiddler(title,false,true); // force=true
}

config.macros.tagglyListControl.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 var onclick = function(e) {
 if (!e) var e = window.event;
 handleSortClick(tiddler.title,params[0]);
 e.cancelBubble = true;
 if (e.stopPropagation) e.stopPropagation();
 return false;
 };
 createTiddlyButton(place,getSortLabel(tiddler.title,params[0]),"Click to change sort options",onclick,params[0]=="hide"?"hidebutton":"button");
}
//}}}
/***

!tagglyListWithSort
put it all together..
***/
//{{{
config.macros.tagglyListWithSort.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
 if (tiddler && store.getTaggedTiddlers(tiddler.title).length > 0)
  // todo make this readable
 wikify(
 "<<tagglyListControl hide>>"+
 (getHideState(tiddler.title) != "hide" ? 
 '<html><span class="tagglyLabel">'+config.macros.tagglyList.label.format([tiddler.title])+' </span></html>'+
 "<<tagglyListControl title>><<tagglyListControl modified>><<tagglyListControl created>><<tagglyListControl group>>"+(getGroupState(tiddler.title)=="group"?"":"<<tagglyListControl cols>>")+"\n" + 
 "<<tagglyList" + (getGroupState(tiddler.title)=="group"?"ByTag ":" ") + getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+" "+getNumCols(tiddler.title)+">>" // hacky
 // + \n----\n" +
 //"<<tagglyList "+getSortBy(tiddler.title)+" "+getSortOrder(tiddler.title)+">>"
 : ""),
 place,null,tiddler);
}

config.macros.tagglyTagging = { handler: config.macros.tagglyListWithSort.handler };


//}}}
/***

!hideSomeTags
So we don't see the sort tags.
(note, they are still there when you edit. Will that be too annoying?
***/
//{{{

// based on tags.handler
config.macros.hideSomeTags.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
 var theList = createTiddlyElement(place,"ul");
 if(params[0] && store.tiddlerExists[params[0]])
 tiddler = store.getTiddler(params[0]);
 var lingo = config.views.wikified.tag;
 var prompt = tiddler.tags.length == 0 ? lingo.labelNoTags : lingo.labelTags;
 createTiddlyElement(theList,"li",null,"listTitle",prompt.format([tiddler.title]));
 for(var t=0; t<tiddler.tags.length; t++)
 if (!this.tagsToHide.contains(tiddler.tags[t])) // this is the only difference from tags.handler...
 createTagButton(createTiddlyElement(theList,"li"),tiddler.tags[t],tiddler.title);

}

//}}}
/***

!Refresh everything when we save a tiddler. So the tagged lists never get stale. Is this too slow???
***/
//{{{

function refreshAllVisible() {
 story.forEachTiddler(function(title,element) {
   if (element.getAttribute("dirty") != "true") 
     story.refreshTiddler(title,false,true);
 });
}

story.saveTiddler_orig_mptw = story.saveTiddler;
story.saveTiddler = function(title,minorUpdate) {
 var result = this.saveTiddler_orig_mptw(title,minorUpdate);
 refreshAllVisible();
 return result;
}

store.removeTiddler_orig_mptw = store.removeTiddler;
store.removeTiddler = function(title) {
 this.removeTiddler_orig_mptw(title);
 refreshAllVisible();
}

config.shadowTiddlers.TagglyTaggingStyles = "/***\nTo use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.\n***/\n/*{{{*/\n.tagglyTagged li.listTitle { display:none;}\n.tagglyTagged li { display: inline; font-size:90%; }\n.tagglyTagged ul { margin:0px; padding:0px; }\n.tagglyTagging { padding-top:0.5em; }\n.tagglyTagging li.listTitle { display:none;}\n.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }\n\n/* .tagglyTagging .tghide { display:inline; } */\n\n.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }\n.tagglyTagging table { margin:0px; padding:0px; }\n\n\n.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }\n.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}\n.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }\n.selected .tagglyTagging .button { display:inline; }\n\n.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */\n.selected .tagglyTagging .hidebutton { color:#aaa }\n\n.tagglyLabel { color:#aaa; font-size:90%; }\n\n.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }\n.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}\n.tagglyTagging ul ul li {margin-left:0.5em; }\n\n.editLabel { font-size:90%; padding-top:0.5em; }\n/*}}}*/\n";

refreshStyles("TagglyTaggingStyles");


//}}}

// // <html>&#x25b8;&#x25be;&minus;&plusmn;</html>
/***
To use, add {{{[[TagglyTaggingStyles]]}}} to your StyleSheet tiddler, or you can just paste the CSS in directly. See also ViewTemplate, EditTemplate and TagglyTagging.
***/
/*{{{*/
.tagglyTagged li.listTitle { display:none;}
.tagglyTagged li { display: inline; font-size:90%; }
.tagglyTagged ul { margin:0px; padding:0px; }
.tagglyTagging { padding-top:0.5em; }
.tagglyTagging li.listTitle { display:none;}
.tagglyTagging ul { margin-top:0px; padding-top:0.5em; padding-left:2em; margin-bottom:0px; padding-bottom:0px; }

/* .tagglyTagging .tghide { display:inline; } */

.tagglyTagging { vertical-align: top; margin:0px; padding:0px; }
.tagglyTagging table { margin:0px; padding:0px; }


.tagglyTagging .button { display:none; margin-left:3px; margin-right:3px; }
.tagglyTagging .button, .tagglyTagging .hidebutton { color:#aaa; font-size:90%; border:0px; padding-left:0.3em;padding-right:0.3em;}
.tagglyTagging .button:hover, .hidebutton:hover { background:#eee; color:#888; }
.selected .tagglyTagging .button { display:inline; }

.tagglyTagging .hidebutton { color:white; } /* has to be there so it takes up space. tweak if you're not using a white tiddler bg */
.selected .tagglyTagging .hidebutton { color:#aaa }

.tagglyLabel { color:#aaa; font-size:90%; }

.tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }
.tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}
.tagglyTagging ul ul li {margin-left:0.5em; }

.editLabel { font-size:90%; padding-top:0.5em; }
/*}}}*/
/***
{{fr{
<<tiddler TiddlerSlicerDocumentation_fr>>}}}{{en{
<<tiddler TiddlerSlicerDocumentation_en>>}}}
/%dependencies TWkdLib %/
!Code
***/
// //version information
//{{{
version.extensions.TiddlerSlicer = { major: 1, minor: 2, revision: 0, date: new Date(2006,10,5),
 source: "http://yann.perrin.googlepages.com/twkd.html#TiddlerSlicer"
};
//}}}
// //slicing function
//{{{

slicing = function(e){
var modeandtitle=this.getAttribute('Id');
modeandtitle=modeandtitle.split('|');
var mode=modeandtitle[0];
var title=modeandtitle[1];
var selection = getSelection(title);
var newtitle=askForTitle();
if(!newtitle)
   {
   displayMessage(config.commands.slice.cancel);
   return(false);
   }
if (mode!="part"&&mode!="nestedSlider")
{
// creation of the new tiddler
newTWkdLibTiddler(newtitle,selection.content,title,config.commands.slice.askForTags);
}

// replacement of selection with a reference to the newly created tiddler
switch(mode) {
   case "nestedSlider":
   putInPlace("+++["+newtitle+"]\n"+selection.content+"\n===",selection);
   break;
   case "part":
   putInPlace("<part "+newtitle+">"+selection.content+"</part>",selection);
   break;
   case "link":
   putInPlace("[["+newtitle+"]]",selection);
   break;
   case "slider":
   putInPlace('<<slider chkSlice [['+newtitle+']] "'+newtitle+'" "'+config.commands.slice.sliderTooltip+newtitle+'">>',selection);
   break;
   default:
   putInPlace("<<tiddler [["+newtitle+"]]>>",selection);
   break;
   }
} // close slicing function definition
//}}}
// // command definition
//{{{
config.commands.slice = {
text:"8<",
tooltip:"create new microcontent from selection",
cancel:"slicing cancelled",
tiddlercreated:" tiddler created",
sliderTooltip:"content of ",
askForTags:true,
wikeditposition:3
}

config.commands.slice.handler = function(event,src,title) {
var availablesModes = ["tiddler","slider","link"];
if (version.extensions.PartTiddlerPlugin)
 availablesModes.push("part");
if (version.extensions.nestedSliders)
 availablesModes.push("nestedSlider");
var popup = Popup.create(src);
 if(popup)
 {
 for (var i=0; i<availablesModes.length; i++)
   {
   createTiddlyButton(createTiddlyElement(popup,"li"), availablesModes[i], availablesModes[i], slicing, null, availablesModes[i]+'|'+title, null);
   }
 Popup.show(popup,false);
 event.cancelBubble = true;
 if (event.stopPropagation) event.stopPropagation();
 return false;
 }
}
//}}}
// // shadow links to documentation
//{{{
config.shadowTiddlers.TiddlerSlicerDocumentation_en = "Documentation for this plugin is available [[here|" + version.extensions.TiddlerSlicer.source +"Documentation_en]]";
config.shadowTiddlers.TiddlerSlicerDocumentation_fr = "La documentation de ce plugin est disponible [[ici|" + version.extensions.TiddlerSlicer.source +"Documentation_fr]]";
//}}}
|Non|TiddlerSlicer|
|Auteur|YannPerrin|
|Source|http://yann.perrin.googlepages.com/twkd.html#TiddlerSlicer ([[del.icio.us|http://del.icio.us/post?url=http://yann.perrin.googlepages.com/twkd.html%23TiddlerSlicer]])|
|Version|1.2.0|
|Requiert|~TW2.0.7+|

!Description
La commande "slice" crée de petits tiddlers en découpant les gros.
Elle transforme le texte selectionné en un nouveau tiddler indépendant, et le remplace dans le tiddler d'origine par une référence au tiddler nouvellement créé. 

!Installation
*importez (ou copiez/collez en mode édition) les tiddlers suivants dans votre document:<<br>>TiddlerSlicer<<br>>TWkdLib<<br>>(indexez les : <<tag systemConfig>>)
*afin de voir la commande, il reste encore à l'installer dans votre EditTemplate en l'intégrant dans le div qui définit la barre d'outil, comme ceci :
{{{
<div class='toolbar' macro='toolbar slice +saveTiddler -cancelTiddler deleteTiddler'></div>
}}}
*si vous souhaitez accéder hors-ligne à cette documentation, importez (ou copiez/collez en mode édition) le tiddler suivant dans votre document:<<br>>TiddlerSlicerDocumentation_fr
*enfin, sauvegardez les changements et rechargez le document.


!Usage
''Une fois correctement installée'' (voir ci-dessus), vous devriez voir une nouvelle commande intitulée 'slice' lors de l'édition d'un tiddler.

Pour l'utiliser : 
*d'abord, selectionnez le texte à extraire
*puis, cliquez sur la commande "slice"
*selectionnez le mode de votre choix
*entrez un titre pour le nouveau tiddler, cliquez sur ok
*eventuellement entrez les index pour le nouveau tiddler
et c'est tout.
Le nouveau tiddler a été créé (si nécessaire), avec le texte selectionné comme contenu, le titre choisi, et les index choisis (ou le titre du tiddler original comme index). Il est déjà référencé dans le tiddler d'origine à la place du texte selectionné. Cette réference correspond au mode choisi, c'est à dire {{{<<tiddler>>}}}, {{{<<slider>>}}}, {{{[[link]]}}} ou encore {{{part}}} ou bien {{{nestedSlider}}} si les plugins additionnels correspondants sont installés.

!Historique des Révisions
2006.10.05-1.2.0
>ajout de la dépendance à TWkdLib afin d'éviter la duplication inutile de code commun avec d'autres plugins
>ajout du réferencement dans [[Wikedit]]
>changement du libellé par défaut pour {{{8<}}}
2006.21.04-1.1.0
>ajout d'une popup pour choisir le mode
>ajout de modes additionnels si PartTiddlerPlugin et/ou NestedSlidersPlugin sont installés
>ajout d'une boite de saisie d'index optionnelle pour le nouveau tiddler
2006.20.04-1.0.0
>Première version publique
>renommé ''~LightSaber'' en TiddlerSlicer 

!Remerciements
à :
*[[Jeremy Ruston]] pour TiddlyWiki
*[[Jacques Turbé]] pour l'idée
/***

|Name|TiddlerWithEditPlugin|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#TiddlerWithEditPlugin|
|Version|0.2|
|Requires|~TW2.x|
!Description:
Adds 'doubleclick to edit source' capabilites to the core {{{<<tiddler>>}}} macro.

!Notes:
*because of the rewrite, only clicking on actual embedded text opens the source tiddler for editing. Clicking on any white space opens the containing tiddler for editing.

!History
*29-04-06, version 0.2, rewritten after input from Udo.
*28-04-06, version 0.1, working.

!Code
***/
//{{{
config.macros.tiddler.onTiddlerMacroDblClick = function(e){
        if (!e) var e = window.event;
        var theTarget = resolveTarget(e);
        var title= this.getAttribute("source");
        if ((version.extensions.PartTiddlerPlugin)&&(title.indexOf("/")!=-1))
                 {if (!oldFetchTiddler.call(this, [title]))
                              {title=title.slice(0,title.lastIndexOf("/"))}}   
        story.displayTiddler(theTarget,title,2,false,null)
        e.cancelBubble = true;
        if (e.stopPropagation) e.stopPropagation();
        return false;
        }

var oldTiddlerHandler=config.macros.tiddler.handler;
config.macros.tiddler.handler = function(place,macroName,params){
        oldTiddlerHandler.apply(this,arguments);
        place.lastChild.setAttribute("source",params[0]);
        place.lastChild.ondblclick = this.onTiddlerMacroDblClick;
}
//}}}
/***

|Name|ToggleSideBarMacro|
|Created by|SaqImtiaz|
|Location|http://lewcid.googlepages.com/lewcid.html#ToggleSideBarMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button for toggling visibility of the SideBar. You can choose whether the SideBar should initially be hidden or displayed.

!Demo
<<toggleSideBar "Toggle Sidebar">>

!Usage:
{{{<<toggleSideBar>>}}} <<toggleSideBar>>
additional options:
{{{<<toggleSideBar label tooltip show/hide>>}}} where:
label = custom label for the button,
tooltip = custom tooltip for the button,
show/hide = use one or the other, determines whether the sidebar is shown at first or not.
(default is to show the sidebar)

You can add it to your tiddler toolbar, your MainMenu, or where you like really.
If you are using a horizontal MainMenu and want the button to be right aligned, put the following in your StyleSheet:
{{{ .HideSideBarButton {float:right;} }}}

!History
*23-07-06: version 1.0: completely rewritten, now works with custom stylesheets too, and easier to customize start behaviour. 
*20-07-06: version 0.11
*27-04-06: version 0.1: working.

!Code
***/
//{{{
config.macros.toggleSideBar={};

config.macros.toggleSideBar.settings={
         styleHide :  "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
         styleShow : " ",
         arrow1: "«",
         arrow2: "»"
};

config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
          var tooltip= params[1]||'toggle sidebar';
          var mode = (params[2] && params[2]=="hide")? "hide":"show";
          var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
          var label= (params[0]&&params[0]!='.')?params[0]+" "+arrow:arrow;
          var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
          if (mode == "hide")
             { 
             (document.getElementById("sidebar")).setAttribute("toggle","hide");
              setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
             }
};

config.macros.toggleSideBar.onToggleSideBar = function(){
          var sidebar = document.getElementById("sidebar");
          var settings = config.macros.toggleSideBar.settings;
          if (sidebar.getAttribute("toggle")=='hide')
             {
              setStylesheet(settings.styleShow,"ToggleSideBarStyles");
              sidebar.setAttribute("toggle","show");
              this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
              }
          else
              {    
               setStylesheet(settings.styleHide,"ToggleSideBarStyles");
               sidebar.setAttribute("toggle","hide");
               this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
              }

     return false;
}

setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");

//}}}
ToggleSideBarMacro has been completely rewritten. Now works flawlessly with custom stylesheets too, and is easier to customize. You can specify whether the sidebar is hidden or displayed to start off with.
*TroisièmeCinq
*TroisièmeSix
*TroisièmeSept
Scanné et adapté de MagnardCollège
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2  (Win32)">
	<META NAME="CREATED" CONTENT="20060201;14072200">
	<META NAME="CHANGEDBY" CONTENT="Mathieu Cartailler">
	<META NAME="CHANGED" CONTENT="20060201;14152900">
	<META NAME="Info 1" CONTENT="">
	<META NAME="Info 2" CONTENT="">
	<META NAME="Info 3" CONTENT="">
	<META NAME="Info 4" CONTENT="">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 21.01cm 29.69cm; margin-left: 3.44cm; margin-right: 3.59cm; margin-top: 2.54cm; margin-bottom: 1.27cm }
		P { margin-bottom: 0.21cm; font-family: "Arial", sans-serif; font-size: 10pt }
	-->
	</STYLE>
</HEAD>
<BODY LANG="fr-FR" DIR="LTR" STYLE="border: none; padding: 0cm">
<P STYLE="margin-bottom: 0cm; background: #ffffff; font-style: normal; font-weight: normal">
<FONT COLOR="#424242"><FONT SIZE=6 STYLE="font-size: 30pt">Types et
formes de phrases</FONT></FONT></P>
<P STYLE="text-indent: 0.07cm; margin-top: 1.8cm; margin-bottom: 0cm; background: #000000">
<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>LES
TYPES DE PHRASES</B></FONT></FONT></P>
<P STYLE="margin-left: 0.05cm; margin-top: 0.39cm; margin-bottom: 0cm; background: #ffffff">
<FONT COLOR="#424242"><FONT SIZE=2 STYLE="font-size: 9pt"><B>II
existe quatre types de phrases :</B></FONT></FONT></P>
<OL>
	<LI><P STYLE="margin-top: 0.08cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.39cm">
	<FONT COLOR="#424242"><FONT SIZE=2 STYLE="font-size: 9pt"><I>Tu nous
	amuses, </I>est une phrase <FONT COLOR="#059284">d&eacute;clarative
	</FONT>; elle donne une information et se termine par un<BR>point.</FONT></FONT></P>
	<LI><P STYLE="margin-top: 0.2cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.37cm">
	<FONT COLOR="#424242"><FONT SIZE=2 STYLE="font-size: 9pt"><I>Nous
	amuses-tu ? </I>est une phrase <FONT COLOR="#059284">interrogative </FONT>;
	elle pose une question <FONT COLOR="#888888">et se </FONT>termine
	par un point<BR>d'interrogation.</FONT></FONT></P>
</OL>
<P STYLE="margin-left: 0.34cm; margin-top: 0.07cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.32cm">
<FONT SIZE=1><FONT COLOR="#424242">Remarque </FONT><FONT COLOR="#888888">:
</FONT><FONT COLOR="#424242">L'interrogation peut &ecirc;tre </FONT><FONT COLOR="#888888">:</FONT></FONT></P>
<P STYLE="margin-left: 0.32cm; margin-right: 1.83cm; text-indent: 0.19cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.32cm">
<FONT SIZE=1><FONT COLOR="#dc2300"><B>totale  </B></FONT><FONT COLOR="#000000">(elle
porte sur toute la phrase et la r&eacute;ponse attendue est &laquo;
oui &laquo; ou &laquo; non &raquo;). </FONT></FONT>
</P>
<P STYLE="margin-left: 0.32cm; margin-right: 1.83cm; text-indent: 0.19cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.32cm">
<FONT COLOR="#dc2300"> <FONT SIZE=1><B>partielle  </B></FONT><FONT COLOR="#000000">(elle
porte sur un &eacute;l&eacute;ment de la phrase et la r&eacute;ponse
attendue est autre que &laquo; oui&nbsp;&raquo; ou &laquo; non</FONT><FONT COLOR="#424242">&raquo;.</FONT></FONT></P>
<OL START=3>
	<LI><P STYLE="margin-top: 0.22cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.37cm">
	<FONT COLOR="#424242"><FONT SIZE=2 STYLE="font-size: 9pt"><I>Tu nous
	amuses ! </I>ou Comme <I>tu nous amuses ! </I>est une phrase
	<FONT COLOR="#40a098">exclamative ; </FONT>elle exprime une
	&eacute;mo&shy;<BR>tion et se termine par un point d'exclamation.
	(Notez la pr&eacute;sence, parfois, d'un adverbe ou d'un<BR>adjectif
	exclamatif.)</FONT></FONT></P>
	<LI><P STYLE="margin-top: 0.19cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.39cm">
	<FONT COLOR="#424242"><FONT SIZE=2 STYLE="font-size: 9pt"><I>Amuse-nous
	! </I>ou <I>Amuse-nous, </I>sont des phrases <FONT COLOR="#40a098">imp&eacute;ratives
	; </FONT>elles expriment un ordre et <FONT COLOR="#888888">se<BR></FONT>terminent
	par un point d'exclamation ou un point.</FONT></FONT></P>
</OL>
<P STYLE="text-indent: 0.05cm; margin-top: 1.07cm; margin-bottom: 0cm; background: #000000">
<FONT COLOR="#ffffff"><FONT SIZE=2 STYLE="font-size: 9pt"><B>LES
FORMES DE PHRASES</B></FONT></FONT></P>
<P STYLE="margin-left: 0.05cm; margin-top: 0.39cm; margin-bottom: 0cm; background: #ffffff">
<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt"><B>Les
phrases peuvent aussi se pr&eacute;senter sous des formes diff&eacute;rentes
:</B></FONT></FONT></P>
<P STYLE="margin-bottom: 0.44cm"><BR><BR>
</P>
<TABLE WIDTH=525 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=3 CELLSPACING=0>
	<COL WIDTH=253>
	<COL WIDTH=1>
	<COL WIDTH=252>
	<TR VALIGN=TOP>
		<TD WIDTH=253 HEIGHT=33 BGCOLOR="#ffffff">
			<P STYLE="margin-left: 1.69cm; margin-right: 2.51cm; text-indent: 0.36cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt">affirmative
			</FONT></FONT>
			</P>
			<P STYLE="margin-left: 1.69cm; margin-right: 2.51cm; text-indent: 0.36cm; background: #ffffff">
			<FONT COLOR="#424242"><FONT SIZE=1><I>Tu nous amuses</I></FONT></FONT></P>
		</TD>
		<TD WIDTH=1 BGCOLOR="#ffffff">
			<P STYLE="background: #ffffff"><BR>
			</P>
		</TD>
		<TD WIDTH=252 BGCOLOR="#ffffff">
			<P STYLE="margin-left: 1.37cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt">n&eacute;gative</FONT></FONT></P>
			<P STYLE="margin-bottom: 0cm; background: #ffffff"><BR>
			</P>
			<P STYLE="background: #ffffff"><FONT COLOR="#000000">             
			 <FONT SIZE=1 STYLE="font-size: 8pt"><I>Tu ne nous amuses pas.</I></FONT></FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=253 HEIGHT=57 BGCOLOR="#ffffff">
			<P ALIGN=LEFT STYLE="margin-left: 1.69cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt">neutre</FONT></FONT></P>
			<P STYLE="margin-left: 1.69cm; margin-bottom: 0cm; background: #ffffff">
			<BR>
			</P>
			<P STYLE="margin-left: 1.69cm; background: #ffffff"><FONT COLOR="#424242"><FONT SIZE=1 STYLE="font-size: 8pt"><I>Tu
			nous amuses.</I></FONT></FONT></P>
		</TD>
		<TD WIDTH=1 BGCOLOR="#ffffff">
			<P STYLE="background: #ffffff"><BR>
			</P>
		</TD>
		<TD WIDTH=252 BGCOLOR="#ffffff">
			<P STYLE="margin-left: 1.17cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000">emphatique</FONT></P>
			<P STYLE="margin-left: 1.17cm; margin-right: 1.59cm; background: #ffffff">
			<FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt"><I>C'est
			toi qui nous amuses. C'est nous que tu amuses.</I></FONT></FONT></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=253 HEIGHT=40 BGCOLOR="#ffffff">
			<P STYLE="margin-left: 1.69cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt">active</FONT></FONT></P>
			<P STYLE="margin-left: 1.69cm; margin-bottom: 0cm; background: #ffffff">
			<BR>
			</P>
			<P STYLE="margin-left: 1.69cm; background: #ffffff"><FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt"><I>Tu
			nous amuses.</I></FONT></FONT></P>
		</TD>
		<TD WIDTH=1 BGCOLOR="#ffffff">
			<P STYLE="background: #ffffff"><BR>
			</P>
		</TD>
		<TD WIDTH=252 BGCOLOR="#ffffff">
			<P STYLE="margin-left: 0.27cm; margin-bottom: 0cm; background: #ffffff">
			<FONT COLOR="#000000">           <FONT SIZE=2 STYLE="font-size: 9pt">passive</FONT></FONT></P>
			<P STYLE="margin-left: 0.27cm; margin-bottom: 0cm; background: #ffffff">
			<BR>
			</P>
			<P STYLE="margin-left: 0.27cm; background: #ffffff"><FONT COLOR="#000000"><FONT SIZE=1 STYLE="font-size: 8pt"><I>Nous
			sommes amus&eacute;s par tes pitreries.</I></FONT></FONT></P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-left: 0.03cm; margin-top: 0.32cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.39cm">
<BR>
</P>
<P STYLE="margin-left: 0.03cm; margin-top: 0.32cm; margin-bottom: 0cm; background: #ffffff; line-height: 0.39cm">
<FONT COLOR="#000000"><FONT SIZE=2 STYLE="font-size: 9pt">On peut
combiner types et formes de phrases. Par exemple, si la phrase est de
type exclamatif et de forme n&eacute;gative, on obtiendra : <I>Tu ne
nous amuses pas </I>/</FONT></FONT></P>
</BODY>
</HTML>
Un exilé en fuite est à l'origine de l'empire romain.
Sénèque - Ad Helviam matrem, VII, 5-7
!1. Ponctuer le texte latin.
Romanum imperium nempe auctorem respicit exulem  quem profugum capta patria exiguas reliquias trahentem, necessitas et uictoris metus longinqua quaerentem in Italiam detulit hic deinde populus quot colonias in omnem prouinciam misit  ubicumque uicit Romanus habitat

L'empire romain ne voit-il pas son créateur: un exilé,  un fugitif que, après la chute de sa patrie, traînant avec lui de petites reliques, le besoin et la peur du vainqueur, parce qu'il cherchait refuge au loin, amena en Italie&nbsp;? Et ce même peuple, par la suite, combien de colons n'a-t-il pas  envoyés dans toutes les provinces! Partout où il a vaincu, le Romain s'établit.

!2. Comparer 2 traductions d'un même passage.
L'empire romain ne doit-il pas sa naissance à un exilé, à un fugitif qui, après la ruine de sa patrie, traînant avec lui quelques faibles débris, et forcé, par la nécessité et la crainte du vainqueur, de chercher un établissement lointain, aborda en Italie ? Que de colonies ce même peuple n'a-t-il pas ensuite envoyées dans toutes les provinces ! Rome est partout où elle a vaincu.

NB: J'ai retouché le texte latin... (Original: Romanum imperium nempe auctorem exulem respicit quem profugum capta patria exiguas reliquias trahentem, necessitas et uictoris metus longinqua quaesivit et in Italiam detulit hic deinde populus quot colonias in omnem prouinciam misit  ubicumque uicit Romanus habitat)
UploadPlugin with <<tag UploadService>> extend TiddlyWiki with @@upload@@ and @@save to web@@ commands. 

See [[HowToUpload]].
!!Todo
*Better UploadLog
*limit the number of backup files

[[Upload]] is... <<tagging Upload>>
//last update: UploadPlugin v 3.4.4//

!Description
UploadPlugin with <<tag UploadService>> extend TiddlyWiki with @@upload@@ and @@save to web@@ commands. 
UploadPlugin uses Username and Password from UploadOptions stored in cookies to authenticate itself to [[store.php]] or [[store.cgi]].
French translation available as a separate tiddler UploadPluginMsgFR

!!UploadPlugin
*If the TiddlyWiki is viewed from @@local disk@@ :
**{{{<<saveChanges>>}}} 
***display as ''save to disk''
***work as usual
**{{{<<upload>>}}}
***display as ''upload''
***after saving to disk, upload in the storeUrl directory.
*If the TiddlyWiki is viewed from @@website@@ and is @@readOnly@@ (in core TiddlyWiki since 2.0.6) :
**{{{<<saveChanges>>}}} 
***print nothing
***has been disabled
**{{{<<upload>>}}}
***display as '''save to web''
***save in the uploadDir directory.
*If GenerateAnRssFeed in AdvancedOptions is set :
**generate the content of the RSSFeed 
**upload the RssFile in uploadDir directory
**Caution : use the SiteUrl tiddler to specify the right url of the TiddlyWiki in the generated RssFile
*DisplayMessage
*Log upload action in UploadLog
hint : if UploadLog is the first tiddler in the Timeline Tab, no tiddler has been updated since last upload.

!![[store.php]]
*UserVariables to set :
//{{{
$AUTHENTICATE_USER = true; // true | false
$USERS = array(
 'UserName1'=>'Password1', 
 'UserName2'=>'Password2', 
 'UserName3'=>'Password3'); // set usernames and strong passwords
$DEBUG = false; // true | false
//}}}
*method GET
**display an information page
*method POST
**if $~AUTHENTICATE_USER is ''true''
***presence and value of user and password are checked with $USER and $PASSWORD 
**if toFilename already exists and backDir parameter specified
***rename toFilename to backupDir/toFilename.AAAAMMDD.HHSS.html
**copy temporaryUploadedFile to toFilename
** return status

!![[store.cgi]]
*UserVariables to set :
//{{{
CONFIG = {
  :users => {
    'UserName1'=>'Password1', 
    'UserName2'=>'Password2', 
    'UserName3'=>'Password3')
  },
  :authenticateUser => true,
  :backupExistingFile => true,
  :withUploadDir => true
}
//}}}
*same processing as store.php above

!Usage : 
{{{
<<upload>>
 uses UploadOptions saved in cookies :
 txtUploadUserName: username
 pasUploadPassword : password
 txtUploadStoreUrl : store script
 txtUploadDir : relative path for upload directory
 txtUploadFilename : upload filename
 txtUploadBackupDir : relative path for backup directory

<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>
	Optional positional parameters can be passed to overwrite 
	UploadOptions. 
}}}

Install the {{{<<upload ... >>}}} macro in SideBarOptions just below {{{<<saveChanges>>}}} macro.


!User manual
See HowToUpload

!Installation :
*Install the UploadPlugin as usual
*Upload the [[store.php]] file on your php aware webserver in your TiddlyWiki directory
*Protect your server against malicious upload. Two approaches :
**set $~AUTHENTICATE_USER to true in the [[store.php]] script
***configure $USER and $PASSWORD in the [[store.php]] script on your webserver
***set UploadOptions in conformity with [[store.php]]
**Use server protection :
***for Apache web server ([[for detail see Apache documentation|http://httpd.apache.org/docs/1.3/howto/htaccess.html]]) : 
****configure and upload the [[.htaccess]] [[.passwd]]
***for other web servers see the appropriate documentation
*Configure an upload button, for example in the SideBarOptions
!Suppported Browser
*Firefox and Gecko based browser: tested Ok
*Internet Explorer : tested Ok
*Safari : tested ok on OS X
*Others : Not tested, please report status.

!Revision history
*V 3.4.4 (30/09/2006)
**PasswordTweak V 1.0.3
***add class attribute specific on each option input (thanks to ClintChecketts)
**UploadOptions width set by styleSheet
*V 3.4.3 (19/09/2006)
**Add classname to input for options (thanks to ClintChecketts)
**Force checkAutoSave to false
**Alert if password is empty before Uploading
*V 3.4.2 (04/09/2006)
**add functions to format displayMessages (thanks to LucDeschenaux)
**take return values from store.cgi of destfile and backupfile for displayMessages 
*V 3.4.1 (19/08/2006)
**Error management improvement
*V 3.4.0 (25/07/2006)
**Manage Lock parameters for GroupAuthoring
**Small code refactoring for new PluginFormat in TW 2.1
+++[previous revisions]
*V 3.3.3 (30/06/2006)
**reinstall saveChanges Hijacking
*V 3.3.2 (26/06/2006)
** make "save to disk" disappear when TiddlyWiki is located on the web
** small reformatting of post headers for store.cgi compatibility
*V 3.3.1 (30/03/2006)
**bug in backup folder when uploading rssfile fixed
*V 3.3.0 (12/03/2006)
**Code refactoring
**suppress saveChanges hijacking
*V3.2.2 (25/02/2006)
**Use PasswordTweak 1.0.1
**uploaddir is a relative path
**backupdir is a relative path
*V3.2.1 (13/02/2006)
**name and password added to open.request (Thanks to TedPavlic)
*V3.2.0 (14/02/2006)
**Use PassworDTweak (http://tiddlyWiki.bidix.info/#PasswordTweak) for password
*V3.1.0 (12/02/2006)
**UploadOptions in Cookies
**Username and password from UploadOptions pass to store.php script for authentification check
*V3.0.3 (03/02/2006)
**Firefox 1.5.0.1 crashes due to global var fixed
*V3.0.2 (25-Jan-2006)
**HTTPS compatible
*V3.0.1 (18-Jan-2006)
**UTF8toUnicode conversion problem in Firefox
*V3.0.0 (15-Jan-2006)
**Asynchronous upload
**Synchronous upload before unload of the page
**All strings extracted in macro config
**Compatibility checked with TW 2.0.2 & TW 1.2.39 for both FF 1.5 and IE 6
*V2.0.2 (8-Jan-2006)
**conversion of SiteTitle and SiteSubtitle in web page Title
*V2.0.1 (8-Jan-2006)
**Compatibilty with TiddlyWiki 2.0.1
*V2.0.0 (3-Jan-2006)
**Save to web
**Compatibilty with TiddlyWiki 1.2.39 and TiddlyWiki 2.0.0 Beta 6
*v1.1.0 (27-Dec-2005)
**Upload RSS File
*v1.0.3 (26-Dec-2005)
**UploadLog tiddler
*v1.0.2 (24-Dec-2005)
**Optional parameter toFilename
**Optional parameter backupDir
*v1.0.1 (23-Dec-2005)
**reformatting code
* v1.0.0 (17-Dec-2005)
** first public working version
===

This form upload any file with an UploadService describe in [[Upload]]
----
<html><center>
<form enctype="multipart/form-data" action="http://cartailler.free.fr/tableau/store.php" method="post" target="_blank">
 <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
This file : <input name="userfile" type="file" /><p>
Options* : <input type="text" name="UploadPlugin" size=70 value="backupDir=sauv;user=cartawiki;password=UPLOAD_PASSWORD;" /><p>
 <input type="submit" value="Upload" />
</form></center>
</html>
----
 * Substitute BACKUP_DIR, UPLOAD_USER and UPLOAD_PASSWORD with your values. See UploadPlugin for option details. 
For security reason, don't save your password in a tiddler.
| 19/10/2007 12:27:45 | MathieuCartailler | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index.html | sauv | Ok |
| 19/10/2007 12:28:57 | MathieuCartailler | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index.html | sauv |
| 19/10/2007 14:39:29 | MathieuCartailler | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index.html | sauv |
| 22/10/2007 12:4:13 | MathieuCartailler | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.cgi|http://cartawiki.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 19/11/2007 15:54:5 | YourName | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index.html | sauv |
| 11/3/2008 14:10:40 | YourName | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] | sauv | index.html |  | Ok |
| 28/3/2008 11:55:30 | YourName | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] | sauv | index.html |  | Ok |
| 7/4/2008 15:49:36 | YourName | [[index.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] | sauv | index.html |  |
| 5/6/2008 15:9:5 | YourName | [[index.html|file:///E:/TW/index.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index.html |  |
| 15/9/2008 11:17:17 | YourName | [[index08.html|file:///F:/index08.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index08.html | sauv |
| 26/2/2009 9:46:53 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://cartailler.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 9:47:32 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 9:47:57 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv | Ok |
| 26/2/2009 13:21:2 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 16:1:51 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/WIKI/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 17:38:21 | Cartailler | [[index09.html|file:///home/cartailler/cours/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 17:39:20 | Cartailler | [[index09.html|file:///home/cartailler/cours/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv | Ok |
| 26/2/2009 21:42:41 | Cartailler | [[index09.html|file:///home/cartailler/cours/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 26/2/2009 23:23:10 | Cartailler | [[index09.html|file:///home/cartailler/cours/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 27/2/2009 15:18:32 | YourName | [[index09.html|file:///H:/Documents%20and%20Settings/Administrateur/Bureau/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv | Ok |
| 27/2/2009 16:2:35 | YourName | [[index09.html|file:///H:/Documents%20and%20Settings/Administrateur/Bureau/index09.html]] | [[store.php|http://cartawiki.free.fr/store.php]] |  | index09.html | sauv |
| 22/3/2009 16:17:56 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[www.cartailler.net|http://www.cartailler.net]] |  | index09.html | sauv |
| 22/3/2009 16:18:35 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 24/3/2009 11:34:2 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 24/3/2009 11:34:29 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 25/3/2009 10:50:25 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 25/3/2009 18:30:14 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 25/3/2009 22:4:17 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 25/3/2009 22:21:11 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 25/3/2009 22:24:3 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 26/3/2009 9:23:31 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 26/3/2009 9:24:24 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 27/3/2009 13:51:33 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 27/3/2009 15:11:59 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 31/3/2009 14:2:10 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 31/3/2009 15:6:56 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html#]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 2/4/2009 11:38:12 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 2/4/2009 11:52:49 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 2/4/2009 15:9:29 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html#]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 2/4/2009 17:16:24 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 2/4/2009 17:55:48 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.cgi|http://cartawiki.tiddlyspot.com/store.cgi]] | . | index.html | . |
| 2/4/2009 17:56:23 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 3/4/2009 12:34:22 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 3/4/2009 13:48:28 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 3/4/2009 13:48:48 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 3/4/2009 17:6:18 | Cartailler | [[index09.html|file:///C:/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 7/4/2009 17:17:39 | YourName | [[index09.html|file:///C:/Documents%20and%20Settings/tulipe/Bureau/mathieu/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 7/4/2009 21:41:15 | YourName | [[index09.html|file:///C:/Documents%20and%20Settings/tulipe/Bureau/mathieu/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 19/4/2009 21:59:13 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 23/4/2009 18:40:2 | YourName | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 29/4/2009 19:23:32 | YourName | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html#%5B%5BExercices%20sur%20les%20PSR%5D%5D%20%5B%5BFun%20Latin%3A%20le%20latin%20moderne%5D%5D%20Adjectifs%20Accueil]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 5/5/2009 10:24:36 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 5/5/2009 11:55:58 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 5/5/2009 16:8:12 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 6/5/2009 21:10:23 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 6/5/2009 22:13:19 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 7/5/2009 9:45:11 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 7/5/2009 10:10:51 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 7/5/2009 12:15:59 | Cartailler | [[index09.html|file:///H:/Documents/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 7/5/2009 12:23:36 | Cartailler | [[index09.html|file:///H:/Documents/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 13/5/2009 17:21:0 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 17/5/2009 21:29:27 | Cartailler | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 17/5/2009 21:40:10 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 18/5/2009 12:35:12 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 19/5/2009 11:9:48 | YourName | [[index09.html|file:///home/cartailler/sites/TW_pour_cours/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 22/5/2009 12:35:14 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 22/5/2009 13:50:57 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 26/5/2009 12:14:31 | Cartailler | [[index09.html|file:///H:/Documents%20and%20Settings/cartailler/Bureau/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 28/5/2009 10:2:43 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv | Ok |
| 28/5/2009 10:48:37 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 28/5/2009 14:39:17 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 28/5/2009 14:40:3 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 28/5/2009 16:3:24 | Cartailler | [[index09.html|file:///H:/Documents/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 4/6/2009 12:38:55 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 5/6/2009 12:35:19 | YourName | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 8/6/2009 14:52:38 | Cartailler | [[index09.html|http://www.cartailler.net/index09.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index09.html | sauv |
| 3/9/2009 17:33:38 | MCartailler | [[index10.html|file:///home/roger/Sites/TW_pour_cours/index10.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index10.html | sauv |
| 16/9/2009 13:55:21 | MCartailler | [[index10.html|file:///home/roger/Sites/TW_pour_cours/index10.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index10.html | sauv |
| 30/9/2009 21:51:59 | MCartailler | [[index10.html|file:///home/roger/Sites/TW_pour_cours/index10.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index10.html | sauv |
| 14/10/2009 19:31:39 | MCartailler | [[index10.html|file:///home/roger/Sites/TW_pour_cours/index10.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index10.html | sauv |
| 14/10/2009 19:32:4 | MCartailler | [[index10.html|file:///home/roger/Sites/TW_pour_cours/index10.html]] | [[store.php|http://www.cartailler.net/store.php]] |  | index10.html | sauv |
!Options used by UploadPlugin
Username: <<option txtUploadUserName>>
Password: <<option pasUploadPassword>>

Url of the UploadService script^^(1)^^: <<option txtUploadStoreUrl 50>>
Relative Directory where to store the file^^(2)^^: <<option txtUploadDir 50>>
Filename of the uploaded file^^(3)^^: <<option txtUploadFilename 40>>
Directory to backup file on webserver^^(4)^^: <<option txtUploadBackupDir>>

^^(1)^^Mandatory either in UploadOptions or in macro parameter
^^(2)^^If empty stores in the script directory
^^(3)^^If empty takes the actual filename
^^(4)^^If empty existing file with same name on webserver will be overwritten

<<upload>> with these options.

!Upload Macro parameters
{{{
<<upload [storeUrl [toFilename [backupDir [uploadDir [username]]]]]>>
	Optional positional parameters can be passed to overwrite 
	UploadOptions. 
}}}

/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|3.4.4|
|''Date:''|Sep 30, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadDoc|
|''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.0.0|
|''Browser:''|Firefox 1.5; InternetExplorer 6.0; Safari|
|''Include:''|config.lib.file; config.lib.log; config.lib.options; PasswordTweak|
|''Require:''|[[UploadService|http://tiddlywiki.bidix.info/#UploadService]]|
***/
//{{{
version.extensions.UploadPlugin = {
	major: 3, minor: 4, revision: 4, 
	date: new Date(2006,8,30),
	source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
	documentation: 'http://tiddlywiki.bidix.info/#UploadDoc',
	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.0.0',
	browser: 'Firefox 1.5; InternetExplorer 6.0; Safari'
};
//}}}

////+++!![config.lib.file]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.file) config.lib.file= {
	author: 'BidiX',
	version: {major: 0, minor: 1, revision: 0}, 
	date: new Date(2006,3,9)
};
config.lib.file.dirname = function (filePath) {
	var lastpos;
	if ((lastpos = filePath.lastIndexOf("/")) != -1) {
		return filePath.substring(0, lastpos);
	} else {
		return filePath.substring(0, filePath.lastIndexOf("\\"));
	}
};
config.lib.file.basename = function (filePath) {
	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);
};
window.basename = function() {return "@@deprecated@@";};
//}}}
////===

////+++!![config.lib.log]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.log) config.lib.log= {
	author: 'BidiX',
	version: {major: 0, minor: 1, revision: 1}, 
	date: new Date(2006,8,19)
};
config.lib.Log = function(tiddlerTitle, logHeader) {
	if (version.major < 2)
		this.tiddler = store.tiddlers[tiddlerTitle];
	else
		this.tiddler = store.getTiddler(tiddlerTitle);
	if (!this.tiddler) {
		this.tiddler = new Tiddler();
		this.tiddler.title = tiddlerTitle;
		this.tiddler.text = "| !date | !user | !location |" + logHeader;
		this.tiddler.created = new Date();
		this.tiddler.modifier = config.options.txtUserName;
		this.tiddler.modified = new Date();
	if (version.major < 2)
		store.tiddlers[tiddlerTitle] = this.tiddler;
	else
		store.addTiddler(this.tiddler);
	}
	return this;
};

config.lib.Log.prototype.newLine = function (line) {
	var now = new Date();
	var newText = "| ";
	newText += now.getDate()+"/"+(now.getMonth()+1)+"/"+now.getFullYear() + " ";
	newText += now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+" | ";
	newText += config.options.txtUserName + " | ";
	var location = document.location.toString();
	var filename = config.lib.file.basename(location);
	if (!filename) filename = '/';
	newText += "[["+filename+"|"+location + "]] |";
	this.tiddler.text = this.tiddler.text + "\n" + newText;
	this.addToLine(line);
};

config.lib.Log.prototype.addToLine = function (text) {
	this.tiddler.text = this.tiddler.text + text;
	this.tiddler.modifier = config.options.txtUserName;
	this.tiddler.modified = new Date();
	if (version.major < 2)
	store.tiddlers[this.tiddler.tittle] = this.tiddler;
	else {
		store.addTiddler(this.tiddler);
		story.refreshTiddler(this.tiddler.title);
		store.notify(this.tiddler.title, true);
	}
	if (version.major < 2)
		store.notifyAll(); 
};
//}}}
////===

////+++!![config.lib.options]

//{{{
if (!config.lib) config.lib = {};
if (!config.lib.options) config.lib.options = {
	author: 'BidiX',
	version: {major: 0, minor: 1, revision: 0}, 
	date: new Date(2006,3,9)
};

config.lib.options.init = function (name, defaultValue) {
	if (!config.options[name]) {
		config.options[name] = defaultValue;
		saveOptionCookie(name);
	}
};
//}}}
////===

////+++!![PasswordTweak]

//{{{
version.extensions.PasswordTweak = {
	major: 1, minor: 0, revision: 3, date: new Date(2006,8,30),
	type: 'tweak',
	source: 'http://tiddlywiki.bidix.info/#PasswordTweak'
};
//}}}
/***
!!config.macros.option
***/
//{{{
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordType = "password"; // password | text

config.macros.option.onChangeOption = function(e)
{
	var opt = this.getAttribute("option");
	var elementType,valueField;
	if(opt) {
		switch(opt.substr(0,3)) {
			case "txt":
				elementType = "input";
				valueField = "value";
				break;
			case "pas":
				elementType = "input";
				valueField = "value";
				break;
			case "chk":
				elementType = "input";
				valueField = "checked";
				break;
		}
		config.options[opt] = this[valueField];
		saveOptionCookie(opt);
		var nodes = document.getElementsByTagName(elementType);
		for(var t=0; t<nodes.length; t++) 
			{
			var optNode = nodes[t].getAttribute("option");
			if (opt == optNode) 
				nodes[t][valueField] = this[valueField];
			}
		}
	return(true);
};

config.macros.option.handler = function(place,macroName,params)
{
    var opt = params[0];
    if(config.options[opt] === undefined) {
        return;}
    var c;
    switch(opt.substr(0,3)) {
		case "txt":
			c = document.createElement("input");
			c.onkeyup = this.onChangeOption;
			c.setAttribute ("option",opt);
			c.className = "txtOptionInput "+opt;
			place.appendChild(c);
			c.value = config.options[opt];
			break;
		case "pas":
			// input password
			c = document.createElement ("input");
			c.setAttribute("type",config.macros.option.passwordType);
			c.onkeyup = this.onChangeOption;
			c.setAttribute("option",opt);
			c.className = "pasOptionInput "+opt;
			place.appendChild(c);
			c.value = config.options[opt];
			// checkbox link with this password "save this password on this computer"
			c = document.createElement("input");
			c.setAttribute("type","checkbox");
			c.onclick = this.onChangeOption;
			c.setAttribute("option","chk"+opt);
			c.className = "chkOptionInput "+opt;
			place.appendChild(c);
			c.checked = config.options["chk"+opt];
			// text savePasswordCheckboxLabel
			place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
			break;
		case "chk":
			c = document.createElement("input");
			c.setAttribute("type","checkbox");
			c.onclick = this.onChangeOption;
			c.setAttribute("option",opt);
			c.className = "chkOptionInput "+opt;
			place.appendChild(c);
			c.checked = config.options[opt];
			break;
	}
};
//}}}
/***
!! Option cookie stuff
***/
//{{{
window.loadOptionsCookie_orig_PasswordTweak = window.loadOptionsCookie;
window.loadOptionsCookie = function()
{
	var cookies = document.cookie.split(";");
	for(var c=0; c<cookies.length; c++) {
		var p = cookies[c].indexOf("=");
		if(p != -1) {
			var name = cookies[c].substr(0,p).trim();
			var value = cookies[c].substr(p+1).trim();
			switch(name.substr(0,3)) {
				case "txt":
					config.options[name] = unescape(value);
					break;
				case "pas":
					config.options[name] = unescape(value);
					break;
				case "chk":
					config.options[name] = value == "true";
					break;
			}
		}
	}
};

window.saveOptionCookie_orig_PasswordTweak = window.saveOptionCookie;
window.saveOptionCookie = function(name)
{
	var c = name + "=";
	switch(name.substr(0,3)) {
		case "txt":
			c += escape(config.options[name].toString());
			break;
		case "chk":
			c += config.options[name] ? "true" : "false";
			// is there an option link with this chk ?
			if (config.options[name.substr(3)]) {
				saveOptionCookie(name.substr(3));
			}
			break;
		case "pas":
			if (config.options["chk"+name]) {
				c += escape(config.options[name].toString());
			} else {
				c += "";
			}
			break;
	}
	c += "; expires=Fri, 1 Jan 2038 12:00:00 UTC; path=/";
	document.cookie = c;
};
//}}}
/***
!! Initializations
***/
//{{{
// define config.options.pasPassword
if (!config.options.pasPassword) {
	config.options.pasPassword = 'defaultPassword';
	window.saveOptionCookie('pasPassword');
}
// since loadCookies is first called befor password definition
// we need to reload cookies
window.loadOptionsCookie();
//}}}
////===

////+++!![config.macros.upload]

//{{{
config.macros.upload = {
	accessKey: "U",
	formName: "UploadPlugin",
	contentType: "text/html;charset=UTF-8",
	defaultStoreScript: "store.php"
};

// only this two configs need to be translated
config.macros.upload.messages = {
	aboutToUpload: "About to upload TiddlyWiki to %0",
	backupFileStored: "Previous file backuped in %0",
	crossDomain: "Certainly a cross-domain isue: access to an other site isn't allowed",
	errorDownloading: "Error downloading",
	errorUploadingContent: "Error uploading content",
	fileLocked: "Files is locked: You are not allowed to Upload",
	fileNotFound: "file to upload not found",
	fileNotUploaded: "File %0 NOT uploaded",
	mainFileUploaded: "Main TiddlyWiki file uploaded to %0",
	passwordEmpty: "Unable to upload, your password is empty",
	urlParamMissing: "url param missing",
	rssFileNotUploaded: "RssFile %0 NOT uploaded",
	rssFileUploaded: "Rss File uploaded to %0"
};

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.handler = function(place,macroName,params){
	// parameters initialization
	var storeUrl = params[0];
	var toFilename = params[1];
	var backupDir = params[2];
	var uploadDir = params[3];
	var username = params[4];
	var password; // for security reason no password as macro parameter
	var label;
	if (document.location.toString().substr(0,4) == "http")
		label = this.label.saveLabel;
	else
		label = this.label.uploadLabel;
	var prompt;
	if (storeUrl) {
		prompt = this.label.promptParamMacro.toString().format([this.toDirUrl(storeUrl, uploadDir, username)]);
	}
	else {
		prompt = this.label.promptOption;
	}
	createTiddlyButton(place, label, prompt, 
						function () {
							config.macros.upload.upload(storeUrl, toFilename, uploadDir, backupDir, username, password); 
							return false;}, 
						null, null, this.accessKey);
};
config.macros.upload.UploadLog = function() {
	return new config.lib.Log('UploadLog', " !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |" );
};
config.macros.upload.UploadLog.prototype = config.lib.Log.prototype;
config.macros.upload.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir,  backupDir) {
	var line = " [[" + config.lib.file.basename(storeUrl) + "|" + storeUrl + "]] | ";
	line += uploadDir + " | " + toFilename + " | " + backupDir + " |";
	this.newLine(line);
};
config.macros.upload.UploadLog.prototype.endUpload = function() {
	this.addToLine(" Ok |");
};
config.macros.upload.basename = config.lib.file.basename;
config.macros.upload.dirname = config.lib.file.dirname;
config.macros.upload.toRootUrl = function (storeUrl, username)
{
	return root = (this.dirname(storeUrl)?this.dirname(storeUrl):this.dirname(document.location.toString()));
}
config.macros.upload.toDirUrl = function (storeUrl,  uploadDir, username)
{
	var root = this.toRootUrl(storeUrl, username);
	if (uploadDir && uploadDir != '.')
		root = root + '/' + uploadDir;
	return root;
}
config.macros.upload.toFileUrl = function (storeUrl, toFilename,  uploadDir, username)
{
	return this.toDirUrl(storeUrl, uploadDir, username) + '/' + toFilename;
}
config.macros.upload.upload = function(storeUrl, toFilename, uploadDir, backupDir, username, password)
{
	// parameters initialization
	storeUrl = (storeUrl ? storeUrl : config.options.txtUploadStoreUrl);
	toFilename = (toFilename ? toFilename : config.options.txtUploadFilename);
	backupDir = (backupDir ? backupDir : config.options.txtUploadBackupDir);
	uploadDir = (uploadDir ? uploadDir : config.options.txtUploadDir);
	username = (username ? username : config.options.txtUploadUserName);
	password = config.options.pasUploadPassword; // for security reason no password as macro parameter
	if (!password || password === '') {
		alert(config.macros.upload.messages.passwordEmpty);
		return;
	}
	if (storeUrl === '') {
		storeUrl = config.macros.upload.defaultStoreScript;
	}
	if (config.lib.file.dirname(storeUrl) === '') {
		storeUrl = config.lib.file.dirname(document.location.toString())+'/'+storeUrl;
	}
	if (toFilename === '') {
		toFilename = config.lib.file.basename(document.location.toString());
	}

	clearMessage();
	// only for forcing the message to display
	 if (version.major < 2)
		store.notifyAll();
	if (!storeUrl) {
		alert(config.macros.upload.messages.urlParamMissing);
		return;
	}
	// Check that file is not locked
	if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
		if (BidiX.GroupAuthoring.lock.isLocked() && !BidiX.GroupAuthoring.lock.isMyLock()) {
			alert(config.macros.upload.messages.fileLocked);
			return;
		}
	}
	
	var log = new this.UploadLog();
	log.startUpload(storeUrl, toFilename, uploadDir,  backupDir);
	if (document.location.toString().substr(0,5) == "file:") {
		saveChanges();
	}
	var toDir = config.macros.upload.toDirUrl(storeUrl, toFilename, uploadDir, username);
	displayMessage(config.macros.upload.messages.aboutToUpload.format([toDir]), toDir);
	this.uploadChanges(storeUrl, toFilename, uploadDir, backupDir, username, password);
	if(config.options.chkGenerateAnRssFeed) {
		//var rssContent = convertUnicodeToUTF8(generateRss());
		var rssContent = generateRss();
		var rssPath = toFilename.substr(0,toFilename.lastIndexOf(".")) + ".xml";
		this.uploadContent(rssContent, storeUrl, rssPath, uploadDir, '', username, password, 
			function (responseText) {
				if (responseText.substring(0,1) != '0') {
					displayMessage(config.macros.upload.messages.rssFileNotUploaded.format([rssPath]));
				}
				else {
					var toFileUrl = config.macros.upload.toFileUrl(storeUrl, rssPath, uploadDir, username);
					displayMessage(config.macros.upload.messages.rssFileUploaded.format(
						[toFileUrl]), toFileUrl);
				}
				// for debugging store.php uncomment last line
				//DEBUG alert(responseText);
			});
	}
	return;
};

config.macros.upload.uploadChanges = function(storeUrl, toFilename, uploadDir, backupDir, 
		username, password) {
	var original;
	if (document.location.toString().substr(0,4) == "http") {
		original =  this.download(storeUrl, toFilename, uploadDir, backupDir, username, password);
		return;
	}
	else {
		// standard way : Local file
		
		original = loadFile(getLocalPath(document.location.toString()));
		if(window.Components) {
			// it's a mozilla browser
			try {
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]
									.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
				converter.charset = "UTF-8";
				original = converter.ConvertToUnicode(original);
			}
			catch(e) {
			}
		}
	}
	//DEBUG alert(original);
	this.uploadChangesFrom(original, storeUrl, toFilename, uploadDir, backupDir, 
		username, password);
};

config.macros.upload.uploadChangesFrom = function(original, storeUrl, toFilename, uploadDir, backupDir, 
		username, password) {
	var startSaveArea = '<div id="' + 'storeArea">'; // Split up into two so that indexOf() of this source doesn't find it
	var endSaveArea = '</d' + 'iv>';
	// Locate the storeArea div's
	var posOpeningDiv = original.indexOf(startSaveArea);
	var posClosingDiv = original.lastIndexOf(endSaveArea);
	if((posOpeningDiv == -1) || (posClosingDiv == -1))
		{
		alert(config.messages.invalidFileError.format([document.location.toString()]));
		return;
		}
	var revised = original.substr(0,posOpeningDiv + startSaveArea.length) + 
				allTiddlersAsHtml() + "\n\t\t" +
				original.substr(posClosingDiv);
	var newSiteTitle;
	if(version.major < 2){
		newSiteTitle = (getElementText("siteTitle") + " - " + getElementText("siteSubtitle")).htmlEncode();
	} else {
		newSiteTitle = (wikifyPlain ("SiteTitle") + " - " + wikifyPlain ("SiteSubtitle")).htmlEncode();
	}

	revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
	revised = revised.replaceChunk("<!--PRE-HEAD-START--"+">","<!--PRE-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPreHead","") + "\n");
	revised = revised.replaceChunk("<!--POST-HEAD-START--"+">","<!--POST-HEAD-END--"+">","\n" + store.getTiddlerText("MarkupPostHead","") + "\n");
	revised = revised.replaceChunk("<!--PRE-BODY-START--"+">","<!--PRE-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPreBody","") + "\n");
	revised = revised.replaceChunk("<!--POST-BODY-START--"+">","<!--POST-BODY-END--"+">","\n" + store.getTiddlerText("MarkupPostBody","") + "\n");

	var response = this.uploadContent(revised, storeUrl, toFilename, uploadDir, backupDir, 
		username, password, function (responseText) {
					if (responseText.substring(0,1) != '0') {
						alert(responseText);
						displayMessage(config.macros.upload.messages.fileNotUploaded.format([getLocalPath(document.location.toString())]));
					}
					else {
						if (uploadDir !== '') {
							toFilename = uploadDir + "/" + config.macros.upload.basename(toFilename);
						} else {
							toFilename = config.macros.upload.basename(toFilename);
						}
						var toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);
						if (responseText.indexOf("destfile:") > 0) {
							var destfile = responseText.substring(responseText.indexOf("destfile:")+9, 
							responseText.indexOf("\n", responseText.indexOf("destfile:")));
							toFileUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + destfile;
						}
						else {
							toFileUrl = config.macros.upload.toFileUrl(storeUrl, toFilename, uploadDir, username);
						}
						displayMessage(config.macros.upload.messages.mainFileUploaded.format(
							[toFileUrl]), toFileUrl);
						if (backupDir && responseText.indexOf("backupfile:") > 0) {
							var backupFile = responseText.substring(responseText.indexOf("backupfile:")+11, 
							responseText.indexOf("\n", responseText.indexOf("backupfile:")));
							toBackupUrl = config.macros.upload.toRootUrl(storeUrl, username) + '/' + backupFile;
							displayMessage(config.macros.upload.messages.backupFileStored.format(
								[toBackupUrl]), toBackupUrl);
						}
						var log = new config.macros.upload.UploadLog();
						log.endUpload();
						store.setDirty(false);
						// erase local lock
						if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
							BidiX.GroupAuthoring.lock.eraseLock();
							// change mtime with new mtime after upload
							var mtime = responseText.substr(responseText.indexOf("mtime:")+6);
							BidiX.GroupAuthoring.lock.mtime = mtime;
						}
						
						
					}
					// for debugging store.php uncomment last line
					//DEBUG alert(responseText);
				}
			);
};

config.macros.upload.uploadContent = function(content, storeUrl, toFilename, uploadDir, backupDir, 
		username, password, callbackFn) {
	var boundary = "---------------------------"+"AaB03x";		
	var request;
	try {
		request = new XMLHttpRequest();
		} 
	catch (e) { 
		request = new ActiveXObject("Msxml2.XMLHTTP"); 
		}
	if (window.netscape){
			try {
				if (document.location.toString().substr(0,4) != "http") {
					netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');}
			}
			catch (e) {}
		}		
	//DEBUG alert("user["+config.options.txtUploadUserName+"] password[" + config.options.pasUploadPassword + "]");
	// compose headers data
	var sheader = "";
	sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
	sheader += config.macros.upload.formName +"\"\r\n\r\n";
	sheader += "backupDir="+backupDir
				+";user=" + username 
				+";password=" + password
				+";uploaddir=" + uploadDir;
	// add lock attributes to sheader
	if (window.BidiX && BidiX.GroupAuthoring && BidiX.GroupAuthoring.lock) {
		var l = BidiX.GroupAuthoring.lock.myLock;
		sheader += ";lockuser=" + l.user
				+ ";mtime=" + l.mtime
				+ ";locktime=" + l.locktime;
	}
	sheader += ";;\r\n"; 
	sheader += "\r\n" + "--" + boundary + "\r\n";
	sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+toFilename+"\"\r\n";
	sheader += "Content-Type: " + config.macros.upload.contentType + "\r\n";
	sheader += "Content-Length: " + content.length + "\r\n\r\n";
	// compose trailer data
	var strailer = new String();
	strailer = "\r\n--" + boundary + "--\r\n";
	//strailer = "--" + boundary + "--\r\n";
	var data;
	data = sheader + content + strailer;
	//request.open("POST", storeUrl, true, username, password);
	try {
		request.open("POST", storeUrl, true);		
	}
	catch(e) {
		alert(config.macros.upload.messages.crossDomain + "\nError:" +e);
		exit;
	}
	request.onreadystatechange = function () {
				if (request.readyState == 4) {
				     if (request.status == 200)
						callbackFn(request.responseText);
					else
						alert(config.macros.upload.messages.errorUploadingContent + "\nStatus: "+request.status.statusText);
				}
		};
	request.setRequestHeader("Content-Length",data.length);
	request.setRequestHeader("Content-Type","multipart/form-data; boundary="+boundary);
	request.send(data); 
};


config.macros.upload.download = function(uploadUrl, uploadToFilename, uploadDir, uploadBackupDir, 
	username, password) {
	var request;
	try {
		request = new XMLHttpRequest();
	} 
	catch (e) { 
		request = new ActiveXObject("Msxml2.XMLHTTP"); 
	}
	try {
		if (uploadUrl.substr(0,4) == "http") {
			netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
			}
		else {
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
		}
	} catch (e) { }
	//request.open("GET", document.location.toString(), true, username, password);
	try {
		request.open("GET", document.location.toString(), true);
	}
	catch(e) {
		alert(config.macros.upload.messages.crossDomain + "\nError:" +e);
		exit;
	}
	
	request.onreadystatechange = function () {
		if (request.readyState == 4) {
			if(request.status == 200) {
				config.macros.upload.uploadChangesFrom(request.responseText, uploadUrl, 
					uploadToFilename, uploadDir, uploadBackupDir, username, password);
			}
			else
				alert(config.macros.upload.messages.errorDownloading.format(
					[document.location.toString()]) + "\nStatus: "+request.status.statusText);
		}
	};
	request.send(null);
};

//}}}
////===

////+++!![Initializations]

//{{{
config.lib.options.init('txtUploadStoreUrl','store.php');
config.lib.options.init('txtUploadFilename','');
config.lib.options.init('txtUploadDir','');
config.lib.options.init('txtUploadBackupDir','');
config.lib.options.init('txtUploadUserName',config.options.txtUserName);
config.lib.options.init('pasUploadPassword','');
setStylesheet(
	".pasOptionInput {width: 11em;}\n"+
	".txtOptionInput.txtUploadStoreUrl {width: 25em;}\n"+
	".txtOptionInput.txtUploadFilename {width: 25em;}\n"+
	".txtOptionInput.txtUploadDir {width: 25em;}\n"+
	".txtOptionInput.txtUploadBackupDir {width: 25em;}\n"+
	"",
	"UploadOptionsStyles");
config.shadowTiddlers.UploadDoc = "[[Full Documentation|http://tiddlywiki.bidix.info/l#UploadDoc ]]\n"; 
config.options.chkAutoSave = false; saveOptionCookie('chkAutoSave');

//}}}
////===

////+++!![Core Hijacking]

//{{{
config.macros.saveChanges.label_orig_UploadPlugin = config.macros.saveChanges.label;
config.macros.saveChanges.label = config.macros.upload.label.saveToDisk;

config.macros.saveChanges.handler_orig_UploadPlugin = config.macros.saveChanges.handler;

config.macros.saveChanges.handler = function(place)
{
	if ((!readOnly) && (document.location.toString().substr(0,4) != "http"))
		createTiddlyButton(place,this.label,this.prompt,this.onClick,null,null,this.accessKey);
};

//}}}
////===
<<tiddler UploadDoc>>
/***
|''Name:''|UploadPluginMsgEN|
|''Description:''|English Translation|
|''Date:''|Sep 20, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPluginMsgEN|
|''Author:''|BidiX (BidiX (at) bidix (dot) info) with modifications by YannPerrin|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''Include:''|none|
|''Require:''|UploadPlugin 3.4.3|
***/
/***
!Usage : 
For an english translation of UploadPlugin Message when using PolyGlotPlugin, import this tiddler in the TiddlyWiki. Make sure it is tagged with {{{en}}} and {{{linguo}}}. 
Comments and suggestions are welcome.
***/
//{{{
config.macros.upload.messages = {
	aboutToUpload: "About to upload TiddlyWiki to %0",
	backupFileStored: "Previous file backuped in %0",
	crossDomain: "Certainly a cross-domain issue: access to an other site isn't allowed",
	errorDownloading: "Error downloading",
	errorUploadingContent: "Error uploading content",
	fileLocked: "Files is locked: You are not allowed to Upload",
	fileNotFound: "file to upload not found",
	fileNotUploaded: "File %0 NOT uploaded",
	mainFileUploaded: "Main TiddlyWiki file uploaded to %0",
	passwordEmpty: "Unable to upload, your password is empty",
	urlParamMissing: "url param missing",
	rssFileNotUploaded: "RssFile %0 NOT uploaded",
	rssFileUploaded: "Rss File uploaded to %0"
};

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.saveChanges.label = config.macros.upload.label.saveToDisk;
//}}}
/***
|''Name:''|UploadPluginMsgFR|
|''Description:''|French Translation|
|''Date:''|Sep 20, 2006|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPluginMsgEN|
|''Author:''|BidiX (BidiX (at) bidix (dot) info) with modifications by YannPerrin|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''Include:''|none|
|''Require:''|UploadPlugin 3.4.3|
***/
/***
!Usage : 
For a french translation of UploadPlugin Message when using PolyGlotPlugin, import this tiddler in the TiddlyWiki. Make sure it is tagged with {{{fr}}} and {{{linguo}}}. 
Comments and suggestions are welcome.
***/
//{{{
config.macros.upload.messages = {
	aboutToUpload: "Préparation du téléchargement le TiddlyWiki vers %0",
	backupFileStored: "Fichier précedent sauvegardé dans %0",
	crossDomain: "Certainement un problème d'accès cross-domaine: l'accès à un autre site n'est pas autorisé",
	errorDownloading: "Erreur de téléchargement de %0 depuis le serveur",
	errorUploadingContent: "Erreur de téléchargement vers le serveur du contenu",
	fileLocked: "Fichier est réservé: vous n'êtes pas autorisé à le mettre à jour",
	fileNotFound: "Fichier à télécharger vers le serveur non trouvé",
	fileNotUploaded: "Le fichier %0 N'A PAS été téléchargé vers le serveur",
	mainFileUploaded: "Le fichier TiddlyWiki a été téléchargé vers le serveur %0",
	passwordEmpty: "Impossible de télécharger, vous n'avez pas fourni de mot de passe.",
	urlParamMissing: "Paramètre URL manquant",
	rssFileNotUploaded: "Le fichier Rss %0 N'A PAS été téléchargé vers le serveur",
	rssFileUploaded: "Le fichier RSS a été téléchargé vers %0"
};

config.macros.upload.label = {	
	promptOption: "Sauvegarde et télécharge ce TiddlyWiki avec les UploadOptions",
	promptParamMacro: "Sauvegarde et télécharge ce TiddlyWiki vers %0",
	saveLabel: "sauvegarde sur le web", 
	saveToDisk: "sauvegarde sur le disque",
	uploadLabel: "Télécharge vers le web"
};

config.macros.saveChanges.label = config.macros.upload.label.saveToDisk;
//}}}
    * file
          o store.cgi
          o store.php
    * GroupAuthoring
          o store.cgi
    * Upload
          o store.cgi
          o store.php
//last update: UploadToFileMacro v 1.4.0//

!Description
Upload a tiddler as a file using UploadPlugin context. 

Used with the SimonBaird's RunMacroIfTagged in [[ViewTemplate]] provides a new command in the tiddler toolbar.

!Usage
{{{
 <<uploadToFile>>
 <<uploadTofile [filename [tiddlerTitle]]>>
 
 tiddlerTitle: if omitted the title of the current tiddler 
 filename: if omitted the title of the current tiddler

}}}

!Revision history
* v1.0.0 (14/03/2006)
** initial release
!!LES BRUITS (l'ouïe)
retentir                      
entendre
détonner                   
percevoir
vrombir                      
distinguer
ronronner                  
reconnaître
carillonner                 
tintinnabuler cliqueter
!!LES ODEURS (l'odorat)
flotter se glisser persister se répandre envelopper envahir
agresser (l'odorat, les narines)
humer
sentir
reconnaître
distinguer
respirer
!!LES SENSATIONS TACTILES (te toucher)
brûler
frotter
râper
frôler
effleurer
caresser sentir reconnaître 
!!LES SENSATIONS GUSTATIVES (le goût)
offenser / réjouir le palais         
goûter
piquer                                        
apprécier
picoter                                    
se révéler
!!LES ELEMENTS VISUELS (la vue)
voir de loin : apercevoir, distinguer, entrevoir, etc.
voir de près : observe/; inspecter, examiner, couver des yeux, braquer les yeux sur, considérer, dévisager, toiser, etc.
voir (de près ou de loin) : remarquer, découvrir, suivre du regard, constater, contempler, etc.
verbes de mouvement : se montrer, se révéler, se mouvoir, remuer, accélérer, freiner, marcher, courir, cavaler, trépigner, gesticuler, se trémousser, danser, sauter, pirouetter, tournoyer, tressaillir, frissonner, frémir, s'agiter, osciller, glisser, papillonner, grouiller, etc.

!!Vocabulaire propre au paysage -
* éléments verticaux : se dresser, se découper, s'élever, s'imposer.
** en plongée : dévaler, glisser, plonger, dégringoler, descendre.
** en contre-plongée : dominer, surplomber, écraser, surmonter.
*éléments horizontaux : s'étendre, se dérouler, s'étirer.
<!---
| Name:|~TagglyTaggingViewTemplate |
| Version:|1.2 (16-Jan-2006)|
| Source:|http://simonbaird.com/mptw/#TagglyTaggingViewTemplate|
| Purpose:|See TagglyTagging for more info|
| Requires:|You need the CSS in TagglyTaggingStyles to make it look right|
!History
* 16-Jan-06, version 1.2, added tagglyListWithSort
* 12-Jan-06, version 1.1, first version
!Notes
Remove the miniTag if you don't like it or you don't use QuickOpenTagPlugin
--->
<!--{{{-->
<div class="toolbar" macro="toolbar  -closeTiddler closeOthers <<publishTiddler>> +editTiddler  references jump newHere"></div>

<div class="tagglyTagged" macro="hideSomeTags"></span></div>
<div><span class="title" macro="view title"></span><span class="miniTag" macro="miniTag"></span></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DD MMM YYYY]]'></span>)</div>
<!--<div class="viewer" macro="view text wikified"></div>-->
<div macro="hideWhen tiddler.tags.containsAny(['css','html','pre','systemConfig','file'])&&!tiddler.text.match('{{'+'{')">
 <div class='viewer' macro='view text wikified'></div>
</div>
<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig','file'])&&!tiddler.text.match('{{'+'{')">
 <div class='viewer'><pre macro='view text'></pre></div>
</div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
Here are some examples that show the usage of the whereClause in the ForEachTiddlerMacro.

<<forEachTiddler
 where
 'tiddler.tags.contains("whereClauseExample")'
>>

See also ForEachTiddlerExamples.
/***
|''Name:''|WikiBar|
|''Version:''|2.0.0 beta3|
|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|
|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|
|''Type:''|toolbar macro command extension|
|''Required:''|TiddlyWiki 2.0.0 beta6|
!Description
WikiBar is a toolbar that gives access to most of TiddlyWiki's formatting features with a few clicks. It's a handy tool for people who are not familiar with TiddlyWiki syntax.
Besides, with WikiBar-addons, users can extend the power of WikiBar.
!Support browser
*Firefox 1.5
!Revision history
*v2.0.0 beta3 (2005/12/30)
** remove macros (replaced by TWMacro addon)
** add wikibar command in toolbar automatically
** rename DOIT to HANDLER
** rename TIP to TOOLTIP
*v2.0.0 beta2 (2005/12/21)
** re-design Wikibar addon framework
*v2.0.0 beta1 (2005/12/14)
** Note:
*** WikiBarPlugin is renamed to WikiBar
** New Features:
*** support TiddlyWiki 2.0.0 template mechanism
*** new wikibar data structure
*** new wikibar-addon framework for developers
**** support dynamic popup menu generator
*** support most new macros added in TiddlyWiki 2.0.0
*** multi-level popup menu
*** fix wikibar tab stop
*** remove paletteSelector
** Known Bugs:
*** popup-menu and color-picker can't be closed correctly
*** some macros can't be displayed correctly in previewer
*** text in previewer will be displayed italic
*v1.2.0 (2005/11/21)
**New Features:
***User defined color palettes supported
####Get color palettes from [[ColorZilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]].
####Save the palette file(*.gpl) as a new tiddler and tag it with 'ColorPalettes', then you can use it in WikiBar.
***WikiBar style sheet supported
***Click on document to close current colorPicker, paletteSelector or aboutWikibar
*v1.1.1 (2005/11/03)
**Bugs fixed:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.1.0 (2005/11/01)
**Bugs fixed:
***WikiBar overruns (reported by by GeoffS <gslocock@yahoo.co.uk>)
**New features:
***Insert a color code at the cursor. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Enable gradient macro. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Insert tiddler comment tags {{{/% ... %/}}}. (new feature supported by TiddlyWiki 1.2.37)
***Insert DateFormatString for {{{<<today>>}}} macro. (new feature supported by TiddlyWiki 1.2.37)
**Enhanced:
***Allow optional parameters in syntax.
**Bugs:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.0.0 (2005/10/30)
**Initial release
!Code
***/
//{{{
config.macros.wikibar = {major: 2, minor: 0, revision: 0, beta: 3, date: new Date(2005,12,30)};
config.macros.wikibar.handler = function(place,macroName,params,wikifier,paramString,tiddler){
  if(!(tiddler instanceof Tiddler))  {return;}
	story.setDirty(tiddler.title,true);
  place.id = 'wikibar'+tiddler.title;
  place.className = 'toolbar wikibar';
};
function wikibar_install(){
  config.commands.wikibar = {
  	text: 'wikibar',
  	tooltip: 'wikibar on/off',
  	handler: function(e,src,title) {
      if(!e){ e = window.event; }
      var theButton = resolveTarget(e);
      theButton.id = 'wikibarButton'+title;
      wikibarPopup.remove();
      wikibar_installAddons(theButton, title);
      wikibar_createWikibar(title);
      return(false);
    }
  };
  config.shadowTiddlers['EditTemplate'] = wikibar_addWikibarCommand(config.shadowTiddlers['EditTemplate']);
  var tiddler = store.getTiddler('EditTemplate');
  if(tiddler){
    tiddler.text = wikibar_addWikibarCommand(tiddler.text);
  }
}
function wikibar_installAddons(theButton, title){
 	var tiddlers = store.getTaggedTiddlers('wikibarAddons');
	if(!tiddlers)	  { return; }
	theButton.addons=[];
  for(var i=0; i<tiddlers.length; i++){
    try{
      eval(tiddlers[i].text);
      try{
        wikibar_addonInstall(title);
        wikibar_addonInstall = null;
        theButton.addons.push({ok:true, name:tiddlers[i].title});
      }catch(ex){
        theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
      }
    }catch(ex){
      theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
    }
  }
}
function wikibar_addWikibarCommand(tiddlerText){
  var div = document.createElement('div');
  div.style.display = 'none';
  div.innerHTML = tiddlerText;
  for(var i=0; i<div.childNodes.length; i++){
    var o=div.childNodes[i];
    if(o.tagName==='DIV'){
      if(o.className=='toolbar'){
        var macroText = o.getAttribute('macro').trim();
        if(macroText.search('wikibar')<=0){
          macroText += ' wikibar';
          o.setAttribute('macro', macroText);
        }
        break;
      }
    }
  }
  return div.innerHTML.replace(/\"/g, "\'");
}
function wikibar_processSyntaxParams(theSyntax, params){
  try{
    var pcr = 'AplWikibarPcr';
    var rx=null;
    var allParams=null;
    if(params){
      if(typeof(params)=='object'){
        for(var i=0; i<params.length; i++){
          if(params[i]){
            params[i] = params[i].replace(new RegExp('%','g'), pcr).trim();
            rx = '(\\[%'+(i+1)+'\\])' + '|' + '(%'+(i+1)+')';
            theSyntax = theSyntax.replace(new RegExp(rx,'g'), params[i] );
          }
        }
        allParams = params.join(' ').trim();
      }else{
        allParams = params.replace(new RegExp('%','g'), pcr).trim();
        rx = /(\[%1{1}\])|(%1{1})/g;
        theSyntax = theSyntax.replace(rx, allParams);
      }
    }
    if(allParams){
      theSyntax = theSyntax.replace(new RegExp('%N{1}','g'), allParams);
    }
    rx=/\[%(([1-9]{1,}[0-9]{0,})|(N{1}))\]/g;
    theSyntax = theSyntax.replace(rx, '');
    rx=/%(([1-9]{1,}[0-9]{0,})|(N{1}))/g;
    if( theSyntax.match(rx) ){
      throw 'Not enough parameters! ' + theSyntax;
    }
    theSyntax=theSyntax.replace(new RegExp(pcr,'g'), '%');
    return theSyntax;
  } catch(ex){
    return null;
  }
}
function wikibar_resolveEditItem(tiddlerWrapper, itemName){
  if(tiddlerWrapper.hasChildNodes()){
    var c=tiddlerWrapper.childNodes;
    for(var i=0; i<c.length; i++){
      var txt=wikibar_resolveEditItem(c[i], itemName);
      if(!txt){
        continue;
      }else{
        return txt;
      }
    }
  }
  return ((tiddlerWrapper.getAttribute && tiddlerWrapper.getAttribute('edit')==itemName)? tiddlerWrapper : null);
}
function wikibar_resolveEditItemValue(tiddlerWrapper, itemName){
  var o = wikibar_resolveEditItem(tiddlerWrapper, itemName);
  return (o? o.value.replace(/\r/mg,'') : null);
}
function wikibar_resolveTiddlerEditorWrapper(obj){
  if(obj.id=='tiddlerDisplay'){return null;}
  if((obj.getAttribute && obj.getAttribute('macro')=='edit text')){return obj;}
  return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);
}
function wikibar_resolveTiddlerEditor(obj){
  if(obj.hasChildNodes()){
    var c = obj.childNodes;
    for(var i=0; i<c.length; i++){
      var o=wikibar_resolveTiddlerEditor(c[i]);
      if(o){ return o;}
    }
  }
  return ((obj.getAttribute && obj.getAttribute('edit')=='text')? obj : null);
}
function wikibar_resolveTargetButton(obj){
  if(obj.id && obj.id.substring(0,7)=='wikibar'){ return null; }
  if(obj.tiddlerTitle){
    return obj;
  }else{
    return wikibar_resolveTargetButton(obj.parentNode);
  }
}
function wikibar_isValidMenuItem(tool){
  if(!tool){  return false; }
  if(tool.TYPE=='MENU' || tool.TYPE=='MAIN_MENU'){
    for(var key in tool){
      if(key.substring(0,8)=='DYNAITEM'){ return true; }
      if(wikibar_isValidMenuItem(tool[key])){ return true; }
    }
    return false;
  }else{
    return (tool.HANDLER? true : false);
  }
}
function wikibar_editFormat(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByWord(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){return;}
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  selText	   = fullText.substring(ss,se);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	  if(!( fullText.charAt(ss-1).match(/\W/gi) || fullText.charAt(ss).match(/\W/gi) )){
      var m = frontText.match(/\W/gi);
      if(m){
        ss = frontText.lastIndexOf(m[m.length-1])+1;
      }
      else{
        ss = 0;
      }
      m = endText.match(/\W/gi);
      if(m){
        se += endText.indexOf(m[0]);
      }
      else{
        se = fullText.length;
      }
      frontText = fullText.substring(0, ss);
  	  endText   = fullText.substring(se, fullText.length);
  	  selText   = fullText.substring(ss,se);
	  }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByCursor(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByLine(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
		if(this.byBlock){
	    frontText  = fullText.substring(0, ss);
	    selText		 = fullText.substring(ss,se);
	    endText    = fullText.substring(se, fullText.length);
		}
		else{
	  	se = ss;
		}
	}
  if(ss===0 && (se===0 || se == fullText.length) ){
    var m=fullText.match(/(\n|\r)/g);
    if(m){
      se = fullText.indexOf(m[0]);
    }else{
      se = fullText.length;
    }
    selText    = fullText.substring(0, se);
    endText    = fullText.substring(se, fullText.length);
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
    m = frontText.match(/(\n|\r)/g);
    if(m){
      ss = frontText.lastIndexOf(m[m.length-1])+1;
    }
    else{
      ss = 0;
    }
    m = endText.match(/(\n|\r)/g);
    if(m){
      se += endText.indexOf(m[0]);
    }
    else{
      se = fullText.length;
    }
    frontText = fullText.substring(0, ss);
	  selText   = fullText.substring(ss,se);
	  endText   = fullText.substring(se, fullText.length);
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	if(this.byBlock){
    if( (frontText.charAt(frontText.length-1)!='\n') && ss>0 ){
    	repText = '\n' + repText;
    }
    if( (endText.charAt(0)!='\n') || se==fullText.length){
    	repText += '\n';
    }
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByTableCell(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(ss===0 || ss==fullText.length){
		throw 'not valid cell!';
	}
	se=ss;
  frontText  = fullText.substring(0, ss);
  endText    = fullText.substring(se, fullText.length);
  i=frontText.lastIndexOf('\n');
  j=frontText.lastIndexOf('|');
  if(i>j || j<0){
  	throw 'not valid cell!';
  }
	ss = j+1;
  i=endText.indexOf('\n');
  j=endText.indexOf('|');
  if(i<j || j<0){
  	throw 'not valid cell!';
  }
  se += j;
  frontText = fullText.substring(0, ss-1);
  selText   = fullText.substring(ss,se);
  endText   = fullText.substring(se+1, fullText.length);
	if(this.key.substring(0,5)=='align'){
		selText = selText.trim();
		if(	selText=='>' || selText=='~' ||	selText.substring(0,8)=='bgcolor(')	{return; }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length - 2;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editSelectAll(param){
  var editor = param.button.editor;
	editor.selectionStart = 0;
	editor.selectionEnd   = editor.value.length;
	editor.scrollTop      = 0;
	editor.focus();
}
function wikibar_doPreview(param){
  var theButton = param.button;
  var editor = param.button.editor;
  var wikibar = theButton.parentNode;
  if(!wikibar)  { return; }
  title = theButton.tiddlerTitle;
  var editorWrapper = wikibar_resolveTiddlerEditorWrapper(editor);
  var tiddlerWrapper = editorWrapper.parentNode;
  var previewer = document.getElementById('previewer'+title);
  if(previewer){
    previewer.parentNode.removeChild(previewer);
    editorWrapper.style.display = 'block';
    visible=true;
  }else{
    previewer = document.createElement('div');
    previewer.id = 'previewer'+title;
    previewer.className = 'viewer previewer';
    previewer.style.height = (editor.offsetHeight) + 'px';
    wikify(editor.value, previewer);
    tiddlerWrapper.insertBefore(previewer, editorWrapper);
    editorWrapper.style.display = 'none';
    visible=false;
  }
  var pv=null;
  for(var i=0; i<wikibar.childNodes.length; i++){
    try{
      var btn = wikibar.childNodes[i];
      if(btn.toolItem.key == 'preview'){ pv=btn; }
      if(btn.toolItem.key != 'preview'){
        btn.style.display = visible ? '': 'none';
      }
    }catch(ex){}
  }
  if(!pv) { return; }
  if(visible){
    pv.innerHTML = '<font face=\"verdana\">&infin;</font>';
    pv.title = 'preview current tiddler';
  }
  else{
    pv.innerHTML = '<font face=\"verdana\">&larr;</font>';
    pv.title = 'back to editor';
  }
}
function wikibar_doListAddons(param){
  clearMessage();
  var title = param.button.tiddlerTitle;
  var wikibarButton = document.getElementById('wikibarButton'+title);
  var ok=0, fail=0;
  for(var i=0; i<wikibarButton.addons.length; i++){
    var addon=wikibarButton.addons[i];
    if(addon.ok){
      displayMessage('[ o ] '+addon.name);
      ok++;
    }
    else{
      displayMessage('[ x ] '+addon.name + ': ' + addon.error);
      fail++;
    }
  }
  displayMessage('---------------------------------');
  displayMessage(ok + ' ok ; ' + fail + ' failed');
}
function wikibar_getColorCode(param){
  var cbOnPickColor = function(colorCode, param){
    param.params = colorCode;
    param.button.toolItem.doMore(param);
  };
  wikibarColorTool.openColorPicker(param.button, cbOnPickColor, param);
}
function wikibar_getLinkUrl(param){
  var url= prompt('Please enter the link target', (this.param? this.param : ''));
  if (url && url.trim().length>0){
    param.params = url;
    this.doMore(param);
  }
}
function wikibar_getTableRowCol(param){
  var rc= prompt('Please enter (rows x cols) of the table', '2 x 3');
  if (!rc || (rc.trim()).length<=0){ return; }
  var arr = rc.toUpperCase().split('X');
  if(arr.length != 2)   { return; }
  for(var i=0; i<arr.length; i++){
    if(isNaN(arr[i].trim()))  { return; }
  }
  var rows = parseInt(arr[0].trim(), 10);
  var cols = parseInt(arr[1].trim(), 10);
  var txtTable='';
  for(var r=0; r<rows; r++){
    for(var c=0; c<=cols; c++){
      if(c===0){
        txtTable += '|';
      }else{
        txtTable += ' |';
      }
    }
    txtTable += '\n';
  }
  if(txtTable.trim().length>0){
    param.params = txtTable.trim();
    this.doMore(param);
  }
}
function wikibar_getMacroParam(param){
  var p = prompt('Please enter the parameters of macro \"' + this.key + '\":' +
                 '\nSyntax: ' + this.syntax +
                 '\n\nNote: '+
                 '\n%1,%2,... - parameter needed'+
                 '\n[%1] - optional parameter'+
                 '\n%N   - more than one parameter(1~n)'+
                 '\n[%N] - any number of parameters(0~n)'+
                 '\n\nPS:'+
                 '\n1. Parameters should be seperated with space character'+
                 '\n2. Use \" to wrap the parameter that includes space character, ex: \"hello world\"'+
                 '\n3. Input the word(null) for the optional parameter ignored',
                 (this.param? this.param : '') );
  if(!p)  { return; }
  p=p.readMacroParams();
  for(var i=0; i<p.length; i++){
    var s=p[i].trim();
    if(s.indexOf(' ')>0){ p[i]="'"+s+"'"; }
    if(s.toLowerCase()=='null'){ p[i]=null; }
  }
  param.params = p;
  this.doMore(param);
}
function wikibar_getMorePalette(unused){
  clearMessage();
  displayMessage('Get more color palettes(*.gpl) from ColorZilla Palettes site', 'http:\/\/www.iosart.com/firefox/colorzilla/palettes.html');
  displayMessage('Save it as a new tiddler with \"ColorPalettes\" tag');
}
function wikibar_createWikibar(title){
  var theWikibar = document.getElementById('wikibar' + title);
  if(theWikibar){
    if(theWikibar.hasChildNodes()){
      theWikibar.style.display = (theWikibar.style.display=='block'? 'none':'block');
      return;
    }
  }
  var tiddlerWrapper = document.getElementById('tiddler'+title);
  var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);
  if(!theTextarea){
    clearMessage();
    displayMessage('WikiBar only works in tiddler edit mode now');
    return;
  }else{
    if(!theTextarea.id){ theTextarea.id = 'editor'+title; }
    if(!theTextarea.parentNode.id){ theTextarea.parentNode.id='editorWrapper'+title;  }
  }
  if(theWikibar){
    theWikibar = document.getElementById('wikibar'+title);
  }else{
    var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);
    theWikibar = createTiddlyElement(tiddlerWrapper, 'div', 'wikibar'+title, 'toolbar');
    addClass(theWikibar, 'wikibar');
    var previewer = document.getElementById('previewer'+title);
    if(previewer){
      tiddlerWrapper.insertBefore(theWikibar, previewer);
    }else{
      tiddlerWrapper.insertBefore(theWikibar, editorWrapper);
    }
  }
  wikibar_createMenu(theWikibar,wikibarStore,title,theTextarea);
  if(config.options['chkWikibarSetEditorHeight'] && config.options['txtWikibarEditorRows']){
    theTextarea.rows = config.options['txtWikibarEditorRows'];
  }
  setStylesheet(
    '.wikibar{text-align:left;visibility:visible;margin:2px;padding:1px;}.previewer{overflow:auto;display:block;border:1px solid;}#colorPicker{position:absolute;display:none;z-index:10;margin:0px;padding:0px;}#colorPicker table{margin:0px;padding:0px;border:2px solid #000;border-spacing:0px;border-collapse:collapse;}#colorPicker td{margin:0px;padding:0px;border:1px solid;font-size:11px;text-align:center;cursor:auto;}#colorPicker .header{background-color:#fff;}#colorPicker .button{background-color:#fff;cursor:pointer;cursor:hand;}#colorPicker .button:hover{padding-top:3px;padding-bottom:3px;color:#fff;background-color:#136;}#colorPicker .cell{padding:4px;font-size:7px;cursor:crosshair;}#colorPicker .cell:hover{padding:10px;}.wikibarPopup{position:absolute;z-index:10;border:1px solid #014;color:#014;background-color:#cef;}.wikibarPopup table{margin:0;padding:0;border:0;border-spacing:0;border-collapse:collapse;}.wikibarPopup .button:hover{color:#eee;background-color:#014;}.wikibarPopup .disabled{color:#888;}.wikibarPopup .disabled:hover{color:#888;background-color:#cef;}.wikibarPopup tr .seperator hr{margin:0;padding:0;background-color:#cef;width:100%;border:0;border-top:1px dashed #014;}.wikibarPopup tr .icon{font-family:verdana;font-weight:bolder;}.wikibarPopup tr .marker{font-family:verdana;font-weight:bolder;}.wikibarPopup td{font-size:0.9em;padding:2px;}.wikibarPopup input{border:0;border-bottom:1px solid #014;margin:0;padding:0;font-family:arial;font-size:100%;background-color:#fff;}',
  	'WikiBarStyleSheet');
}
function wikibar_createMenu(place,toolset,title,editor){
  if(!wikibar_isValidMenuItem(toolset)){return;}
  if(!(toolset.TYPE=='MAIN_MENU' || toolset.TYPE=='MENU')){ return; }
    for(var key in toolset){
      if(key.substring(0,9)=='SEPERATOR'){
        wikibar_createMenuSeperator(place);
        continue;
      }
      if(key.substring(0,8)=='DYNAITEM'){
        var dynaTools = toolset[key](title,editor);
        if(dynaTools.TYPE && dynaTools.TYPE=='MENU'){
          wikibar_createMenuItem(place,dynaTools,null,editor,title);
        }else{
          dynaTools.TYPE = 'MENU';
          wikibar_createMenu(place, dynaTools, title, editor);
        }
        continue;
      }
      if((toolset[key].TYPE!='MENU' && toolset[key].TYPE!='MAIN_MENU') && !toolset[key].HANDLER){continue;}
      wikibar_createMenuItem(place,toolset,key,editor,title);
    }
}
function wikibar_createMenuItem(place,toolset,key,editor,title){
  if(!key){
    var tool = toolset;
  }else{
    tool = toolset[key];
    tool.key = key;
  }
  if(!wikibar_isValidMenuItem(tool)){return;}
  var toolIsOnMainMenu = (toolset.TYPE=='MAIN_MENU');
  var toolIsMenu = (tool.TYPE=='MENU');
  var theButton;
  if(toolIsOnMainMenu){
    theButton = createTiddlyButton(
                  place,
                  '',
                  (tool.TOOLTIP? tool.TOOLTIP : ''),
                  (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem),
                  'button');
    theButton.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    theButton.isOnMainMenu = true;
    addClass(theButton, (toolIsMenu? 'menu' : 'item'));
  	place.appendChild( document.createTextNode('\n') );
    if(!toolIsMenu){
      if(config.options['chkWikibarPopmenuOnMouseOver']){
        theButton.onmouseover = function(e){ wikibarPopup.remove(); };
      }
    }
  }else{
    theButton=createTiddlyElement(place, 'tr',key,'button');
    theButton.title = (tool.TOOLTIP? tool.TOOLTIP : '');
    theButton.onclick = (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem);
    var tdL = createTiddlyElement(theButton, 'td','','marker');
    var td = createTiddlyElement(theButton, 'td');
    var tdR = createTiddlyElement(theButton, 'td','','marker');
    td.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    if(toolIsMenu){
      tdR.innerHTML='&nbsp;&nbsp;&rsaquo;';
    }
    if(tool.SELECTED){
      tdL.innerHTML = '&radic; ';
      addClass(theButton, 'selected');
    }
    if(tool.DISABLED){
      addClass(theButton, 'disabled');
    }
  }
  theButton.tiddlerTitle = title;
  theButton.toolItem = tool;
  theButton.editor = editor;
  theButton.tabIndex = 999;
  if(toolIsMenu){
    if(config.options['chkWikibarPopmenuOnMouseOver']){
      theButton.onmouseover = wikibar_onClickMenuItem;
    }
  }
}
function wikibar_createMenuSeperator(place){
  if(place.id.substring(0,7)=='wikibar')  { return; }
  var onclickSeperator=function(e){
  	if(!e){ e = window.event; }
  	e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation();  }
  	return(false);
  };
  var theButton=createTiddlyElement(place,'tr','','seperator');
  var td = createTiddlyElement(theButton, 'td','','seperator');
  td.colSpan=3;
  theButton.onclick=onclickSeperator;
	td.innerHTML = '<hr>';
}
function wikibar_genWikibarAbout(){
  var toolset={};
  toolset.version = {
    CAPTION: '<center>WikiBar ' +
              config.macros.wikibar.major + '.' +
              config.macros.wikibar.minor + '.' +
              config.macros.wikibar.revision +
              (config.macros.wikibar.beta? ' beta '+config.macros.wikibar.beta : '') +
              '</center>',
    HANDLER: function(){}
  };
  toolset.SEPERATOR = {};
  toolset.author = {
    CAPTION: '<center>Arphen Lin<br>arphenlin@gmail.com</center>',
    TOOLTIP: 'send mail to the author',
    HANDLER: function(){ window.open('mailto:arphenlin@gmail.com'); }
  };
  toolset.website = {
    CAPTION: '<center>aiddlywiki.sourceforge.net</center>',
    TOOLTIP: 'go to the web site of WikiBar',
    HANDLER: function(){ window.open('http:\/\/aiddlywiki.sourceforge.net/'); }
  };
  return toolset;
}
function wikibar_genWikibarOptions(title, editor){
  var toolset={};
  toolset.popOnMouseOver = {
    CAPTION:'popup menu on mouse over',
    SELECTED: config.options['chkWikibarPopmenuOnMouseOver'],
    HANDLER: function(param){
      config.options['chkWikibarPopmenuOnMouseOver'] = !config.options['chkWikibarPopmenuOnMouseOver'];
      saveOptionCookie('chkWikibarPopmenuOnMouseOver');
      var title = param.button.tiddlerTitle;
      var wikibar = document.getElementById('wikibar'+title);
      if(wikibar){ wikibar.parentNode.removeChild(wikibar); }
      wikibar_createWikibar(title);
    }
  };
  toolset.setEditorSize = {
    CAPTION:'set editor height: <input id=\"txtWikibarEditorRows\" type=text size=1 MAXLENGTH=3 value=\"' +
            (config.options['txtWikibarEditorRows']? config.options['txtWikibarEditorRows']:editor.rows) + '\"> ok',
    HANDLER: function(param){
      var input = document.getElementById('txtWikibarEditorRows');
      if(input){
        var rows = parseInt(input.value, 10);
        if(!isNaN(rows)){
          var editor = param.button.editor;
          editor.rows = rows;
        }else{
          rows=config.maxEditRows;
        }
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
        config.maxEditRows = rows;
      }
    }
  };
  toolset.setEditorSizeOnLoadingWikibar = {
    CAPTION:'set editor height on loading wikibar',
    SELECTED: config.options['chkWikibarSetEditorHeight'],
    HANDLER: function(param){
      config.options['chkWikibarSetEditorHeight'] = !config.options['chkWikibarSetEditorHeight'];
      saveOptionCookie('chkWikibarSetEditorHeight');
      if(config.options['chkWikibarSetEditorHeight']){
        var rows = config.options['txtWikibarEditorRows'];
        if(!isNaN(rows)){ rows = 15; }
        var editor = param.button.editor;
        editor.rows = rows;
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
      }
    }
  };
  toolset.SEPERATOR = {};
  toolset.update = {
    CAPTION: 'check for updates',
    DISABLED: true,
    HANDLER: function(){}
  };
  return toolset;
}
function wikibar_genPaletteSelector(){
  try{
  	var cpTiddlers = store.getTaggedTiddlers('ColorPalettes');
  	if(!cpTiddlers) { return; }
  	var palettes=[];
  	palettes.push(wikibarColorTool.defaultPaletteName);
  	for(var i=0; i<cpTiddlers.length; i++){
  		palettes.push(cpTiddlers[i].title.trim());
  	}
    var toolset={};
    for(i=0; i<palettes.length; i++){
      toolset[palettes[i]] = {
        TOOLTIP: palettes[i],
        SELECTED: (palettes[i]==wikibarColorTool.paletteName),
        HANDLER: wikibar_doSelectPalette
      };
    }
    return toolset;
  }catch(ex){ return null; }
}
function wikibar_onClickItem(e){
	if(!e){ e = window.event; }
	var theTarget = resolveTarget(e);
	if(theTarget.tagName=='INPUT'){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
    return;
	}
	var theButton = wikibar_resolveTargetButton(theTarget);
	if(!theButton){ return(false);  }
  	var o = theButton.toolItem;
    if(!o) { return; }
    var param = {
      event: e,
      button: theButton
    };
    if(o.HANDLER){ o.HANDLER(param);  }
  if(o.DISABLED){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
  }
	return(false);
}
function wikibar_onClickMenuItem(e){
	if(!e){ e = window.event; }
	var theButton = wikibar_resolveTargetButton(resolveTarget(e));
	if(!theButton){ return(false);  }
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
    var title = theButton.tiddlerTitle;
    var editor = theButton.editor;
    var tool = theButton.toolItem;
    if(!tool) { return; }
    var popup = wikibarPopup.create(this);
  	if(popup){
      wikibar_createMenu(popup,tool,title,editor);
      if(!popup.hasChildNodes()){
        wikibarPopup.remove();
      }else{
        wikibarPopup.show(popup, false);
      }
    }
	return(false);
}
var wikibarColorTool = {
  defaultPaletteName : 'default',
  defaultColumns : 16,
  defaultPalette : [
    '#FFF','#DDD','#CCC','#BBB','#AAA','#999','#666','#333','#111','#000','#FC0','#F90','#F60','#F30','#C30','#C03',
    '#9C0','#9D0','#9E0','#E90','#D90','#C90','#FC3','#FC6','#F96','#F63','#600','#900','#C00','#F00','#F36','#F03',
    '#CF0','#CF3','#330','#660','#990','#CC0','#FF0','#C93','#C63','#300','#933','#C33','#F33','#C36','#F69','#F06',
    '#9F0','#CF6','#9C3','#663','#993','#CC3','#FF3','#960','#930','#633','#C66','#F66','#903','#C39','#F6C','#F09',
    '#6F0','#9F6','#6C3','#690','#996','#CC6','#FF6','#963','#630','#966','#F99','#F39','#C06','#906','#F3C','#F0C',
    '#3F0','#6F3','#390','#6C0','#9F3','#CC9','#FF9','#C96','#C60','#C99','#F9C','#C69','#936','#603','#C09','#303',
    '#0C0','#3C0','#360','#693','#9C6','#CF9','#FFC','#FC9','#F93','#FCC','#C9C','#969','#939','#909','#636','#606',
    '#060','#3C3','#6C6','#0F0','#3F3','#6F6','#9F9','#CFC','#9CF','#FCF','#F9F','#F6F','#F3F','#F0F','#C6C','#C3C',
    '#030','#363','#090','#393','#696','#9C9','#CFF','#39F','#69C','#CCF','#C9F','#96C','#639','#306','#90C','#C0C',
    '#0F3','#0C3','#063','#396','#6C9','#9FC','#9CC','#06C','#369','#99F','#99C','#93F','#60C','#609','#C3F','#C0F',
    '#0F6','#3F6','#093','#0C6','#3F9','#9FF','#699','#036','#039','#66F','#66C','#669','#309','#93C','#C6F','#90F',
    '#0F9','#6F9','#3C6','#096','#6FF','#6CC','#366','#069','#36C','#33F','#33C','#339','#336','#63C','#96F','#60F',
    '#0FC','#6FC','#3C9','#3FF','#3CC','#399','#033','#39C','#69F','#00F','#00C','#009','#006','#003','#63F','#30F',
    '#0C9','#3FC','#0FF','#0CC','#099','#066','#3CF','#6CF','#09C','#36F','#0CF','#09F','#06F','#03F','#03C','#30C'
  ],
	colorPicker : null,
  pickColorHandler: null,
  userData: null
};
wikibarColorTool.paletteName = wikibarColorTool.defaultPaletteName;
wikibarColorTool.columns = wikibarColorTool.defaultColumns;
wikibarColorTool.palette = wikibarColorTool.defaultPalette;
wikibarColorTool.onPickColor = function(e){
	if (!e){ e = window.event; }
	var theCell = resolveTarget(e);
	if(!theCell){ return(false); }
    color = theCell.bgColor.toLowerCase();
    if(!color)  { return; }
    wikibarColorTool.displayColorPicker(false);
    if(wikibarColorTool.pickColorHandler){
      wikibarColorTool.pickColorHandler(color, wikibarColorTool.userData);
    }
	return(false);
};
wikibarColorTool.onMouseOver = function(e){
	if (!e){ e = window.event; }
	var theButton = resolveTarget(e);
	if(!theButton){ return(false);  }
  	if(!wikibarColorTool)  { return; }
    color = theButton.bgColor.toUpperCase();
    if(!color)  { return; }
    td=document.getElementById('colorPickerInfo');
  	if(!td) { return; }
  	td.bgColor = color;
  	td.innerHTML = '<span style=\"color:#000;\">'+color+'</span>&nbsp;&nbsp;&nbsp;' +
  	               '<span style=\"color:#fff;\">'+color+'</span>';
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
	return(false);
};
wikibarColorTool.openColorPicker = function(theTarget, pickColorHandler, userData){
  wikibarColorTool.skipClickDocumentEvent = true;
  wikibarColorTool.pickColorHandler = pickColorHandler;
  wikibarColorTool.userData = userData;
  wikibarColorTool.moveColorPicker(theTarget);
};
wikibarColorTool.convert3to6HexColor = function(c){
  c=c.trim();
  var rx=/^\#(\d|[a-f])(\d|[a-f])(\d|[a-f])$/gi;
  return (rx.test(c)? c.replace(rx, '#$1$1$2$2$3$3') : c);
};
wikibarColorTool.numToHexColor = function (n){
  if(typeof(n)=='number' && (n>=0 && n<=255)) {
  		s = n.toString(16).toLowerCase();
  		return ((s.length==1)? '0'+s : s);
  }else{
	 return null;
	}
};
wikibarColorTool.renderColorPalette = function(){
	if(wikibarColorTool.paletteName==wikibarColorTool.defaultPaletteName){
		wikibarColorTool.palette=wikibarColorTool.defaultPalette;
		wikibarColorTool.columns=wikibarColorTool.defaultColumns;
		return;
	}
	tiddlerText = (store.getTiddlerText(wikibarColorTool.paletteName, '')).trim();
	if(tiddlerText.length<=0) { return; }
	var cpContents = tiddlerText.split('\n');
	var colors=[];
	columns = wikibarColorTool.defaultColumns;
	var tmpArray=null;
	errCount=0;
	for(var i=0; i<cpContents.length; i++){
		cpLine=cpContents[i].trim();
    if( (!cpLine) || (cpLine.length<=0) || (cpLine.charAt(0) == '#') ){ continue; }
		if(cpLine.substring(0,8).toLowerCase()=='columns:'){
			tmpArray = cpLine.split(':');
			try{
				columns = parseInt(tmpArray[1],10);
			}catch(ex){
				columns = wikibarColorTool.defaultColumns;
			}
		}else{
			tmpArray = cpLine.replace('\t', ' ').split(/[ ]{1,}/);
			try{
				color='';
				for(var j=0; j<3; j++){
          c=parseInt(tmpArray[j].trim(), 10);
          if(isNaN(c)){
						break;
          }else{
						c=wikibarColorTool.numToHexColor(c);
						if(!c) {break;}
            color+=c;
					}
				}
				if(color.length==6){
					colors.push('#'+color);
				}	else {
					throw 'error';
				}
			}catch(ex){
			}
		}
	}
	if(colors.length>0){
		wikibarColorTool.palette = colors;
		wikibarColorTool.columns = columns;
	}else{
		throw 'renderColorPalette(): No color defined in the palette.';
	}
};
wikibarColorTool.displayColorPicker = function(visible){
  if(wikibarColorTool.colorPicker){
    wikibarColorTool.colorPicker.style.display = (visible? 'block' : 'none');
  }
};
wikibarColorTool.moveColorPicker = function(theTarget){
  if(!wikibarColorTool.colorPicker){
  	wikibarColorTool.createColorPicker();
  }
	var cp = wikibarColorTool.colorPicker;
	var rootLeft = findPosX(theTarget);
  var rootTop = findPosY(theTarget);
  var popupLeft = rootLeft;
  var popupTop = rootTop;
  var popupWidth = cp.offsetWidth;
  var winWidth = findWindowWidth();
  if(popupLeft + popupWidth > winWidth){
	  popupLeft = winWidth - popupWidth;
	}
  cp.style.left = popupLeft + 'px';
  cp.style.top = popupTop + 'px';
  wikibarColorTool.displayColorPicker(true);
};
wikibarColorTool.createColorPicker = function(unused, palette){
  if(palette){	wikibarColorTool.paletteName=palette; }
	wikibarColorTool.renderColorPalette();
	wikibarColorTool.colorPicker = document.createElement('div');
	wikibarColorTool.colorPicker.id = 'colorPicker';
	document.body.appendChild(wikibarColorTool.colorPicker);
  var theTable = document.createElement('table');
  wikibarColorTool.colorPicker.appendChild(theTable);
  var theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	var theTD = document.createElement('td');
	theTD.className = 'header';
	theTD.colSpan = wikibarColorTool.columns;
	theTD.innerHTML = wikibarColorTool.paletteName;
  theTR.appendChild(theTD);
  for(var i=0; i<wikibarColorTool.palette.length; i++){
    if((i%wikibarColorTool.columns)===0){
      theTR = document.createElement('tr');
      theTable.appendChild(theTR);
    }
    theTD = document.createElement('td');
    theTD.className = 'cell';
    theTD.bgColor = wikibarColorTool.convert3to6HexColor(wikibarColorTool.palette[i]);
    theTD.onclick = wikibarColorTool.onPickColor;
    theTD.onmouseover = wikibarColorTool.onMouseOver;
    theTR.appendChild(theTD);
  }
  rest = wikibarColorTool.palette.length % wikibarColorTool.columns;
  if(rest>0){
    theTD = document.createElement('td');
		theTD.colSpan = wikibarColorTool.columns-rest;
    theTD.bgColor = '#000000';
    theTR.appendChild(theTD);
  }
  theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	theTD = document.createElement('td');
	theTD.colSpan = wikibarColorTool.columns;
	theTD.id = 'colorPickerInfo';
  theTR.appendChild(theTD);
};
wikibarColorTool.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarColorTool.skipClickDocumentEvent) {
	  wikibarColorTool.skipClickDocumentEvent = false;
    return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
    wikibarColorTool.displayColorPicker(false);
  }
	return true;
};
function wikibar_doSelectPalette(param){
	clearMessage();
	var theButton = param.button;
	if(!theButton.toolItem.key)  { return; }
	var palette = theButton.toolItem.key;
	var oldPaletteName = wikibarColorTool.paletteName;
	if(oldPaletteName != palette){
		try{
			wikibarColorTool.createColorPicker(theButton, palette);
			displayMessage('Palette \"'+palette+'\" ('+ wikibarColorTool.palette.length +' colors) is selected');
		}catch(ex){
			errMsg = ex;
			if(errMsg.substring(0,18)=='renderColorPalette'){
				displayMessage('Invalid palette \"' + palette + '\", please check it out!');
				wikibarColorTool.createColorPicker(theButton, oldPaletteName);
			}
		}
	}
}
var wikibarPopup = {
  skipClickDocumentEvent: false,
	stack: []
};
wikibarPopup.resolveRootPopup = function(o){
  if(o.isOnMainMenu){  return null; }
  if(o.className.substring(0,12)=='wikibarPopup'){  return o;}
  return wikibarPopup.resolveRootPopup(o.parentNode);
};
wikibarPopup.create = function(root){
  for(var i=0; i<wikibarPopup.stack.length; i++){
    var p=wikibarPopup.stack[i];
    if(p.root==root){
      wikibarPopup.removeFrom(i+1);
      return null;
    }
  }
  var rootPopup = wikibarPopup.resolveRootPopup(root);
  if(!rootPopup){
    wikibarPopup.remove();
  }else{
    wikibarPopup.removeFromRootPopup(rootPopup);
  }
	var popup = createTiddlyElement(document.body,'div','wikibarPopup'+root.toolItem.key,'wikibarPopup');
	var pop = createTiddlyElement(popup,'table','','');
	wikibarPopup.stack.push({rootPopup: rootPopup, root: root, popup: popup});
	return pop;
};
wikibarPopup.show = function(unused,slowly){
	var curr = wikibarPopup.stack[wikibarPopup.stack.length-1];
	var overlayWidth = 1;
  var rootLeft, rootTop, rootWidth, rootHeight, popupLeft, popupTop, popupWidth;
  if(curr.rootPopup){
  	rootLeft = findPosX(curr.rootPopup);
  	rootTop = findPosY(curr.root);
  	rootWidth = curr.rootPopup.offsetWidth;
  	popupLeft = rootLeft + rootWidth - overlayWidth;
  	popupTop = rootTop;
  }else{
  	rootLeft = findPosX(curr.root);
  	rootTop = findPosY(curr.root);
  	rootHeight = curr.root.offsetHeight;
  	popupLeft = rootLeft;
  	popupTop = rootTop + rootHeight;
  }
	var winWidth = findWindowWidth();
	popupWidth = curr.popup.offsetWidth;
	if(popupLeft + popupWidth > winWidth){
		popupLeft = rootLeft - popupWidth + overlayWidth;
	}
	curr.popup.style.left = popupLeft + 'px';
	curr.popup.style.top = popupTop + 'px';
	curr.popup.style.display = 'block';
	addClass(curr.root, 'highlight');
	if(config.options.chkAnimate){
		anim.startAnimating(new Scroller(curr.popup,slowly));
	}else{
		window.scrollTo(0,ensureVisible(curr.popup));
	}
};
wikibarPopup.remove = function(){
	if(wikibarPopup.stack.length > 0){
		wikibarPopup.removeFrom(0);
  }
};
wikibarPopup.removeFrom = function(from){
	for(var t=wikibarPopup.stack.length-1; t>=from; t--){
		var p = wikibarPopup.stack[t];
		removeClass(p.root,'highlight');
		p.popup.parentNode.removeChild(p.popup);
  }
	wikibarPopup.stack = wikibarPopup.stack.slice(0,from);
};
wikibarPopup.removeFromRootPopup = function(from){
  for(var t=0; t<wikibarPopup.stack.length; t++){
    var p = wikibarPopup.stack[t];
    if(p.rootPopup==from){
      wikibarPopup.removeFrom(t);
      break;
    }
  }
};
wikibarPopup.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarPopup.skipClickDocumentEvent){
	 wikibarPopup.skipClickDocumentEvent=false;
	 return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
		wikibarPopup.remove();
	}
	return true;
};
var wikibarStore = {
  TYPE: 'MAIN_MENU',
  help:{
    TYPE:'MENU',
    CAPTION: '<font face=\"verdana\">?</font>',
    TOOLTIP:     'about WikiBar',
    options:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarOptions
    },
    about:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarAbout
    }
  },
  preview:{
    TOOLTIP:     'preview this tiddler',
    CAPTION: '<font face=\"verdana\">&infin;</font>',
    HANDLER: wikibar_doPreview
  },
	line:{
		TOOLTIP:    'horizontal line',
		CAPTION: '<font face=\"verdana\">&mdash;</font>',
		syntax: '\n----\n',
		HANDLER: wikibar_editFormatByCursor
	},
	crlf:{
		TOOLTIP:    'new line',
		CAPTION: '<font face=\"verdana\">&para;</font>',
		syntax: '\n',
		HANDLER: wikibar_editFormatByCursor
	},
	selectAll:{
		TOOLTIP:    'select all',
		CAPTION: '<font face=\"verdana\">&sect;</font>',
		HANDLER: wikibar_editSelectAll
	},
	deleteSelected:{
		TOOLTIP:    'delete selected',
		CAPTION: '<font face=\"verdana\">&times;</font>',
		syntax: '',
		HANDLER: wikibar_editFormat
	},
  textFormat:{
    TYPE: 'MENU',
    CAPTION: 'text',
    TOOLTIP: 'text formatters',
    ignore:{
			TOOLTIP:     'ignore wiki word',
			CAPTION: 'ignore wikiWord',
			syntax:  '~user_text',
			hint:    'wiki_word',
			HANDLER:    wikibar_editFormatByWord
		},
		bolder:{
			TOOLTIP:     'bolder text',
			CAPTION: '<strong>bolder</strong>',
			syntax:  "''user_text''",
			hint:		 'bold_text',
			HANDLER:    wikibar_editFormatByWord
		},
		italic:{
			TOOLTIP:    'italic text',
			CAPTION: '<em>italic</em>',
			syntax: '\/\/user_text\/\/',
			hint:		'italic_text',
			HANDLER: wikibar_editFormatByWord
		},
		underline:{
			TOOLTIP:    'underline text',
			CAPTION: '<u>underline</u>',
			syntax: '__user_text__',
			hint:		'underline_text',
			HANDLER: wikibar_editFormatByWord
		},
		strikethrough:{
			TOOLTIP:    'strikethrough text',
			CAPTION: '<strike>strikethrough</strike>',
			syntax: '==user_text==',
			hint:		'strikethrough_text',
			HANDLER: wikibar_editFormatByWord
		},
		superscript:{
			TOOLTIP:    'superscript text',
			CAPTION: 'X<sup>superscript</sup>',
			syntax: '^^user_text^^',
			hint:		'superscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		subscript:{
			TOOLTIP:    'subscript text',
			CAPTION: 'X<sub>subscript</sub>',
			syntax: '~~user_text~~',
			hint:		'subscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		comment:{
			TOOLTIP:    'comment text',
			CAPTION: 'comment text',
			syntax: '/%user_text%/',
			hint:		'comment_text',
			HANDLER: wikibar_editFormatByWord
		},
		monospaced:{
			TOOLTIP:    'monospaced text',
			CAPTION: '<code>monospaced</code>',
			syntax: '{{{user_text}}}',
			hint:		'monospaced_text',
			HANDLER: wikibar_editFormatByWord
		}
  },
  paragraph:{
    TYPE: 'MENU',
    TOOLTIP: 'paragarph formatters',
    list:{
      TYPE: 'MENU',
      TOOLTIP: 'list tools',
      bullet:{
  			TOOLTIP:    'bullet point',
  			syntax: '*user_text',
  			hint:		'bullet_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		numbered:{
  			TOOLTIP:    'numbered list',
  			syntax: '#user_text',
  			hint:		'numbered_text',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    heading:{
      TYPE: 'MENU',
      heading1:{
  		  CAPTION:'<h1>Heading 1</h1>',
  			TOOLTIP:    'Heading 1',
  			syntax: '!user_text',
  			hint:		'heading_1',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading2:{
  		  CAPTION:'<h2>Heading 2<h2>',
  			TOOLTIP:    'Heading 2',
  			syntax: '!!user_text',
  			hint:		'heading_2',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading3:{
  		  CAPTION:'<h3>Heading 3</h3>',
  			TOOLTIP:    'Heading 3',
  			syntax: '!!!user_text',
  			hint:		'heading_3',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading4:{
  		  CAPTION:'<h4>Heading 4</h4>',
  			TOOLTIP:    'Heading 4',
  			syntax: '!!!!user_text',
  			hint:		'heading_4',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading5:{
  		  CAPTION:'<h5>Heading 5</h5>',
  			TOOLTIP:    'Heading 5',
  			syntax: '!!!!!user_text',
  			hint:		'heading_5',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    comment:{
      TYPE: 'MENU',
      commentByLine:{
  			CAPTION:'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '/%user_text%/',
  			hint:		'comment_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION:'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '/%\nuser_text\n%/',
  			hint:		'comment_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    monospaced:{
      TYPE: 'MENU',
  		monosByLine:{
  			CAPTION: 	'monospaced by line',
  			TOOLTIP:    'line monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		monosByBlock:{
  			CAPTION: 	'monospaced by block',
  			TOOLTIP:    'block monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    quote:{
      TYPE: 'MENU',
  		quoteByLine:{
  			CAPTION: 	'quote by line',
  			TOOLTIP:    'line quote',
  			syntax: '>user_text',
  			hint:		'quote_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		quoteByBlcok:{
  			CAPTION: 	'quote by block',
  			TOOLTIP:    'block quote',
  			syntax: '<<<\nuser_text\n<<<',
  			hint:		'quote_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    plugin:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for plugin',
  			syntax: '\n\/\/{{{\nuser_text\n\/\/}}}\n',
  			hint:		'monospaced_plugin_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '\/\/user_text',
  			hint:		'plugin_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '\/\***\nuser_text\n***\/',
  			hint:		'plugin_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    css:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for css',
  			syntax: '\n\nuser_text\n\n',
  			hint:		'monospaced_css_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '',
  			hint:		'css_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '',
  			hint:		'css_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  color:{
    TYPE: 'MENU',
    TOOLTIP: 'color tools',
    highlight:{
		  CAPTION:'highlight text',
			TOOLTIP:    'highlight text',
			syntax: '@@user_text@@',
			hint:		'highlight_text',
			HANDLER: wikibar_editFormatByWord
		},
		color:{
		  CAPTION:'text color',
			TOOLTIP:    'text color',
			hint:		'your_text',
			syntax: '@@color(%1):user_text@@',
			HANDLER:   wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		bgcolor:{
		  CAPTION:'background color',
			TOOLTIP:    'background color',
			hint:		'your_text',
			syntax: '@@bgcolor(%1):user_text@@',
			HANDLER: wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		colorcode:{
      CAPTION:'color code',
      TOOLTIP:    'insert color code',
      syntax: '%1',
      HANDLER: wikibar_getColorCode,
      doMore: wikibar_editFormatByCursor
    },
    'color palette':{
      TYPE:'MENU',
      DYNAITEM: wikibar_genPaletteSelector,
  		SEPERATOR:{},
  		morePalette:{
  		  CAPTION:'more palettes',
  		  TOOLTIP:'get more palettes',
  		  HANDLER: wikibar_getMorePalette
  		}
    }
  },
  link:{
    TYPE: 'MENU',
    TOOLTIP: 'insert link',
    wiki:{
		  CAPTION:'wiki link',
			TOOLTIP:    'wiki link',
			syntax: '[[user_text]]',
			hint:		'wiki_word',
			HANDLER: wikibar_editFormatByWord
		},
		pretty:{
			CAPTION: 	'pretty link',
			TOOLTIP:    'pretty link',
			syntax: '[[user_text|%1]]',
			hint:		'pretty_word',
			param:	'PrettyLink Target',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		url:{
			TOOLTIP:    'url link',
			syntax: '[[user_text|%1]]',
			hint:		'your_text',
			param:	'http:\/\/...',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		image:{
			TOOLTIP:    'image link',
			syntax: '[img[user_text|%1]]',
			hint:		'alt_text',
			param:	'image/icon.jpg',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		}
  },
  macro:{},
  more:{
    TYPE: 'MENU',
    TOOLTIP: 'more tools',
    table:{
      TYPE: 'MENU',
      TOOLTIP: 'table',
      table:{
  		  CAPTION:'create table',
  			TOOLTIP:    'create a new table',
  			syntax: '\n%1\n',
  			HANDLER: wikibar_getTableRowCol,
  			doMore: wikibar_editFormatByWord
  		},
  		header:{
  			TOOLTIP:    'table header text',
  			syntax: '|user_text|c',
  			hint:		'table_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  		cell:{
  			TOOLTIP:    'create a tabel cell',
  			syntax: '|user_text|',
  			hint:		'your_text',
  			HANDLER: wikibar_editFormatByWord
  		},
  		columnHeader:{
  		  CAPTION:'column header',
  			TOOLTIP:    'create a column header cell',
  			syntax: '|!user_text|',
  			hint:		'column_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  	  cell:{
  	    TYPE: 'MENU',
        CAPTION: 'cell options',
    		bgcolor:{
    			CAPTION: 	'background color',
    			TOOLTIP:    'cell bgcolor',
    			syntax: '|bgcolor(%1):user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_getColorCode,
    			doMore: wikibar_editFormatByTableCell
    		},
    		alignLeft:{
    			CAPTION: 	'align left',
    			TOOLTIP:    'left align cell text',
    			syntax: '|user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignCenter:{
    			CAPTION: 	'align center',
    			TOOLTIP:    'center align cell text',
    			syntax: '| user_text |',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignRight:{
    			CAPTION: 	'align right',
    			TOOLTIP:    'right align cell text',
    			syntax: '| user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		}
    	}
    },
    html:{
      TYPE: 'MENU',
      html:{
  			CAPTION: 	'&lt;html&gt;',
  			TOOLTIP:    'html tag',
  			syntax: '<html>\nuser_text\n</html>',
  			hint:		'html_content',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  addon:{
    TYPE: 'MENU',
    TOOLTIP:'3rd party tools',
    'about addons':{
      TOOLTIP: 'list loaded addons',
      HANDLER: wikibar_doListAddons
    },
    SEPERATOR:{}
  }
};
addEvent(document, 'click', wikibarColorTool.onDocumentClick);
addEvent(document, 'click', wikibarPopup.onDocumentClick);
wikibar_install();
//}}}
/***
|''Name:''|YourSearchPlugin|
|''Version:''|2.1.0 (2006-10-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#YourSearchPlugin ([[del.icio.us|http://del.icio.us/post?url=http://tiddlywiki.abego-software.de/index.html%23YourSearchPlugin]])|
|''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-2006 [[abego Software|http://www.abego-software.de]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; ~InternetExplorer 6.0|
!About YourSearch
YourSearch gives you a bunch of new features to simplify and speed up your daily searches in TiddlyWiki. It seamlessly integrates into the standard TiddlyWiki search: just start typing into the 'search' field and explore!

For more information see [[Help|YourSearch Help]].
!Compatibility
This plugin requires TiddlyWiki 2.1. 
Check the [[archive|http://tiddlywiki.abego-software.de/archive]] for ~YourSearchPlugins supporting older versions of TiddlyWiki.
!Revision history
* v2.1.0 (2006-10-12)
** Release version with TiddlyWiki 2.1 support
*** Support (Extended) Field search
*** Support parenthesis in Boolean Search
*** Support direct regular expression input
*** Support JavaScript Expressions for filtering
*** "new tiddler" feature (create tiddler based on search text)
* v2.0.2 (2006-02-13)
** Bugfix for Firefox 1.5.0.1 related to the "Show prefix" checkbox. Thanks to Ted Pavlic for reporting and to BramChen for fixing. 
** Internal
*** Make "JSLint" conform
* v2.0.1 (2006-02-05)
** Support "Exact Word Match" (use '=' to prefix word)
** Support default filter settings (when no filter flags are given in search term)
** Rework on the "less than 3 chars search text" feature (thanks to EricShulman)
** Better support SinglePageMode when doing "Open all tiddlers" (thanks to EricShulman)
** Support Firefox 1.5.0.1
** Bug: Fixed a hilite bug in "classic search mode" (thanks to EricShulman)
* v2.0.0 (2006-01-16)
** Add User Interface
* v1.0.1 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.0 (2005-12-28)
** initial version
!Source Code
***/
//{{{
//============================================================================
//============================================================================
//                           YourSearchPlugin
//============================================================================
//============================================================================

// Ensure that the Plugin is only installed once.
//
if (!version.extensions.YourSearchPlugin) {

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

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

// define the Array forEach when not yet defined (e.g. by Mozilla)
if (!Array.forEach) {
    Array.forEach = function(obj, callback, thisObj) {
        for (var i = 0,len = obj.length; i < len; i++)
            callback.call(thisObj, obj[i], i, obj);
    };
    Array.prototype.forEach = function(callback, thisObj) {
        for (var i = 0,len = this.length; i < len; i++)
            callback.call(thisObj,  this[i], i, this);
    };
}

abego.toInt = function(s, defaultValue) {
	if (!s) return defaultValue;
	var n = parseInt(s);
	return (n == NaN) ? defaultValue : n;
};

abego.createEllipsis = function(place) {
	var e = createTiddlyElement(place,"span");
	e.innerHTML = "&hellip;";
};

//#concept Object
//
abego.shallowCopy = function(object) {
	if (!object)
		return object;
	var result = {};
	for (var n in object) 
		result[n] = object[n];
	return result;
};

// Returns a shallow copy of the options, or a new, empty object if options is null/undefined.
//
// @param options [may be null/undefined]
//
//#concept Object, Options
//#import abego.shallowCopy
//
abego.copyOptions = function(options) {
	return !options ? {} : abego.shallowCopy(options);
};

//#import abego.define-namespace
// returns the number of occurances of s in the text
abego.countStrings = function(text, s) {
	if (!s)
		return 0;
		
	var len = s.length;
	var n = 0;
	var lastIndex = 0;
	while (1) {
		var i = text.indexOf(s, lastIndex);
		if (i < 0)
			return n;
		n++;
		lastIndex = i+len;
	}
	return n;
};// Returns the content of the first "braced" text {...}
// Also takes care of nested braces
//
// Returns undefined when no braced text is found or it is not properly nested
//
// @param [optional] when defined and a braced text is found lastIndexRef.lastIndex will contain the index of the char following the (final) closing brace on return.
//
abego.getBracedText = function(text, offset,lastIndexRef) {
	if (!offset) offset = 0;
	var re = /\{([^\}]*)\}/gm;
	re.lastIndex = offset;
	var m = re.exec(text);
	if (m) {
		// The matching stopped at the first closing brace.
		// But if the matched text contains opening braces 
		// this is not the final closing brace.
		// Handle this case specially, find the "corresponding" closing brace
		var s = m[1];
		var nExtraOpenBrace = abego.countStrings(s,"{");
		
		if (!nExtraOpenBrace) {
			if (lastIndexRef)
				lastIndexRef.lastIndex = re.lastIndex;
			// simple case: no nested braces
			return s;
		}

		// special case: "nested braces"
		var len = text.length;
		for (var i = re.lastIndex; i < len && nExtraOpenBrace; i++) {
			var c = text.charAt(i);
			if (c == "{") 
				nExtraOpenBrace++;
			else if (c == "}")
				nExtraOpenBrace--;
		}
		if (!nExtraOpenBrace) {
			// found the corresponding "}".
			if (lastIndexRef)
				lastIndexRef.lastIndex = i-1;
			return text.substring(m.index+1, i-1);
		}
	}
	
	// no return means: return undefined;
};

// Returns an array with those items from the array that pass the given test
//
// @param test an one-arg boolean function that returns true when the item should be added.
// @param testObj [optional] the receiver for the test function (global if undefined or null)
// @param result [optional] an array. When define the selected items are added to this array, otherwise a new array is used.
//
//#import Array.prototype.forEach
//
abego.select = function(array,test,testObj,result) {
	if (!result) result = [];
	array.forEach(function(t) {
		if (test.call(testObj,t)) 
			result.push(t);
		});
	return result;
};

// Class abego.TiddlerFilterTerm =================================================================
//
// Used to check if a tiddler contains a given text.
//
// A list of fields (standard and/or extended) may be specified to restrict the search to certain fields. 
//
// When no explicit fields are given the fields defined by defaultFields are checked, plus all extended 
// fields (when options.withExtendedFields is true).
//
// @param options [may be null/undefined]
//		options.fields @seeParam abego.MultiFieldRegExpTester.fields
// 		options.withExtendedFields @seeParam abego.MultiFieldRegExpTester.withExtendedFields  
// 		options.caseSensitive [Default: false]
// 		options.fullWordMatch [Default: false]
// 		options.textIsRegExp [Default: false] when true the given text is already a regExp
//
//#import abego.MultiFieldRegExpTester
//
abego.TiddlerFilterTerm = function(text,options) {
	if (!options) options = {};

	var reText = text;
	if (!options.textIsRegExp) {
		reText = text.escapeRegExp();
		if (options.fullWordMatch) 
			reText = "\\b"+reText+"\\b";
	}
	var regExp = new RegExp(reText, "m"+(options.caseSensitive ? "" : "i"));

	this.tester = new abego.MultiFieldRegExpTester(regExp, options.fields, options.withExtendedFields);
}

abego.TiddlerFilterTerm.prototype.test = function(tiddler) {
	return this.tester.test(tiddler);
}

//#import abego.define-namespace
// Recognize a string like
//     "Some Title. Some content text #Tag1 #Tag2 Tag3"
// with the tags and the text being optional.
// Also the period at the end of the title is optional when no content text is specified)
//
// Returns the result in an object with properties "title" and "params",
// with "params" following the parseParams format, containing the "tag" and "text" arguments.
//
abego.parseNewTiddlerCommandLine = function(s) {
	var m = /(.*?)\.(?:\s+|$)([^#]*)(#.*)?/.exec(s);
	if (!m) 
		m = /([^#]*)()(#.*)?/.exec(s);
	if (m) {
		var r;
		if (m[3]) {
			var s2 = m[3].replace(/#/g,"");
			r = s2.parseParams("tag");
		} else
			r = [[]];
			
		// add the text parameter
		var text = m[2]?m[2].trim():"";
		r.push({name: "text", value: text});
		r[0].text = [text];
		
		return {title: m[1].trim(), params: r}; 
	} else
		return {title: s.trim(),params: [[]]};
}	
// 		options.defaultFields [@seeOptionDefault abego.TiddlerFilterTerm.fields] fields to check when no fields are explicitly specified in queryText.
// 		options.withExtendedFields [@seeOptionDefault abego.TiddlerFilterTerm.withExtendedFields] when true and no fields are explicitly specified in queryText also the extended fields are considered (in addition to the ones in defaultFields).
// @seeOptions abego.TiddlerFilterTerm (-fields -fullWordMatch -withExtendedFields)
//
//#import abego.getBracedText
//#import abego.copyOptions
//#import abego.TiddlerFilterTerm
//
abego.parseTiddlerFilterTerm = function(queryText,offset,options) {
	
	// group 1: {...} 		(JavaScript expression)
	// group 2: '=' 		(full word match (optional))
	// group 3: [!%#] 		(field selection short cuts)
	// group 4: fieldName ':'
	// group 5: String literal "..."
	// group 6: RegExp literal /.../
	// group 7: scheme '://' nonSpaceChars
	// group 8: word
	var re = /\s*(?:(?:\{([^\}]*)\})|(?:(=)|([#%!])|(?:(\w+)\s*\:(?!\/\/))|(?:(?:("(?:(?:\\")|[^"])+")|(?:\/((?:(?:\\\/)|[^\/])+)\/)|(\w+\:\/\/[^\s]+)|([^\s\)\-\"]+)))))/mg;
	var shortCuts = {'!':'title','%':'text','#':'tags'};
	
	var fieldNames = {};
	var fullWordMatch;
	re.lastIndex = offset;
	while (1) {
		var i = re.lastIndex;
		var m = re.exec(queryText);
		if (!m || m.index != i) 
			throw "Word or String literal expected";
		if (m[1]) {
			var lastIndexRef = {};
			var code = abego.getBracedText(queryText,0,lastIndexRef);
			if (!code)
				throw "Invalid {...} syntax";
			var f = Function("tiddler","return ("+code+");");
			return {func: f,
					lastIndex:lastIndexRef.lastIndex,
					markRE: null};
		}
		if (m[2])
			fullWordMatch = true;
		else if (m[3]) 
			fieldNames[shortCuts[m[3]]] = 1;
		else if (m[4]) 
			fieldNames[m[4]] = 1;
		else {
			var textIsRegExp = m[6];
			var text = m[5] ? window.eval(m[5]) : m[6] ? m[6] :  m[7] ? m[7] : m[8];
			
			var options = abego.copyOptions(options);
			options.fullWordMatch = fullWordMatch;
			options.textIsRegExp = textIsRegExp;

			var fields = [];
			for (var n in fieldNames)
				fields.push(n);
			if (fields.length == 0) {
				options.fields = options.defaultFields;
			} else {
				options.fields = fields;
				options.withExtendedFields	= false;
			}	
			var term = new abego.TiddlerFilterTerm(text,options);
			var markREText = textIsRegExp ? text : text.escapeRegExp();
			if (markREText && fullWordMatch)
				markREText = "\\b"+markREText+"\\b";
			return {func: function(tiddler) {return term.test(tiddler);},
					lastIndex:re.lastIndex,
					markRE: markREText ? "(?:"+markREText+")" : null};
		}
	}
};

// Class abego.BoolExp =================================================================
//
// Allows the execution/evaluation of a boolean expression, according to this syntax:
//
// boolExpression    : unaryExpression (("AND"|"OR"|"&&"|"||")? unaryExpression)*
//                   ;
//
// unaryExpression   : ("not"|"-")? primaryExpression
//                   ;
//
// primaryExpression : "(" boolExpression ")" 
//                   | Term
//                   ;
//
// For flexibility the Term syntax is defined by a separate parse function.
//
// Notice that there is no precedence between "AND" and "OR" operators, i.e. they are evaluated from left to right.
//
// To evaluate the expression in a given context use code like this:
//
//	var be = new abego.BoolExp(s, termParseFunc);
//  var result = be.exec(context);
// 
// @param s the text defining the expression 
// @param parseTermFunc a Function(text,offset,options) that parses the text starting at offset for a "Term" and returns an object with properties {func: Function(context), lastIndex: ...}. func is the function to be used to evaluate the term in the given context.
// @param options [may be null/undefined] (is also passed to the parseTermFunc)
// 			options.defaultOperationIs_OR [Default: false] When true the concatenation of unaryExpressions (without an operator) is interpreted as an "OR", otherwise as an "AND".
// 			options.caseSensitive [default: false]
//
abego.BoolExp = function(s, parseTermFunc, options) {
	this.s = s;
	var defaultOperationIs_OR = options && options.defaultOperationIs_OR;
	
	var reStart = /\s*(?:(\-|not)|(\())/gi; 		// group 1: NOT, group2 "("
	var reCloseParenthesis = /\s*\)/g;  			// match )
	var reAndOr = /\s*(?:(and|\&\&)|(or|\|\|))/gi; 	// group 1: AND, group 2: OR
	var reNonWhiteSpace = /\s*[^\)\s]/g;
	
	var reNot_Parenthesis = /\s*(\-|not)?(\s*\()?/gi;
	
	var parseUnaryExpression = function(offset) {
		reNot_Parenthesis.lastIndex = offset;
		var m = reNot_Parenthesis.exec(s);
		var negate;
		var result;
		if (m && m.index == offset) {
			offset = reNot_Parenthesis.lastIndex;
			negate = m[1];
			if (m[2]) {
				// case:  (...)
				var e = parseBoolExpression(offset);
				reCloseParenthesis.lastIndex = e.lastIndex;
				if (!reCloseParenthesis.exec(s))
					throw "Missing ')'";
				result = {func: e.func, lastIndex: reCloseParenthesis.lastIndex};
			}
		}
		if (!result)
			result = parseTermFunc(s,offset,options);

		if (negate) {
			result.func = (function(f){return function(context) {return !f(context);}})(result.func);
			// don't mark patterns that are negated
			// (This is essential since the marking may also be used to calculate "ranks". If we
			// would also count the negated matches (i.e. that should not exist) the rank may get too high)
			result.markRE = null;
		}
		return result;
	};

	var parseBoolExpression = function(offset) {
		var result = parseUnaryExpression(offset);
		while (1) {
			var l = result.lastIndex;
			reAndOr.lastIndex = l;
			var m = reAndOr.exec(s);
			var isOrCase;
			var nextExp;
			if (m && m.index == l) {
				isOrCase = !m[1];
				nextExp = parseUnaryExpression(reAndOr.lastIndex);
			} else {
				// no "AND" or "OR" found. 
				// Maybe it is a concatenations of parseUnaryExpression without operators
				try {
					nextExp = parseUnaryExpression(l);
				} catch (e) {
					// no unary expression follows. We are done
					return result;
				}
				isOrCase = defaultOperationIs_OR;
			}
			result.func = (function(func1, func2, isOrCase) {
					return isOrCase
						? function(context) {return func1(context) || func2(context);}
						: function(context) {return func1(context) && func2(context);};
				})(result.func,nextExp.func,isOrCase);
			result.lastIndex = nextExp.lastIndex;
			if (!result.markRE)
				result.markRE = nextExp.markRE;
			else if (nextExp.markRE) 
				result.markRE = result.markRE + "|" + nextExp.markRE;
		}
	};
	
	var expr = parseBoolExpression(0);
	this.evalFunc = expr.func;
	if (expr.markRE)
		this.markRegExp = new RegExp(expr.markRE, options.caseSensitive ? "mg" : "img");
}

abego.BoolExp.prototype.exec = function() {
	return this.evalFunc.apply(this,arguments);
};

abego.BoolExp.prototype.getMarkRegExp = function() {
	return this.markRegExp;
};

abego.BoolExp.prototype.toString = function() {
	return this.s;
};

// Class abego.MultiFieldRegExpTester ==================================================================
//
// @param fields [optional; Default: ["title","text","tags"]] array of names of fields to be considered
// @param withExtendedFields [optional; Default: false] when true also extended fields are considered (in addition to the ones given in 'fields')
//
abego.MultiFieldRegExpTester = function(re, fields, withExtendedFields) {
	this.re = re;
	this.fields = fields ? fields : ["title","text","tags"];
	this.withExtendedFields = withExtendedFields;
}

// Returns the name of the first field found that value succeeds the given test,
// or null when no such field is found
//
abego.MultiFieldRegExpTester.prototype.test = function(tiddler) {
	var re = this.re;
	// Check the fields explicitly specified
	for (var i = 0; i < this.fields.length; i++) {
		var s = store.getValue(tiddler, this.fields[i]);
		if (typeof s == "string" && re.test(s))
			return this.fields[i];		
	}
	// Check the extended fields (if required)
	if (this.withExtendedFields) 
		return store.forEachField(
				tiddler,
				function(tiddler, fieldName, value) {
					return typeof value == "string" && re.test(value)?fieldName:null;
				}, true);
		
	return null;
}

// Class abego.TiddlerQuery ==================================================================
//
//#import abego.select
//#import abego.MultiFieldRegExpTester
//
abego.TiddlerQuery = function(queryText,caseSensitive,useRegExp,defaultFields,withExtendedFields) {
	if (useRegExp) {
		this.regExp = new RegExp(queryText, caseSensitive ? "mg" : "img");
		this.tester = new abego.MultiFieldRegExpTester(this.regExp, defaultFields, withExtendedFields);
	} else {
		this.expr = new abego.BoolExp(
				queryText,
				abego.parseTiddlerFilterTerm, {
				defaultFields: defaultFields,
				caseSensitive: caseSensitive,
				withExtendedFields: withExtendedFields});
	}
	
	this.getQueryText = function() {
		return queryText;
	};
	this.getUseRegExp = function() {
		return useRegExp;
	};
	this.getCaseSensitive = function() {
		return caseSensitive;
	};
	this.getDefaultFields = function() {
		return defaultFields;
	};
	this.getWithExtendedFields = function() {
		return withExtendedFields;
	};
}

// Returns true iff the query includes the given tiddler
//
// @param tiddler [may be null/undefined]
//
abego.TiddlerQuery.prototype.test = function(tiddler) {
	if (!tiddler) return false;
	if (this.regExp) {
		return this.tester.test(tiddler);
	}
	return this.expr.exec(tiddler);
};

// Returns an array with those tiddlers from the tiddlers array that match the query.
//
abego.TiddlerQuery.prototype.filter = function(tiddlers) {
	return abego.select(tiddlers,this.test,this);
};

abego.TiddlerQuery.prototype.getMarkRegExp = function() {
	if (this.regExp) {
		// Only use the regExp for marking when it does not match the empty string.
		return "".search(this.regExp) >= 0 ? null :  this.regExp;
	}
	return this.expr.getMarkRegExp();
};

abego.TiddlerQuery.prototype.toString = function() {
	return (this.regExp ? this.regExp : this.expr).toString();
};

// Class abego.PageWiseRenderer ================================================
//
// Subclass or instance must implement getItemsPerPage function;
// They should also implement onPageChanged and refresh the container of the
// PageWiseRenderer on that event.
//
//#import abego.toInt
//
abego.PageWiseRenderer = function() {
	this.firstIndexOnPage = 0; // The index of the first item of the lastResults list displayed on the search result page
};

merge(abego.PageWiseRenderer.prototype, {
	setItems: function(items) {
		this.items = items;
		this.setFirstIndexOnPage(0);
	},
	
	// Maximum number of pages listed in the navigation bar (before or after the current page)
	//
	getMaxPagesInNavigation: function() {
		return 10;
	},
	
	getItemsCount: function(items) {
		return this.items ? this.items.length : 0;
	},
	
	getCurrentPageIndex: function() {
		return Math.floor(this.firstIndexOnPage / this.getItemsPerPage());
	},
	
	getLastPageIndex: function() {
		return Math.floor((this.getItemsCount()-1) / this.getItemsPerPage())
	},
	
	setFirstIndexOnPage: function(index) {
		this.firstIndexOnPage = Math.min(Math.max(0, index), this.getItemsCount()-1);
	},
	
	getFirstIndexOnPage: function() {
		// Ensure that the firstIndexOnPage is really a page start. 
		// This may have become violated when getItemsPerPage has changed,
		// (e.g. when switching between previewText and simple mode.)
		this.firstIndexOnPage = Math.floor(this.firstIndexOnPage / this.getItemsPerPage()) * this.getItemsPerPage();
	
		return this.firstIndexOnPage;
	},
	
	getLastIndexOnPage: function() {
		return Math.min(this.getFirstIndexOnPage()+this.getItemsPerPage()-1, this.getItemsCount()-1);
	},
	
	onPageChanged: function(pageIndex,oldPageIndex) {
	},
	
	renderPage: function(itemRenderer) {
		if (itemRenderer.beginRendering)
			itemRenderer.beginRendering(this);
		try {
			// When there are items found add them to the result page (pagewise)
			if (this.getItemsCount()) {
				// Add the items of the current page
				var lastIndex = this.getLastIndexOnPage();
				var iInPage = -1;
				for (var i=this.getFirstIndexOnPage(); i <= lastIndex; i++) {
					iInPage++;
					
					itemRenderer.render(this,this.items[i],i,iInPage);
				}
			}
		} finally {
			if (itemRenderer.endRendering)
				itemRenderer.endRendering(this);
		}
	},
	
	addPageNavigation: function(place) {
		if (!this.getItemsCount()) return;
	
		var self = this;
		var onNaviButtonClick = function(e) {
			if (!e) var e = window.event;
		
			var pageIndex = abego.toInt(this.getAttribute("page"),0);
			var oldPageIndex = self.getCurrentPageIndex();
			if (pageIndex == oldPageIndex)
				return;
			var index = pageIndex * self.getItemsPerPage();
			self.setFirstIndexOnPage(index);
			self.onPageChanged(pageIndex,oldPageIndex);	
		};
	
		var button;
		var currentPageIndex = this.getCurrentPageIndex();
		var lastPageIndex = this.getLastPageIndex();
		if (currentPageIndex > 0) {
			button = createTiddlyButton(place, "Previous", "Go to previous page (Shortcut: Alt-'<')", onNaviButtonClick, "prev");
			button.setAttribute("page",(currentPageIndex-1).toString());
			button.setAttribute("accessKey","<");
		}
	
		for (var i = -this.getMaxPagesInNavigation(); i < this.getMaxPagesInNavigation(); i++) {
			var pageIndex = currentPageIndex+i;
			if (pageIndex < 0) continue;
			if (pageIndex > lastPageIndex) break;
	
			var pageNo = (i+currentPageIndex+1).toString();
			var buttonClass = pageIndex == currentPageIndex ? "currentPage" : "otherPage";
			button = createTiddlyButton(place, pageNo, "Go to page %0".format([pageNo]), onNaviButtonClick, buttonClass);
			button.setAttribute("page",(pageIndex).toString());
		}
		
		if (currentPageIndex < lastPageIndex) {
			button = createTiddlyButton(place, "Next", "Go to next page (Shortcut: Alt-'>')", onNaviButtonClick, "next");
			button.setAttribute("page",(currentPageIndex+1).toString());
			button.setAttribute("accessKey",">");
		}
	}
});

// Class abego.LimitedTextRenderer ===========================================================
//
// Renders a given text, ensuring that a given limit of number of characters 
// is not exceeded.
//
// A "markRegExp" may be specified. Substring matching this regular expression 
// ("matched strings") are rendered with the class "marked". 
//
// if the given text is longer than the limit the matched strings are preferred 
// to be included in the rendered text (with some leading and trailing "context text"). 
// 
// Example:
//     var renderer = new abego.LimitedTextRenderer();
//
//     var place = ... // a DOM element that should contain the rendered (limited) text
//     var s = "This is another 'Hello World' example, as saying 'Hello' is always nice. So let's say it again: >Hello!<";
//     var maxLen = 50;
//     var markRE = /hello/gi;
//     renderer.render(place,s,maxLen,markRE);
// 
//#import abego.createEllipsis
//
abego.LimitedTextRenderer = function() {
	var minMatchWithContextSize = 40; 
	var maxMovementForWordCorrection = 4; // When a "match" context starts or end on a word the context borders may be changed to at most this amount to include or exclude the word.
	
	
	//----------------------------------------------------------------------------
	//
	// Ranges
	//
	// Objects with a "start" and "end" property (not a specific class). 
	// 
	// In a corresponding "Ranges array" these objects are sorted by their start 
	// and no Range object intersects/touches any other in the array.
	//
	//----------------------------------------------------------------------------
	
	// Adds the Range [startIndex,endIndex[ to the ranges, ensuring that the Ranges
	// in the array are sorted by their start and no Range object 
	// intersects/touches any other in the array (i.e. possibly the new Range is 
	// "merged" with existing ranges)
	//
	// @param ranges array of Range objects
	//
	var addRange = function(ranges, startIndex, endIndex) {
		var n = ranges.length;
		
		// When there are no ranges in ranges, just add it.
		if (n == 0) {
			ranges.push({start: startIndex, end: endIndex});
			return;
		}
		
		var i = 0;
		for (; i < n; i++) {
			var range = ranges[i];
			
			// find the first range that intersects or "touches" [startIndex, endIndex[
			if (range.start <= endIndex && startIndex <= range.end) {
				// Found.
				
				var r;
				// find the first range behind the new range that does not interfere
				var rIndex = i+1;
				for (; rIndex < n; rIndex++) {
					r = ranges[rIndex];
					if (r.start > endIndex || startIndex > range.end) {
						break;
					}
				}
				
				// Replace the ranges i to rIndex-1 with the union of the new range with these ranges.
				var unionStart = startIndex;
				var unionEnd = endIndex;
				for (var j = i; j < rIndex; j++) {
					r = ranges[j];
					unionStart = Math.min(unionStart, r.start);
					unionEnd = Math.max(unionEnd, r.end);
				}
				ranges.splice(i, rIndex-i, {start: unionStart, end: unionEnd});
				return;			
			}
			
			// if we found a range R that is right of the new range there is no
			// intersection and we can insert the new range before R.
			if (range.start > endIndex) {
				break;
			}
		}
	
		// When we are here the new range does not interfere with any range in ranges and
		// i is the index of the first range right to it (or ranges.length, when the new range
		// becomes the right most range). 
	
		ranges.splice(i, 0, {start: startIndex, end: endIndex});
	};
	
	// Returns the total size of all Ranges in ranges
	//
	var getTotalRangesSize = function(ranges) {
		var totalRangeSize = 0;
		for (var i=0; i < ranges.length; i++) {
			var range = ranges[i];
			totalRangeSize += range.end-range.start;
		}
		return totalRangeSize;
	};
	
	//----------------------------------------------------------------------------
	
	
	var isWordChar = function(c) {
		return (c >= "a" && c <= "z") || (c >= "A" && c <= "Z") || c == "_";
	};
	
	// Returns the bounds of the word in s around offset as a {start: , end:} object.
	//
	// Returns null when the char at offset is not a word char.
	//
	var getWordBounds = function(s, offset) {
		// Handle the "offset is not in word" case
		if (!isWordChar(s[offset])) return null;
	
		for (var i = offset-1; i >= 0 && isWordChar(s[i]); i--) 
			{/*empty*/}
			
		var startIndex = i+1;
		var n = s.length;
		for (i = offset+1; i < n && isWordChar(s[i]); i++) 
			{/*empty*/}
		
		return {start: startIndex, end: i};
	};
	
	var moveToWordBorder = function(s, offset, isStartOffset) {
		var wordBounds;
		if (isStartOffset) {
			wordBounds = getWordBounds(s, offset);
		} else {
			if (offset <= 0) return offset;
			wordBounds = getWordBounds(s, offset-1);
		}
		if (!wordBounds) return offset;
		
		if (isStartOffset) {
			if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
			if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
		} else {
			if (wordBounds.end <= offset+maxMovementForWordCorrection) return wordBounds.end;
			if (wordBounds.start >= offset-maxMovementForWordCorrection) return wordBounds.start;
		}
		return offset;
	};
	
	
	
	// Splits s into a sequence of "matched" and "unmatched" substrings, using the 
	// matchRegExp to do the matching.
	// 
	// Returns an array of objects with a "text" property containing the substring text. 
	// Substrings that are "matches" also contain a boolean "isMatch" property set to true.
	// 
	// @param matchRegExp [may be null] when null no matching is performed and the returned 
	// 			array just contains one item with s as its text
	// 
	var getTextAndMatchArray = function(s, matchRegExp) {
		var result = [];
		if (matchRegExp) {
			var startIndex = 0;
			var n = s.length;
			var currentLen = 0;
			do {
				matchRegExp.lastIndex = startIndex;
				var match = matchRegExp.exec(s);
				if (match) {
					if (startIndex < match.index) {
						var t = s.substring(startIndex, match.index);
						result.push({text:t});
					}
					result.push({text:match[0], isMatch:true});
					startIndex = match.index + match[0].length;
				} else {
					result.push({text: s.substr(startIndex)});
					break;
				}
			} while (true);
		} else {
			result.push({text: s});
		}
		return result;
	};
	
	
	
	var getMatchedTextCount = function(textAndMatches) {
		var result = 0;
		for (var i=0; i < textAndMatches.length; i++) {
			if (textAndMatches[i].isMatch) {
				result++;
			}
		}
		return result;	
	};
	
	
	
	var getContextRangeAround = function(s, startIndex, endIndex, matchCount, maxLen) {
		// Partition the available space into equal sized areas for each match and one 
		// for the text start.
		// But the size should not go below a certain limit
		var size = Math.max(Math.floor(maxLen/(matchCount+1)), minMatchWithContextSize);
		
		// Substract the size of the range to get the size of the context.
		var contextSize = Math.max(size-(endIndex-startIndex), 0);
		// Two thirds of the context should be before the match, one third after.
		var contextEnd = Math.min(Math.floor(endIndex+contextSize/3), s.length);
		var contextStart = Math.max(contextEnd - size, 0);
	
		// If the contextStart/End is inside a word and the end of the word is
		// close move the pointers accordingly to make the text more readable.
		contextStart = moveToWordBorder(s, contextStart, true);
		contextEnd = moveToWordBorder(s, contextEnd, false);
		
		return {start: contextStart, end: contextEnd};
	};
	
	// Get all ranges around matched substrings with their contexts
	//
	var getMatchedTextWithContextRanges = function(textAndMatches, s, maxLen) {
		var ranges = [];
		var matchCount = getMatchedTextCount(textAndMatches);
		var pos = 0;
		for (var i=0; i < textAndMatches.length; i++) {
			var t = textAndMatches[i];
			var text = t.text;
			if (t.isMatch) {
				var range = getContextRangeAround(s, pos, pos+text.length, matchCount, maxLen);
				addRange(ranges, range.start, range.end);
			}
			pos += text.length;
		}
		return ranges;
	};
	
	var fillUpRanges = function(s, ranges, maxLen) {
		var remainingLen = maxLen - getTotalRangesSize(ranges);
		while (remainingLen > 0) {
			if (ranges.length == 0) {
				// No matches added yet. Make one large range.
				addRange(ranges, 0, moveToWordBorder(s, maxLen, false));
				return;
			} else {
				var range = ranges[0];
				var startIndex;
				var maxEndIndex;
				if (range.start == 0) {
					// The first range already starts at the beginning of the string.
	
					// When there is a second range fill to the next range start or to the maxLen.
					startIndex = range.end;
					if (ranges.length > 1) {
						maxEndIndex =  ranges[1].start;
					} else {
						// Only one range. Add a range after that with the complete remaining len 
						// (corrected to "beautify" the output)
						addRange(ranges, startIndex, moveToWordBorder(s, startIndex+remainingLen, false));
						return;
					}
				} else {
					// There is unused space between the start of the text and the first range.
					startIndex = 0;
					maxEndIndex = range.start;
				}
				var endIndex = Math.min(maxEndIndex, startIndex+remainingLen);
				addRange(ranges, startIndex, endIndex);
				remainingLen -= (endIndex-startIndex);
			}
		}
	};
	
	
	// Write the given ranges of s, using textAndMatches for marking portions of the text.
	//
	var writeRanges = function(place, s, textAndMatches, ranges, maxLen) {
		if (ranges.length == 0) return;
		
		// Processes the text between startIndex and endIndex of the textAndMatches
		// "writes" them (as DOM elements) at the given place, possibly as "marked" text.
		//
		// When endIndex is not the end of the full text an ellisis is appended. 
		//
		var writeTextAndMatchRange = function(place, s, textAndMatches, startIndex, endIndex) {
			var t;
			var text;
			
			// find the first text item to write
			var pos = 0;
			var i = 0;
			var offset = 0;
			for (;i < textAndMatches.length; i++) {
				t = textAndMatches[i];
				text = t.text;
				if (startIndex < pos+text.length) {
					offset = startIndex - pos;
					break;
				}
				pos += text.length;
			}
			
			var remainingLen = endIndex - startIndex;
			for (; i < textAndMatches.length && remainingLen > 0; i++) {
				t = textAndMatches[i];
				text = t.text.substr(offset);
				offset = 0;
				if (text.length > remainingLen) text = text.substr(0,remainingLen);
				
				if (t.isMatch) {
					createTiddlyElement(place,"span",null,"marked",text);
				} else {
					createTiddlyText(place, text);
				}
				remainingLen -= text.length;
			}
			
			if (endIndex < s.length) {
				abego.createEllipsis(place);
			}
		};
		
		// When the first range is not at the start of the text write an ellipsis("...")
		// (Ellipses between ranges are written in the writeTextAndMatchRange method)
		if (ranges[0].start > 0) abego.createEllipsis(place);
	
		var remainingLen = maxLen;
		for (var i = 0; i < ranges.length && remainingLen > 0; i++) {
			var range = ranges[i];
			var len = Math.min(range.end - range.start, remainingLen);
			writeTextAndMatchRange(place, s, textAndMatches, range.start, range.start+len);
			remainingLen -= len;
		}
	};
	
	this.render = function(place,s,maxLen,markRegExp) {
		if (s.length < maxLen) maxLen = s.length;
		
		var textAndMatches = getTextAndMatchArray(s, markRegExp);
		
		var ranges = getMatchedTextWithContextRanges(textAndMatches, s, maxLen);
		
		// When the maxLen is not yet reached add more ranges 
		// starting from the beginning until either maxLen or 
		// the end of the string is reached.
		fillUpRanges(s, ranges, maxLen);
	
		writeRanges(place, s, textAndMatches, ranges, maxLen);
	};
};



(function() {

function alertAndThrow(msg) {
	alert(msg);
	throw msg;
};

if (version.major < 2 || (version.major == 2 && version.minor < 1)) 
	alertAndThrow("YourSearchPlugin requires TiddlyWiki 2.1 or newer.\n\nCheck the archive for YourSearch plugins\nsupporting older versions of TiddlyWiki.\n\nArchive: http://tiddlywiki.abego-software.de/archive");

abego.YourSearch = {};

//----------------------------------------------------------------------------
// The Search Core
//----------------------------------------------------------------------------

// Model Variables
var lastResults; // Array of tiddlers that matched the last search
var lastQuery; // The last Search query (TiddlerQuery)

var setLastResults = function(array) {
	lastResults = array;
};

var getLastResults = function() {
	return lastResults ? lastResults : [];
};

var getLastResultsCount = function() {
	return lastResults ? lastResults.length : 0;
};

// Standard Ranking Weights
var matchInTitleWeight = 4;
var precisionInTitleWeight = 10;
var matchInTagsWeight = 2;

var getMatchCount = function(s, re) {
	var m = s.match(re);
	return m ? m.length : 0;
};

var standardRankFunction = function(tiddler, query) {	
	// Count the matches in the title and the tags
	var markRE = query.getMarkRegExp();
	if (!markRE) return 1;
	
	var matchesInTitle = tiddler.title.match(markRE);
	var nMatchesInTitle =  matchesInTitle ? matchesInTitle.length : 0;
	var nMatchesInTags = getMatchCount(tiddler.getTags(), markRE);

	// Calculate the "precision" of the matches in the title as the ratio of
	// the length of the matches to the total length of the title.
	var lengthOfMatchesInTitle = matchesInTitle ? matchesInTitle.join("").length : 0;
	var precisionInTitle = tiddler.title.length > 0 ? lengthOfMatchesInTitle/tiddler.title.length : 0;
	
	// calculate a weighted score
	var rank= nMatchesInTitle * matchInTitleWeight 
			+ nMatchesInTags * matchInTagsWeight 
			+ precisionInTitle * precisionInTitleWeight 
			+ 1;

	return rank;
};

// @return Tiddler[]
//
var findMatches = function(store, searchText,caseSensitive,useRegExp,sortField,excludeTag) {
	lastQuery = null;
	
	var candidates = store.reverseLookup("tags",excludeTag,false);
	try {
		var defaultFields = [];
		if (config.options.chkSearchInTitle) defaultFields.push("title");
		if (config.options.chkSearchInText) defaultFields.push("text");
		if (config.options.chkSearchInTags) defaultFields.push("tags");
		lastQuery = new abego.TiddlerQuery(
				searchText,caseSensitive, useRegExp,defaultFields,config.options.chkSearchExtendedFields); 
	} catch (e) {
		// when an invalid query is given no tiddlers are matched
		return [];
	}

	var results = lastQuery.filter(candidates);

	// Rank the results
	var rankFunction = abego.YourSearch.getRankFunction();
	for (var i = 0; i < results.length; i++) {
		var tiddler = results[i];
		var rank = rankFunction(tiddler, lastQuery);
		// Add the rank information to the tiddler.
		// This is used during the sorting, but it may also
		// be used in the result, e.g. to display some "relevance" 
		// information in the result	
		tiddler.searchRank = rank;	
	}
	
	// sort the result, taking care of the rank and the sortField	
	if(!sortField) {
		sortField = "title";
	}
	
	var sortFunction = function (a,b) {
		var searchRankDiff = a.searchRank - b.searchRank;
		if (searchRankDiff == 0) {
			if (a[sortField] == b[sortField]) {
				return(0); 
			} else {
				return (a[sortField] < b[sortField]) ? -1 : +1; 
			}
		} else {
			return (searchRankDiff > 0) ? -1 : +1; 
		}
	};
	results.sort(sortFunction);
	return results;
};

//----------------------------------------------------------------------------
// The Search UI (Result page)
//----------------------------------------------------------------------------


// Visual appearance of the result page
var maxCharsInTitle = 80;
var maxCharsInTags = 50;
var maxCharsInText = 250;
var maxCharsInField = 50;

var itemsPerPageDefault = 25; // Default maximum number of items on one search result page
var itemsPerPageWithPreviewDefault = 10; // Default maximum number of items on one search result page when PreviewText is on

// DOM IDs
var yourSearchResultID = "yourSearchResult";
var yourSearchResultItemsID = "yourSearchResultItems";

var lastSearchText; // The last search text, as passed to findMatches

var resultElement; // The (popup) DOM element containing the search result [may be null]
var searchInputField; // The "search" input field
var searchButton; // The "search" button
var lastNewTiddlerButton;

var initStylesheet = function() {
	if (version.extensions.YourSearchPlugin.styleSheetInited) 
		return;
		
	version.extensions.YourSearchPlugin.styleSheetInited = true;
	setStylesheet(store.getTiddlerText("YourSearchStyleSheet"),"yourSearch");
}

var isResultOpen = function() {
	return resultElement != null && resultElement.parentNode == document.body;
};

var closeResult = function() {
	if (isResultOpen()) {
		document.body.removeChild(resultElement);
	}
};

// Closes the Search Result window and displays the tiddler 
// defined by the "tiddlyLink" attribute of this element
//
var closeResultAndDisplayTiddler = function(e)
{
	closeResult();
	
	var title = this.getAttribute("tiddlyLink");
	if(title) {
		var withHilite = this.getAttribute("withHilite");
		var oldHighlightHack = highlightHack;
		if (withHilite && withHilite=="true" && lastQuery) {
			highlightHack = lastQuery.getMarkRegExp();
		}
		story.displayTiddler(this,title);
		highlightHack = oldHighlightHack;
	}
	return(false);
};

// Adjusts the resultElement's size and position, relative to the search input field.
//
var adjustResultPositionAndSize = function() {
	if (!searchInputField) return;
	
	var root = searchInputField;
	
	// Position the result below the root and resize it if necessary.
	var rootLeft = findPosX(root);
	var rootTop = findPosY(root);
	var rootHeight = root.offsetHeight;
	var popupLeft = rootLeft;
	var popupTop = rootTop + rootHeight;

	// Make sure the result is not wider than the window
	var winWidth = findWindowWidth();
	if (winWidth < resultElement.offsetWidth) {
		resultElement.style.width = (winWidth - 100)+"px";
		winWidth = findWindowWidth();
	}

	// Ensure that the left and right of the result are not
	// clipped by the window. Move it to the left or right, if necessary.	
	var popupWidth = resultElement.offsetWidth;
	if(popupLeft + popupWidth > winWidth)
		popupLeft = winWidth - popupWidth-30;
	if (popupLeft < 0) popupLeft = 0;
	
	// Do the actual moving
	resultElement.style.left = popupLeft + "px";
	resultElement.style.top = popupTop + "px";
	resultElement.style.display = "block";
};

var scrollVisible = function() {
	// Scroll the window to make the result page (and the search Input field) visible.
	if (resultElement) window.scrollTo(0,ensureVisible(resultElement));
	if (searchInputField) window.scrollTo(0,ensureVisible(searchInputField));
};

// Makes sure the result page has a good size and position and visible
// (may scroll the window)
//
var	ensureResultIsDisplayedNicely = function() {
	adjustResultPositionAndSize();
	scrollVisible();
};



var indexInPage; // The index (in the current page) of the tiddler currently rendered.
var currentTiddler; // While rendering the page the tiddler that is currently rendered.

var pager = new abego.PageWiseRenderer();

var MyItemRenderer = function(parent) {
	// Load the template how to display the items that represent a found tiddler
	this.itemHtml = store.getTiddlerText("YourSearchItemTemplate");
	if (!this.itemHtml) alertAndThrow("YourSearchItemTemplate not found");
	
	// Locate the node that shall contain the list of found tiddlers
	this.place = document.getElementById(yourSearchResultItemsID);
	if(!this.place)
		this.place = createTiddlyElement(parent,"div",yourSearchResultItemsID);
};

merge(MyItemRenderer.prototype,{
	render: function(pager,object,index,indexOnPage) {
		// Define global variables, referenced by macros during applyHtmlMacros
		indexInPage = indexOnPage;
		currentTiddler = object;
		
		var item = createTiddlyElement(this.place,"div",null, "yourSearchItem");
		item.innerHTML = this.itemHtml;
		applyHtmlMacros(item,null);
		refreshElements(item,null);
	},

	endRendering: function(pager) {
		// The currentTiddler must only be defined while rendering the found tiddlers
		currentTiddler = null;
	}
});

// Refreshes the content of the result with the current search result
// of the selected page.
//
// Assumes that the result is already open. 
//
var refreshResult = function() {
	if (!resultElement || !searchInputField) return;

	// Load the template for the YourSearchResult
	var html = store.getTiddlerText("YourSearchResultTemplate");
	if (!html) html = "<b>Tiddler YourSearchResultTemplate not found</b>";
	resultElement.innerHTML = html;

	// Expand the template macros etc.
	applyHtmlMacros(resultElement,null);
	refreshElements(resultElement,null);
	
	var itemRenderer = new MyItemRenderer(resultElement);
	pager.renderPage(itemRenderer);

	ensureResultIsDisplayedNicely();
};

pager.getItemsPerPage = function() {
	var n = (config.options.chkPreviewText) 
			? abego.toInt(config.options.txtItemsPerPageWithPreview, itemsPerPageWithPreviewDefault) 
			: abego.toInt(config.options.txtItemsPerPage, itemsPerPageDefault);
	return (n > 0) ? n : 1;
};

pager.onPageChanged = function() {
	refreshResult();
};

var showResult = function() {
	if (!resultElement) {
		resultElement = createTiddlyElement(document.body,"div",yourSearchResultID,"yourSearchResult");
	} else if (resultElement.parentNode != document.body) {
		document.body.appendChild(resultElement);
	}

	refreshResult();
};


var	reopenResultIfApplicable = function() {
	if (searchInputField == null || !config.options.chkUseYourSearch) return;
	
	if ((searchInputField.value == lastSearchText) && lastSearchText && !isResultOpen()) {
		// For speedup we check re-use the previously created resultElement, if possible.
		if (resultElement && (resultElement.parentNode != document.body)) {
			document.body.appendChild(resultElement);
			ensureResultIsDisplayedNicely();
		} else {
			showResult();
		}
	}
};


var invalidateResult = function() {
	closeResult();
	resultElement = null;
	lastSearchText = null;
};



//-------------------------------------------------------------------------
// Close the search result page when the user clicks on the document
// (and not into the searchInputField, on the search button or in the result)
// or presses the ESC key

// Returns true if e is either self or a descendant (child, grandchild,...) of self.
//
// @param self DOM:Element
// @param e DOM:Element or null
//
var isDescendantOrSelf = function(self, e) {
	while (e != null) {
		if (self == e) return true;
		e = e.parentNode;
	}
	return false;
};

var onDocumentClick = function(e) {
	if (e.target == searchInputField) return; 
	if (e.target == searchButton) return; 
	if (resultElement && isDescendantOrSelf(resultElement, e.target)) return; 
	
	closeResult();
};

var onDocumentKeyup = function(e) {
	// Close the search result page when the user presses "ESC"
	if (e.keyCode == 27) closeResult();
};
addEvent(document,"click",onDocumentClick);
addEvent(document,"keyup",onDocumentKeyup);


// Our Search Macro Hijack Function ==========================================

// Helper
var myStorySearch = function(text,useCaseSensitive,useRegExp)
{
	lastSearchText = text;
	setLastResults(findMatches(store, text,useCaseSensitive,useRegExp,"title","excludeSearch"));

	highlightHack = lastQuery ? lastQuery.getMarkRegExp() : null;
	pager.setItems(getLastResults());
	showResult();
	highlightHack = null;
};


var myMacroSearchHandler = function(place,macroName,params,wikifier,paramString,tiddler)
{
	initStylesheet();

	lastSearchText = "";
	var searchTimeout = null;
	var doSearch = function(txt)
		{
		if (config.options.chkUseYourSearch)
			myStorySearch(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
		else
			story.search(txt.value,config.options.chkCaseSensitiveSearch,config.options.chkRegExpSearch);
		lastSearchText = txt.value;
		};
	var clickHandler = function(e)
		{
		doSearch(searchInputField);
		return false;
		};
	var keyHandler = function(e)
		{
		if (!e) var e = window.event;
		searchInputField = this;
		switch(e.keyCode)
			{
			case 13:
				if (e.ctrlKey && lastNewTiddlerButton && isResultOpen())
					lastNewTiddlerButton.onclick.apply(lastNewTiddlerButton,[e]);
				else
					doSearch(this);
				break;
			case 27:
				// When the result is open, close it, 
				// otherwise clear the content of the input field
				if (isResultOpen()) {
					closeResult();
				} else {
					this.value = "";
					clearMessage();
				}
				break;
			}
		if (String.fromCharCode(e.keyCode) == this.accessKey || e.altKey) 
			{
			reopenResultIfApplicable();
			}

		if(this.value.length<3 && searchTimeout) clearTimeout(searchTimeout);
		if(this.value.length > 2)
			{
		 	if (this.value != lastSearchText)
		 		{
				if (!config.options.chkUseYourSearch || config.options.chkSearchAsYouType)
					{
					if(searchTimeout)
						clearTimeout(searchTimeout);
					var txt = this;
					searchTimeout = setTimeout(function() {doSearch(txt);},500);
					}
				}
			else
				{
				if(searchTimeout)
					clearTimeout(searchTimeout);
				}
			};
		if (this.value.length == 0) 
			{
			closeResult();
			}
		};


	var focusHandler = function(e)
		{
		this.select();
		clearMessage();
		reopenResultIfApplicable();
		};

	
	var args = paramString.parseParams("list",null,true);
	var buttonAtRight = getFlag(args, "buttonAtRight");
	var sizeTextbox = getParam(args, "sizeTextbox", this.sizeTextbox);
	
	var btn;
	if (!buttonAtRight)
		btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);
		
	var txt = createTiddlyElement(place,"input",null,null,null);
	if(params[0])
		txt.value = params[0];
	txt.onkeyup = keyHandler;
	txt.onfocus = focusHandler;
	txt.setAttribute("size",sizeTextbox);
	txt.setAttribute("accessKey",this.accessKey);
	txt.setAttribute("autocomplete","off");
	if(config.browser.isSafari)
		{
		txt.setAttribute("type","search");
		txt.setAttribute("results","5");
		}
	else
		txt.setAttribute("type","text");

	if (buttonAtRight)
		btn = createTiddlyButton(place,this.label,this.prompt,clickHandler);

	searchInputField = txt;
	searchButton = btn;
};

//----------------------------------------------------------------------------
// Support for Macros
//----------------------------------------------------------------------------

var openAllFoundTiddlers = function() {
	closeResult();
	var results = getLastResults();
	var n = results.length;
	if (n) {
		var titles=[];
		for(var i = 0; i<n; i++)
			titles.push(results[i].title);
		story.displayTiddlers(null,titles);
	}
};

var createOptionWithRefresh = function(place, optionParams, wikifier,tiddler) {
	invokeMacro(place,"option",optionParams,wikifier,tiddler);
	// The option macro appended the component at the end of the place.
	var elem = place.lastChild;
	var oldOnClick = elem.onclick;
	elem.onclick = function(e) {
		var result = oldOnClick.apply(this, arguments);
		refreshResult();
		return result;
	};
	return elem;
};

var removeTextDecoration = function(s) {
	var removeThis = ["''", "{{{", "}}}", "//", "<<<", "/***", "***/"];
	var reText = "";
	for (var i = 0; i < removeThis.length; i++) {
		if (i != 0) reText += "|";
		reText += "("+removeThis[i].escapeRegExp()+")";
	}
	return s.replace(new RegExp(reText, "mg"), "").trim();
};



// Returns the "shortcut number" of the currentTiddler. 
// I.e. When the user presses Alt-n the given tiddler is opened/display.
//
// @return 0-9 or -1 when no number is defined
//
var getShortCutNumber = function() {
	var i = indexInPage;
	return (i >= 0 && i <= 9) 
		? (i < 9 ? (i+1) : 0)
		: -1;
};

var limitedTextRenderer = new abego.LimitedTextRenderer();
var renderLimitedText = function(place, s, maxLen) {
	limitedTextRenderer.render(place,s,maxLen,lastQuery.getMarkRegExp())
}

// When any tiddler are changed reset the result.
// 
var oldTiddlyWikiSaveTiddler = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields) {
	oldTiddlyWikiSaveTiddler.apply(this, arguments);
	invalidateResult();
};
var oldTiddlyWikiRemoveTiddler = TiddlyWiki.prototype.removeTiddler;
TiddlyWiki.prototype.removeTiddler = function(title) {
	oldTiddlyWikiRemoveTiddler.apply(this, arguments);
	invalidateResult();
};

//----------------------------------------------------------------------------
// Macros
//----------------------------------------------------------------------------

// ====Macro yourSearch ================================================

config.macros.yourSearch = {
	// Standard Properties
	label: "yourSearch",
	prompt: "Gives access to the current/last YourSearch result",
	
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		if (params.length == 0) return;
	
		var name = params[0];
		var func = config.macros.yourSearch.funcs[name];
		if (func) func(place,macroName,params,wikifier,paramString,tiddler);
	},
	
	tests: {
		"true" : function() {return true;},
		"false" : function() {return false;},
		"found" : function() {return getLastResultsCount() > 0;},
		"previewText" : function() {return config.options.chkPreviewText;}
	},

	funcs: {
		itemRange: function(place) {
			if (getLastResultsCount()) {
				var lastIndex = pager.getLastIndexOnPage();
				var s = "%0 - %1".format([pager.getFirstIndexOnPage()+1,lastIndex+1]);
				createTiddlyText(place, s);
			}
		},
		
		count: function(place) {
			createTiddlyText(place, getLastResultsCount().toString());
		},
		
		query: function(place) {
			if (lastQuery) {
				createTiddlyText(place, lastQuery.toString());
			}
		},
		
		version: function(place) {
			var t = "YourSearch %0.%1.%2".format(
					[version.extensions.YourSearchPlugin.major, 
					 version.extensions.YourSearchPlugin.minor, 
					 version.extensions.YourSearchPlugin.revision]);
			var e = createTiddlyElement(place, "a");
			e.setAttribute("href", "http://tiddlywiki.abego-software.de/#YourSearchPlugin");
			e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">'+t+'<font>';
		},
		
		copyright: function(place) {
			var e = createTiddlyElement(place, "a");
			e.setAttribute("href", "http://www.abego-software.de");
			e.innerHTML = '<font color="black" face="Arial, Helvetica, sans-serif">&copy; 2005-2006 <b><font color="red">abego</font></b> Software<font>';
		},
		
		newTiddlerButton: function(place) {
			if (lastQuery) {
				var r = abego.parseNewTiddlerCommandLine(lastQuery.getQueryText());
				var btn = config.macros.newTiddler.createNewTiddlerButton(place,r.title,r.params,"new tiddler","Create a new tiddler based on search text. (Shortcut: Ctrl-Enter; Separators: '.', '#')",null,"text");				
				// Close the result before the new tiddler is created.
				var oldOnClick = btn.onclick;
				btn.onclick = function() {
					closeResult();
					oldOnClick.apply(this,arguments);
				}
				lastNewTiddlerButton = btn;
			}
		},
		
		linkButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (params < 2) return;
			
			var	tiddlyLink = params[1];
			var text = params < 3 ? tiddlyLink : params[2];
			var tooltip = params < 4 ? text : params[3];
			var accessKey = params < 5 ? null : params[4];
			
			var btn = createTiddlyButton(place,text,tooltip,closeResultAndDisplayTiddler,null,null, accessKey);
			btn.setAttribute("tiddlyLink",tiddlyLink);
		},
		
		closeButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			var button = createTiddlyButton(place, "close", "Close the Search Results (Shortcut: ESC)", closeResult);
		},
		
		openAllButton: function(place,macroName,params,wikifier,paramString,tiddler) {
			var n = getLastResultsCount();
			if (n == 0) return;
		
			var title = n == 1 ? "open tiddler" : "open all %0 tiddlers".format([n]);
			var button = createTiddlyButton(place, title, "Open all found tiddlers (Shortcut: Alt-O)", openAllFoundTiddlers);
			button.setAttribute("accessKey","O");
		},
		
		naviBar: function(place,macroName,params,wikifier,paramString,tiddler) {
			pager.addPageNavigation(place);
		},
		
		"if": function(place,macroName,params,wikifier,paramString,tiddler) {
			if (params.length < 2) return;
			
			var testName = params[1];
			var negate = (testName == "not");
			if (negate) {
				if (params.length < 3) return;
				testName = params[2];
			}
			
			var test = config.macros.yourSearch.tests[testName];
			var showIt = false;
			try {
				if (test) {
					showIt = test(place,macroName,params,wikifier,paramString,tiddler) != negate;
				} else {
					// When no predefined test is specified try to evaluate it as a JavaScript expression.
					showIt = (!eval(testName)) == negate;
				}
			} catch (ex) {
			}
			
			if (!showIt) {
				place.style.display="none";
			}
		},
		
		chkPreviewText: function(place,macroName,params,wikifier,paramString,tiddler) {
			var optionParams = params.slice(1).join(" ");
			
			var elem = createOptionWithRefresh(place, "chkPreviewText", wikifier,tiddler);
			elem.setAttribute("accessKey", "P");
			elem.title = "Show text preview of found tiddlers (Shortcut: Alt-P)";	
			return elem;
		}
	}
};


// ====Macro foundTiddler ================================================

config.macros.foundTiddler = {
	// Standard Properties
	label: "foundTiddler",
	prompt: "Provides information on the tiddler currently processed on the YourSearch result page",
	
	handler: function(place,macroName,params,wikifier,paramString,tiddler) {
		var name = params[0];
		var func = config.macros.foundTiddler.funcs[name];
		if (func) func(place,macroName,params,wikifier,paramString,tiddler);
	},
		
	funcs: {
		title: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
			
			var shortcutNumber = getShortCutNumber();
			var tooltip = shortcutNumber >= 0 
					? "Open tiddler (Shortcut: Alt-%0)".format([shortcutNumber.toString()])
					: "Open tiddler";
		
			var btn = createTiddlyButton(place,null,tooltip,closeResultAndDisplayTiddler,null);
			btn.setAttribute("tiddlyLink",currentTiddler.title);
			btn.setAttribute("withHilite","true");
			
			renderLimitedText(btn, currentTiddler.title, maxCharsInTitle);
		
			if (shortcutNumber >= 0) {
				btn.setAttribute("accessKey",shortcutNumber.toString());
			}
		},
		
		tags: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
		
			renderLimitedText(place, currentTiddler.getTags(), maxCharsInTags);
		},
		
		text: function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
		
			renderLimitedText(place, removeTextDecoration(currentTiddler.text), maxCharsInText);
		},
		
		field:  function(place,macroName,params,wikifier,paramString,tiddler) {
			if (!currentTiddler) return;
			var	name = params[1];
			var len = params.length > 2 ? abego.toInt(params[2],maxCharsInField) : maxCharsInField;
			var v = store.getValue(currentTiddler,name);
			if (v)
				renderLimitedText(place, removeTextDecoration(v), len);
		},
		
		// Renders the "shortcut number" of the current tiddler, to indicate to the user
		// what number to "Alt-press" to open the tiddler.
		//
		number: function(place,macroName,params,wikifier,paramString,tiddler) {
			var numberToDisplay = getShortCutNumber();
			if (numberToDisplay >= 0) {
				var text = "%0)".format([numberToDisplay.toString()]);
				createTiddlyElement(place,"span",null,"shortcutNumber",text);
			}
		}
	}
};


//----------------------------------------------------------------------------
// Configuration Stuff
//----------------------------------------------------------------------------

var opts = {chkUseYourSearch:true,
	chkPreviewText:true,
	chkSearchAsYouType:true,
	chkSearchInTitle:true,
	chkSearchInText:true,
	chkSearchInTags:true,
	chkSearchExtendedFields:true,
	txtItemsPerPage:itemsPerPageDefault,
	txtItemsPerPageWithPreview:itemsPerPageWithPreviewDefault};
for (var n in opts) 
	if (config.options[n] == undefined) config.options[n] = opts[n];




//----------------------------------------------------------------------------
// Shadow Tiddlers
//----------------------------------------------------------------------------

config.shadowTiddlers.AdvancedOptions += "\n<<option chkUseYourSearch>> Use 'Your Search' //([[more options|YourSearch Options]]) ([[help|YourSearch Help]])// ";

config.shadowTiddlers["YourSearch Help"] =
"!Field Search\nWith the Field Search you can restrict your search to certain fields of a tiddler, e.g"+
" only search the tags or only the titles. The general form is //fieldname//'':''//textToSearch// (e."+
"g. {{{title:intro}}}). In addition one-character shortcuts are also supported for the standard field"+
"s {{{title}}}, {{{text}}} and {{{tags}}}:\n|!What you want|!What you type|!Example|\n|Search ''titles "+
"only''|start word with ''!''|{{{!jonny}}} (shortcut for {{{title:jonny}}})|\n|Search ''contents/text "+
"only''|start word with ''%''|{{{%football}}} (shortcut for {{{text:football}}})|\n|Search ''tags only"+
"''|start word with ''#''|{{{#Plugin}}} (shortcut for {{{tags:Plugin}}})|\n\nUsing this feature you may"+
" also search the extended fields (\"Metadata\") introduced with TiddlyWiki 2.1, e.g. use {{{priority:1"+
"}}} to find all tiddlers with the priority field set to \"1\".\n\nYou may search a word in more than one"+
" field. E.g. {{{!#Plugin}}} (or {{{title:tags:Plugin}}} in the \"long form\") finds tiddlers containin"+
"g \"Plugin\" either in the title or in the tags (but does not look for \"Plugin\" in the text). \n\n!Boole"+
"an Search\nThe Boolean Search is useful when searching for multiple words.\n|!What you want|!What you "+
"type|!Example|\n|''All words'' must exist|List of words|{{{jonny jeremy}}} (or {{{jonny and jeremy}}}"+
")|\n|''At least one word'' must exist|Separate words by ''or''|{{{jonny or jeremy}}}|\n|A word ''must "+
"not exist''|Start word with ''-''|{{{-jonny}}} (or {{{not jonny}}})|\n\n''Note:'' When you specify two"+
" words, separated with a space, YourSearch finds all tiddlers that contain both words, but not neces"+
"sarily next to each other. If you want to find a sequence of word, e.g. '{{{John Brown}}}', you need"+
" to put the words into quotes. I.e. you type: {{{\"john brown\"}}}.\n\nUsing parenthesis you may change "+
"the default \"left to right\" evaluation of the boolean search. E.g. {{{not (jonny or jeremy)}}} finds"+
" all tiddlers that contain neither \"jonny\" nor \"jeremy. In contrast to this {{{not jonny or jeremy}}"+
"} (i.e. without parenthesis) finds all tiddlers that either don't contain \"jonny\" or that contain \"j"+
"eremy\".\n\n!'Exact Word' Search\nBy default a search result all matches that 'contain' the searched tex"+
"t. E.g. if you search for {{{Task}}} you will get all tiddlers containing 'Task', but also '~Complet"+
"edTask', '~TaskForce' etc.\n\nIf you only want to get the tiddlers that contain 'exactly the word' you"+
" need to prefix it with a '='. E.g. typing '=Task' will find the tiddlers that contain the word 'Tas"+
"k', ignoring words that just contain 'Task' as a substring.\n\n!~CaseSensitiveSearch and ~RegExpSearch"+
"\nThe standard search options ~CaseSensitiveSearch and ~RegExpSearch are fully supported by YourSearc"+
"h. However when ''~RegExpSearch'' is on Filtered and Boolean Search are disabled.\n\nIn addition you m"+
"ay do a \"regular expression\" search even with the ''~RegExpSearch'' set to false by directly enterin"+
"g the regular expression into the search field, framed with {{{/.../}}}. \n\nExample: {{{/m[ae][iy]er/"+
"}}} will find all tiddlers that contain either \"maier\", \"mayer\", \"meier\" or \"meyer\".\n\n!~JavaScript E"+
"xpression Filtering\nIf you are familiar with JavaScript programming and know some TiddlyWiki interna"+
"ls you may also use JavaScript expression for the search. Just enter a JavaScript boolean expression"+
" into the search field, framed with {{{ { ... } }}}. In the code refer to the variable tiddler and e"+
"valuate to {{{true}}} when the given tiddler should be included in the result. \n\nExample: {{{ { tidd"+
"ler.modified > new Date(\"Jul 4, 2005\")} }}} returns all tiddler modified after July 4th, 2005.\n\n!Com"+
"bined Search\nYou are free to combine the various search options. \n\n''Examples''\n|!What you type|!Res"+
"ult|\n|{{{!jonny !jeremy -%football}}}|all tiddlers with both {{{jonny}}} and {{{jeremy}}} in its tit"+
"les, but no {{{football}}} in content.|\n|{{{#=Task}}}|All tiddlers tagged with 'Task' (the exact wor"+
"d). Tags named '~CompletedTask', '~TaskForce' etc. are not considered.|\n\n!Access Keys\nYou are encour"+
"aged to use the access keys (also called \"shortcut\" keys) for the most frequently used operations. F"+
"or quick reference these shortcuts are also mentioned in the tooltip for the various buttons etc.\n\n|"+
"!Key|!Operation|\n|{{{Alt-F}}}|''The most important keystroke'': It moves the cursor to the search in"+
"put field so you can directly start typing your query. Pressing {{{Alt-F}}} will also display the pr"+
"evious search result. This way you can quickly display multiple tiddlers using \"Press {{{Alt-F}}}. S"+
"elect tiddler.\" sequences.|\n|{{{ESC}}}|Closes the [[YourSearch Result]]. When the [[YourSearch Resul"+
"t]] is already closed and the cursor is in the search input field the field's content is cleared so "+
"you start a new query.|\n|{{{Alt-1}}}, {{{Alt-2}}},... |Pressing these keys opens the first, second e"+
"tc. tiddler from the result list.|\n|{{{Alt-O}}}|Opens all found tiddlers.|\n|{{{Alt-P}}}|Toggles the "+
"'Preview Text' mode.|\n|{{{Alt-'<'}}}, {{{Alt-'>'}}}|Displays the previous or next page in the [[Your"+
"Search Result]].|\n|{{{Return}}}|When you have turned off the 'as you type' search mode pressing the "+
"{{{Return}}} key actually starts the search (as does pressing the 'search' button).|\n\n//If some of t"+
"hese shortcuts don't work for you check your browser if you have other extensions installed that alr"+
"eady \"use\" these shortcuts.//";

config.shadowTiddlers["YourSearch Options"] =
"|>|!YourSearch Options|\n|>|<<option chkUseYourSearch>> Use 'Your Search'|\n|!|<<option chkPreviewText"+
">> Show Text Preview|\n|!|<<option chkSearchAsYouType>> 'Search As You Type' Mode (No RETURN required"+
" to start search)|\n|!|Default Search Filter:<<option chkSearchInTitle>>Title ('!')     <<option chk"+
"SearchInText>>Text ('%')     <<option chkSearchInTags>>Tags ('#')    <<option chkSearchExtendedFiel"+
"ds>>Extended Fields<html><br><font size=\"-2\">The fields of a tiddlers that are searched when you don"+
"'t explicitly specify a filter in the search text <br>(Explictly specify fields using one or more '!"+
"', '%', '#' or 'fieldname:' prefix before the word/text to find).</font></html>|\n|!|Number of items "+
"on search result page: <<option txtItemsPerPage>>|\n|!|Number of items on search result page with pre"+
"view text: <<option txtItemsPerPageWithPreview>>|\n";
			
config.shadowTiddlers["YourSearchStyleSheet"] = 
"/***\n!~YourSearchResult Stylesheet\n***/\n/*{{{*/\n.yourSearchResult {\n\tposition: absolute;\n\twidth: 800"+
"px;\n\n\tpadding: 0.2em;\n\tlist-style: none;\n\tmargin: 0;\n\n\tbackground: #ffd;\n\tborder: 1px solid DarkGra"+
"y;\n}\n\n/*}}}*/\n/***\n!!Summary Section\n***/\n/*{{{*/\n.yourSearchResult .summary {\n\tborder-bottom-width:"+
" thin;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: #999999;\n\tpadding-bottom: 4px;\n}\n\n.yourSea"+
"rchRange, .yourSearchCount, .yourSearchQuery   {\n\tfont-weight: bold;\n}\n\n.yourSearchResult .summary ."+
"button {\n\tfont-size: 10px;\n\n\tpadding-left: 0.3em;\n\tpadding-right: 0.3em;\n}\n\n.yourSearchResult .summa"+
"ry .chkBoxLabel {\n\tfont-size: 10px;\n\n\tpadding-right: 0.3em;\n}\n\n/*}}}*/\n/***\n!!Items Area\n***/\n/*{{{*"+
"/\n.yourSearchResult .marked {\n\tbackground: none;\n\tfont-weight: bold;\n}\n\n.yourSearchItem {\n\tmargin-to"+
"p: 2px;\n}\n\n.yourSearchNumber {\n\tcolor: #808080;\n}\n\n\n.yourSearchTags {\n\tcolor: #008000;\n}\n\n.yourSearc"+
"hText {\n\tcolor: #808080;\n\tmargin-bottom: 6px;\n}\n\n/*}}}*/\n/***\n!!Footer\n***/\n/*{{{*/\n.yourSearchFoote"+
"r {\n\tmargin-top: 8px;\n\tborder-top-width: thin;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;"+
"\n}\n\n.yourSearchFooter a:hover{\n\tbackground: none;\n\tcolor: none;\n}\n/*}}}*/\n/***\n!!Navigation Bar\n***/"+
"\n/*{{{*/\n.yourSearchNaviBar a {\n\tfont-size: 16px;\n\tmargin-left: 4px;\n\tmargin-right: 4px;\n\tcolor: bla"+
"ck;\n\ttext-decoration: underline;\n}\n\n.yourSearchNaviBar a:hover {\n\tbackground-color: none;\n}\n\n.yourSe"+
"archNaviBar .prev {\n\tfont-weight: bold;\n\tcolor: blue;\n}\n\n.yourSearchNaviBar .currentPage {\n\tcolor: #"+
"13AF0A;\n\tfont-weight: bold;\n\ttext-decoration: none;\n}\n\n.yourSearchNaviBar .next {\n\tfont-weight: bold"+
";\n\tcolor: blue;\n}\n/*}}}*/\n";

config.shadowTiddlers["YourSearchResultTemplate"] =
"<!--\n{{{\n-->\n<span macro=\"yourSearch if found\">\n<!-- The Summary Header ============================"+
"================ -->\n<table class=\"summary\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">"+
"<tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Result <span class=\"yourSearchRange\" macro=\"yourSearc"+
"h itemRange\"></span>\n\t\t&nbsp;of&nbsp;<span class=\"yourSearchCount\" macro=\"yourSearch count\"></span>\n"+
"\t\tfor&nbsp;<span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>\n\t</td>\n\t<td class=\"yourSea"+
"rchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch chkPreviewText\"></span><span class=\"chkBoxLabel"+
"\">preview text</span>\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch openAllButton\"></span>\n\t\t<span macro=\"yourSearch lin"+
"kButton 'YourSearch Options' options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkB"+
"utton 'YourSearch Help' help 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch clo"+
"seButton\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n\n<!-- The List of Found Tiddlers ================="+
"=========================== -->\n<div id=\"yourSearchResultItems\" itemsPerPage=\"25\" itemsPerPageWithPr"+
"eview=\"10\"></div>\n\n<!-- The Footer (with the Navigation) ==========================================="+
"= -->\n<table class=\"yourSearchFooter\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody"+
">\n  <tr>\n\t<td align=\"left\">\n\t\tResult page: <span class=\"yourSearchNaviBar\" macro=\"yourSearch naviBar"+
"\"></span>\n\t</td>\n\t<td align=\"right\"><span macro=\"yourSearch version\"></span>, <span macro=\"yourSearc"+
"h copyright\"></span>\n\t</td>\n  </tr>\n</tbody></table>\n<!-- end of the 'tiddlers found' case ========="+
"================================== -->\n</span>\n\n\n<!-- The \"No tiddlers found\" case ================="+
"========================== -->\n<span macro=\"yourSearch if not found\">\n<table class=\"summary\" border="+
"\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n  <tr>\n\t<td align=\"left\">\n\t\tYourSearch Resu"+
"lt: No tiddlers found for <span class=\"yourSearchQuery\" macro=\"yourSearch query\"></span>.\n\t</td>\n\t<t"+
"d class=\"yourSearchButtons\" align=\"right\">\n\t\t<span macro=\"yourSearch newTiddlerButton\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Options'"+
" options 'Configure YourSearch'\"></span>\n\t\t<span macro=\"yourSearch linkButton 'YourSearch Help' help"+
" 'Get help how to use YourSearch'\"></span>\n\t\t<span macro=\"yourSearch closeButton\"></span>\n\t</td>\n  <"+
"/tr>\n</tbody></table>\n</span>\n\n\n<!--\n}}}\n-->\n";

config.shadowTiddlers["YourSearchItemTemplate"] = 
"<!--\n{{{\n-->\n<span class='yourSearchNumber' macro='foundTiddler number'></span>\n<span class='yourSea"+
"rchTitle' macro='foundTiddler title'/></span>&nbsp;-&nbsp;\n<span class='yourSearchTags' macro='found"+
"Tiddler field tags 50'/></span>\n<span macro=\"yourSearch if previewText\"><div class='yourSearchText' macro='fo"+
"undTiddler field text 250'/></div></span>\n<!--\n}}}\n-->";

config.shadowTiddlers["YourSearch"] = "<<tiddler [[YourSearch Help]]>>";

config.shadowTiddlers["YourSearch Result"] = "The popup-like window displaying the result of a YourSearch query.";

//----------------------------------------------------------------------------
// Install YourSearch
//----------------------------------------------------------------------------

// Overwrite the TiddlyWiki search handler and verify after a while 
// that nobody else has overwritten it.
config.macros.search.handler = myMacroSearchHandler;

var checkForOtherHijacker = function() {
	// Check that still our search handler is installed
    if (config.macros.search.handler != myMacroSearchHandler) {
    	alert(
"Message from YourSearchPlugin:\n\n\nAnother plugin has disabled the 'Your Search' features.\n\n\nYou may "+
"disable the other plugin or change the load order of \nthe plugins (by changing the names of the tidd"+
"lers)\nto enable the 'Your Search' features.");
    }
};

setTimeout(checkForOtherHijacker, 5000);

// === Public API =================================

abego.YourSearch.getStandardRankFunction = function() {
	return standardRankFunction;
};

abego.YourSearch.getRankFunction = function() {
	return abego.YourSearch.getStandardRankFunction();
};

abego.YourSearch.getCurrentTiddler = function() {
	return currentTiddler;
};

abego.YourSearch.closeResult = function() {
	closeResult();
}

})();
} // of "install only once"
// Used Globals (for JSLint) ==============

// ... JavaScript Core
/*global 	alert,clearTimeout,confirm */
// ... TiddlyWiki Core
/*global 	Tiddler, applyHtmlMacros, clearMessage, createTiddlyElement, createTiddlyButton, createTiddlyText, ensureVisible ,findPosX, highlightHack, findPosY,findWindowWidth, invokeMacro, saveChanges, refreshElements, story */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005-2006 ([[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.
***/
setStylesheet("/***\n!Calendar Styles\n***/\n/**/\n .viewer .calendarHolder {\n margin-left: auto;\n margin-right: auto;\n border: none;\n}\n\n .viewer .calendarHolder table {\n border: none;\n margin: 0;\n}\n\n .viewer .calendarHolder tr {\n border: none;\n vertical-align: top;\n}\n\n .viewer .calendarHolder td {\n border: none;\n vertical-align: top;\n}\n\n .viewer #calendarWrapper {\n width: 21em;\n border: 2px solid #4682b4;\n cursor: pointer;\n}\n\n #calendarWrapper #calendarLine td {\n height: 2.5em;\n}\n\n #calendarWrapper tr {\n border:none;\n}\n\n #calendarWrapper td {\n text-align: center;\n vertical-align: middle;\n width: 14.28%;\n border:none;\n}\n\n #calendarWrapper #calendarHeader td{\n color: #900FD3;\n background-color: #FFF;\n height: 2em;\n}\n\n #calendarWrapper #weekNames td {\n color: #900FD3;\n background-color: #FFF;\n height: 2em;\n}\n\n #calendarWrapper .weekDay {\n background-color: #FFF;\n}\n\n #calendarWrapper .holiDay {\n background-color: #900FD3;\n}\n\n #calendarWrapper .currentDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .currentscheduledDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .workingDay {\n background-color: #FFF;\n}\n\n #calendarWrapper .scheduledDay {\n border: solid orange 2px;\n}\n\n #calendarWrapper .otherMonthDay {\n background-color: #900FD3;\n}\n\n/**/","CalendarStyles");
etStylesheet("/***\n!Calendar Styles\n***/\n/**/\n .viewer .calendarHolder {\n margin-left: auto;\n margin-right: auto;\n border: none;\n}\n\n .viewer .calendarHolder table {\n border: none;\n margin: 0;\n}\n\n .viewer .calendarHolder tr {\n border: none;\n vertical-align: top;\n}\n\n .viewer .calendarHolder td {\n border: none;\n vertical-align: top;\n}\n\n .viewer #calendarWrapper {\n width: 21em;\n border: 2px solid #4682b4;\n cursor: pointer;\n}\n\n #calendarWrapper #calendarLine td {\n height: 2.5em;\n}\n\n #calendarWrapper tr {\n border:none;\n}\n\n #calendarWrapper td {\n text-align: center;\n vertical-align: middle;\n width: 14.28%;\n border:none;\n}\n\n #calendarWrapper #calendarHeader td{\n color: #ffffff;\n background-color: #666;\n height: 2em;\n}\n\n #calendarWrapper #weekNames td {\n color: #ffffff;\n background-color: #87cefa;\n height: 2em;\n}\n\n #calendarWrapper .weekDay {\n background-color: #ccff99;\n}\n\n #calendarWrapper .holiDay {\n background-color: #9acd32;\n}\n\n #calendarWrapper .currentDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .currentscheduledDay {\n border: solid #ff0000 2px;\n font-weight: bold;\n}\n\n #calendarWrapper .workingDay {\n background-color: #999;\n}\n\n #calendarWrapper .scheduledDay {\n border: solid orange 2px;\n}\n\n #calendarWrapper .otherMonthDay {\n background-color: #014;\n}\n\n/**/","CalendarStyles");
Copyright [[Osmosoft|http://www.tiddlywiki.com]]
Nos ancêtres les Gaulois ?
Pourquoi la France s'est-elle choisi les Gaulois pour ancêtres&nbsp;?
En quoi la IIIème République s'est-elle reconnue dans les Gaulois&nbsp;?

L'Ancien  Régime trouvait son origine dans les Francs de Clovis (avec le «&nbsp;mythe&nbsp;» du sacre).
Quand commence la France ?  (Gaulois, Francs, Carolingiens,  Capétiens,  1515, Révolution Française, mai 68...etc).

Pourquoi a-t-on choisi les Gaulois, plutôt que les Romains&nbsp;?
Quelle est l'utilité des «&nbsp;Gaulois&nbsp;»&nbsp;?
A quel moment les Français se sont-ils sentis français&nbsp;?
Quelle différence entre pays, nation, royaume, empire, état&nbsp;?

Revue Archeo
Encyclopédie Universalis (pour ceux qui sont curieux)

Recherches Google.
«&nbsp;Nos ancêtres les gaulois ?&nbsp;»
«&nbsp;gaulois+IIIème République&nbsp;»
!S1: Chant du ciel
Dans ce poème, beaucoup de «&nbsp;choses&nbsp;» parlent:
la fleur → le coquillage → la mer → le bateau → le feu
le bateau→ la mer → le coquillage → la fleur → JE

Ce poème dit l'amour de «&nbsp;JE&nbsp;» pour «&nbsp;ELLE&nbsp;»:
«&nbsp;elle est belle&nbsp;», «&nbsp;ses yeux&nbsp;», «&nbsp;elle paraît&nbsp;».
«&nbsp;ton cœur&nbsp;», «&nbsp;ton amour&nbsp;», «&nbsp;ton rêve creux&nbsp;»
→ Nous avons relevé le champ lexical de l'amour.

Champ lexical de la lumière: phosphore, yeux, le feu, tu luis, brille,
Ce champ lexical révèle la beauté de celle qui l'aime et de son amour.

Rappel: 
Les pronoms personnels: il me disait.
Les pronoms personnels désignent une personne ou une chose dont on a déjà parlé ou qui est évidente.
Ex: Je pense à Lisa → je pense à elle, j'y pense.

Devoirs:
p14 ex 5,6,7, p15 ex 1; 2 ;3  (sur les pronoms)
Lire les poèmes, choisir vos 2 préférés (et dire pourquoi)

!Séance 2: Chantepleure. Écrire une poésie de mots-valises.

«&nbsp;Chantepleure&nbsp;» est un mot qui n'existe pas. Il est composé de 2 mots qui existent. On appelle un mot-valise.
(ex: «&nbsp;adoléchiant&nbsp;», «&nbsp;adulescent&nbsp;», «&nbsp;franglais&nbsp;»)

Écrire des poèmes sur le modèle de celui de Desnos.
1. Gardez le titre, gardez «&nbsp;Chante...&nbsp;» et «&nbsp;Pleure...&nbsp;» au début des vers. Mettre d'autres groupes nominaux.
Ex «&nbsp;chantevent feuille d'automne; chantétoile 
2. Gardez la 1ere strophe. Intituler le poème «&nbsp;chanterire&nbsp;». modifier la seconde strophe.

Écrire un poème sur le modèle de «&nbsp;Chants du ciel&nbsp;».
1. le début doit être: 
«&nbsp;La fleur des Alpes disait au bouquetin:...
   Le bouquetin disait à la montagne:....
   … etc&nbsp;»

Écrire un poème qui commence
«&nbsp;L'oiseau se pose sur la fleur
La fleur se penche sur la terre
la terre...

2 poèmes sur feuille pour lundi.
Vendredi: exos p16, n° 5→9

!Séance 3: Comment est structuré «&nbsp;Il était une fois&nbsp;»?

Tout poème est organisé selon une structure. La plus simple est la rime.
Ici: «&nbsp;Il était un(e)...&nbsp;», puis les trois vers suivants commencent par le même mot. 
Ligne, signe, digne, vignes sont des mots PARONYMES. Ce sont des mots qui sonnent presque pareil (ex: manège, ménage, déménage, mésange...).

Ici, le poète parle d'abord de la feuille, puis la branche, puis arbre, puis racines, puis terre, puis ciel. Cet ordre correspond à une progression.

Écrivez un poème sur le modèle de ce texte qui commence par:
«&nbsp;Il était une graine...&nbsp;»
ou
«&nbsp;Il était un fruit...&nbsp;»

Bonus: Un même mot écrit en tête de phrase (ou de vers) s'appelle une ANAPHORE.

Écrire une imitation du poème «&nbsp;il était une feuille&nbsp;» (voir le cahier).
Inventez un poème de 8 lignes avec une anaphore.
Apprendre 2 poésies de votre choix de «&nbsp;chantefables et chantefleurs&nbsp;» (recueil en pdf)

!!!__Rappel__
*Démonstratifs: cette chaise → celle-là
**adjectif: ce, cette, ces
**pronom: celui-ci, celle-ci, ceux-ci
*Possessifs: ta voix → la tienne
**adjectif: mon, notre
**pronom: le mien, le nôtre
| tiddlyspot password:|<<option pasUploadPassword>>|
| site management:|<<upload http://cartawiki.tiddlyspot.com/store.cgi index.html . .  >>//(requires tiddlyspot password)//<<br>>[[control panel|http://cartawiki.tiddlyspot.com/controlpanel]], [[download (go offline)|http://cartawiki.tiddlyspot.com/download]]|
| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|
This tag flags tiddlers that Wikibar will attempt to install as Add-Ons