Opened 16 years ago
Last modified 9 years ago
#7690 new enhancement
Add doctype supporting mathml
Reported by: | Tim Kerby | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | rendering | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
I've been trying to add support for mathml in the Trac wiki. We work on the development of algorithms for imaging and the inclusion of equations into tickets and the wiki would be extremely useful.
I think that we can do this by using the commands to embed html into the wiki markup then cutting and pasting mathml from an editor. The issue is that genshi doesnt support a suitable doctype and there is also no way of setting the doctype on a per project basis
Ideally, I would like the following definition to be available so that math code can be pasted into the wiki
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ]>
Attachments (0)
Change History (9)
comment:1 by , 16 years ago
follow-up: 3 comment:2 by , 16 years ago
Of course, I doubt MathML works in IE6, so that's probably not a concern ;) Not sure about changing the doctype declaration, but you can use a simple request filter to set the content type on all requests (or at least the relevant ones) to application/xhtml+xml
.
comment:3 by , 16 years ago
Replying to ebray:
Of course, I doubt MathML works in IE6, so that's probably not a concern ;)
It could be, if the request is to include such a change in Trac Core - if Trac had to send application/xhtml+xml
for instance.
comment:4 by , 16 years ago
Milestone: | → 0.13 |
---|---|
Owner: | set to |
Equations in wiki pages would be nice, SVG too. I'd like to look into this, unless somebody beats me to it.
comment:5 by , 16 years ago
Maybe it'd be a better idea to give plugins the necessary hooks to do a doctype or mime type change. I wouldn't want that kind of doctype if I don't intend to use SVG or MathML.
comment:6 by , 15 years ago
Apart from being able to change the mimetype of the document, simply forget IE <8, please. Force users to upgrade.
comment:9 by , 9 years ago
Priority: | high → normal |
---|
Workarounds available: http://trac-hacks.org/tags/math?wiki=on
Maybe you can do this with the site-template.html customization file.
However, I don't think (to be checked) that redefining the doctype would suffice:
the HTTP
Content-Type
header would probably need to be changed as well:Trac returns
text/html
, whereasapplication/xhtml+xml
would be required to properly parse MathML document.The trouble is that this kind of Content-Type document does not work with older browsers, such as IE6, AFAIR.
For example, the RevtreePlugin returns
application/xhtml+xml
content type, as it needs to embed SVG code into the XML stream:but this breaks IE6 (at least)