1

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
3

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

in the terminal.

  • Is this the source code to the package or to the documentation of the package? I'm looking for the latter. – ipavlic Jun 6 '14 at 12:28
  • 1
    It's both. See the link provided in @some1's comment. – Ian Thompson Jun 6 '14 at 12:31
  • @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
  • @ipavlic What are you trying to do? – Joseph Wright Jun 6 '14 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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