0
   

Typing Equations on a PC

 
 
ebrown p
 
  1  
Reply Wed 6 Jun, 2007 11:50 am
I am a Linux user (and you should be to if you are doing this kind of stuff).

I would be able to recommend Octave (a GNU matlab equivalent) if you were on Linux. I believe Octave has been ported to that other OS you people use, but I have never used it outside of a GNOME environment.
0 Replies
 
Brandon9000
 
  1  
Reply Wed 6 Jun, 2007 01:44 pm
Thanks!
0 Replies
 
stuh505
 
  1  
Reply Wed 6 Jun, 2007 03:56 pm
Brandon9000 wrote:
Does anyone know how I might insert graphs of functions in my document? I don't know either how to generate the graphs on the PC or how to then put them into LaTex.


I suggest GNUPlot for linux...and for PC I just use Excel because it's there and it's easy to use.
0 Replies
 
Quincy
 
  1  
Reply Wed 6 Jun, 2007 04:05 pm
I find EXCEL incredibly difficult, Octave is simple if you just want to plot graphs.
0 Replies
 
Brandon9000
 
  1  
Reply Thu 7 Jun, 2007 07:16 am
stuh505 wrote:
Brandon9000 wrote:
Does anyone know how I might insert graphs of functions in my document? I don't know either how to generate the graphs on the PC or how to then put them into LaTex.


I suggest GNUPlot for linux...and for PC I just use Excel because it's there and it's easy to use.

Can Excel import graph images that LaTeX can then import? That's the kind of thing I need.
0 Replies
 
Brandon9000
 
  1  
Reply Thu 7 Jun, 2007 07:17 am
Quincy wrote:
I find EXCEL incredibly difficult, Octave is simple if you just want to plot graphs.

Thanks. Is Octave a PC program? I am not using Linux. Is it expensive?
0 Replies
 
stuh505
 
  1  
Reply Thu 7 Jun, 2007 11:39 pm
Brandon9000 wrote:
Can Excel import graph images that LaTeX can then import? That's the kind of thing I need.


Well I will explain the process that I use.

Usually for me I have some kind of a computer program that is generating data that I need to plot. I write this out to a CSV (comma separated value) file. For example, the format would look like this:

TIME, COUNT, C2
1, 6, 0.4,
2, 4, 0.9,
3, 7, 0.85

Practically everything is set up to work with CSV files (both GNUplot and Excel, for example).

If you name the file with extension .csv then you can just double click it and Excel will know how to open it. To open it manually, you would just go to Data->Import External Data->Import Data. Then select the file. Choose delimited and pick comma, then you're done. Alternatively you could separate by tabs or column numbers or whatever. This comes in handy a lot.

Once you have it in Excel, just select the data. If you include the top row that has the names of the columns then it will use those automatically. After selecting the data click on the Chart symbol (or do Insert->Chart).

Pick "XY Scatter" if the left column is the X axis and the other columns are each separate data series. Select "Line" if you just want it to use the cell number as the X axis.

Then you can play around with the graph, make it look the way you like it, then select the graph and hit Ctrl+C. Then open up Photoshop and do new file, paste, and this will give you an image of the graph. Save it as a PNG file. This is the best file format to use with LAtex.

There are 2 ways to get plots into Latex. One way is to write extremely complicated and ridiculous code using Latex syntax to literally draw the plot. Altough there are some wizards to create this for you, the other downside is that it will be very slow to view because it is drawn in vector graphics!

Typically what you do is just import the image...put the image in the same folder as your latex file and it will work. Use code something like this:

Code:\includegraphics[width=400pt]{classA.png}
jagan
 
  1  
Reply Fri 8 Jun, 2007 01:47 am
Typing Equations on a PC
I have used MathType equation editor from Designscience for my thesis. You can download a 30 day trial version, and even after the trial version expires, a basic version runs on ur PC(which is enough to take care of basic ones). The equations will be saved as jpegs and u can paste it on a doc.
go to this site http://www.dessci.com/en/
0 Replies
 
vinsan
 
  1  
