I've written some code to extract some help from dtx files (documented package), and I have tested it on a few packages for which I had the .dtx. It seems, however, that .dtx files are not shipped with TeXlive (or rather, find /usr -name '*.dtx' only came up with very few of them).

I could simply go to CTAN and download package documentation one file at a time, but... that's not desirable :). So how can I do that in the most efficient possible way?

EDIT: it appears that the absence of dtx is normal under Ubuntu 10.04 (Lucid). Only dtx from the koma-script and a few others are included.

  • I guess TeX Live does have (almost) all .dtx files in texmf-dist/source/{latex|generic|...}. But there are a lot of packages distributed without .dtx files, such as pgf. – Leo Liu Mar 1 '11 at 13:23
  • 7
    are you sure you installed everything from tex live? the .dtx files are segregated in a source tree separate from the "active" trees to save time. when installing, i believe there's an option to omit the source tree to save space. – barbara beeton Mar 1 '11 at 13:26
  • @barbara beeton: a search for texlive in my package manager (synaptic) only comes up with various texlive2009 subpackages, all of which are installed. – Bruno Le Floch Mar 1 '11 at 14:06
  • Did you try to get the Debian source package for texlive-base? packages.debian.org/source/squeeze/texlive-base. I am not sure, but I think it should have the dtx files in it. It is a huge file, though, the rsync solution is better, I think. – Jan Hlavacek Mar 2 '11 at 6:41

You can use the rsync interface of the three main archive servers. Then use the correct rsync option to only include .dtx files:

rsync -aP --prune-empty-dirs --include='*/' --include='*.dtx' --exclude='*' rsync://rsync.dante.ctan.org/CTAN alldtxs

However, in my manually installed TeXLive2010 tree the DTX files are included.

  • Perhaps the issue is that I have TeXLive2009 installed? – Bruno Le Floch Mar 1 '11 at 14:01
  • 1
    @Bruno: The TeXLive provided by Debian or Ubuntu might not have the source files installed. You might try to install texlive-full with this distributions, but I can't tell you if this will install the .dtx files. I strongly recommend you to install TeXLive manually. Then you get the benefit of being able to update packages using tlmgr. – Martin Scharrer Mar 1 '11 at 14:15
  • 1
    Thank you for your rsync dark magic: it works. I indeed have Ubuntu's texlive-full installed, but there is no dtx. I'll give a try to the manual installation. – Bruno Le Floch Mar 1 '11 at 19:18
  • 1
    @Bruno: If you do make a manual install (which I would recommend), you may want to look at tug.org/texlive/debian.html . Note in particular the part about creating an "equivs" package, so that the package manager knows that various (TeX) dependencies are met. Of course, you should uninstall all tex-related packages from the package manager, to avoid interference. – Villemoes Mar 2 '11 at 6:16
find /usr/local/texlive/2010/texmf-dist/source/ -name "*.dtx" | nl

reports 1315 files

  • On my installation, /usr/local/texlive does not exist. Everything seems to be under /usr/share – Bruno Le Floch Mar 1 '11 at 14:01
  • 3
    Sure, then you do not have the TexLive from tug.org but from your Linux distribution. However, there should also be a ???/source/ dir. Which distribution do you have? – user2478 Mar 1 '11 at 14:02
  • Ubuntu's texlive-full (TeXLive 2009). There have been issues in the past apparently that Ubuntu was sticking with TeXLive 2007 when TeXLive 2009 was already out. This at least more or less explains why I don't have TeXLive 2010. On the dtx issue, I don't know. I'll go for Martin Sharrer's idea of trying manual installation. – Bruno Le Floch Mar 1 '11 at 19:23
  • sorry for double posting. I found out that Ubuntu's packages (for Lucid) only include 60 or so dtx. See the link in my updated question. – Bruno Le Floch Mar 1 '11 at 19:42
  • @Bruno: for Ubuntu/Hardy it was the package tetex-src Lucid has indeed no source file package – user2478 Mar 1 '11 at 20:07

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.