8

Is there a way to download the package files only be knowing the CTAN package name (which can be a (La)TeX package, class, bundle, font, etc.)? I'm aware that http://www.ctan.org/pkg/<NAME> shows the package entry and tug.ctan.org/tex-archive/help/Catalogue/entries/<NAME>.html shows the similar catalogue entry. Both of them link to the CTAN directory holding the package files, which is fine for manual browsing. I however look for an automatic way to retrieve the package files (mainly the DTX and INS files) without needing to parse a HTML page for the directory URL. The idea is to write a script which allows to install most CTAN packages directly from CTAN.

To elaborate: I'm looking for an online resource where I can use the CTAN package name in an URL and I get redirected to the CTAN directory of this package, on any mirror. This is similar to http://texdoc.net just not for the documentation but for the DTX/INS files. If there is no such thing I probably will create it myself (by altering the some source code of CTAN-HG), but I see no reason to duplicate something which already exists.

8
  • 3
    Have you looked at the TL scripts for updating packages? They already have the (long) list of 'special cases' you'd need to allow for.
    – Joseph Wright
    May 26, 2012 at 19:31
  • @JosephWright: I didn't saw these scripts yet. Can you give me a link, please? However, I have experience with exceptions from my work on CTAN-HG. May 26, 2012 at 20:21
  • Now there you have me. I know these scripts exist, but I'd have to ask on the TL list where they actually are :-)
    – Joseph Wright
    May 26, 2012 at 20:24
  • 2
    ctan hosts allow any directory to be retrieved as a zip file so if you know the directory you can get all the files, in one go, May 26, 2012 at 20:50
  • 2
    For the scripts in TL see tug.org/svn/texlive/trunk/Master/tlpkg/libexec/…, tug.org/svn/texlive/trunk/Master/tlpkg/bin/…, ... but these are not standalone and might need minor adjustments. May 30, 2012 at 0:24

1 Answer 1

2

[Combining comments into a answer]

You can retrieve any directory from CTAN as a .zip file so if you know the directory you can get all the files, in one go. TeX Live uses a series of scripts, which can be downloaded from http://tug.org/svn/texlive/trunk/Master/tlpkg/libexec/ctan2tds?view=markup and http://tug.org/svn/texlive/trunk/Master/tlpkg/bin/tlpkg-ctan-check?view=markup, but these are not standalone and might need minor adjustments.

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.