Mathematics Department - Creating Web Pages

Creating Web Pages

Table of Contents


About 60% of Mathematics Department faculty already have at least a basic web page and many of these faculty also have course web pages. The information provided below is primarily intended to help the remaining faculty make use of the web, especially as a means of reducing copying costs in providing non-timely course material to students.

To create web pages and make them accessible for reading by a web browser, there are several things you need to know.

Web pages are created by writing plain text files which include a set of commands in a special language called HTML (HyperText Markup Language). HTML provides the structure for your web page, which browsers, such as Firefox and Internet Explorer, interpret. The files that produce the web pages can be created using any standand text editor, e.g., emacs. For web pages with a fairly simple structure, only about a dozen HTML commands are needed, so there is not much to learn. In fact, a plain text file, with no HTML commands, can also produce a web page. Of course, to do more sophisticated things (e.g., create tables), more HTML commands are needed. Some text editors (e.g., Microsoft Word) have the capability of transforming a document to HTML, so one can can prepare a document in the usual way and then export it to HTML format.

To have the files accessible to a web browser, they must be placed in a special subdirectory of your main directory called public_html and, like any files, if you want others to be able to read them, the directory public_html and the files in it must have appropriate file permissions. The URL (web) address of a file (say syllabus.html) that a faculty member with username smith places in his subdirectory public_html will be:

Note that files written using HTML are given the extension .html

One notable exception to the address rule is that typing into your web browser's location window will produce the file index.html in user smith's subdirectory public_html. Thus, index.html is the name given to the file you want people to see first when they access your web pages.

Getting Started

First execute all of the following commands. Note there is a space after chmod and a space after 755.

Command Explanation
math% cd Move from your current directory to your home directory.
math% mkdir public_html Make a new directory named public_html where all of your html files will be kept.
math% chmod 755 public_html Now the entire World Wide Web has access to the files you put in this directory.
math% chmod 755 . Also make sure everyone has access to the public_html directory.
math% cd public_html Change from your present directory to your public_html directory.

Creating a Basic Web Page

The simplest way to do this, after you have performed the commands in the last section, is to copy an existing .html file from someone else into your subdirectory public_html and then edit it. This can be done in one of two ways:

  1. (Preferred method)Starting from your public_html subdirectory(cd public_html), type cp /math/share/WWW/help/sampleindex.html index.html to copy the file sampleindex.html to the file index.html in your public_html subdirectory. Note, as described above, it is important that the name given to this file be index.html.
  2. Use your browser to bring up sampleindex.html. Select File and then Save As. A window will open and you will need to choose a file name in the Selection window. Edit what you see so that after your username, you have /public_html/index.html. If neccesary, change the Format for Saved Document to Source.

Once you have copied this file to your public_html subdirectory, you must type chmod 644 index.html so that it can be seen on the web. If your username is smith, you can then view this file by connecting to or

To see a variety of other .html files to use as a model for your basic web page, use your browser to connect to the Rutgers Mathematics Faculty web page and click on various names. You may copy any of these files to your public_html subdirectory using the second method described above.

If you stick very closely to the format of any of the pages you have copied, most of the changes you need to make to modify the page to contain your personal data will be obvious, even if you do not totally understand the HTML commands that appear.

If you want to understand the syntax of the HTML commands and learn about other commands, you can find many sources on the web. One such source is: HTML Code Tutorial. Several other introductory and advanced guides can be found at HTML Guides. Additional information and references can be found on the New Brunswick Computer Services web pages.

Creating a Course Web Page

Again, the simplest way to do this is to copy someone else's page in the manner described above, and then edit the file. You will notice that many of the basic web pages contain links to course web pages. The file sampleindex.html has a link to the course web page mathxxx.html. Copying this page to a file, in the manner described in the previous section, provides a starting point for producing a course web page with most of the basic information you might want to provide. After you edit the file, don't forget to use the chmod command as above to make the file readable on the web. Links to many course web pages can also be found on the Mathematics Department web site at courseware.

Conventions for posting course materials in a central location have developed to the point where it is now best to put all course related material in subdirectories of ~www/courses. Files and directories in this area are owned by a group containing all regular faculty and several other members of the department involved in making course material available on the web. New directories created in this area will normally inherit this group access permission, but you should check that anything that you create has suitable permission. Each course has its own directory with subdirectories for specific semesters, which may also have subdirectories for individual instructors. In this way, material is collected in one place to allow easy references between sections of the same course and access to common resources. A consistent style for each course can be maintained by copying related web pages.

It is expected that course archives here will be maintained for at least five years from the time the course is given. Instructors should retain private copies of the source files for their own use since the department reserves the right to remove material that no longer appears useful.

Format of Course Material

Information that should be provided only on the web, rather than in hard copy:

  • Exam Review Sheets
  • Exam Solutions
  • Homework Solutions
  • Workshop Problem Solutions
  • Course Notes

Material that will still need to be provided in hard copy:

  • Exams
  • Quizzes
  • Workshop Problems

Material that may be provided in either web or hard copy format:

  • Course Syllabus
  • List of Homework Assignments
  • Course Information (grading, policies)

How to place files created using TeX on the web

There are several possibilities for viewing files created by TeX on the web. One is to view the .dvi file directly, the second is to use dvips to convert the .dvi file to a .ps file and then view the .ps file, and the third is to use ps2pdf or distill to convert the .ps file to a .pdf file, and view the .pdf file. Viewing each of these requires a separate piece of software (e.g., xdvi, ghostview, or acroread, respectively). Since not everyone will have all this software on their computer, if you choose too restrictive a format, your files will not be accessible to everyone you would like to view them. The safest procedure is to convert all the files to .pdf format, since this has the widest audience. Some faculty place files in both .pdf and .ps format on their web sites, since both of these can be then printed directly. Recall that after you have created the file exp.tex and texed it to produce exp.dvi, it is converted to postscript by the command dvips -Ppdf exp (you can omit the dvi extension, since dvips only reads dvi files, and the pdf pseudo-printer will automatically cause output from this instruction to be written to Then type ps2pdf exp.pdf or distill which then produces the file exp.pdf. Note that ps2pdf and distill produce different size and possibly different quality pdf files, so you may want to try both to see which is better for converting your particular ps file. Copy or move the file exp.pdf to your subdirectory public_html, or to the appropriate courseware directory, and make sure to change the file permission, e.g., type chmod 644 exp.pdf.

How to place material available in electronic form on the web:

If the thought of learning HTML commands is too burdensome, you can place ordinary text files on the web without inserting any HTML commands. The result is a file appearing just as you typed it. To view the text file exp.txt on the web, simply move it to your subdirectory public_html and change its permissions to make it readable, i.e., type chmod 644 exp.txt.

How to place hard copy material on the web

This is done using the Fujitsu scanner and computer in Hill 317.

  1. Using the automatic feeder, just place your documents in order facing down in the feeder.
  2. If the computer is not already operating, login to the computer using the username and password found under the keyboard.
  3. There are instructions posted on the screen of how to scan a document.
  4. Confirm that the output type is what you want. If you are scanning a document with text and figures and do NOT want to edit the text, use Greyscale. If you have a text document that you want to edit, use Editable Text (OCR).

When you have finished scanning the material and saving it to files on the PC, the next step is to transfer the files to the math computer using SFTP. Click here to see how to transfer files using SFTP.

This page was last updated on August 25, 2008 at 10:32 am and is maintained by
For questions regarding courses and/or special permission, please contact
For questions or comments about this site, please contact
© 2017 Rutgers, The State University of New Jersey. All rights reserved.