On 13.01.2013 02:02, Lee Worden wrote:
> Yes, I think ContentHandler does some of what WW does, and I'll be happy to
> integrate with it.  I don't think we'll want to abandon the source-file tag,
> though, because on pages like
> http://lalashan.mcmaster.ca/theobio/math/index.php/Nomogram and
> http://lalashan.mcmaster.ca/theobio/worden/index.php/Selection_Gradients/MacLev,
> it's good to be able to intertwine source code with the rest of the page's
> wikitext.

ContentHandler does not yet have good support for inclusion - currently, there's
just Content::getWikitextForInclusion(), which is annoying. It would be much
nicer if we had Content::getHTMLForInclusion(). That would allow us to
transclude any kind of content anywhere.

That would mean taht instead of <source-file>Foo.tex</source-file>, you could
just use {{:Foo.tex}} to transclude Foo.tex's content. Actually, you could
implement getWikitextForInclusion() to return
<source-file>Foo.tex</source-file>, I guess - but that's cheating ;)

> Also, in a multi-file project, for instance a simple LaTeX project with a .tex
> file and a .bib file, it's useful to put the files on a single page so you can
> edit and preview them for a while before saving.

That would not change when using the ContentHandler: You would have one page for
the .tex file, one for the .bib file, etc. The difference is that MediaWiki will
know about the different types of content, so it can provide different rendering
methods (syntax highlighted source or html output, as you like), different
editing methods (input forms for bibtext entries?).

Basically, you no longer need nasty hacks to work around MediaWiki's assumption
that pages contain wikitext, because that assumption was removed in 1.21.

-- daniel


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to