Creating Images

C

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.
 
M

Mirco Wahab

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 <img> 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.
 
I

it_says_BALLS_on_your forehead

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 <img> 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 :).
 
C

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.


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 <img> 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,206
Messages
2,571,069
Members
47,675
Latest member
RollandKna

Latest Threads

Top