Editing Postscript Files in the Lab

Postscript files are text files which, when properly compiled, can produce quite complicated text and images.  Postscript files can be edited with any text editor; to see the output requires a compiler.  Common compilers include Adobe Distiller (which our lab does not have) and the command ps2pdf (which it does).  To conveniently use ps2pdf, there is a small amount of setup necessary, which is described below:

 

 

Step 1:  Initial Setup (You only need to do this once.)

 

  1. Run the program Cygwin (Start -- All Programs -- Cygnus Solutions -- Cygwin) so the system creates the necessary directories. This will give you a command prompt.
  2. Leave that window (we’ll use it later, so you don’t need to close it) and use Explorer to open the folder C:\pgms\CYGWIN\HOME
  3. There should be a subfolder called ‘micros’.  Right-click it, and go to ‘create shortcut’.
  4. Copy the Shortcut to your desktop or My Documents folder, and rename it: PostScript Files

 

From now on, you should place your postscript files in this directory.  For example, from the ‘Handouts’ section of the website, there is a file labeled ‘Corners File’. Click on it, and choose to save it in your Postscript Files directory. Make sure it has a .ps extension. You can edit this file with any text editor.

 

            Step 2: Editing postscript files

 

  1. Open your favorite text editor.
  2. Open an existing file in the PostScript Files directory, or create a new one.
  3. Make sure that you save your file with a .ps extension, and in the PostScript Files directory.

 

            Step 3: Compiling postscript files

 

  1. Open Cygwin. (Start -- All Programs -- Cygnus Solutions -- Cygwin) (Or just switch to Cygwin if it is already open)
  2. Type the command: ps2pdf filename.ps  where filename.ps is the file you are working on.
  3. This will create a file called filename.pdf in the PostScript Files directory.  Open it to see your work!
  4. You need to close the .pdf file before you can recompile.
  5. To make recompiling even faster, you can reenter the previous command in cygwin by pressing the up-arrow key.

 

 

            Important!

   The files in the Postscript Files directory will be deleted when you log out.  Make sure you copy them to a place in your My Documents that is not a shortcut before you log out!

 

 

 

Play around and have fun!