Reply Fri 8 Jun, 2007 07:52 am
I used MATLB for complex mathematical equations. I used it for Digital Signal Processing practicals.

It is dream software for math freaks.
0 Replies
 
Brandon9000
 
  1  
Reply Tue 12 Jun, 2007 07:38 am
I don't have Linux. This is for a PC running Windows. So far the only thing mentioned in that category for drawing graphs that can be imported into LaTeX is Excel.
0 Replies
 
stuh505
 
  1  
Reply Tue 12 Jun, 2007 11:48 am
Brandon9000 wrote:
I don't have Linux. This is for a PC running Windows. So far the only thing mentioned in that category for drawing graphs that can be imported into LaTeX is Excel.


Not true...like I said already, Latex doesn't "import graphs", it imports images...and therefore you can use any program in existence that can make a graph.
0 Replies
 
Brandon9000
 
  1  
Reply Tue 12 Jun, 2007 12:54 pm
stuh505 wrote:
Brandon9000 wrote:
I don't have Linux. This is for a PC running Windows. So far the only thing mentioned in that category for drawing graphs that can be imported into LaTeX is Excel.


Not true...like I said already, Latex doesn't "import graphs", it imports images...and therefore you can use any program in existence that can make a graph.

Yes, and I thank you for being the only one so far to tell me a Windows program that can create such an image.
0 Replies
 
Clara10
 
  1  
Reply Tue 26 Jun, 2007 10:16 pm
ebrown_p wrote:
Hi Brandon,

In later version of Microsoft Word... click the "Insert" button on the top menu bar. Then chose "Object" from the menu.

This will pop a a dialog box with a bunch of object types, choose the one that has the words "Microsoft Equation". This will give a little OLE object in a frame in your document, along with a little menu with mathmatical symbols and templates to handle fractions and exponents and integrals and Sigmas etc.

This is pretty handy for simple stuff.

If you want something more complex, look at "MathType" which runs about $100. I worked with them for a consulting project once and they have a decent piece of software.


I have Ms office 2003 but i don't find Ms equations in the box. Which version has this object?
0 Replies
 
Brandon9000
 
  1  
Reply Mon 16 Nov, 2009 06:55 am
@stuh505,
stuh505 wrote:

Brandon9000 wrote:
Can Excel export graph images that LaTeX can then import? That's the kind of thing I need.


Well I will explain the process that I use.
...
Typically what you do is just import the image...put the image in the same folder as your latex file and it will work. Use code something like this:

Code:\includegraphics[width=400pt]{classA.png}


Stuh, this has been tremendously helpful to me, but I'm having one remaining problem. I am copying my Excel file to MS Paint and then saving it to a jpeg. But when I build my Latex, it won't display the image unless I create pdf output. With dvi output, it just isn't there. Is there a way to get it into dvi output?
Thomas
 
  1  
Reply Fri 20 Nov, 2009 07:27 pm
@Brandon9000,
Brandon -- could you try printing out the DVI file on your printer and tell me if the graph is on the paper printout? I think I have a solution for you, but it could be the solution of either of two problems, so I first need to figure out which.
Brandon9000
 
  1  
Reply Fri 20 Nov, 2009 11:39 pm
@Thomas,
Thomas wrote:

Brandon -- could you try printing out the DVI file on your printer and tell me if the graph is on the paper printout? I think I have a solution for you, but it could be the solution of either of two problems, so I first need to figure out which.

I just did that and it's not on the printout either. When it's set to produce dvi, the image is just not there.
Wilso
 
  1  
Reply Sat 21 Nov, 2009 03:16 am
@Brandon9000,
Brandon9000 wrote:

ebrown_p wrote:
Hi Brandon,

In later version of Microsoft Word... click the "Insert" button on the top menu bar. Then chose "Object" from the menu.

This will pop a a dialog box with a bunch of object types, choose the one that has the words "Microsoft Equation". This will give a little OLE object in a frame in your document, along with a little menu with mathmatical symbols and templates to handle fractions and exponents and integrals and Sigmas etc.

This is pretty handy for simple stuff.

