I would like to split the voluminous .dtx of eledmac in multiple .dtx file. 1) one for the user handbook 2) many other for the package code + handbook.

So my objectives are: 1) have multiple .dtx file 2) but produce one .sty file and one .pdf file

what is the best way?

  • Why do you want to write the user handbook in DTX? Might be easier to manage that in normal LaTeX. That is how memoir is handled. The documented source might not be that relevant for the casual user. So having two PDFs might be better (might even leave out the PDF of the documented source code)
    – daleif
    Commented May 15, 2015 at 8:58
  • you are right. Hovewer, for now, the eledmac user handbook and the documentation are in the same file, which I have inherited from previous developer. But as my objectif is to separat as much as possible what is relevant for user and what is for developer.
    – Maïeul
    Commented May 15, 2015 at 9:17

1 Answer 1


It is quite straight-forward to split the code for a single .sty over multiple sources: after all, the .dtx format was created to support the work of the LaTeX team where there is a significant need for this type of thing. The \generate macro takes two arguments where the second can have multiple source files

\input docstrip

In terms of making a single PDF, that comes down to having a source file that will generate the documentation and then typesetting it. Depending on exactly how you want to set things up, you might have a simple .tex file for the user documentation, might use a .dtx or might arrange that the user documentation is inside the code .dtx files and only the user part of each one is read by a master .tex file. However, that does not depend at all on where your code sources are.

  • I was stupid. I didn't thing about duplicate the \from command.
    – Maïeul
    Commented May 15, 2015 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .