(See
AdminGuide for help on installation/configuration.)
In here, you can find help on
text-formatting directives and
tips.
Have fun!
This is a short summary of all directives, to get you up and
running (and editing) as soon as possible.
| @directive | (See 'Directives list' below.) Starts a multiline-block under control of directive. The '@' must appear in the leftmost column. There must be no text after the directive. |
| @ | Ends a multiline-block. The '@' must appear in the leftmost column. There must be no text after it. |
| %directive(text) | Inline directive. Applies to text only. |
| [topic] | (Explicit) link to topic. No implicit topic links exists. |
| [#section-title] | (Explicit) link to section-title within this topic. No implicit section-links exists. |
| [http://foo.bar/baz] | (Explicit) link to URL. No implicit URL links exist. |
| [http://foo.bar/baz|descr] | Explicitly named URL link (appears as descr). |
| + title | Heading 1 (biggest); '+' must occur in the leftmost column. |
| ++ title | Heading 2 (medium); '+' must occur in the leftmost column. |
| +++ title | Heading 3 (small); '+' must occur in the leftmost column. |
| * text | (Unordered) list item; '*' must occur in the leftmost column. |
| \char | Escapes special char char. |
| *text* | Output text bold. |
| _text_ | Output text slanted. |
| @pre | Preformatted text block. Output raw HTML block. |
| @code | Pretty-print sourcecode, Don't alter indent, escape HTML codes. |
| %inc(topic) | Inserted interpreted contents of topic at this point. |
| %color(text) | Colorize text, where color may be one of 'red', 'green', 'blue', 'pink', 'white', 'cyan', 'yellow'. |
| %img(URL) | Output image URL. |
A user creates and edits
topics, which contain text and
text-formatting directives that specify text layout - that's all.
A '
topic' is a wiki page about one well-defined subject; it contains
text about the subject, and references to related topics as well as
external links.
In
MicKI, a topic is created the first time someone requests it.
Nonexistent topics are shown in
red, while existing ones are
shown in friendly
green.
Thus, if you create a link to new (non-existent) topic, a new topic with
default contents will be created and shown. You can then edit it to
your liking; the next time someone requests it, it will already exist,
and the new contents will be shown.
There is
no way to delete existing topics. I will have to
rethink this; right now I don't see a need to - they will just bleed
to death, no harm done.
When
MicKI is started without an argument (e.g. on first run), it checks
whether an
initial topic named '
Home' exists.
This is no different
from other topics, with the exception that it is the default in case no
topic was specified (e.g. when
MicKI was called as
'http://foo.bar/cgi-bin/micki', thus, without topic argument).
Apart from normal topics (corresponding to disk files), there are
also a number of
internal topics built into the
MicKI engine, such
as this help page.
You can access internal topics from the menu bar at the top of the page,
or at every section title.
Available internal topics are:
- edit (choose 'Edit' from the menu)
- printer-friendly rendering (choose 'Print' from the menu)
- topic list (choose 'Topics' from the menu)
- user guide (choose 'Help!' from the menu - you are reading it now)
- admin guide (choose 'Help!', and then click the 'AdminGuide' link near the top)
Note, however, that internal topics are
basically no different
(with some exceptions ;-) than normal topics; they are just built
into the engine.
As with any proper wiki, text-formatting directives were chosen to be
minimal yet complete, and be easy to 'read through' when editing a
topic-page.
MicKI-directives can be divided into
- inline directives
- single-line directives
- multi-line directives
All three directive-groups are discussed hereafter.
Inline directives are used to perform an operation 'inline',
e.g. including another topic on the spot, or pretty-printing some
text.
Some inline directives look like normal text, while others require a
little more syntax, and are of this form:
... %<directive>(<text>) ...
where '
directive' is a directive name, such as '
inc', and
'
text' is the directive
argument.
Depending on the directive in question, this argument can be a
filename, topic name, or a normal text string, and may or may not be
formatted.
Inline directives of this form
may not be nested (yet).
All inline directives are discussed in detail hereafter.
The pretty-printing (or
purrdey-printing, if you will) directives
have only one purpose, and that is to decorate your text.
All these purrdey-printing directives are listed below.
The
Bold-directive is used as follows:
... this is *bold* text! ...
resulting in something like this:
... this is bold text! ...
For this to work, the opening '*'...
- can't occur at leftmost column (else it would be a list item)
- must occur at a start-of-word.
For example, this...
Here are *multiple bold words*, how nice!
... works, and produces
Here are multiple bold words, how nice!
while this...
Oops, these *'quoted words'* are not shown in bold! :-(
...does not. However you can use
Ahh, _these_ '*quoted words*' seem to work after all! :-)
to produce
Ahh, these 'quoted words' seem to work after all! :-)
Of course, this doesn't work either:
Hmmm, why doesn't the * bold * function work anymore..?
One more thing: a bold sequence
can't span multiple lines.
This is very similar to the
bold-functionality above, and
produces slanted text; for example, this...
Michai, did you _really really really_ mean that?!
...will produce something like this:
Michai, did you really really really mean that?!
Furthermore, the same restrictions from the
bold-functionality apply here.
These last 2 directives can be combined, if you take care to
have each directive start at a
start-of-word (!): this...
This is not _*bold italic*_ at all! Your wiki %red(sucks)!
doesn't work as expected, and produces this:
This is not _bold italic_ at all! Your wiki sucks!
but this...
I'm _really, *really*, really_ sorry Michai, your wiki is really neat.
works after all:
I'm really, really, really sorry Michai, your wiki is really neat.
Colors are
Super Duper Nice! To specify colors,
use one of the following directives:
- %red()
- %green()
- %blue()
- %pink()
- %white()
- %yellow()
- %cyan()
For example, this...
Arr! I'm a-turnin' %red(red hot) with rage, ye sissy %yellow(*yellow*-belly)!!!
...will produce something like this:
Arr! I'm a-turnin' red hot with rage, ye sissy yellow-belly!!!
(As you can see, simple formatting directives such as
bold and
italic
can be applied to the directive-argument; in the previous example, the
word 'yellow' was printed in bold.)
Please take in mind that the color-directives
don't span multiple lines,
and that you should use pirate-lingo only when alone, and even then,
with care.
To use
pīnyīn (romanized Chinese) characters, type...
- '!', followed by...
- the vowel in question (use "u:" for the u-with-dots), followed by...
- the tone mark (a digit from 1 to 4)
That's all. For example, this...
would result in...
Nǐ hǎo ma?
Another example (illustrating the "u-with-dots"):
would produce...
Nǚ
A test-matrix to see if your browser supports all pīnyīn characters:
| tone: | 1 | 2 | 3 | 4 |
| a: | ā | á | ǎ | à |
| e: | ē | é | ě | è |
| o: | ō | ó | ǒ | ò |
| i: | ī | í | ǐ | ì |
| u: | ū | ú | ǔ | ù |
| tone: | (toneless) | 1 | 2 | 3 | 4 |
| u-with-dots: | ü | ǖ | ǘ | ǚ | ǜ |
Links in this context are simply references to other topics, or to
external URLs. Each of these links are described below.
Section links refer to a section within the current topic. A section
link works as follows:
Next up: [#Topic links], which are also nice. (And here is a [#non-existent section name].)
which would give you:
Some words of wisdom and/or warning:
- there is no error checking whether the section in question actually exists.
- in the link definition, you must type the exact title of the section you want to refer to; click the 'non-existent section name' link above, to see what happens otherwise - probably nothing. :-)
- the TOC-entries use a different anchor scheme, using sequence numbers. Therefore, you should not just copy/paste the link from the (rendered) TOC as the browser sees it - it will work, but link targets are volatile. Copy/paste the section title instead, while editing the topic.
Topic links refer to other topics within the wiki web. You can create
a topic link like this:
This is a link to [TheTopic] somewhere in this wiki.
resulting in this:
This is a link to
TheTopic somewhere in this wiki.
If this is the first time you see this help page, the topic link
is probably
red, indicating the topic does not (yet) exist.
Clicking on the link will create the topic, so that the next time
you see it, it would be
green instead, like this:
This is a link to the
Home topic, which does exist.
Topic links, as opposed to
URL links, described hereafter, can't
carry an additional description - that is, a topic-link always looks
like the topic name (which is good).
URL links are, surprise, links to external URLs. They can occur
in 2 forms, the first of which is like this:
This is a link to [http://foo.bar] which is elsewhere.
and will result in something like this:
The second form is
with additional description, and is used
like this:
Apply brain, or [http://foo.bar/manual.html|RTFM].
which will result in
Note that
URL links are always displayed in
green.
One of the
nicer things in
MicKI is that you can
inline topics.
What does that mean?
Consider a normal topic link:
(The '
HelpTestTopic' topic is an internal topic, just for the
sake of example. Try clicking it now, and note its contents.)
What happens here, is that
MicKI generates a link to the
'HelpTestTopic' topic, without displaying the actual 'HelpTestTopic'
contents itself (of course).
Instead, you can also
inline a topic, which means that the
topic contents, rather than the link to the topic, are generated;
use
Before... %inc(HelpTestTopic) ...after!
to generate this:
Before... This is HelpTestTopic contents!
...after!
As you can see, the 'HelpTestTopic'
contents are generated inline.
Not just that, but they are generated just like every topic would,
meaning that directives are expanded and all.
And yes, it
is still possible to make
circular references and
hang your server process :-)
I guess it's no surprise that you can inline
pictures as well:
Behold, a %img(http://mircad.com/pic/nl_flag.png) (dutch) flag.
will result in
Behold, a
![[image]](http://mircad.com/pic/nl_flag.png)
(dutch) flag.
(The picture there is indeed from another site.)
Specify
img-argument either like above (external image)
or like this:
And here is a %img(foobar.png) local image.
(Note that this is not actually shown here, since I can't
rely on you having access to the
foobar.png(tm) picture!)
Local images are located relative to the
IMGROOT path. (See
the
AdminGuide for more info.)
Sometimes you don't want normal directives' actions to kick in.
For example,...
You can use ( *pChar == 'a' ) to see whether ...
will result in
You can use (
Non-terminated sequence: "pChar == 'a' ) to see whether ...
"
pChar == 'a' ) to see whether ...
...and you really don't want that. (Yes, an
error, call the
press.)
In such cases, you can use the '\' character to escape relevant
directive characters, like this:
Ok, _now_ you can use ( \*pChar == 'a' ) :-)
resulting in
Ok, now you can use ( *pChar == 'a' ) :-)
Use of the '\' char is pretty obvious and not further documented;
use your intuition, e.g.
... and finally, \%inc(foobar) is an _include_-directive.
will inhibit directive-action, resulting in
... and finally, %inc(foobar) is an include-directive.
Single-line directives operate on one whole line. That is, they
occur at the start of a line (as opposed to
inline directives),
and determine the fate of the whole line, so to say.
All single-line directives are discussed below.
(Sub)
section titles are always on a separate line by themselves,
and have the following form:
+++++ Advanced Mathematical Equations of the Sea Turtle
...which would result in a subsection title. You can see plenty
of those already on this page, so there isn't one output now.
The number of '+' characters indicates the nesting level; 1 '+'
means
page-nesting (as in, outermost nesting level), and
nesting levels range from 1 to 6, where 6 is a
sub-sub-sub-sub-subsection.
The previous example had nesting level 5 (since there were 5
'+' characters).
Above each topic-page, there's a
table of contents displayed,
provided there were at least 2 sections on that page. You can
click on the an entry in the
table of contents, to bring you
to the appropriate (sub)section on the page.
To generate an unordered list of items, use something like this:
The trout...
* are very valuable
* are immensely powerful
* have underwater weapons
which will result in...
The trout...
- are very valuable
- are immensely powerful
- have underwater weapons
(Unfortunately I cannot nest
Multi-line-directives yet, so no
box around the list there ;-)
The '*' characters must occur in the leftmost column. There may
or may not be text directly above the 1st item, like in above example.
To generate a table of cells, use something like...
| all | your | base |
| what | you | say! |
to produce...
| all | your | base |
| what | you | say! |
(Same as with
unordered list, above: I can't put this in a
box yet :-)
The '|' chars must occur in the leftmost column, and there must be a '|'
character at the end of each cell as well.
You can also indicate
special cells (e.g. row- or column-descriptions),
using a '#' immediately following the cell border ('|'), like this:
| *animals* |# land |# sea |
|# small | mouse | shrimp |
|# big | elephant | whale |
This would give something like...
| animals | land | sea |
| small | mouse | shrimp |
| big | elephant | whale |
(The '
land' and '
sea' column-descriptions as well as '
small' and
'
big' row-descriptions have a '#' as 1st cell character, so those
cells stand out from the rest.)
As you can see, cell contents may contain text-formatting directives,
and are processed just as normal topic contents.
A table cell may not be empty. There is no support for row-/colspan.
There is no support for tables within tables.
Resistance is futile.
Watchen das blinkenlichten.
Multi-line-directives specify that a whole block, from
start-
to
end-marker, are subject to some operation. A multi-line
directive is of the form
@<directive>
here is text...
...and here is some more text!
@
(where '
directive' is a single keyword)
The '@' character must occur at the leftmost column. All multi-line
directives are discussed below.
Sometimes you want to maintain the exact layout of a block of
text. To do so, use something like this:
@pre
/\ ^o^
/ \ ^o^
/ \
/+----+\
| |
| |
+----+
@
resulting in this lovely ascii art:
/\ ^o^
/ \ ^o^
/ \
/+----+\
| |
| |
+----+
Note that these 2 look almost the same, except for the '@pre...@'
directive.
It will be no surprise that all the blocks describing
literal syntax in the previous examples, were made out of these
preformatted text blocks.
Code blocks are very similar to
preformatted text blocks,
except that they contain line numbers, and -
in some distant future - may handle syntax hilighting.
Use code blocks like this:
@code
char *tu_vfmt( const char *pFmt, va_list vl )
{
int N = vsnprintf( NULL, 0, pFmt, vl );
char *p = malloc( N + 1 );
vsnprintf( p, ( N + 1 ), pFmt, vl );
return p;
}
@
to produce something like this:
1 : char *tu_vfmt( const char *pFmt, va_list vl )
2 : {
3 : int N = vsnprintf( NULL, 0, pFmt, vl );
4 : char *p = malloc( N + 1 );
5 : vsnprintf( p, ( N + 1 ), pFmt, vl );
6 :
7 : return p;
8 : }
Note that I mainly use this for C, Perl and shellcode, but the
choice of '@' as directive start-/end-markers may be very
inconvenient for
your favourite programming language.
What I call
Boxed text, is just topic-content in a box.
Almost
everything that can be in a topic, will look the same when in a
box.
...'
Almost' everything, since you can't have
- (sub)sections,
- unordered lists, and
- nested multi-line directives
This is
mainly due to the
anonymous multi-line directive
end-marker ('@'), and
partly because I am too lazy to make it
better :-)
As an illustration of a boxed text, consider this example:
@box
The dutch %img(http://mircad.com/pic/nl_flag.png) flag has
the colors %red(red), %yellow(*white*) and %blue(blue), and
is the *most beautiful* flag in the world.
Here is another commonly %img(http://mircad.com/pic/en_flag.png)
used flag, and a link to the [HelpTestTopic].
@
which will result in...
The dutch
![[image]](http://mircad.com/pic/nl_flag.png)
flag has
the colors
red,
white and
blue, and
is the
most beautiful flag in the world.
Here is another commonly
![[image]](http://mircad.com/pic/uk_flag.png)
used flag, and a link to the
HelpTestTopic.
So,
boxed text can be used to
emphasize topic content,
without losing the power of directives (as opposed to using the
preformatted text and
code directives).
The above is all you need to know to be able to use
MicKI, however,
below are some tips to make life a bit more pleasant.
MicKI uses the concept '
everything is a topic', which makes a lot of
things very simple.
That is, it's merely a guideline, but things
can
be simpler if users stick to this idea :-) Directives were chosen to
promote this.
An example: you may have a datasheet about some electronics component,
or an image of a relative somewhere, stored under a filename. You would
probably want to refer to them as '
NiceDatasheet' and '
MySister'
rather than '
http://some.where/obscure/path/foobar.pdf' and
'
family/2004/IMG1234.JPG', right?
Using the '%inc()'-directive, one can
inline topic contents in
another topic. This feature is quite powerful; you can make a topic
like this:
[http://some.where/obscure/path/IC-1234.pdf|IC-1234 datasheet]
(or [http://my.own.box/stuff/ic1234.pdf|local copy])
and name the topic 'DatasheetIC1234'. That way, you can
use one fixed reference all over the place, by
inlining your
'reference'-topic, like this:
See %inc(DatasheetIC1234) for details.
which will result in something like...
As for the family example, you can make a topic like this:
[Family] members ([Sister], [Brother], [Dad], [Mom])
...and name it 'FamilyMembers'. It could be used like this:
Ask my %inc(FamilyMembers), because they know best!
resulting in...
Nice eh? :-)
Avoid duplication of volatile information, like the
man said.