# 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.

-
@an_ant: it doesn't need to be deleted, because it might help other users. You could even improve that chance if you change the title to "Installing a dtx file" or similar, so it could be found by users with a similar problem but any arbitrary package. – Stefan Kottwitz Dec 11 '10 at 18:59
@Stefan Kottwitz: Got it. I'll try to manage it. – user1996 Dec 11 '10 at 19:24
Thanks! Forgot that you should "Run LaTeX on the .ins file to unpack the .dtx file". – user1996 Dec 11 '10 at 19:29

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.

-