Creating Images
am 17.10.2007 20:06:55 von cylurian
I'm trying to print out math equations like, 1/x + 2/3x = 4 in html
via perl. The problem is the denominator and numerator look funny.
Not only fractions, but square roots. I want to know if there was an
easy tutorial on how to create images via perl. Maybe I might be able
to create a nicely formated equations by creating an image.
Re: Creating Images
am 17.10.2007 20:33:33 von Mirco Wahab
cylurian@gmail.com wrote:
> I'm trying to print out math equations like, 1/x + 2/3x = 4 in html
> via perl. The problem is the denominator and numerator look funny.
> Not only fractions, but square roots. I want to know if there was an
> easy tutorial on how to create images via perl. Maybe I might be able
> to create a nicely formated equations by creating an image.
Is this as part of a web app? If so (and you control
the server), you coul'd go for the maximum impact
and use a wrapper into Latex, like LaTeXRender.pm:
http://www.tangentspace.net/cz/archives/2005/04/latexrender- perl-port
Some time ago I wrote a mod_perl2 output filter that
grabs [LaTex] $E = mc^2$ [/LaTex] pseudotags from the
outgoing html stream, takes the content in between and
sends this to the (heavily modified for my purposes:)
LaTExRender.pm, which responds with a on-server link to
a generated (and cached) image of the equation (or a
complete TeX block); this link is then inserted
at the positon of the pseudotag.
This works fine, e.g. here on a test account
http://phys.chemie.uni-halle.de/latex/sample.html
(it works, but nobody uses it)
Maybe thats the way to go?
Regards
M.
Re: Creating Images
am 17.10.2007 21:54:39 von it_says_BALLS_on_your forehead
On Oct 17, 2:33 pm, Mirco Wahab wrote:
> cylur...@gmail.com wrote:
> > I'm trying to print out math equations like, 1/x + 2/3x = 4 in html
> > via perl. The problem is the denominator and numerator look funny.
> > Not only fractions, but square roots. I want to know if there was an
> > easy tutorial on how to create images via perl. Maybe I might be able
> > to create a nicely formated equations by creating an image.
>
> Is this as part of a web app? If so (and you control
> the server), you coul'd go for the maximum impact
> and use a wrapper into Latex, like LaTeXRender.pm:http://www.tangentspace.net/cz/archives/2005/ 04/latexrender-perl-port
>
> Some time ago I wrote a mod_perl2 output filter that
> grabs [LaTex] $E = mc^2$ [/LaTex] pseudotags from the
> outgoing html stream, takes the content in between and
> sends this to the (heavily modified for my purposes:)
> LaTExRender.pm, which responds with a on-server link to
> a generated (and cached) image of the equation (or a
> complete TeX block); this link is then inserted
> at the positon of the pseudotag.
>
> This works fine, e.g. here on a test accounthttp://phys.chemie.uni-halle.de/latex/sample.html
> (it works, but nobody uses it)
That's really cool :-).
Re: Creating Images
am 17.10.2007 22:18:02 von cylurian
It's not for a webapp. I just have some perl code that creates math
problems, but the formatting always kills me. I have heard of LaTex
before for formating. Didn't know you can connect both together. I
will check your link. Thx.
On Oct 17, 11:33 am, Mirco Wahab wrote:
> cylur...@gmail.com wrote:
> > I'm trying to print out math equations like, 1/x + 2/3x = 4 in html
> > via perl. The problem is the denominator and numerator look funny.
> > Not only fractions, but square roots. I want to know if there was an
> > easy tutorial on how to create images via perl. Maybe I might be able
> > to create a nicely formated equations by creating an image.
>
> Is this as part of a web app? If so (and you control
> the server), you coul'd go for the maximum impact
> and use a wrapper into Latex, like LaTeXRender.pm:http://www.tangentspace.net/cz/archives/2005/ 04/latexrender-perl-port
>
> Some time ago I wrote a mod_perl2 output filter that
> grabs [LaTex] $E = mc^2$ [/LaTex] pseudotags from the
> outgoing html stream, takes the content in between and
> sends this to the (heavily modified for my purposes:)
> LaTExRender.pm, which responds with a on-server link to
> a generated (and cached) image of the equation (or a
> complete TeX block); this link is then inserted
> at the positon of the pseudotag.
>
> This works fine, e.g. here on a test accounthttp://phys.chemie.uni-halle.de/latex/sample.html
> (it works, but nobody uses it)
>
> Maybe thats the way to go?
>
> Regards
>
> M.