Program for graphs and diagrams

1. Jul 2, 2004

Zurtex

Hi, I'm typing up all my maths notes for when I go to university and I have some fairly good programs for displaying all the maths symbols etc. However could someone please point me in the direction of a good program that I could use to quickly make graphs of functions or easily make diagrams to illustrate geometry problems?

2. Jul 2, 2004

3. Jul 2, 2004

matt grime

For diagrams, then depending on where you want to use them, try using xypic in latex (ie produce your document entirely using latex) you can insert graphs as eps files which may be created in ways muzza suggests.

4. Jul 2, 2004

Zurtex

Thanks muzza.

Matt, could you please explain further. I've only ever used Latex on this website so I'm not overly used to it, however I've been planning to teach myself over the next couple of months anyway.

5. Jul 2, 2004

matt grime

Well, basically it's like this.

You will need to borrow a basic outline (often called a preamble), and then between the begin document and end document command you type as if you're typing here: plain text then you start a maths environment by using the command \ [ (no space, cos i think that the latex here would pick it up if i did it literally) do the symbols stuff and end \ ] again no space, then text then....

once you've done that you pass it through a translator, it produce a dvi file (easily converted to ps or pdf) et voila. Now, how you implement all this depends on your system.

Windows? Then you want to look up MikTeX. Linux and you can install it directly using whatever you use, you want the TeTeX package. (Mac not au fait with.) That installs all the compilers and fonts and things you need (though you may need to install xypic in windows, but that should be easy). Basically it's like typing in plain old html. there are a bunch of commands to remember etc, and then you need a compiler type thingy, and so on.

there's loads of online documentation (something like tex in under sixty nine hours is often cited) and books to help you.

there are WISYWIG editors as well if you like that kind of thing (emacs of vim are my preferred tools, they have tex modes that highlight the syntax and match brackets and so on).

xypic is a very powerful way to create diagrams, graphs (in the sense of graph theory) and so on, google for it, look at their documents and see if it appears to do what you want. as a guide it WILL do what you want, no matter how bizarre, but it may take you a month to figure out how.

the key to starting is to have a basic framework to work in. if you like i'll email you mine, with copious notes added explaining what all the stuff means. this is the general way of starting to use latex.

oh, and miktex etc are all free to obtain (though the editors often aren't if they're MS based ones)

6. Jul 2, 2004

Muzza

I think you need Ghostscript as well, in order to run Miktex.

7. Jul 2, 2004

matt grime

if you want to make it into a ps file, or read them, which is the usual thing, yes.

8. Jul 2, 2004

Zurtex

That's great thanks, I'll spend tommorw trying to make sense of what was said lol.

9. Jul 7, 2004

Zurtex

Thanks, I've downloaded MikTeX, but I can't seem to find anything about what I do now. And on the web sites I've been on I can't seem to make heads nor tails of xypic.

10. Jul 7, 2004

Muzza

11. Jul 7, 2004

Zurtex

Thanks, I'm sure this will be a big help.

12. Jul 7, 2004

JohnDubYa

I don't think you need Ghostscript if you use PDFLatex. Is this correct?

I suggest gnuplot. It is free and easy to use. If you have about \$100, go for Maple or Mathematica.

13. Jul 8, 2004

Muzza

Well, I needed Ghostscript to use pdflatex ;)

14. Jul 8, 2004

matt grime

zurtex, here's a sample latex file. have you installed emacs? probably should do so, or you need to get used to command lines (ok, some of you will use winedit too). when you save it change the ending to .tex not .txt, you can't upload .tex files here which seems like a bizarre idea.

anyway, open in some text editor to see what it looks like and change it around.

to process it, well, get a dos prompt up, move to the dir the file is in and type

> latex sample.tex

it should produce sample.dvi, you can use yap to view it, yap comes with miktex.

there will be some errors when you do this to do with citations, you can ignore them.

