Markdown and Mathematics

John Gruber gruber at fedora.net
Wed Apr 7 13:39:56 EDT 2004


Michel Fortin <michel.fortin at michelf.com> wrote on 04/04/04 at 10:21a:

> I took the simple bracket syntax `{ x }` and made an experimental 
> version of Markdown using mimetex. You can try on my dingus page. 
> Choose "PHP Markdown Math" form the filter box and you're in!
> 
> <http://www.michelf.com/php-markdown/>

Neat.


> So, is latex a good choice?

I don't know and can't say, because I don't write math.


> Is the curly braket syntax dangerous?

Yes.


> Hum, just before hitting send I remember John saying he wants to keep 
> these curly brackets for class and id assignments.

Exactly.


> What is the best way of doing this? I would like to know what
> everyone thinks and especially what John Gruber has to say on the
> subject.

The math stuff doesn't belong in Markdown itself. Maybe, possibly,
perhaps, Markdown could support superscripts using something like
`x^2`, but not something as complex as full-blown math markup.
(Michel, I'm guessing you agree with this.)

The issue here is not Markdown and Mathematics. It's Markdown and
expansion. What's needed, and I've thought about this for a while,
is a generic escape sequence for expansion.

For the sake of discussion, let's say `{$` and `$}`, as Michel
suggested. (Just plain `{` and `}` are not enough; the expansion
delimiters need to be something that isn't likely to appear
normally.)

What I'm suggesting is that Markdown, by itself, simply define one
set of delimiters, and that anything appearing between those
delimiters would be ignored.

That would mean that custom expansions could be built on top of
Markdown, with the custom bits going inside those delimiters. You
might write "Markdown Plus Math". Someone else might write "Markdown
Plus Foo." The point is, you wouldn't have to rewrite the core
Markdown parts; just the Foo, which users would include between the
`{$` and `$}` delimiters.

So, I think the question is, what should those delimiters be?

-J.G.


More information about the Markdown-discuss mailing list