4

I learned that many of (La)TeX book examples are stored in http://ctan.org/tex-archive/info/examples directory.

enter image description here

However, the directory with examples from the book LaTeX Companion 2nd ed does not provide the feature to download files in one zip file.

enter image description here

In this case, how to download all the files in the CTAN example directory?

Googling to find this site (https://stackoverflow.com/questions/23446635/how-to-download-http-directory-with-all-files-and-sub-directories-as-they-appear#) to use wget, but with this command, I could not download any file.

wget -r -np -nH --cut-dirs=3 -R index.html http://ctan.org/tex-archive/info/examples/LaTeX_Companion_2ed/

How to download example files in a CTAN directory?

2
  • This seems off-topic. The only sense in which it is related to TeX is that you are trying to download files having to do with TeX. But the question would be just the same if you were downloading papers about psychotherapeutic relationships with goldfish. Wouldn't this be best asked elsewhere?
    – cfr
    Sep 9, 2016 at 23:13
  • 1
    Efficiently downloading files from CTAN in bulk seems an acceptable question for here to me. There may be CTAN-specific answers which would not appear elsewhere. That said, getting the command the OP has found to work probably is a bit off-topic here and better asked elsewhere.
    – Dai Bowen
    Sep 9, 2016 at 23:24

2 Answers 2

6

If you write ftp://tug.org/tex-archive/info/examples/ in the address bar, the same resources are available. You can use any FTP software to download a directory. If you use FTP software (as opposed to accessing the FTP server in a web browser) you need to use the username anonymous and an e-mail address (of your choice) as a password.

5

In a web browser type ftp://ftp.ctan.org/tex-archive/info/examples/ in the address bar, and log in as a guest. There is a tlc2.zip file that zips all the example file. The LaTeX_Companion_2ed directory is symbolically linked to ltc2 directory, and I guess that's the reason why it does not show the zip file to download.

enter image description here

When you can access with http://ctan.org/tex-archive/info/examples/tlc2, you can see the zip file to download.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .