dtx
dtx is a file extension used in the TeX/LaTeX ecosystem for documented source files. A dtx file, short for documented TeX, combines human-readable documentation with TeX/LaTeX code in a single literate source. The standard workflow is to write the package as a dtx, then use the docstrip tool to extract the actual code into a .sty or .cls file and to generate a separate documentation file, usually a PDF or TeX document.
Dtx files are commonly associated with the LaTeX project and with the package authoring conventions from the
To build a package, one typically runs latex on the .dtx to produce the rendered documentation, and
The dtx format remains widely used for traditional LaTeX packages, although newer tooling and packaging practices