By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,369 Members | 1,188 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,369 IT Pros & Developers. It's quick & easy.

Help wanted with TeX/MathTran bookmarklet for math on web pages

P: n/a
If you care about mathematics on the web, this might be for you. I'm the
lead developer of MathTran, a web service that provides TeX for math
formulas as web service. Visit http://www.mathtran.org to get a sense of
what it can do.

My colleague Tim Hunt has written a really neat Javascript bookmarklet that
replaces
$$x^2 + y^2 = 1$$
on web page by an image
<img src="http://www.mathtran.org/ .... ">
that gives the rendered version of this equation.

I want help in developing it further, in part I don't have much experience
in writing Javascript. (It's possible that I can pay for help.) What I'm
wanting to develop is browser extensions, plugins or whatever that give
users a lot of help in displaying and writing mathematics.

If you're interested in this, please reply to this list, or email me
directly.

--
Jonathan Fine
The Open University, Milton Keynes, England
http://jonathanfine.wordpress.com
Mar 4 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Jonathan Fine" <J.****@open.ac.ukwrote
My colleague Tim Hunt has written a really neat Javascript bookmarklet
that
replaces
$$x^2 + y^2 = 1$$
on web page by an image
<img src="http://www.mathtran.org/ .... ">
that gives the rendered version of this equation.
Apologies: I did not give the URL for the bookmarklet.

http://www.mathtran.org/wiki/index.p...an_bookmarklet
--
Jonathan Fine
The Open University, Milton Keynes, England
http://jonathanfine.wordpress.com

Mar 4 '08 #2

P: n/a
Topic as subject:

I've made some progress, which is published at:

http://mathtran.cvs.sourceforge.net/....2&view=markup

Briefly, I've created a Javascript snippet that replaces
$$<formula>$$
by
<img src="http://www.mathtran.org/...<formula>">
I'm calling it 'doit', and clearly I also need an 'undoit' script.

According to Jess Ruderman, there's a 508 character limit on bookmarklets in
IE 6.0.

http://www.squarefree.com/2005/01/12...-bookmarklets/

The generate.py file above contains a transformation for compressing
Javascript code, which reduces Tim Hunt's original code from 660 bytes to
495 (phew!), which might be of independent interest.

For example, the compressor http://www.creativyst.com/Prod/3/ cuts it down
to 574 bytes (too big). I also looked at http://compressor.ebiene.de/, and
that cuts it down to 640 bytes.

--
Jonathan Fine
The Open University, Milton Keynes, England
http://jonathanfine.wordpress.com
Mar 6 '08 #3

P: n/a
Thomas 'PointedEars' Lahn wrote:
>read) on a third party website. For example, a web-mail site. The
'degradation' is that you get
$$x^2+y^=1$$
instead of a rendered version of this formula.

A screen reader such as DeskBot reads this as "dollar dollar x caret two
plus y caret equals one dollar dollar". One could only hope for a screen
reader to read "x^2" as "x squared" instead.

I suggest you find a format that degrades more gracefully.
I don't think there is one. Do you know of anything better than
TeX-encoding for this purpose?

If there was a web service that translated
x^2
into
x squared
then one could write Javascript that replaced
$$x^2$$
on the web page by
x squared
and perhaps bring benefits to user who use on audio rendering.
Your reply was not easily legible (see also the unchanged quotation above).
Please find ways to work around the flaws of your posting agent, or find
a better posting agent in the first place.
Thank you for this nudge. I'm now using Thunderbird.

--
Jonathan

Mar 11 '08 #4

P: n/a
Jonathan Fine wrote:
Thomas 'PointedEars' Lahn wrote:
>>read) on a third party website. For example, a web-mail site. The
'degradation' is that you get
$$x^2+y^=1$$
instead of a rendered version of this formula.
A screen reader such as DeskBot reads this as "dollar dollar x caret two
plus y caret equals one dollar dollar". One could only hope for a screen
reader to read "x^2" as "x squared" instead.

I suggest you find a format that degrades more gracefully.

I don't think there is one. Do you know of anything better than
TeX-encoding for this purpose?

If there was a web service that translated
x^2
into
x squared
then one could write Javascript that replaced
$$x^2$$
on the web page by
x squared
and perhaps bring benefits to user who use on audio rendering.
You could replace the dollar characters with something less obtrusive for a
start.
>Your reply was not easily legible (see also the unchanged quotation above).
Please find ways to work around the flaws of your posting agent, or find
a better posting agent in the first place.

Thank you for this nudge. I'm now using Thunderbird.
Thanks. You may not have found the Edit, Rewrap command yet. I found it
very convenient to add it as a button to the toolbar. You have to be
careful with postings that contain source code, though, for that will be
uglified ;-)
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Mar 11 '08 #5

P: n/a
Thomas 'PointedEars' Lahn wrote:
>If there was a web service that translated
x^2
into
x squared
then one could write Javascript that replaced
$$x^2$$
on the web page by
x squared
and perhaps bring benefits to user who use on audio rendering.

You could replace the dollar characters with something less obtrusive for a
start.
Continued off-list, in case you are interested.

--
Jonathan
Mar 13 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.