[pmwiki-users] capital first letters
Joachim Durchholz
jo at durchholz.org
Thu Jun 30 06:07:11 CDT 2005
Hans wrote:
> I like to style first letters of a paragraph, but only if they are
> Capitals. How can I do this?
Not with HTML and CSS alone. You'd make 'capital letter at paragraph
start' into a markup, maybe with the following Markup() call:
Markup ('initial-caps',
'inline',
'/^[:upper:]/e',
'Keep(\'<span style="your-style-goes-here">\') . \'$0\' .
Keep(\'</span>\')');
(Sorry for the word wrap, my mail program won't allow a longer line here.)
No guarantees for:
* The 'inline' line (another place in the markup sequence might be
preferrable).
* The replacement string (it might have backslashes or quotes in the
wrong places).
You will probably want to use a <span class=...> instead of a <span
style=...>, since that would allow you to influence the formatting from
the CSS file.
Regards,
Jo
More information about the pmwiki-users
mailing list