Edgewall Software
Modify

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 Christian Boos)

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 Emmanuel Blot, 16 years ago

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, whereas application/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:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
  "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> 

but this breaks IE6 (at least)

comment:2 by ebray, 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.

in reply to:  2 comment:3 by Emmanuel Blot, 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 Remy Blank, 16 years ago

Milestone: 0.13
Owner: set to Remy Blank

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 anonymous, 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 Carsten Klein <carsten.klein@…>, 15 years ago

Apart from being able to change the mimetype of the document, simply forget IE <8, please. Force users to upgrade.

comment:7 by Christian Boos, 14 years ago

Description: modified (diff)

#9194 was closed as duplicate.

comment:8 by Remy Blank, 13 years ago

Owner: Remy Blank removed

Refocusing.

comment:9 by figaro, 9 years ago

Priority: highnormal
Last edited 9 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.