-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathHelp On Macros.xml
152 lines (142 loc) · 10.2 KB
/
Help On Macros.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0" ?>
<tiddlers>
<tiddler tags="help" title="Help On Macros" modified="20101201100819" modifier="giewiki" version="0"><pre>
Macros let you insert special content. In general, they are applied using the syntax
{{{
<<macroName parameters>>
}}}
where the relevant parameters are defined by each macro. Multiple parameters are separated by spaces. If a parameter value includes spaces, "enclose it in quotes".
In addition to the macros defined by TiddlyWiki, giewiki adds a set of it's own, for various purposes.
This list of macros may not be complete, as plug-ins (like giewiki's youtube plugin) tend to define macros of their own.
!!!General purpose macros
|!macro name|!purpose|
|[[tiddler|Help on tiddler macro]]|Renders the text of a specified tiddler at the point where is is applied|
|[[gradient|Help on gradient macro]]|Renders text on a background of a gradient range of colors|
|[[slider|Help on slider macro]]|Produces a panel that slides open/closed when clicked|
|tabs|Create as set of tabs (such as the SideBarTabs)|
|[[image|Help on image macro]]|Lets you add an image left or right, filling a specified percentage of the story column width|
!!!Special purpose macros
|!macro name|!purpose|
|today|Formats and renders today's date using an optional format string parameters|
|version|Shows the version of TiddlyWiki being used|
|giewikiversion|Shows the version of giewiki that you are using|
|search|Displays a search box|
|tag|Creates a button that lists all the tiddlers with a specific tag|
|tags|Part of the tagging facility|
|tagging|Part of the tagging facility|
|timeline|Defines the button in the edit menu|
|allTags|Produces the list of tagged tiddlers in the index area on the right|
|list|Produces the top-level wrapper of of the index lists|
|closeAll|Makes a button for closing all tiddlers in the story column|
|permaview|Produces a button for representing the currently displayed tiddlers into the browser address bar|
|comments|Produces a toolbar for comment access and creation relative to the tiddler that contains it|
|option|Part of the options panel implementation|
|options|Part of the advanced options dialog implementation|
|newTiddler|Produces a button to allow creatin a new tiddler|
|newJournal|Similar to newTiddler, but inserting today's date for the title|
|message|Renders text retrieved from a named global variable|
|view|Renders a named field of the containing tiddler (used as part of the ViewTemplate)|
|edit|Creates an input box initialized with the contents of as specific tiddler (used as part of the EditTemplate)|
|tagChooser|Lets you pick existing tags to apply to a tiddler (used as part of the EditTemplate)|
|toolbar|Builds a row of command buttons such as the one above each tiddler|
!!!giewiki specific macros
|!macro name|!purpose|
|importTiddlers|The importTiddlers macro lets you easily import from ~TiddlyWiki or giewiki documents on the web or on this web site. Usage:<br> {{{<<importTiddlers URL>>}}}<br>substituting URL with the web address or filename of the library you want to use.|
</pre>
</tiddler>
<tiddler tags="help" title="Help on image macro" modified="20110613100819" modifier="giewiki" version="0"><pre>The image macro allows inserting images left or right of the surrounding text, or filling the width of the column. The syntax to put an image on the right is
{{{<<image filename > XX%>>}}}
whereas, to put an image on the left, you would write
{{{<<image filename < XX%>>}}}
Either way, insert the image macro before the text that you want to appear next to it, specify a percentage in place of //XX//, and in place of //filename//, put the name of a file you have previously uploaded. Beware that there is currently a filesize limit somewhat less than 1 MB on what you can upload to giewiki through the 'upload file' facility. The suggested workarounds are:
* To include large images, put them in the ''static'' subfolder (or a subfolder thereof) of your local giewiki folder prior to deploying the files to appspot.com - then, refer to them using the full path, e.g. /static/images/myimage.jpg
* Reduce the image size prior to uploading, using whatever software you may have for this purpose. One way is to use dropbox ( a free software/cloud service, that automatically puts your images out on the web and produces suitably reduced filesize versions that you can download).
To make the image fill the entire width of the story column, you need to include only the filename parameter.
In stead of just one filename, you may specify two, separated by a | character. The second filename (or URL) will be opened when the image is clicked.
Beware that the image macro is specific to giewiki; if you download the page as a TiddlyWiki, you will see an error message where the image macro is applied. If you were to use the [[TiddlyWiki-style|TiddlyWiki-style image markup]] {{{[img[filename]]}}} markup in stead (which is also supported), you would see either a broken link or the actual image, provided that you put it in the right place.
</pre>
</tiddler>
<tiddler tags="help" title="Help on gradient macro" modified="20101201100819" modifier="giewiki" version="0"><pre>The Gradient macro allows simple horizontal and vertical coloured gradient backgrounds. They are constructed from coloured HTML elements, and don't require any images to work.
The Gradient macro is an extended macro that processes the text after it up until the next '>>' sequence. For example,
{{{<<gradient vert #4400ff #44ff44 #ff0044>>gradient fill>>}}}
produces this:
<<gradient vert #4400ff #44ff44 #ff0044>>gradient fill>>
The first parameter can be ''vert'' or ''horiz'' to indicate the direction of the gradient. The following parameters are two or more colours (CSS RGB(r,g,b) format is also acceptable). The macro constructs a smooth linear gradient between each of the colours in turn.
Inline CSS definitions can be added to gradient fills like so:
{{{<<gradient horiz #000000 #660000 #aa2222>>color:#ffffff;font-size:14pt;text-align: center;Shadows And Light<br>Joni Mitchell, Jaco Pastorius, Don Alias, Pat Metheny, Michael Brecker (1979)
>>}}}
which produces:
<<gradient horiz #000000 #660000 #aa2222>>color:#ffffff;font-size:14pt;text-align: center;Shadows And Light<br>Joni Mitchell, Jaco Pastorius, Don Alias, Pat Metheny, Michael Brecker (1979)
>>
</pre>
</tiddler>
<tiddler tags="help" title="Help on tiddler macro" modified="20101201100819" modifier="giewiki" version="0"><pre>The tidder macro will insert the contents of another tiddler into the current tiddler; so typing "<<tiddler TiddlerTitle>>" will insert the contents of TiddlerTitle, into the current Tiddler. This is called [[transclusion]]. It is also sometimes called a "template" (not to be confused with TiddlyWiki's [[HTML Templates]] for page layout), especially if used with variables.
!!!Example
You have a tiddler called TiddlerOne, with the contents:
{{{This is Tiddler One!}}}
You create a second tiddler with the contents:
{{{This is Tiddler Two! Here's what it says on Tiddler One: "<<tiddler TiddlerOne>>"}}}
When you're done editing, this new tiddler will read:
This is Tiddler Two! Here's what it says on Tiddler One: "<<tiddler TiddlerOne>>"
!!!Example with variable
You can also add custom content to a transcluded tiddler with one or more variables (called $1, $2, $3, etc.).
In this example, TiddlerThree has the contents:
Hello! My name is $1.
You create a second tiddler, adding "with:", followed by the value of the variable. (If there's more than one variable, each value is separated by a space; values with spaces should be enclosed in quotes or double square brackets):
{{{<<tiddler TiddlerThree with:"Poul Staugaard">>}}}
When you're done editing, this new tiddler will read (//edit this tiddler to check that this is indeed what is happening here//):
<<tiddler TiddlerThree with:"Poul Staugaard">>
</pre></tiddler>
<tiddler tags="help" title="TiddlerThree" modified="20101201100819" modifier="giewiki" version="0"><pre> Hello! My name is $1.</pre></tiddler>
<tiddler tags="help" title="Help on slider macro" modified="20101201100819" modifier="giewiki" version="0"><pre>The slider macro allows embedding tiddlers within another tiddler, with the option to toggle the visibility of the [[transclusion|transcluded]] content:
{{{
<<slider cookie tiddler label tooltip>>
}}}
* {{{cookie}}}: variable to save the state of the slider (e.g. {{{chkFooSlider}}})
* {{{tiddler}}}: name of the tiddler to include in the slider
* {{{label}}}: title text of the slider
* {{{tooltip}}}: tooltip text of the slider
For example:
{{{
<<slider chkTestSlider [[OptionsPanel]] "Options" "Options panel">>
}}}
which produces this:
<<slider chkTestSlider [[OptionsPanel]] "Options" "Options panel">>
</pre></tiddler>
<tiddler tags="help" title="TiddlyWiki-style image markup" modified="20101201100819" modifier="giewiki" version="0"><pre>!Simple Images
{{{
[img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]
}}}
Displays as:
[img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]
!Tooltips for Images
{{{
[img[tooltip|http://wikitext.tiddlyspace.com/fractalveg.jpg]]
}}}
Displays as:
[img[tooltip|http://wikitext.tiddlyspace.com/fractalveg.jpg]]
!Image Links
{{{
[img[http://wikitext.tiddlyspace.com/fractalveg.jpg][http://www.flickr.com/photos/jermy/10134618/]]
}}}
Displays as:
[img[http://wikitext.tiddlyspace.com/fractalveg.jpg][http://www.flickr.com/photos/jermy/10134618/]]
!Floating Images with Text
{{{
[<img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]
}}}
[<img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]Displays as.
{{{
@@clear:both;display:block; @@
}}}
Will then clear the float.
@@clear:both;display:block;Like this@@
{{{
[>img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]
}}}
[>img[http://wikitext.tiddlyspace.com/fractalveg.jpg]]Displays as.@@clear:both;display:block; @@
!See Also
[[Help on image macro]]
</pre>
</tiddler>
</tiddlers>