Latex using the Google Chart API as used in Google Knol: is there any documentation on this?

325 views
Skip to first unread message

ahab

unread,
Aug 12, 2009, 2:40:59 PM8/12/09
to Google Chart API
E.g.
<img alt="S=\frac{a_1.(r^n-1)}{r-1}" eeimg="1" src="http://
chart.apis.google.com/chart?
cht=tx&amp;chs=1x0&amp;chf=bg,s,FFFFFF00&amp;chco=000000&amp;chl=S%3D
%5Cfrac%7Ba_1.(r%5En-1)%7D%7Br-1%7D" style="vertical-align:middle">

I.e. the raw URL:
http://chart.apis.google.com/chart?cht=tx&chs=1x0&chf=bg,s,FFFFFF00&;chco=000000&chl=S%3D%5Cfrac%7Ba_1.(r%5En-1)%7D%7Br-1%7D

With cht=tx (TeX?)
and alt="S=\frac{a_1.(r^n-1)}{r-1}" is equivalent to chl=S%3D%5Cfrac
%7Ba_1.(r%5En-1)%7D%7Br-1%7D

Jonathan Fine

unread,
Aug 12, 2009, 3:40:23 PM8/12/09
to google-c...@googlegroups.com

You might want to look at
http://www.mathtran.org/wiki/index.php/Web_service
which has, since 2007, been making TeX typeset formulas available as a
public service.

(I'm the main developer of MathTran.)

Google's service doesn't seem to be using TeX for typesetting: compare
http://chart.apis.google.com/chart?cht=tx&chl=%201%20\left\langle%20ddd%20\right\rangle%202
http://www.mathtran.org/cgi-bin/mathtran?D=5;tex=%201%20\left\langle%20ddd%20\right\rangle%202

If anyone from Google is listening: I'd rather you contributed to
MathTran than wrote your own pseudo-TeX. And you'll find it easier in
the long run.


--
Jonathan

ahab

unread,
Aug 13, 2009, 6:30:39 AM8/13/09
to Google Chart API
Jonathan thank you for your feedback.
It looks like the Google Chart API supports a bit the same (La)TeX
syntax as your application does, with as at least one difference that
\displaystyle seems to be the default display mode for Google Chart
and can be omitted
Compare:
http://chart.apis.google.com/chart?cht=tx&chl=\sum_1^\infty\frac{1}{n^2}
with
http://www.mathtran.org/cgi-bin/mathtran?tex=\displaystyle\sum_1^\infty\frac{1}{n^2}

But also (showing another difference):
http://chart.apis.google.com/chart?cht=tx&chl=\root+3+\of+{1+%2B+x^2}
versus
http://www.mathtran.org/cgi-bin/mathtran?tex=\root+3+\of+{1+%2B+x^2}
making Mathtran the better renderer.

I can understand you would like Google's programmers to support your
initiative instead of re-inventing the wheel, but that's Google for
you: the NIH *) syndrome plagues the entire development at Google.

To find out more about the differences between Google Chart's and the
mathtran.org implementation of TeX can you point me to a source, that
will help me determine this?



*) NIH: http://en.wikipedia.org/wiki/Not_Invented_Here

On Aug 12, 9:40 pm, Jonathan Fine <jf...@pytex.org> wrote:
> ahab wrote:
> > E.g.
> > <img alt="S=\frac{a_1.(r^n-1)}{r-1}" eeimg="1" src="http://
> > chart.apis.google.com/chart?
> > cht=tx&amp;chs=1x0&amp;chf=bg,s,FFFFFF00&amp;chco=000000&amp;chl=S%3D
> > %5Cfrac%7Ba_1.(r%5En-1)%7D%7Br-1%7D" style="vertical-align:middle">
>
> > I.e. the raw URL:
> >http://chart.apis.google.com/chart?cht=tx&chs=1x0&chf=bg,s,FFFFFF00&;...
>
> > With cht=tx (TeX?)
> > and alt="S=\frac{a_1.(r^n-1)}{r-1}" is equivalent to chl=S%3D%5Cfrac
> > %7Ba_1.(r%5En-1)%7D%7Br-1%7D
>
> You might want to look at
>      http://www.mathtran.org/wiki/index.php/Web_service
> which has, since 2007, been making TeX typeset formulas available as a
> public service.
>
> (I'm the main developer of MathTran.)
>
> Google's service doesn't seem to be using TeX for typesetting: comparehttp://chart.apis.google.com/chart?cht=tx&chl=%201%20\left\langle%20ddd%20\right\rangle%202http://www.mathtran.org/cgi-bin/mathtran?D=5;tex=%201%20\left\langle%20ddd%20\right\rangle%202
Reply all
Reply to author
Forward
0 new messages