Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I run:

tex algorithms.dtx

for example, I get this message.

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

Help?

share|improve this question
add comment

2 Answers 2

up vote 10 down vote accepted

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.

share|improve this answer
    
@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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.