### Partner Sites

 A brief and concise description of RevTeX 4 package
(894 votes, average: 3.97 out of 5)
LaTeX - Document Classes
Written by Thiago S. Mosqueiro
Tuesday, 10 February 2009 05:15

In this article, we describe briefly the RevTex 4 package for those interested in Physical Review look and feel. As a non-trivial article, some features supported (and not supported) by RevTeX 4 are presented with screenshot examples. This article may help physicists in first touch with APS journals and manuscripts submittion.

## Introduction

RevTeX 4 is a set of macro packages designed to be used with LaTeX 2e. These macros might be used in LaTeX articles by naming the document class as revtex4, wich is well-suited for preparing manuscripts for submission to American Physical Society (APS) journals. The full documentation of RevTeX 4 can be found here. Unfortunately important information are spread away in internet and we hope this article helps new users.

The first natural question one might ask before using any different document classes (or an entire macro package) would be close to what are the design principles of this new document class? Since, for pratical purposes, RevTeX 4 is a new document class and it is really different from ams or article document classes (see comparison section), let's cite some of the principles listed in RevTeX's Home Page. First of all, RevTeX 4 is fully compatible with LaTeX 2e and it relies on standard LaTeX 2e packages for common tasks (as examples, graphics/graphicx, color, hyperref and longtable). Also, RevTeX 4 provides better support for achieving the Physical Review look and feel, including the improved front matter macros for tagging authors, affiliations and references (see this section), promoting the use of BibTeX. This latest tagging is designed to aid the peer-review and publication process from the moment a RevTeX paper is submitted. For college works or internal group reports RevTeX 4 have all the features required and offers an well formatted look.

First of all in this article, the starting section deals with installation and first-time use of RevTeX 4 package, both in Windows and Linux/Unix systems. In the following section, we compare this new class to two other document classes. After the comparison, we construct the article's title and we show some of the specifications of RevTeX 4.

## Starting with RevTeX 4

It is not common to find this package in a default LaTeX/TeX distribution installation (for example, MikTeX or teTeX), but it can be easily found and downloaded. In debian-like systems (linux), we can find this as a package in Synaptics software. These systems use as default teTeX distribution. Equivalently, one may use the following terminal command:

sudo apt-get install revtex4

Since this calls a superuser permission with sudo, a superuser password will be required by the system. Once the identification is complete, the revtex4 package in system repository will be installed together with its dependencies. When installation is finished, RevTeX 4 is ready to use.

