Posting on

From Wiki
Jump to navigation Jump to search

What is is a worldwide, open-access preprint server. It is the primary means of scholarly communication in many subfields of physics. It also serves preprints in mathematics, computer science, quantitative biology, and some other subjects. Begun in 1991, by 2015, its preprint collection had more than one million articles[1].

Why should ConTeXt users care about this page? uses plain TeX or LaTeX as the preferred source format for submitting documents. When you request PDF, PS, or DVI format, the system, which now (April 2007) runs a modified teTeX 3 distribution, generates it automatically from the source.

But the system does not run ConTeXt in the same automatic way. So you have to generate the PS format yourself and submit that. If that were the whole story, you'd be done. However, you would like the benefit of arxiving, sorry archiving the source code that plain TeX or LaTeX users get. So you need a way to submit the source code along with your PS file, in a way that the automatic system does not reject.

You can imagine that with 500,000 or so documents, with thousands added every month, that the submission process has to be as automatic as possible in order to keep the costs per article low. And the low per-paper cost, one or two orders of magnitude lower than the cost of traditional journals, allows the system to provide the articles for free.

So this page describes how to submit your ConTeXt document along with its source.


For the impatient, look at containing a working example. It is licensed under the GNU GPL free-software license, so you can use it as a basis for your own submission.

Otherwise, here are the details.

Why PostScript?

The system will accept a PDF file but only unaccompanied. So for now you cannot submit a PDF file along with the source. Instead, you need to submit PS. The PS-submission subsystem does accept other files, ideally placed in a subdirectory.

The admins say that this situation is an oddity in their system, but not one that they can fix easily or soon (except, I suppose, by making the PS submission be like the PDF one!).

Prepare the PostScript

Write your document! Let's say that it's called document.tex and uses two EPS figures generated from the MetaPost file Generate using

  texexec --dvi --nobackend document.tex
  dvips -Ppdf document.dvi -o

The -o is to work around stupid dvips configurations that send the output to lpr by default.

The system will automatically generate PDF from the PS using ghostscript, so test that ps2pdf (a wrapper around ghostscript) on produces a working PDF file.

View to check that any TeX-generated labels in the MetaPost figures come out in the correct font. If they look like Courier, then the font embedding isn't right. The -Ppdf is to make sure that the correct fonts are embedded into the PS file, but if that didn't work, ask for help on the mailing list!

Prepare the upload file

Make a directory src/ with document.tex and Then make a .tgz file for uploading. I usually call it arxiv.tgz. It is produced from this file structure:

The command to produce the tgz file:

   tar -czvf arxiv.tgz src/


If all is well, upload arxiv.tgz as your submission using the usual submission or replacement procedure. Ideally you'll do step 4 an hour before the 4pm (US Eastern) weekday deadline, so that you get back in time the submission date and preprint number from for step 5. Then you have time for the next steps.

Incorporate the date and preprint number

Incorporate the preprint number (or URL) and submission date into your document and produce an arxiv stampline along the left margin on the first page. Then remake and arxiv.tgz, and replace the previous submission with the new arxiv.tgz. This stampline is most easily placed using layers, and the document is an example.

For automatically processed source formats (plain TeX and LaTeX), you can avoid this incorporation step by using magic strings in the source file, and the automatic system will translate those into the preprint number and date. However, we as ConTeXt users are (with these directions) faking the behavior of that system, so we get the info ourselves and incorporate it.

Check that all is well

Check that the PS and PDF look fine. For example, check that the fonts in the MetaPost figures look right.

Then sit back and relax, knowing that you've contributed to the open-access commons.


Generating and arxiv.tgz from the source files is a process best done by a computer. And that is best done by a Makefile. See for how to use the make program for documents. And see for a ConText document that uses a Makefile.

Good luck!


  1. Gwen Glazer, arXiv hits 1 million submissions, Cornell University Library, Ithaca, NY, USA,, 2015-01-12, Retrieved 2017-11-12.