TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use doc\docstrip to write a small package. I have one main class .dtx, which is processed via an .ins file. Is it possible to include two small test files in the .dtx file and generate them via the doc/docstrip method or do I have to write them as separate files.

share|improve this question
@MarcoDaniel Thanks a lot. I will have a look at your package. Will you please post your comment as an answer so I can accept it? – mathspasha Jan 13 '12 at 14:22

Put the code of the test file between tags, say

code for the first test

and say, in the .ins file,


Notice that a single \generate can have many \file statements.

There are many examples in the directories under source/latex.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.