From problem statement to printed solution and web display

vaguely described by S. Greenfield

I did problem #15 on page 252 of the calculus text by Larson, Hostetler and Edwards, which is used in our Math 135 course.


Into classical text

Math requires special care because of symbols and pictures. I use TeX for handling symbols and general typesetting (like this document) and I usually use the program xfig to create pictures, although I sometimes use other programs (e.g., Maple if I want a "correct" picture of the graph of a function, for example).

I typed the attached file exactly as shown using a text editor (in my case, emacs). During this time, I used the program xfig to draw the pictures shown. I exported the pictures from xfig in encapsulated postscript format("eps"). Note that there are a wide variety of pictorial file formats. Postcript is one which is widely used in mathematics, and I create pictures in eps format because TeX can include them in its output using the indicated epsf commands.

The file I created was in plain TeX . Other people feel more comfortable using other varieties of TeX. TeX and its variants are widely available in math departments. I then "texed" the file. That is, I typed the line tex exercise.tex (followed by a return) and got some output, basically telling me that things went well. The file exercise.dvi was created. This is an intermediate stage in the process. I then typed the line dvips -i exercise.dvi -o exercise.ps which caused the dvi file I had created to be converted to a postscript file and which also caused the pictures I made with xfig to be inserted1. Then I was able to print the postscript file with the command lpr exercise.ps. I did this at home. At school I'd need to specify which printer I wanted to use with some variant of the lpr command.

Of course, I made a number of errors while doing this. Typically the errors were in typing some TeX commands. I was able to preview the file by typing xdvi exercise.dvi in another X window while I was editing and then repeatedly texing the file. Also note that the pictures I created with the "easy to use" program xfig also needed to be redone several times. The whole process described above (not including this explanation!) took almost an hour to do, and I didn't make many mistakes -- I'm fairly experienced. Realize that first attempts will necessarily take much more time.

I use the books TeX for the Impatient and The TeX book as my references for TeX. There are other books for the many TeX variants. I have no references for the use of xfig and, indeed, I learned it under the benignly neglectful supervision of a considerably younger family member whose instructional technique consisted of repeating, "Try that, it won't break." I did, and it didn't. That teaching method perhaps used more sparingly2 can be recommended.

And onto the web ...

Again displaying symbols and pictures requires extra effort. The standard "language" understood by web browsers is html, which really has few features allowing math to be displayed. Proposals exist for extending html to a larger "language" which would handle mathematics and graphics better but these proposals have not yet been adapted, and, in any case, there are many browsers installed in the world without the extensions. Some ways of displaying math on the web include:

  1. Approximate with standard typography. So the integral of the square root of x from 0 to 1 might appear (on the web) as S_0^1 sqrt(x)dx which isn't terrible if you only have a few things to display, and if your readers understand your expressions.
  2. Convert your postscript file to gifs, and display them on a web page. This web page discusses a way to do this.
  3. Put up a link to the postscript version of your file. Assume your reader's browser knows postscript. Although our browsers can "handle" postscript, the browsers on the Rutgers student machines such as the eden system generally can't!
  4. Convert your postscript file to pdf (using ps2pdf) and link the pdf version. This format is becoming more common (income tax forms are available in pdf!) and might be the best current solution.
  5. Use one of the various TeX translators (such as latex2html) and hope that the results are acceptable. I have found these clumsy -- producing many, many files which make directory maintainance difficult. But other people like the results very much.

Methods 2, 3, and 4 have been used to display versions of the calculus problem solution on this web page. See how you like the results!

Footnotes

1. Sigh. Does this seem intricate?

2. A tiny bit of active instruction is useful!


Maintained by greenfie@math.rutgers.edu and last modified 2/8/2000.