[pmwiki-users] Markup for Compose?

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 13 11:34:29 CDT 2006

On Wed, Sep 13, 2006 at 12:19:06PM -0400, Stirling Westrup wrote:
> Sandy wrote:
> > Stirling Westrup wrote:
> >> I'm doing a survey of opinions here. Lately I've been thinking of
> >> writing a recipe that allows for character composition and definition of
> >> new character entities as one goes. I'm not sure what a reasonable
> >> markup would be. I'm tempted to use a backslash, but I fear it would
> >> interfere with existing markup. The idea would be to allow someone (like
> >> me) who occasionally writes in another language, but who doesn't have a
> >> keyboard that supports it, to insert accented and special characters in
> >> a simple way without cutting and pasting from a character map.
> >>
> > 
> > If you're willing to use the HTML special character listings by the w3c, 
> > then it's already part of the core.
> I'm not. Can you, without looking it up, remember what the official HTML
> entity name is for captial-C-with-cedila? 

It's "Ç".  (Yes, I remembered it without looking up the official
HTML entity name. :-)

The HTML entity names for the standard characters aren't *that* difficult, 
it's always the letter followed by one of "grave", "acute", "circ", 
"tilde", "uml", or "cedil".  And ligatures always end in "lig".

> Besides, there are many, many, many unicode code-points that aren't in
> the standard. This page I am working on in my wiki has a lot of them:
>   http://sti.pooq.com/Tech/UnicodeLineDrawing
> There is also the case that I would far rather type something like \ae
> (3 letters) than æ (7 letters) if I'm going to be typing it a lot.

This makes sense.  On the other hand, I'm not sure that a simple backslash 
will be "safe" -- somehow I worry there could eventually end up being
conflicts with other markups.

> > Given your example, I would expect ☃  to give the snowman, but 
> > either it doesn't, or my machine doesn't support it. 
> U-2603 is the unicode snowman character. Of course, you have to have a
> font installed that has that code point or you won't see anything.

☃ displays properly on my machine, but of course I tend to have
a rich font set on my computer.

> True, but its my frustration with dealing with this that has me wanting
> to create a recipe that makes it easier to work with special characters.

As a recipe this is probably okay.  I see both positives and negatives
to using replace-on-save for this...  a big positive for replace-on-save
is that if the recipe ever needs to be disabled for some reason, the
page contents will still have valid characters.  A negative is that, as
a recipe, the replace-on-save probably needs to replace the shortcut 
with the "&entity;" and/or "&#xxxx;" forms, which might be more difficult 
to read/edit.  Either that or it has to be smart about doing the replacements
in different character encodings (e.g., iso-8859-1 versus utf-8).


More information about the pmwiki-users mailing list