473,508 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
5 1375
"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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1895
by: Martin | last post by:
I've found examples of bookmarklets that select a URL from a page at random, but I'd like one that generates part of the URL at random. If you have a bunch of images that are named:...
1
1261
by: Michael Hamm | last post by:
Here's a neat bookmarklet for putting tooltips on links. I got the idea a long time ago somewhere and made it much better than it started out. ...
1
1864
by: Kim Scarborough | last post by:
I found this bookmarklet that will go to a random link on the currently open page: javascript:void(location.href=document.links) Could this be changed to go to a random link from the bookmarks...
2
2236
by: Jesper Rønn-Jensen | last post by:
Hi everybody. I just created a bookmarklet that can view, add and edit cookies. Feel free to use it, if you like. And please share any modifications you make. I had a hard time figuring out...
2
2666
by: Smugsboy | last post by:
Hi, Got a problem here. I'm trying to create a bookmarklet on IE6, that passes the outerHTML of the body element as a GET param my site. The problem is that for some page (ie mail.yahoo.com) the...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
25
2558
by: bweaverusenet | last post by:
Hi. I am trying to get some javascript to work in IE6, from the address line. It works in Firefox and, I believe, IE7. It appears that with some number of nested structures, the code does not...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.