If you want something more complex, look at "MathType" which runs about $100. I worked with them for a consulting project once and they have a decent piece of software.

That's great, thanks! And thanks also to DrewDad for those links! It's great to know so many smart people.


Except that it makes people like me feel like an idiot!
0 Replies
 
Thomas
 
  1  
Reply Sat 21 Nov, 2009 12:02 pm
@Brandon9000,
Okay. Then here's what I think your problem is:

For historical reasons, TeX and LaTex can work in either of two different modes: The historically older mode outputs DVI files and can import graphics only in the encapsulated PostScript format (eps). The more modern mode outputs PDF files and has a broader choice of input formats: jpeg, PNG, PDF, and MetaPost -- but, so far, not eps.

To make LaTex display your graphics in dvi mode, you will have to import them into your document as eps files -- and then you'll need extra steps to produce PDFs from the dvi. (To repeat, the (La)Tex mode that directly outputs PDFs cannot import jpeg graphics.)

How do you get your graphics into eps format? I can think of two methods: Method 1 is a mere nuisance, but might produce good-enough output for you. Method 2 is a pain in the arm but produces optimal quality.

Method 1: Convert the jpeg you already have to eps
For this, you can use Image Magick's command line tool "convert". (Image Magick is a collection of Open Source tools specialized on image conversion.)

Step 1: Download the Image Magic installer from its homepage and run it:

http://www.imagemagick.org/script/binary-releases.php#windows

Step 2: Convert your file by starting the Windows command line, "cmd", and typing "convert myimage.jpg myimage.eps". Of course you want to replace "myimage" with your actual filename.

Step 3: From LaTex, import the image. I use the graphicx package (not sure what you use), so the minimal Latex file that would do the work would look something like this:

Code:\documentclass{article}
\usepackage{graphicx}
% your other preliminaries go here

\begin{document}

\includegraphics[scale=1.0]{myimage} % Note the absence of a file extension.
% Use the "scale" parameter above to tweak the image's size in your document.

\end{document}

There's a lot of other options to the \includegraphics command that you can use to tweak the imported picture. A tutorial on them is webbed here.

Method 2: Directly generate eps from Excel
In an ideal world, Excel could save to eps files. But this is not an ideal world, so what you need to do instead is to print the graph to a file, using a postscript printer driver (I use Apple Color Laser Writer) with special printing options to guarantee the output of an eps file that is portable across platforms and printers. In all likelihood, you then have to hand-tweak the bounding box by editing the eps file in Notepad. As you might have guessed, this is where it becomes a major pain in the arm.

In exchange for your pain, you end up importing a true vector graphic. This way, your image will never look pixelish, no matter how large your magnification or how fine your printer resolution. This method is worth the trouble if, and probably only if, you're shooting for publication quality PDFs.

I'll walk you through it if you want me to, but let's see first if method 1 is good enough for you.
0 Replies
 
Thomas
 
  1  
Reply Sat 21 Nov, 2009 12:33 pm
Oh, and method 3: Listen to Stuh's advice and take a look at GnuPlot. It's available on Windows, can produce all the graphics you need from a .csv table, and doesn't require any additional hoops for you to jump through. The downside is that it's command-line-driven, so you would need a little time to learn the commands you need. But if you need to plot often, the investment is worth it.
Thomas
 
  1  
Reply Sat 21 Nov, 2009 12:36 pm
@Thomas,
Whichever method you use to produce the eps, you'll get a dvi file and a ps file out of it, but if you want to make pdfs out of these easily, you'll need to install ghostscript and gsview and reconfigure TeXnic Center a little bit. Just let me know if you want me to talk you through it.
 

Related Topics

Evolution 101 - Discussion by gungasnake
The Future of Artificial Intelligence - Discussion by Brandon9000
The well known Mind vs Brain. - Discussion by crayon851
Scientists Offer Proof of 'Dark Matter' - Discussion by oralloy
Blue Saturn - Discussion by oralloy
Bald Eagle-DDT Myth Still Flying High - Discussion by gungasnake
DDT: A Weapon of Mass Survival - Discussion by gungasnake
 
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 04/16/2024 at 02:27:11