Discussion:
Online Latex for Chemistry
(too old to reply)
Andrew Saleh
2011-02-06 21:53:39 UTC
Permalink
Could anyone help with finding an Online Editor or web service which
converts chemistry latex texts to images ?
Similar to what the below program is doing:

http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2

All comments are welcome.
Joseph Wright
2011-02-06 21:55:49 UTC
Permalink
Post by Andrew Saleh
Could anyone help with finding an Online Editor or web service which
converts chemistry latex texts to images ?
http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2
All comments are welcome.
You're going to need to be rather more precise in your requirements.
What type of ' chemistry latex texts'?
--
Joseph Wright
Andrew Saleh
2011-02-06 22:42:06 UTC
Permalink
Post by Joseph Wright
Post by Andrew Saleh
Could anyone help with finding an Online Editor or web service which
converts chemistry latex texts to images ?
http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2
All comments are welcome.
You're going to need to be rather more precise in your requirements.
What type of ' chemistry latex texts'?
--
Joseph Wright
For example how can someone write an image like Loading Image...
in an online latex.
Martin Heller
2011-02-06 23:25:59 UTC
Permalink
For example how can someone write an image likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
For simple things you can use the Google Chart API:

<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\mathrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Andrew Saleh
2011-02-06 23:39:38 UTC
Permalink
Post by Martin Heller
For example how can someone write an image likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\mathrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of high school. I
may consider the google charts, if there is no other program
available.
Andrew Saleh
2011-02-06 23:46:55 UTC
Permalink
Post by Andrew Saleh
Post by Martin Heller
For example how can someone write an image likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\mathrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of  high school. I
may consider the google charts, if there is no other program
available.
I got http://www.sciprof.dreamhosters.com/cgi-bin/mimetex.cgi?SO_{4}^2^-+Ba^2^+\longrightarrow%20BaSO_{4}\downarrow
working.... I am still worried if mimeTex works for all the chemistry
equations.
John Forkosh
2011-02-07 20:22:54 UTC
Permalink
Post by Andrew Saleh
Post by Andrew Saleh
Post by Martin Heller
Post by Andrew Saleh
For example how can someone write an image like
http://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&
chl=\mathrm{SO}_4^{2-}%2B\mathrm{Ba}^{2%2B}\longrightarrow
\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of high school. I
may consider the google charts, if there is no other program
available.
I got
http://www.sciprof.dreamhosters.com/cgi-bin/
mimetex.cgi?SO_{4}^2^-+Ba^2^+\longrightarrow%20BaSO_{4}\downarrow
working.... I am still worried if mimeTex works for all the chemistry
equations.
That would be doubtful indeed. But restricted to the kinds of
constructions you've illustrated, your odds might be slightly better.
If you feel like gambling with some of your time, read (or read
again more carefully:) Section III Syntax Reference of the
complete mimetex manual,
http://www.forkosh.com/mimetexmanual.html
which you can point to directly with (use ? as shown, not #)
http://www.forkosh.com/mimetexmanual.html?reference
(Note that this should be identical to your local downloaded
copy called mimetex.html in the mimetex.zip file. But use #
rather than ? when pointing into to your local copy.)

I'd pay special attention to the arrows subsection, and discussions
about \rasiebox, \rotatebox, \reflectbox, \compose, \rule,
and about \line and \circle in the picture environment (because
they work outside pictures, too). But you'll have to read the whole
Section III to see what other features may (or may not) be useful.
Judicious combinations of these may (or may not) let you put together
useful constructions for your purposes. If they do, then also see
the -DNEWCOMMANDS compile option under
http://www.forkosh.com/mimetexmanual.html?options
Since useful constructions may be complicated expressions, you
can compile mimetex with a file defining various \newcommand-like
directives, including arguments and an optional first arg, too.
That's all explained under -DNEWCOMMANDS in the manual.

Also, some newcommand examples are underneath line 5508 in your
mimetex.c source, where several usual latex commands are "virtualized"
in mimetex, e.g.,
{ "\\binom", "2", "{\\begin{pmatrix}{#1}\\\\{#2}\\end{pmatrix}}" },
takes the usual two args, and
{"\\angle", NULL, "{\\compose{\\hspace{3}\\lt}{\\circle(10,15;-80,80)}}"},
takes none. An optional first arg example is
{ "\\lvec", "2n", "{#2_1,\\cdots,#2_{#1}}" },
which is explained in that -DNEWCOMMANDS section.

In any case, it'll eat up some amount of your time to read and play
with these mimetex features enough to figure out whether or not they
might do what you want. You might first want to try to find mhchem,
as suggested previously, or some similar standard latex package,
available with an online (or user installable) equation renderer.
That would be lots easier than mimetex, where anything you cobble
together will be way non-standard, even if it works okay or semi-okay.
--
John Forkosh ( mailto: ***@f.com where j=john and f=forkosh )
Enrico Gregorio
2011-02-06 23:47:53 UTC
Permalink
Post by Andrew Saleh
Post by Martin Heller
Post by Andrew Saleh
For example how can someone write an image
likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\mat
hrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of high school. I
may consider the google charts, if there is no other program
available.
Have a look at the mhchem package.

Ciao
Enrico
Lars Madsen
2011-02-07 00:01:30 UTC
Permalink
Andrew Saleh
2011-02-07 00:09:18 UTC
Permalink
Post by Enrico Gregorio
Post by Andrew Saleh
Post by Martin Heller
Post by Andrew Saleh
For example how can someone write an image
likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\mat
hrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of  high school. I
may consider the google charts, if there is no other program
available.
Have a look at the mhchem package.
Ciao
Enrico
and in which online latex-to-image generator is mhchem available?
(because that _would_ slove the OPs problem)
If mhchem is / can be plugged in an latex image generator let me
know... I tried but couldn't find one..
Enrico Gregorio
2011-02-07 00:16:23 UTC
Permalink
Post by Enrico Gregorio
Post by Andrew Saleh
Post by Martin Heller
Post by Andrew Saleh
For example how can someone write an image
likehttp://www.sciprof.dreamhosters.com/so4.JPG
in an online latex.
<URL:https://chart.googleapis.com/chart?cht=tx&chl=\mathrm{SO}_4^{2-}%2B\m
at
hrm{Ba}^{2%2B}\longrightarrow\mathrm{BaSO}_4\downarrow>
Thanks Martin, but the above was just an example, I am looking for a
whole some program which satisfies most of the chemical equations. Not
very complex ones, but still should cover equations of high school. I
may consider the google charts, if there is no other program
available.
Have a look at the mhchem package.
Ciao
Enrico
and in which online latex-to-image generator is mhchem available?
(because that _would_ slove the OPs problem)
I don't know about latex-to-image generators, but this
document produces a cropped pdf very similar to that image:

\documentclass{article}
\usepackage[active,xetex,tightpage]{preview}
\usepackage{mathptmx}
\usepackage[version=3]{mhchem}
\setlength{\PreviewBorder}{2bp}

\begin{document}
\begin{preview}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}
\end{preview}
\end{document}

I guess it's quite easy to build a script that accepts
as input the argument to \ce and produces a PDF and from
that a PNG or a JPG. If one knows how to do it, of course. :)

Ciao
Enrico
NickyPanther
2011-02-07 08:50:30 UTC
Permalink
Post by Andrew Saleh
Could anyone help with finding an Online Editor or web service which
converts chemistry latex texts to images ?
http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2
All comments are welcome.
Perhaps not what you are looking for (it is not online as far as I
know and should be installed on your machine), but klatexformula could
do the job (with the proper packages such as mhchem)
http://klatexformula.sourceforge.net/

My 2 cents,

--
NickyPanther
m***@gmail.com
2018-11-14 19:17:56 UTC
Permalink
Post by Andrew Saleh
Could anyone help with finding an Online Editor or web service which
converts chemistry latex texts to images ?
http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2
All comments are welcome.
Hi I know I am 7yrs late but http://www.forkosh.com/cgi-bin/mimetex.cgi is giving the homepage of cia on my browser
Loading...