id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
160	Formatter for Superscript / Subscript	NilsLindenberg	unassigned	"== Superscript and subscript (<sup>/<sub>) ==
''(text higher or lower in the line than normal)''

There are only simple changes needed to add wikka-formatters for superscript and subscript text; the bigger problem is the markup:

Nils:
  * for superscript: {{{^^}}}
  * for subscript: {{{vv}}} (would be logical, but perhaps problematic?) 

BlueNode:
/\superscript/\ (forwardslash,backslash)
\/subscript\/ (backslash,forwardslash)

Javawoman:
Or what about two commas {{{,,}}} for subscript?


== Code Changes ==

Anyway, changes necessary to '''formatters/wakka.php''':
add to the list of static variables (after trigger_center = 0;)

{{{
        static $trigger_sup = 0;
        static $trigger_sub = 0;
}}}

add after if ($trigger_bold % 2) echo('</strong>');

{{{
            if ($trigger_sup % 2) echo '</sup>';
            if ($trigger_sub % 2) echo '</sub>';
}}}

change the long line a little below to:

{{{
            $trigger_bold = $trigger_center = $trigger_floatl = $trigger_inserted = $trigger_deleted = $trigger_italic = $trigger_keys = $trigger_sup = $trigger_sub = 0;

}}}

add after the //center block:

{{{
        // higher text
        else if ($thing == "" "") // enter the markup 
        {
            return (++$trigger_sup % 2 ? ""<sup>"" : ""</sup>"");
        }
        // lowered text
        else if ($thing == ""  "") // enter the markup 
        {
            return (++$trigger_sub % 2 ? ""<sub>"" : ""</sub>"");
        }
}}}


and finally the line with #Wiki Markup (near the end) needs to have the markup, too:
(example with {{{^^}}} and {{{vv}}})
    
{{{
""\*\*|\'\'|\#\#|\#\%|@@|::c::|\>\>|\<\<|&pound;&pound;|&yen;&yen;|\v\v|\^\^|\+\+|__|<|>|\/\/|"".    # Wiki markup
}}}

Ref: [http://wikkawiki.org/WantedFormatters]"	enhancement	new	low	2.0	formatters	1.1.6.1	minor		superscript subscript formatter	
