[pmwiki-users] Markup Expressions problem

Patrick R. Michaud pmichaud at pobox.com
Mon May 28 01:22:19 CDT 2007


On Mon, May 28, 2007 at 03:23:16PM +1000, Simon Wotherspoon wrote:
> Is it too late to beg for a change to the syntax for markup expressions?

It's a bit late, but possibly not too late.  It depends on what
we can come up with as an alternative solution.

> The new syntax for 
> markup expressions completely breaks this because the sequence "{(" 
> tends to occur all the time in latex  math syntax.  

Ouch.  You're correct, this is a problem.  However, note that it's
not the sequence "{(" that is a problem -- markup expressions are
triggered only when "{(" is immediately followed by an alphanumeric
character.  We could easily change this so that it's triggered only
when immediately followed by an alphabetic character.  With a fair
bit more effort we might be able to have it processed only if
immediately followed by a valid MarkupExpression function name,
leaving all other instances of {(<letter>...)} alone.

> The nicest solution 
> to allow ASCIIMathML and PmWiki to play together again would be to 
> change the syntax for markup expressions to a sequence that does not 
> readily occur in latex - perhaps something like "{:".

Well, while this would be "nice" for ASCIIMathML, it's not necessarily
so nice for the MarkupExpressions markup.  Something like "{:" doesn't
quite work because the colon isn't a bracketing character (one that
has a unique closing counterpart, and the syntax works a bit better with 
bracketing characters.  

There's also the problem that the MarkupExtensions recipe (which is
widely deployed) already uses the "{:" sequence, and that the colon
tends to have other meanings within PmWiki that wouldn't be entirely
consistent with using it for MarkupExpressions.

All of this isn't a "no, we can't change markup expressions", only 
that it's not immediately obvious what to change.

We could also see about having the math markup be processed before
markup expressions.  This would be likely work out okay, as long as
we don't want to use markup expressions to generate output to be
processed by the math markup.

> There is a recipe for incorporating ASCIIMathML into PmWiki, but it is 
> just much easier to include the ASCIIMathML javascript in your skin and 
> have all the action occur at the browser.

Have you seen the JsMath recipe?  It displays equations using a Javascript
plugin in the browser.

  http://www.pmwiki.org/wiki/Cookbook/JsMath

Pm



More information about the pmwiki-users mailing list