then ask questions (pm me if nec)

Attached Files:

• sample.txt
File size:
10.8 KB
Views:
91
15. Jul 8, 2004

futb0l

Mathematica is cool :) I like it. Pretty easy to use as well, it has a GUI, but it's not that good.

16. Jul 8, 2004

Zurtex

I tried what you said matt but I just go this:

Code (Text):

C:\Documents and Settings\Damian\Desktop>latex sample.tex
This is e-TeX, Version 3.141592-2.1 (MiKTeX 2.4)
etex.exe --ini --interaction=nonstopmode --halt-on-error --alias latex *C:/texmf
/tex/latex/base/latex.ltx \dump
This is e-TeX, Version 3.141592-2.1 (MiKTeX 2.4) (INITEX)
entering extended mode
(C:/texmf/tex/latex/base/latex.ltx (C:\texmf\tex\latex\00miktex\texsys.cfg)
./texsys.aux found

\@currdir set to: ./.

Assuming \openin and \input
have the same search path.

Defining UNIX/DOS style filename parser.

catcodes, registers, compatibility for TeX 2,  parameters,
LaTeX2e <2003/12/01>
hacks, control, par, spacing, files, font encodings, lengths,
====================================

Local config file fonttext.cfg used

====================================
(C:\texmf\tex\latex\00miktex\fonttext.cfg (C:\texmf\tex\latex\base\fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===

(C:\texmf\tex\latex\base\omlenc.def) (C:\texmf\tex\latex\base\t1enc.def)
(C:\texmf\tex\latex\base\ot1enc.def) (C:\texmf\tex\latex\base\omsenc.def)
(C:\texmf\tex\latex\base\t1cmr.fd) (C:\texmf\tex\latex\base\ot1cmr.fd)
(C:\texmf\tex\latex\base\ot1cmss.fd) (C:\texmf\tex\latex\base\ot1cmtt.fd)))
====================================

Local config file fontmath.cfg used

====================================
(C:\texmf\tex\latex\00miktex\fontmath.cfg (C:\texmf\tex\latex\base\fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===

(C:\texmf\tex\latex\base\omlcmm.fd) (C:\texmf\tex\latex\base\omscmsy.fd)
(C:\texmf\tex\latex\base\omxcmex.fd) (C:\texmf\tex\latex\base\ucmr.fd)))
====================================

=====================================
page nos., x-ref, environments, center, verbatim, math definitions, boxes,
title, sectioning, contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(C:\texmf\tex\generic\babel\hyphen.cfg (C:\texmf\tex\generic\hyphen\ushyph.tex)
(C:\texmf\tex\generic\hyphen\frhyph.tex
frhyph.tex - French hyphenation patterns (V2.11) <2002/01/16>)
(C:\texmf\tex\generic\hyphen\dehypht.tex
German Traditional Hyphenation Patterns dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name ghyph31' and ghyphen'.))
(C:\texmf\tex\generic\hyphen\dehyphn.tex
New German Hyphenation Patterns dehyphn' Rev.31 <2001-05-07> (WaS))
(C:\texmf\tex\generic\hyphen\dumyhyph.tex)
(C:\texmf\tex\generic\hyphen\zerohyph.tex))
=================================
Applying patch file ltpatch.ltx
=================================
(C:\texmf\tex\latex\base\ltpatch.ltx)
)
Beginning to dump on file latex.efmt
4359 strings of total length 54759
43926 memory locations dumped; current usage is 144&41982
3142 multiletter control sequences
\font\nullfont=nullfont
\font\OMX/cmex/m/n/10=cmex10
\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=lcircle10
\font\tencircw=lcirclew10
\font\OT1/cmr/m/n/5=cmr5
\font\OT1/cmr/m/n/7=cmr7
\font\OT1/cmr/m/n/10=cmr10
\font\OML/cmm/m/it/5=cmmi5
\font\OML/cmm/m/it/7=cmmi7
\font\OML/cmm/m/it/10=cmmi10
\font\OMS/cmsy/m/n/5=cmsy5
\font\OMS/cmsy/m/n/7=cmsy7
\font\OMS/cmsy/m/n/10=cmsy10
3633 words of font info for 14 preloaded fonts
14 hyphenation exceptions
Hyphenation trie of length 23218 has 713 ops out of 2048
2 for language 4
235 for language 3
207 for language 2
88 for language 1
181 for language 0
No pages of output.
Transcript written on latex.log.
entering extended mode
(sample.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size12.clo)) (C:\texmf\tex\latex\base\latexsym.sty)
(C:\texmf\tex\latex\amsfonts\amsfonts.sty)
(C:\texmf\tex\latex\amsmath\amscd.sty (C:\texmf\tex\latex\amsmath\amsgen.sty))
(C:\texmf\tex\latex\amsfonts\amssymb.sty)

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:

