Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have create a template and some macros I would like to share. How can I contribute them to CTAN?

share|improve this question
Ego battle for upvotes in the answers =) –  Dima Aug 3 '10 at 16:31
Not really :-) As I said, Will's answer is spot on, it's just that I'd just finished drafting mine when his popped up, and I hope mine provides a few 'immediate' pointers on what to do. –  Joseph Wright Aug 3 '10 at 20:10
add comment

2 Answers

up vote 37 down vote accepted

Great! The process is simple. Everything is explained on the upload page (see below for the actual links). My own guidelines are listed below.

  1. Make sure the material is licensed appropriately. Most LaTeX package are licensed under the LPPL, but you can also use the GPL or one of the Apache/BSD/MIT licenses if you wish.

  2. Make sure that you include the sources to any pre-built files (where appropriate: files such as images do not have 'sources'). PDFs without source files are not permitted in TeX Live. The usual system for LaTeX packages is to use a DTX file as a combined source/documentation file that can be typeset to PDF or extracted to a STY or CLS file using an INS file -- this is known as the ‘docstrip’ system. See Scott Pakin's dtxtut for good guidelines here.

  3. If you're not using docstrip for your package source, make sure the material is documented; a package without PDF documentation will probably not be accepted these days. Remember to include a readme file (called README, i.e., without an extension) that briefly explains the package.

  4. Check the naming of things. Your the names of your files shouldn't conflict with anything on CTAN or anything in TeX Live/MiKTeX. The more specific the name can be, the better. E.g., don't call a conference class anything like conference.cls; refer explicitly to which conference it is to be used for, such as active-conf-2006.cls.

Having done that, take your files and bundle them up in a ZIP or TAR.BZ (or etc.) archive and upload it. There are two CTAN ‘mirrors’ to which you can upload your work:

The only difference between the two is that a different person (in a different timezone) will process the upload.

share|improve this answer
add comment

I see Will has answered this, but I'm going to give the same information in a slightly different form!

The upload page at http://www.ctan.org/upload contains some advice, as well as an upload form. You only have to upload the files themselves, but it is usual to include some kind of README file and also probably some documentation. If you have a package called 'mypkg', you might therefore want to upload:

  • mypkg.sty, the package itself
  • mypkg.pdf, the documentation
  • mypkg.tex, the source for the documentation (needed to get the documentation into TeX Live)
  • README, the readme file

All of that needs to go into a single zip file, which you then upload.

A lot of LaTeX packages are written in 'dtx' format, which puts the source for the documentation and the code into one file. This is also used to document the code itself. If you use dtx format, then you'd upload

  • mypkg.dtx, the source file
  • mypkg.ins, used to unpack the dtx file
  • mypkg.pdf, the documentation
  • README, the readme file

Again, everything goes into one zip file and gets uploaded using the form on the CTAN website.

There are additional things that you can upload, but to begin with I think this is where to start.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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