Jump to content

Equation Editor for the GIMP


manly
 Share

Recommended Posts

Hi,

 

Is there an equation editor for the Gimp, similar to the editor in OpenOffice? If not, is there some way that I can take the output of a math equation from OO and put it into the Gimp?

 

Thanks!

--Andrew

Link to comment
Share on other sites

Guest JaseP

I don't think GIMP has an Equation editor.

 

What you CAN do is to use screen capture to turn your exsting equation editor image into a PNG. Then you can open the GIMP, crop the image to just the equation, resize it using the scale function, and paste it into whatever graphic image you are trying to create...

 

It's not an elegant solution, but it is workable.

Link to comment
Share on other sites

What's the quality of a screenshot under X11? Good enough to print?

 

Some background info: I'm making a t-shirt for calculus with the definition of the derivative on the front. I was just going to do it in OO, but I couldn't figure out how to do "lim over h->0" (it's hard to describe :-P). If someone knows how to do that properly it would be great :-)

 

--Andrew

Link to comment
Share on other sites

I know that I'm going to go offtopic with this reply :D but if you want to be proud of your t-shirt, then make the "making of" (the proccess) the coolest way possible! feel like a geek :lol:

 

Depending on if you want the equation itself or the representation of it, you can do (just a couple of cool commandline ideas):

 

if it is the former, I suggest to use latex2html to generate a transparent png file wich contains only the equation. Then you can open it with Gimp.

 

Here is an example, the drawing of the Michaelis-Menten Equation (math equations are surronded by $ sings in latex):

~$ cat > equation.tex

documentclass[spanish]{article}

usepackage[T1]{fontenc}



makeatletter



begin{document}

$v = frac{V_{max} * [S]}{K_M + [S]}$ 

end{document}



~$ latex2html equation.tex

This is LaTeX2HTML Version 2K.1beta (1.50)

by Nikos Drakos, Computer Based Learning Unit, University of Leeds.



... loads of output striped...



Done.



~$ cd equation/

~$ ls

WARNINGS      equation.html  images.log  images.tex  index.html  node1.html

equation.css  images.aux     images.pl   img1.png    labels.pl

~$

Among the bunch of files generated you can see one named img1.png which is the image of the equation:

 

img1.png

 

If it is the later case (you want the representation of the equation) I suggest using gnuplot. ie:

 

~$ gnuplot << EOF

> set terminal png

> set output 'mm-graph.png'

> set title "Michaelis-Menten Equation"

> set xlabel "[S] (M)"

> set ylabel "v (1/s)"

> set xrange[0:75]

> set yrange[0:1.2]

> Vmax=1

> Km=0.5

> plot (Vmax * x) /  ( Km + x )

> EOF



~$

 

The above command will render the file 'mm-graph.png':

 

mm-graph.png

 

In both of my examples I ended with png graphics which are cool for www, but if you want quality you can generate vectorial gaphics by setting the output to postscript. Since you'll get vectorial graphics you can resize and make them as bigger as your computer memory allows you without loosing any quality. ;)

 

HTH

Link to comment
Share on other sites

Damn, this is really cool :-). I've modified the file you sent me, here it is:

 

documentclass[spanish]{article} 

usepackage[T1]{fontenc} 



makeatletter 



begin{document} 

$f(x) = frac{f(x+h)-f(x)}{h}$ 

end{document}

 

A few more questions:

1. How do I get postscript output? I can't seem to find the right command/package.

2. What is the command to place some text "over" another line? It would look like a fraction without the line (this is for the lim h->0).

3. Where is there good documentation on tex commands in general?

 

Thanks!

Link to comment
Share on other sites

1. How do I get postscript output? I can't seem to find the right command/package.

with latex, the default output will be ".dvi", then you can run dvips to generate the postscirpt document (if you like better pdf, use dvipdf instead).

 

2. What is the command to place some text "over" another line? It would look like a fraction without the line (this is for the lim h->0).

I'm not sure, I guess I haven't used latex enough, but I guess it should be something like:

$ lim_{hto0} f(x) = 0$

 

You'll have to search for the proper command ;)

 

A cool one that I've found googling, :roll: is:

$sum_{k=1}^n k = frac{n(n+1)}{2}$

 

3. Where is there good documentation on tex commands in general?

When I used latex (at college) I remember that I learned everything from the documentation that came with the latex packages.

Anyhow here you should find what you need:

http://www.latex-project.org/guides/usrgui...e/usrguide.html

 

here is a link related to math in latex:

http://www.giss.nasa.gov/latex/ltx-115.html

 

HTH

Link to comment
Share on other sites

OK, checked! :P

 

In order to make a "prety limit", you have to set up the displaymath environment ($$ formula $$) versus the math mode ($ formula $)

 

so my above attempt should look like:

 

$$lim_{hto0} f(x) = 0$$

Link to comment
Share on other sites

That worked nicely, aru. What I would like is for the output to be the size of an entire page in landscape, at 600 dpi. Do I do that in the tex file, or though latex or dvips?

 

Thanks!

Link to comment
Share on other sites

As per latex output 600dpi is the default.

 

To get the formula - only, I've had to do (after googling):

 

~$ cat foo.tex

documentclass[spanish]{seminar}

usepackage[T1]{fontenc}

defforcedisplay#1${displaystyle{#1}$}

everymath{forcedisplay}

shipouthbox{$lim_{hto0}f(x)=frac{n(n+1)}{2}$}



begin

end



~$ dvips -E foo.dvi -o foo.ps

 

With that you yet a formula only document. Now the problem is how to print it big. I can't find how to do it, but I haven't tried harder

Link to comment
Share on other sites

Guest JaseP
What's the quality of a screenshot under X11? Good enough to print?

 

Some background info: I'm making a t-shirt for calculus with the definition of the derivative on the front. I was just going to do it in OO, but I couldn't figure out how to do "lim over h->0" (it's hard to describe :-P). If someone knows how to do that properly it would be great :-)

 

--Andrew

 

Although it seems that you are approaching the problem from a different angle, The quality is as good as the resolution that the equation was drawn at. When you resize, you can have it dither it's way out to a better look, but the bigger you make it, the fuzzier it will look.

 

With some of the image manipulation apps, you can set the background to the pass-though color to allow whatever you wanted in the new backgound (the image or doc you are posting to) to show through.

 

Of course, there is more than one way to skin a cat...

Link to comment
Share on other sites

Thanks everyone for the help. I finished it up, and here are links to the sources, tiff image, etc. I printed everything on one transfer, and cut it so "Calculus Rules!" was on the back, with the equation on the front. If you want to see what I've done, go to my psuedo-homepage: http://www.sentex.net/~aberry/index.html. Feel free to make your own cool t-shirts showing your love for calculus ;-)

 

Thanks again for the help! You guys whip the llama's ass :-)

 

--Andrew

Link to comment
Share on other sites

  • 2 years later...

so while i know this post is about 2 and a half years too late, if you include the amsmath or amsart packages, instead of doing the $$lim_{aaa}$ stuff you can do $\lim_{}$ stuff and it automatically puts that underneath.

 

but further if you use an equation environment that might help.

 

it's super nice to see someone use the latex software. it's totally wonderful.

 

just out of curiosity, why did you pass the documentclass command the [spanish] argument?

 

also, it was wonderful to see the gnuplot references. that was actually what i've been looking for all over the web. thanks,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...