17. Jul 9, 2004

matt grime

okay, this means that one of the package's i've specified isn't in your system, the way round this is to remover enumerate from the first \usepackage{..} instruction.

18. Jul 9, 2004

Zurtex

kk thanks, I'll work it out later

19. Jul 26, 2004

Zurtex

Sorry to come up with another problem but I removed the package command and tried it again and it came up with this error:

Code (Text):
(sample.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, ngerman, du
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size12.clo)) (C:\texmf\tex\generic\xypic\xy.sty
(C:\texmf\tex\generic\xypic\xy.tex Bootstrap'ing: catcodes, docmode,
(C:\texmf\tex\generic\xypic\xyrecat.tex)
(C:\texmf\tex\generic\xypic\xyidioms.tex)

Xy-pic version 3.7 <1999/02/16>
Copyright (c) 1991-1998 by Kristoffer H. Rose <krisrose@ens-lyon.fr>
Xy-pic is free software: see the User's Guide for details.

utility macros; pictures: \xy, positions, objects, decorations;
kernel objects: directionals, circles, text; options; algorithms: directions,
Xy-pic option: All features v.3.3 (C:\texmf\tex\generic\xypic\xycurve.tex
Xy-pic option: Curve and Spline extension v.3.7 curve, circles, loaded)
(C:\texmf\tex\generic\xypic\xyframe.tex
Xy-pic option: Frame and Bracket extension v.3.7 loaded)
(C:\texmf\tex\generic\xypic\xycmtip.tex
Xy-pic option: Computer Modern tip extension v.3.3
(C:\texmf\tex\generic\xypic\xytips.tex
(C:\texmf\tex\generic\xypic\xyline.tex
Xy-pic option: Line styles extension v.3.6 loaded)
(C:\texmf\tex\generic\xypic\xyrotate.tex
Xy-pic option: Rotate and Scale extension v.3.3 loaded)
(C:\texmf\tex\generic\xypic\xycolor.tex  Xy-pic option: Colour extension v.3.3
Xy-pic option: Matrix feature v.3.4 loaded)
(C:\texmf\tex\generic\xypic\xyarrow.tex
Xy-pic option: Arrow and Path feature v.3.5 path, \ar, loaded)
(C:\texmf\tex\generic\xypic\xygraph.tex  Xy-pic option: Graph feature v.3.7
No file sample.aux.

! LaTeX Error: Environment lem undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.165 \begin{lem}
Also could you please explain how I install packages and what they do. (Oh and I tried asking it for help but it just came up with more and more confusing errors)

20. Jul 26, 2004

matt grime

shoot, i'd forgotten about that bit.

let me produce some more examples and see which works

sample corrects the problem but uses my preferred way of numbering theorem headings and such

sample2 i've removed all the offending things inside the body, but there are no examples of lemma headings and so on, but you can create your own using the info in any latex starter guide

File size:
7.7 KB
Views:
75
File size:
10.9 KB
Views:
65