# How to obtain the source latex code of package documentation?

Is it possible to obtain the source latex code from package documentation? For example, I don't see the documentation latex file among siunitx source files.

• Ehm... Short answer: it's there. See FAQ for a brief description. – m0nhawk Jun 6 '14 at 12:03
• Not: there is ongoing work on the siunitx package: look at siunitx-v2.dtx. More generally, look for the .dtx files in your TeX system (which should match your installed packages). – Joseph Wright Jun 6 '14 at 12:03

These files have the extension .dtx. The source for siunitx is here. If you are using TeXLive, you can find the file on your own system by typing
kpsewhich siunitx.dtx

• @ipavlic In the case of siunitx, it's both: this is not required but is common for LaTeX packages as the .dtx format is designed to support such an approach. – Joseph Wright Jun 6 '14 at 12:36
• Great, I see it now! Is there a built-in command to automatically strip non-documentation code (e.g. \begin{macro}..)? – ipavlic Jun 6 '14 at 13:15