Using Windows MikTeX, we can find revtex4 together with thousands of other packages in MikTeX Package Manager (suposing the MikTeX installation's version is 2.4 or newer). After waiting MikTeX downloads and installs revtex4 package, it is necessary to open MikTeX Options and click on Refresh Now button so MikTeX can update all your LaTeX/TeX system. Again, RevTeX 4 is ready to use just after the system is refreshed.

There are cases in wich one cannot download revtex4 package from any system's repository (like Synaptics or MikTeX Package Manager). The RevTeX 4 team recommends downloading the TeX Live package, since it has everything including revtex4. Actually, TeX Live includes all the major TeX-related programs, macro packages, and fonts that are free software, including support for many languages around the world. Most important, it's available for Windows, Mac and Linux/Unix.

Once these steps are done, all the RevTeX 4 macros are ready to be used. So, starting a new LaTeX file with your favorite editor (namely we can cite TeXnicCenter for Windows users and Kile or GNU Emacs for Linux/Unix users [0]), it is only necessary

\documentclass{revtex4}

in the LaTeX document and, after compiled, it will be fully formatted using all the RevTeX standards. This line is the first of a LaTeX file, in a region we call as preamble: all the code before \begin{document} macro. This \documentclass macro loads the RevTeX 4 class [1]. In a most general case, it is possible to include some class options,

\documentclass[ -- CLASS OPTIONS -- ]{revtex4}

These class options defines the document's layout. At this point, one only needs to choose a journal style and either preprint or twocolumn styles. The possible journal styles are pra, prb, prc, prd, pre, prl, prstab and rmp. So, for example,

\documentclass[preprint, prX]{revtex4}

gives 12 pt, one-column, double-spaced look used for the review process (not yet publicated in a journal). Trying

\documentclass[twocolumn, prX]{revtex4}

gives a 10 pt font size, double-sized final documents (as already publicated) look [2]. Both of the precedings examples use prX as a generic journal style. In the class options, we can also define paper size options. A full list of these class options can be found in RevTeX 4 Command and Options Summary.

Many of the LaTeX 2e macros work just fine. For example, if a user wants to change the page numbers, the LaTeX 2e original method should work perfectly:

\setcounter[page]{12}

Another example of a genuine LaTeX 2e method is hiding all the page numbers, wich can be achieved with

\pagestyle{empty}

RevTeX 4 comes with a template file called template.aps, and you can copy and study this file here. The easiast way to begin with RevTeX 4 is using this template file. After a few trials, one may create its own template file and things should go easy. The document presented in screenshots as example is available for downloads: here is the TeX and here is the PDF version.

### Preprint vs Two-Column

It is important now to discuss these two document class options: the preprint and twocolumn options. When submitting a manuscript to APS, the preprint option must be used instead of twocolumn. Even when submittions are made using twocolumns, this options is changed to preprint automatically upon submission. From Wikipédia, we can read this about preprint style.

Publication of manuscripts in a peer-reviewed journal takes some time, because manuscripts must undergo extensive reviewer critique. The need to quickly circulate current results within a scientific community has led researchers to distribute documents known as preprints, which are manuscripts that have yet to undergo peer review. So, a preprint is a draft of a scientific paper that has not yet been published in a peer-reviewed scientific journal. The immediate distribution of pre-prints allows authors to receive early feedback from their peers, which may be helpful in revising and preparing articles for submission.

Therefore, the preprint only helps referees when reviewing submissions. The preprint increases font size to 12 pt, increases line spacing and formats the text in one-column scheme. When writing a work, it is common to use twocolumn option. But when switching between these two options, there can be some problems with the new spacing and font size. So tables and equations need to be reformated. Since this is the version a peer review from APS will read, it is important to pay attention to these details when using preprint style.

## Comparisons between classes

Now it would be usefull to compare RevTeX 4 with other widely used document class: article. We are not going to compare in deeply details these classes, but how they look like. If you know what you want to achieve for your paper or report, so now you can verify if RevTeX 4 may help you.

Click for real sized picture (thumbnails). In the following sections, we are going to pay more attention to details of this macro package, and other details wich one may not see in these pictures shall be explored.

## Constructing the article's title

Perhaps, the most important macro changes in RevTeX 4 are those pertaining to the markup of the front matter, i.e., title, authors affiliations, abstract, PACS, etc. While the macros are quite similar to other classes, the usage is quite different. In this section, we pay attention to this important subject, since this is the basis of documentation and search engines.

When starting your paper, one might want write the paper's title or header. It is quite common in other classes to use \maketitle macro for printing the header informations. In RevTeX 4, there is one little difference: the \maketitle macro comes after the abstract environment. It is possible to determine author's name, email, home page and affiliation. For the paper, abstract and it's keywords. There are specific macros for each one. Let's examine the following example.

\title{A brief and concise description of RevTeX 4 package}\author{T. S. Mosqueiro}\email{thiago.schiavo@gmail.com}\homepage{http://legauss.blogspot.com}\affiliation{Instituto de Física de São Carlos, University of São Paulo, São Carlos, SP - Brazil}\date{\today}\begin{abstract} In this article, we briefly describe the RevTex 4 package for users interested in scientific publication around APS journals.\end{abstract}\keywords{latex-community, revtex4, aps, papers}\maketitle

With RevTeX 4 (but not only with) it is possible to use double backslash to force linebreaking in the title or affiliation. If there are more than just one author, just repeat the same author's properties for each one. But it is really important that each \author macro has uniquely one author's name. Simmetrically, each \affiliation macro has its own affiliation information, not more than one.

(...)\author{Name of author 1}\email{Author 1 email}\homepage{url of author 1 home page}\affiliation{Author 1 affiliation}\author{Name of author 2}\email{Author 2 email}\homepage{url of author 2 home page}\affiliation{Author 2 affiliation}(...)

Sometimes, we have more than one author with same affiliation. In this case, group authors with same affiliation and define the authors affiliation propertie only after the last author of this group. See the example bellow.

(...)\author{Name of author 1}\email{Author 1 email}\homepage{url of author 1 home page}\author{Name of author 2}\email{Author 2 email}\homepage{url of author 2 home page}\affiliation{Author 2 affiliation}(...)

Let's take a look in a screen shot of this last example. The figure (click for real size image) is a screenshot of a compiled revtex4 document, using two column, with three authors: T. S. Mosqueiro, J Doe and mr W. Y. S. I. W. Y. Get (of course, the two last names are not real). The same procedure can be used for inumerous authors with their inumerous respectives affiliations. As we can see, the date comes just after the last affiliation's name (as default in LaTeX 2e); the \today macro gives as argument the actual date when the document is compiled [3]. Notice that the abstract starts without any title and, as default, it is centralized. Even when using two columns (as this case), the abstract is printed separated from the columns.

One may notice that no keywords were printed in preceding figure. For displaying the keywords, use explicitly the showkeys class options. When compiling the file, we used the following header (adding a showkeys class option).

\documentclass[a4paper,superscriptaddress,twocolumn,prb,showkeys]{revtex4}(...)\begin{document}\title{A brief and concise description of RevTeX 4 package}\author{T. S. Mosqueiro}\email{thiago.schiavo@gmail.com}\homepage{http://legauss.blogspot.com}\author{J. Doe}\email{johndoe@someserver.com}\affiliation{Instituto de Física de São Carlos, Universidade de São \\Paulo.  Av. do Trabalhador São-carlense, 400 CEP 369, 13560.970, São \\Carlos, SP, Brazil.}\author{W. Y. S. I. W. Y. Get}\email{wisiwig@duh.com}\homepage{http://www.google.com}\affiliation{National Other Institute of Other Country.}\date{\today}\begin{abstract}  In this article, we briefly describe the RevTex 4 package  for users interested in scientific publication around APS journals.\end{abstract}\keywords{latex-community, revtex4, aps, papers}\maketitle

The symbols after the names in this figure are actually links for author's respectives emails and home pages. These informations are printed together with footnoes, as shown in this picture at right (click for real size image).

Both the author electronic adress and home page are hyperlinks: the first calls any service for mailing; the second, calls the default reader's browser, visiting the selected home page. These are usefull tools for on-line paper versions. The little bar in the figure indicates the end of the text in this two column scheme.

A quite differente result can be achieved using the superscriptaddress option in document class. This appears to be way papers get published by Physical Review journals. In the figure at right (click for real size image) we can see the output. It's the same header, same options, just adding with superscriptaddress option.

There are also cases in wich some author may have no affiliation. In this case, noaffiliation must be used. It is also possible to specify collaborations for each author, by means of collaboration macro. The author macro should not be used for collaborations, since these macros are used for documentations.

## Specifications

There are some specifications around the environments and macros used in a RevTeX 4 document, specially if the authors aim to send it for publication. Some of these specifications may cause headache while working, since there are some prohibitive rules.

### Text formatting

When writing a manuscript aimed at a journal, all the specific formatting requirements must be followed. As seen, RevTeX 4 formats a manuscript like a APS publication. This doesn't means exactly that APS publications are simply RevTeX 4 files: they deal with a complex software interacting with the RevTeX 4 preprint manuscripts. Usually, manuscripted are submitted to APS formatted with letter size paper. Since referees receive manuscripts electronically and they might want to print them out, consider using letter size paper when submitting papers.

When using RevTeX 4, the text is formatted using 10 pt font size. It is preferable to avoid old macros such rm or it. Since RevTeX 4 is fully compatible with LaTeX 2e, other macros may substitute these old ones. Here is a table of text and math more convenient formating macros. This table was copied from APS Guide to RevTeX. Finally, it is not possible to creat margin notes using \marginpar macro.

### Using BibTeX

We usually cite other works (such as books, papers, internet addresses, etc) using a separated section, the bibliography section in general. BibTeX stands for a tool and a file format wich are used to describe and process lists of bibliographic references in conjunct with LaTeX. Any LaTeX user can write a file with all his relevant bibliographic references, defining labels for each reference, and cite in his papers these references by using their label. A file with all this bibliographic information may be seen as a data basis. In this file, all the reference details are separated so the TeX can use them separately.

Let's see how BibTeX work a little more. First of all, save a new blank file with .bib extension [4]. For every relevant reference, add to this file a new entry. Supose one might cite an article by Mr. Get named That's what you see!, published at 2009. The entry in the .bib file should be like the following lines.

@article{get05,  author = "Mr. Get",  title = {That's what you see!},  publisher = "nob" # "ody"}, year = 2005, }

When citing our coulegue Mr. Get in a LaTeX document, it's only necessary to use \cite macro with get05 as argument:

\cite{get05}

This generates that biobliographic section we mentioned before and add's automatically and entry with the get05 labeled reference present in .bib specified file. But... Specified where? To complete the correct use of BibTeX, it's necessary to add the following code where the bibliographic section should be.

\bibliographystyle{ -- STYlE -- }\bibliography{ -- .bib file --}

Usually, this is the last macros before \end{document}. This defines your library file. In --.bib file-- only the name of the .bib file should be, without the .bib extension. It's also possible to use a .bib file not located in the same folder as the LaTeX document: instead of the .bib file's name, supply the full address. For example, in a linux system one might use

\bibliography{/home/thiago/bibtex/books}

Using a non local .bib file may be very usefull, since there will be only one file to update everytime a new reference must be cited. If there are more than one .bib file, you can specify them separating by comas.

\bibliography{/home/thiago/bibtex/books,/home/thiago/bibtex/articles,/home/thiago/bibtex/hqs}

By --style-- we mean a predefined style for displaying these references. For example, plain and unsrt are widely used. See this page for more styles and examples.

After writing a paper, LaTeX dedicated editors, like Kile and TexNicCenter (not Emacs, for example), already compile the bibliography. Without any of these dedicated editors, it's necessary to run this routine.

latex papernamebibtex papernamelatex papername

First, we compile the paper principal file. Then we generate the bibliography entries. At the end, we re-compile paper principal file so TeX can put together paper and its bibliography.

Since BibTeX is trully usefull as a standard, it is common to see journals providing together with an article its BibTeX information, so an user interested in citing this article can just copy and paste the reference details in his .bib file. If one doesn't want to use BibTeX, but the standard references LaTeX environment, just replace this environment with thebibliography environment, as rommended by APS team.