One (least work) option would be to name the page Turoa, and add (:title T#363;roa:) to the page text. You would want to use [[Turoa |+]] when linking to the page.
JR
_______________________________________________ pmwiki-devel mailing list pmwiki...@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
Interesting; I did not know that.
A markup rule that translates [[!Turoa|+]] into
[[Category.Turoa|+]] might work, although category markup uses a
special categorylink class in the <a> link generated. Or you
could introduce a local category markup rule just for this
purpose, for example so that [[!T`uroa]] is turned into
[[Category.Turoa|T#363;roa]] (ie look for "`[aeiouAEIOU]" inside
category link markup, then process as a category link). The rule
would have to fully process the link markup, as it needs to use
the category link format, with the correct class attribute.
A bit more investigation is needed, I think.
JR
There is a targeted local customisation which I think will work. In local/config.php the site could over-ride the default treatment of [[!Category]] markup. Try the following code:
$LongVowels = array (
'A' => 'Ā',
'a' => 'ā',
'E' => 'Ē',
'e' => 'ē',
'I' => 'Ī',
'i' => 'ī',
'O' => 'Ō',
'o' => 'ō',
'U' => 'Ū',
'u' => 'ū');
function MacronHelper($match) {
global $LongVowels;
return $LongVowels[$match[1]];
}
Markup('[[!','<[[','/\\[\\[!(.*?)\\]\\]/',
function ($m) use(&$pagename) {
$text = preg_replace_callback('/\{([AEIOUaeiou])\}/',
"MacronHelper", $m[1]);
return Keep(MakeLink($pagename,
$GLOBALS['CategoryGroup'].'/'.$m[1], $text, '',
$GLOBALS['LinkCategoryFmt']), 'L')
} );
With this code, writing [[!T{u}roa]] should create a link to page
Category.Turoa with the link text Tūroa. Links to
categories without long vowels, such as [[!Akaroa]] should
continue to work.
The {a} {e} {i} {o} {u} markup will only work inside category markup. A more general solution which would work anywhere in the text would need a further markup rule.
Hope this helps.
JR