***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.
To get a list of the custom markups available on any particular server, just
include the {quote:{markups}} markup in any Wiki page.
**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**
Some wikis implement "verbatim" blocks. This can easily be done with a Block
markup, {quote:{verbatim}} which uses the following formatter:
%bTo 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:
. %bOr, if you wanted indentation too:
%b |
%b(I'm afraid not. The first (original) example won't work, either. See #724. The HTML filters strips out the =STYLE= attribute (spammers like to embed stuff in wikis with explicit style attributes having a =display:none;=), so you'd actually have to use something like =CLASS="indented"= and augment the CVSTrac style sheet, or you'd need to do the markup via an external program which can be tagged as "trusted"-- cpb) **CVSTrac Shortcuts** Want a link into the CVS repository without a cumbersome URL? {quote:{getfile cvstrac/main.c}} with @ \ }else{ @
`/usr/bin/co -q -p $FILE,v 2>/dev/null`
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----------------- Well, it's enough to get the idea. 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";