# How do I install a .dtx file?

When I run:

tex algorithms.dtx


for example, I get this message.

  ! Undefined control sequence.
l.34 \documentclass
{ltxdoc}
?


Help?

-

Depending on how the .dtx is constructed, it may not work at all with TeX: you have to use (pdf)latex. To unpack the file you may well need an .ins file.
Joseph Wright says "run latex on the .ins"; however, if you have LaTeX, you also have ltxdoc.cls, etc., so that unpacking the .dtx doesn't help.
Processing the .dtx file with (pdf)latex gives all you need -- a file of documentation.