TeX Macros

Plain TeX Macros


Gzipped Tar File containing all files mentioned below, even this file!


If you prefer Plain TeX, but want macros to handle automatically all your numbering and referencing, including hyperlinks and generating bibliography and tables of contents, then you may want to use the file Ref.macros, for which documentation is in Ref.doc (TeX file), Ref.dvi. Possibly this should have been written in eplain.tex, but not having done so has two advantages:

If you type a lot of math, then you may want my collection of macros that are useful for common items in math. These are in the file math.macros, for which documentation is in math.doc (TeX file), math.dvi. If you use both of these, make sure to input math.macros before you input Ref.macros, as explained in the documentation.

To illustrate both of the above, a sample file is available with BibTeX-generated bibliography file; when you TeX it twice, it should look like this.

Actually, BibTeX generated the bibliography file from article-tpl.bib. I use a modification of apalike.bst that fixes some bugs and is compatible with Ref.macros; it is myapalike.bst. For books, I use instead bookapalike.bst.

You may also want lrlEPSfig.macros, a file of macros to make it very convenient to insert encapsulated PostScript (eps) figures with epsf.tex and to relabel them with either rlepsf.tex or labelfig.tex, with automatic captioning and labeling if desired, compatible with Ref.macros. There is no documentation for this file, but it should be easy to figure out by looking at it and reading the comments in the file. Note, however, that it already inputs Ref.macros, so don't input it again in your main file, or comment out that line.

If you like bp.pl, then you may want to use bibpick, written by Oded Schramm, which will generate a bib file from the aux file that TeX writes when you use either Ref.macros or (heaven forbid) LaTeX. You may also want to use bibweb to pick these off the web for you. I now use keys for bibliographic referencing, as explained in Ref.doc.

If you upload to arXiv, you may want to make a tar file containing all the necessary files. A very convenient way to do this that allows for mistakes and repeated attempts is to create a file called tarme and an empty tmp/ subdirectory. The file tarme should list the files to be included in the tar file, one per line with relative names. Then use the command

tarit filename

where you have elsewhere made the alias

alias tarit 'cp `cat tarme` tmp/ ; cd tmp ; tar cvf ../\!*.tar * ; cd .. ; gzip \!*.tar ; rmrm tmp/*'

You will end up with filename.tar.gz, containing all that is listed in tarme. If you upload this and find a mistake, correct the mistake, delete filename.tar.gz, and try again. (This avoids a growing tarball. Here, I have used another alias, rmrm, for removing without asking for confirmation.)

Note: there are some hidden conventions in arXiv. No files with nonstandard extensions are allowed to be overwritten unless they were created by arXiv while TeXing. Therefore, do not upload *.lbl files, unless you have set the switches not to do forward referencing or generating a bibliography. In addition, all of $basename.(dvi|aux|log|lof|lot|toc) are removed before the first TeXing. Therefore, it is useless to upload those. This means, in particular, that if you generate a table of contents, you should let arXiv do that. Alternatively, you could change the macros to use a different extension than .toc. The simplest thing, then, is to upload only $basename.(tex|bbl), Ref.macros, and math.macros, as well as any figures or other files you input.

All the above files are in the public domain.