Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Jonathan Fine
Guest
 
Posts: n/a
#1: Mar 4 '08
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



Jonathan Fine
Guest
 
Posts: n/a
#2: Mar 4 '08

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


"Jonathan Fine" <J.Fine@open.ac.ukwrote
Quote:
My colleague Tim Hunt has written a really neat Javascript bookmarklet
that
Quote:
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



Jonathan Fine
Guest
 
Posts: n/a
#3: Mar 6 '08

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


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


Jonathan Fine
Guest
 
Posts: n/a
#4: Mar 11 '08

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


Thomas 'PointedEars' Lahn wrote:
Quote:
Quote:
>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.
Quote:
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

Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#5: Mar 11 '08

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


Jonathan Fine wrote:
Quote:
Thomas 'PointedEars' Lahn wrote:
Quote:
Quote:
>>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.
Quote:
Quote:
>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
Jonathan Fine
Guest
 
Posts: n/a
#6: Mar 13 '08

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


Thomas 'PointedEars' Lahn wrote:
Quote:
Quote:
>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
Closed Thread