The purpose of this project is twofold: first, you will extend the results in sections 13 and 14 of our textbook to Rn; and second, you will get a reasonably gentle introduction to LaTeX, a documentation preparation system used by mathematicians. LaTeX is a very powerful system that takes a long time to fully learn. However, I will help you learn the amount of LaTeX you need to know in order to do this project, or to write a paper in another class, should that be something you want to do. In fact, I think some of you might decide to use LaTeX to write up your mastery homework, since it is fairly easy to correct minor errors in LaTeX instead of completely rewriting the proof using pen or pencil.
I am going to explain how to do LaTeX on the Linux computers in the third floor Computer lab (Olin 326). If you want to, you can set up LaTeX on a Mac or PC, but I'm not going to deal with that here.
Launch Firefox and go to this page: After logging into one of the lab's computers (in Linux mode), launch Firefox and go to this page, which is accessible off the course homepage. In addition to Firefox, you will need three other applications, which I describe here but explain how to launch later:
Launch a terminal: Go to the Accessories sub-menu of the Applications menu and select Terminal. This is a program that has a prompt from which you can issue commands. The terminal starts at your home directory. I will have you create folders (also known as sub-directories) where you will put the files for this project.
Create folders and copy files: If you haven't already created a folder for this course, issue the following commands (exactly as written and one at a time) from the terminal:
mkdir mcs220
chmod 700 mcs220
cd mcs220
cp -r ~karl/public/220/project .
cd project
ls
The last command allows you to see the files you have copied. Two of them (simple.tex and template.tex) are simple LaTeX files I got from David Wolfe (who perhaps got them from someone else; I don't know). Another one, project.tex, is the starting point for your project. All three are files that you can edit using a text editor (described below; don't worry about that yet).
Compile simple.tex from the terminal and then view it using kdvi: In order to view a LaTeX as it's supposed to look, you need to first compile it using the command "latex"; this creates another file which can be viewed through the program kdvi. We will first do this for the simplest of the files, simple.tex
First, issue the following commands from the terminal:
latex simple
kdvi simple &
Assuming all has gone well, you should see a nice rendering of the compiled form of the simple.tex file. The compiled file is called simple.dvi. Two final task here: first, print the file, which you can do from the file menu in kdvi. Then, look at the simple.tex file and see if you can see how it corresponds to the document you just printed.
Edit the simple.tex file, compile, and view change: To edit the simple.tex file, you will need to use a text editor. Do this by going to the terminal and issue the following command:
kedit simple.tex &
This opens up the simple.tex file in a window which will allow you to edit the file. Make a small change to the file -- for example, change "This is a very short document" to "This is a very, very short document". After doing this and saving your change, recompile the file and see that the change has been made. That's all there is to it.
Do the same for template.tex: This is a slightly more complex file that David put together to illustrate other things you can do with LaTeX. You can open it using the file menus in kedit and kdvi.
You may notice that there were some warning messages when you compiled template.tex; these arose because there are bibliographic citations. In order to take care of this, issue the following commands from the terminal:
latex template
bibtex template
latex template
latex template
After doing this, your citations should be viewable in kdvi.
Get started on project.tex: This is your starting point for your project. After you run through the above process for project.tex and print out the file, you will see what you need to do for the first part of the project. It's not too much, but you will nonetheless find it challenging.