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.

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
add comment

1 Answer 1

Put the code of the test file between tags, say

%<*testa>
code for the first test
%</testa>

and say, in the .ins file,

\generate{\file{testa.tex}{\from{mypackage.dtx}{testa}}}

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

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

share|improve this answer
add comment

Your Answer

 
discard

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.