***Custom Markup Cookbook***
This is just a rough idea of things that can be done via the custom markup
functionality of #301, #405 and #417. It'll be a work in progress.
**HTML Markup Shortcuts**
Rather than having to do things like {quote:text}, you
can define markups as shortcuts (the HTML would go in the custom formatter
section):
*: {quote:{big: big text}} using {quote:%k %a}
*: {quote:{small: small text}} using {quote:%k %a}
*: {quote:{strike: striked text}} using {quote:%k %a}
**Emulating Other Wikis**
Many other Wiki styles implement something like [wiki:page description]. This
can be easily done with a {quote:{wiki: page description}} markup using as a
formatter {quote:%a}.
This can also be combined with an {quote:{anchor: name}} markup (which just
formats as {quote:}) to link to different parts of a wiki page.
That is, {quote:{wiki: page#anchorname}} would cause the browser to skip right
to the {quote:{anchor:anchorname}} markup in the given _page_.
Some wikis implement "verbatim" blocks. This can easily be done with a Block
markup, {quote:{verbatim}} which uses the following formatter:
%b
To start a block, you'd use {quote:{verbatim}} and to close it,
{quote:{endverbatim}}.
By itself, this doesn't buy you much beyond the default CVSTrac verbatim blocks
(besides not having to indent large tracts), but you can adjust the HTML output
to do things like add a contrasting background:
.
%b
Or, if you wanted indentation too:
%b |
`/usr/bin/co -q -p $FILE,v 2>/dev/null`END The really interesting markup happens when you start to interact with the SQLite database, allowing for things like custom reports and whatnot. The following script can be used to define a {quote:{wikitoc}} markup using {quote: /path/to/wikitoc '%r/%n'}: #!/bin/sh for p in `sqlite $1.db 'SELECT name FROM wiki GROUP BY name ORDER BY name;'` do echo "$p
This is a test of Ticket... THEY DO NOT GIVE to IMPORTANCE and eliminenla HIM:d I add a line to the description: I add a new mark----------------- We use {quote: "translate.pl %k %a"} as a formatter with the following script: #!/usr/bin/perl use Lingua::Translate; my $x = Lingua::Translate->new(src => $ARGV[0], dest => $ARGV[1]); my $from = join("",
\n"; print $x->translate($from); print "\n\n";