Canadian Journal of Physics

User Guide to cjp.cls

1 Basic coding

All L^{A}TEX documents must include these three commands:

\documentclass{...}
...
\begin{document}
...
...
\end{document}

1. The documentclass must be specified, either with a generic package, such as article or a specific package, such as cjp).

2. Between the first two lines comes the material often called the “preamble”, which includes additional packages (and their options), as well as any file-specific macros.

3. Between the second and third lines comes the actual contents of the article — call it the “body” of the file.

Typesetting commands are usually of the following types:

1. control sequences begin with a backslash ( \ ).

2. environments use matching \begin{...}

\end{...} statements (e.g., \begin{document}).

3. optional arguments are within square brackets [...]

2 The Preamble

The following represents the main packages and options for CJP. Note that most articles will not require all of them. However, this does represent the usual order of the packages and options.^{1}

\documentclass[usecmfonts   OR   type1rest,%
french,%
breakaddress,%
trimmarks]{cjp}
\usepackage[pctex32]{graphicx,color}
\usepackage[figuresright]{rotating}
\usepackage[french]{babel}
\usepackage{cite}
\usepackage{bm}

The next section will discuss each line in the preamble.

2.1 Packages and options

\documentclass[...]{cjp}

Insert at the very top of the file. Options are inserted into the square brackets. The usecmfonts option selects Knuth’s Computer Modern fonts in place of the Times and Helvetica fonts ordinarily selected by cjp.cls. Note that spacing for most text will change as Computer Modern fonts are wider than Times; mathematics is still set using the CM math fonts, so there will be no similar change in these areas. The type1rest option selects a restricted set of Adobe fonts in place of the set ordinarily selected by cjp.cls. This has the advantage of using fonts that are available on any PostScript printer, and typesetting running text as it will appear in the published result. The french option configures the cjp documentclass to ensure all the automated textual elements (in the author IDbox, for figures, tables, bibliographies, etc.) are printed in French as per CJP specifications. It must be

used in concert with \usepackage[french]{babel}.

The breakaddress option affects the author IDbox at the bottom of the titlepage. It inserts a linebreak between the author name and address; the default setting has them print on the same line. The trimmarks option is for in-house production purposes only.

\usepackage[pctex32]{graphicx,color}

This syntax demonstrates loading two packages with the same option (the driver, in this case). The graphicx package is needed for inserting graphics into papers. The color package is used for in-house production of reversed out text (white on black). The pctex32 option (for in-house NRC production) is

needed whenever graphicx, color, or graphicx,color

are specified.

\usepackage[figuresright]{rotating}

The rotating package^{2} is only needed when tables or figures must be placed in landscape (“sideways”) position. It must be preceded by the graphicx package.

1Note that the option [pctex32] is for in-house production.

2For the NRC’s production use, the standard distribution version of this file is currently under revision. Authors can proceed with the public version of rotating.sty.

The figuresright option ensures that rotated elements are oriented with the caption at the left margin of the regular page, in accord with CJP style requirements.

\usepackage[french]{babel}

The {babel} package with the french option is required for French-language articles.^{3} This invokes French hyphenation patterns (note that accented words will not hyphenate — use \- to signal soft hyphenation points) as well as some of the (European) French typesetting conventions (e.g., “french spacing”). Where these conflict with CJP requirements, cjp.cls makes provision to deal with the conflict.

\usepackage{cite}

All articles will use this package, which enhances the default options available in L^{A}TEX (e.g., \citen prints cross-references without brackets). See cite.sty documentation for additional features.

\usepackage{bm}

This additional package helps deal with font changes in math mode. See bm.sty documentation for details.

\usepackage{amsfonts}

The AMS fonts provide additional special characters frequently used by the mathematics and scientific communities. This package provides access to the following font sets: Euler (Fraktur, Roman, Script, extensions); Computer Modern (math bold italic, symbol, extensions, in the smaller sizes); Cyrillic (lightfact, bold, italic, smallcaps); and the msam and msbm fonts, familiar to RevTEX users.

There are a number of other packages associated with the AMS. The revised version of chap. 8 of The L^{A}TEX Companion provides a great deal of information on these packages; a copy is included in the documentation binder.^{4}

Authors should avoid creating too many personal macros, which may conflict with cjp.cls and slow in-house processing of their files. In particular, \let-statements for abbreviations, while useful for keyboarding purposes, should be replaced by the full control sequence before submission.

3 The Body

All articles have the following elements:

1. titleblock and author information

2. abstract or resumé

3. headings and subheadings

4. text (!)

5. bibliography

Most articles also include some or all of the following elements:

1. offset quoted passages

2. enumerated lists

3. tables and figures

4. display mathematics

5. illustrations (e.g., PostScript)

6. footnotes

7. acknowledgements

3.1 Titleblock and author information

All elements of the titleblock are taken care of via macros, some of which have optional arguments, to allow for variant forms and for ‘labelling’ of bits of text (for cross-referencing).

                                                \title{...}

Lines will be broken automatically; line breaks can be forced by using \\.

                                                \author[...]{author1}

Author1’s name as it will appear in the titleblock and the right running head. The optional argument allows a different form of the author’s name to appear in the IDbox at page-bottom (e.g., full first name in titleblock, but initials only in IDbox).

Each author is specified separately. The document class will automatically insert “and” (or “et”, if in French) between the last and second-last names, both in the titleblock and in the IDbox area.

If authors’ names make the running head too long, use \shortauthor{...} to provide a short list. This macro should appear below all the author-address information.

                                                \address[label1]{addr1}

Address for author1; this should be immediately below the \author entry. Each author’s address is specified separately. If no address is specified before the next author entry, the immediately preceding address is used (an address for the first author must therefore be specified).

3It is not necessary to use babel with an english option — that is the CJP default.

4Or pick up a copy from CTAN: go to ftp://ctan.tug.org, change to the /tex-archive/info/companion-rev subdirectory and fetch the file ch8.ps. For other CTAN sites, connect to www.tug.org and look for ‘archives’.

The optional [label1] argument (any sequence of letters can be used) does not print anything; it makes it possible to relate one address to several authors (this is similar to L^{A}TEX’s \label and \ref commands).

Below is an example of using the author-address crossreferencing macros:

\author{auth1} defines first author

\address[label1]{addr1} defines an address for author1 and tag it as [label1]

\author{auth2} this author doesn’t have an address, so the IDbox will use the immediately preceeding author’s address

\author{auth3} defines a third author

\address{addr3} third author is at an address of their own

\author{auth4} defines a fourth author

\address[label1] fourth author uses the address associated with [label1], above

The net result (assuming the breakaddress option has been used) is the following:

Author1, Author2, and Author4. Address1.

Author3. Address3.

IDbox address notes

Author addresses can be augmented with additional information via numbered notes, which appear below all the authors’ names and main addresses. Note that only one of these supplementary notes can appear for

each author.
\correspond{...}

Usually one author is selected from all co-authors to deal with correspondence. If the argument is left empty (that is, if only \correspond appears below a given author entry, the following text will appear: “Author to whom all correspondence should be addressed.” If the argument contains information about phone, fax, e-mail, it will be introduced by: “Corresponding author:”

    \phone{...}    \fax{...}    \email{...}

These three macros (phone et al.) can be used anywhere inside the author IDbox area.

                                                     \present{...}

Authors may wish to indicate a temporary or current address, different from the main one provided via \address. This note will begin with the text: “Present address:”.

                                                     \AddressNote{...}

Allows the user to input any information they wish, with no automatic text being added.

                                                \dedication{...}

Will print a dedicatory text in the IDbox area, between the “Received/Accepted” and the author/address sections.

                                                \maketitle

This command activates the titleblock commands; it must appear after all the above commands.

3.2 Abstracts/Résumés

The syntax is the normal one expected for environments: a matched set of either abstract or resume:

                                                \begin{abstract} ...  \end{abstract}
                                                \begin{resume} ...  \end{resume}

3.3 Headings and subheadings

Four levels, numbered automatically. Line breaks can be forced by using \\. To suppress numbering (e.g., for “Acknowledgements”), use an asterisk before the opening curly brace: \section*{}. All four levels can also be referred to by the indicated alias.

\section{...} Level-1 heading (alias \Asection)

                                                \subsection{...} Level-2 heading (alias \Bsection)
                                                \subsubsection{...} Level-3 heading (alias \Csection)

\paragraph{...} Level-4 heading (alias \Dsection)

3.4 Text

Same as the default L^{A}TEX commands.

                                                \begin{quote} ...  \end{quote}
                                                \begin{enumerate} ...  \end{enumerate}
                                                \begin{itemize} ...  \end{itemize}
                                                \begin{description} ...  \end{description}
                                                \footnote{...}

3.5 Maths

Same as the default L^{A}TEX commands. See also bm.sty for enhanced font handling inside math mode.

\begin{equation} ...  \end{equation}
\numberby{...}

For articles where equation numbers must include section numbers (e.g., equation 3.2 is the second equation in section 3), input the following in the preamble area, after all \usepackage commands:^{5}

\numberby{equation}{section}

3.6 Tables and Figures

Same as default L^{A}TEX commands.

\begin{table} ...  \end{table}
\begin{sidewaystable} ...  \end{sidewaystable} for ro-

tating a table sideways. To ensure rotation is in correct direction, remember to add the figuresright option to rotating (see Preamble section).

\begin{tabular} ...  \end{tabular}

\hline* for the thicker lines at top/bottom of tables. Regular 1pt rules accessed via default \hline command.

\begin{figure} ...  \end{figure}

\topcaption{...} syntax same as for L^{A}TEX default \caption To custom-fit captions to table widths, print tables, measure their width, specify required caption dimension via \captionwidth, like this:

\setlength\captionwidth{ ... }
\topcaption{ ... }

3.7 References

Same as the default L^{A}TEX commands. See also cite.sty for additional options.

\begin{thebibliography}{99}...  \end{thebibliography}

\bibitem{...}

\cite{...} produces cross-referencing digit or digits inside square brackets.

\citen produces digit with no brackets. Loaded via cite package.

4 Summary of commands

Keep in mind that the following is a summary of mainly CJP-related commands; consult your favourite L^{A}TEX documentation for additional assistance and information.

4.1 Preamble

Only use the packages necessary.

\documentclass[usecmfonts   OR   type1rest,%
               breakaddress,%
               trimmarks]{cjp}
\usepackage[pctex32]{graphicx,color}
\usepackage[figuresright]{rotating}
\usepackage[french]{babel}
\usepackage{cite}
\usepackage{bm}

4.2 In-house additions to preamble

\setcounter{page}{...}
\volyear{...}[...]{...}
\received{...}
\accepted{...}

4.3 Body

4.3.1 Titleblock and author information

\begin{document}
\title{...}
\author[author1 short name]{full name}
   \address[label1]{address of author1}
\author{full name of author2}
   \address{address of author2}
(choose one:)
\correspond     or     \correspond{...}
\present{...}
\AddressNote{...}
   \phone{...}
   \fax{...}
   \email{...}
\author[author2 short name]{full name}
   \address[...]
\shortauthor{...}
\maketitle

5This is the same as using the command \numberwithin, but that requires loading the amsmath package.

4.3.2 Abstract/Resume

\begin{abstract}
   ...
\end{abstract}
\begin{resume}
   ...
\end{resume}

4.3.3 Headings and subheadings

\section{...}         or    \Asection{...}
\subsection{...}      or    \Bsection{...}
\subsubsection{...}   or    \Csection{...}
\paragraph{...}       or    \Dsection{...}
\section*{Acknowledgments}

4.3.4 Miscellaneous

\footnote{...}
\begin{quote} ... \end{quote}
\begin{itemize} ... \end{itemize}
\begin{enumerate} ... \end{enumerate}
\begin{description} ... \end{description}
\begin{equation} ... \end{equation}
\begin{eqnarray} ... \end{eqnarray}
\begin{array} ... \end{array}

4.3.5 Tables and Figures

\begin{table}   or   \begin{sidewaystable}
   \setlength{captionwidth}{...}
   \topcaption
   \begin{tabular}{...}
      \hline*
       ...
      \hline
       ...
       ...
      \hline*
   \end{tabular}
\end{table}     or   \end{sidewaystable}

                                                     \begin{figure}
                                                        \topcaption{...}
                                                        ...
                                                     \end{figure}

4.3.6 References

                                                     \cite{...}    \cite{...,...}    \citen{...}
                                                     \begin{thebibliography}{99}
                                                     \bibitem{...}
                                                     \end{thebibliography}
                                                     \end{document}

5 Resources

The following documentation, newsgroups, and web pages are useful source to consult for help, news, and updates. Keep in mind, however, that conflicts may arise when

5.1 Books and articles

The L^{A}TEX Companion: by Michel Goossens, Frank Mittelbach, and Alexander Samarin (Addison-Wesley, 1994).

Contains many details to assist users. Caveats:

Chapter 8 is no longer valid — a revised version is available in both .ps and .pdf formats from CTAN.^{6}

As well, the sections on graphics and colour have been superceded by material in The L^{A}TEX Graphics Companion.

The L^{A}TEX Graphics Companion: Illustrating Documents with TEX and PostScript, by Michel Goossens, Sebastian Rahtz, and Frank Mittelbach (Addison-Wesley, 1997).

Math into L^{A}TEX: An Introduction to L^{A}TEX and AMSL^{A}TEX, by George Grätzer (Birkhäuser, 1996).

The TEXbook: by Donald E. Knuth (Addison-Wesley, 1986).

L^{A}TEX: A Document Preparation System — User’s Guide and Reference Manual, by Leslie Lamport (Addison-Wesley, 1994, 2nd ed).

A Guide to L^{A}TEX2ε: by Helmut Kopka and Patrick W. Daly (Addison-Wesley, 1995, 2nd ed).

6CTAN = Comprehensive TEX Network Archive; a listing of addresses can be found on the TUG home page www.tug.org. Follow the links to /tex-archive/info/companion-rev.

Michael Downes: “Breaking equations,” TUGboat 18,3 (Sept 1997): 182–194.

Keith Reckdahl: “Using EPS graphics in L^{A}TEX2ε documents,” TUGboat 17,1 (March 1996): 43–53.

Keith Reckdahl: “Using EPS graphics in L^{A}TEX2ε documents, Part 2: Floating figures, boxed figures, captions, and math in figures,” TUGboat 17,3 (Sept. 1996): 288–310.

5.2 Electronic resources

www.tug.org: the most complete stepping-stone to the worldwide TEX community, including the CTAN archives, user groups, news, and so on.

comp.text.tex a general all-purpose newgroup for TEX users.

Send queries to info-tex@shsu.edu. Consult sections 6 and 7 of the document “Processing Author-generated .tex Files” for details.

FAQ: put together by the UK TEX Users Group; available via the TUG web page.

Listserv lists: there are a great number of specialised Listserv lists.

6 In-house Coding

6.1 File activity log

At the very top of each file are entries noting activities specific to the file. Comment structure may vary but could cover such activities as editing, typesetting, screen-proofing, checking tables and figures, inputting author corrections, and so on. Entries may be dated or not, depending on journal. Comments should be on one line each, beginning with %% signs:

   %% Typeset by:
   %% Edited by:
   %% Tables and Figures:

Specific day-to-day details could also be added:

   %% 17 NOV 97: ran file to test author code
   %% 25 NOV 97: input c/e; screen-proofed output
   %%  9 DEC 97: proofs printed, mailed to author

If several people work on the same file, initials could be added after each log entry.

6.2 In the preamble area

Recall that two options to cjp.cls are most often used for in-house production rather than by authors: breakaddress and trimmarks. See section 2.

Over time, it may become apparent that some small modifications or shorthands are used in almost all papers. Until such changes are incorporated into the cjp.cls documentclass, these should not be inserted into each article file but rather stored in a separate file (call it physmods.sty), which would be loaded via a \usagepackage command inserted be-

low cjp.cls.

The following information is input by CJP’s in-house production team, and not by the author. It appears after all packages have been loaded, and before the \begin{document} statement:

   \setcounter{page}{<digit>}
   \volyear{<vol no.>}[<copyright year>]{<year>}
   \received{<complete date>}
   \accepted{<complete date>}
\setcounter{page}{...}

Insert starting page number for article. The information will be printed on the titlepage (bottom left) and in the running head; the complete page range will be calculated and inserted automatically when run a second time.

                                                     \volyear{...}[...]{...}

First argument is for the volume number. The second (optional) argument specifies the copyright year; if the argument is not present, the copyright year is assumed to be the same as the publication year. The third argument specifies the publication year. This information is used in the titlepage footer and in the left running head.

                                                     \received{...}

Insert date as per CJP style — e.g., June 6, 1996 — but without a final period (it is automatically inserted). This information appears in the author IDbox area.

                                                     \accepted{...}

Insert date as per CJP style — e.g., June 6, 1996 — but without a final period (it is automatically inserted). This information appears in the author IDbox area.

6.3 Translations of abstracts/resumés

The following lines are inserted at the end of each abstract or resumé, before the \end{...} statement:

\translation generates the text: “[Journal translation]”.

\traduit generates the text: “[Traduit par la rédaction]”.

\Traduit generates the text: “[Traduit par la Rédaction]”.

6.4 Special titleblocks

For elements in CJP which are not articles (editorials, communications, erratum, reviews, etc.), the titleblock is a solid black stripe with reversed-out white lettering. Since these require the ‘color’ black to be printed, the following line must appear in the preamble:

                                                        \usepackage[pctex32]{color}

There are two versions of the special title command:

                                                     \specialtitle

This allows the regular titleblock (\title, etc.) to be included with the special title; for example, a review article with its own title.

                                                          \begin{document}
                                                          \specialtitle{REVIEW/SYNTH\`ESE}
                                                          \title{Regular article title}
                                                          \author{Someone's name here}
                                                          \address{Someplace nice and warm}
                                                             \correspond
                                                          \shortauthor{Review/Synth\`ese}
                                                          \maketitle

\specialtitle*

The regular titleblock material cannot be used with this variant; for example, an editorial.

     \begin{document}
     \specialtitle*{EDITORIAL/\'EDITORIAL}
     \shortauthor{Editorial/\'Editorial}
     \maketitle

6.5 Two-column bilingual texts

The first step is to load the appropriate package and options. These are added after the \documentclass line:

1. if main (left column) language is English:

     \usepackage[french,english]{babel}

2. if main (left column) language is French, there is an additional option to add to the document class line:

     \documentclass[french]{cjp}
     \usepackage[english,french]{babel}

Notice that this seems counter-intuitive.

The next step is to code the English and French texts so that the tops of matching paragraphs align horizontally.

When the left-column language is English, French is the additional “option”, so it appears in square brackets (line 1). The entire two-column section is set inside a par-text environment (lines 1 and 13).

1.  \begin{par-text}[french][<dimen.>][<dimen.>]
2.      \begin{par-para}
3.         ... <English paragraph> ...
4.      \othercol
5.         ... <French paragraph> ...
6.      \end{par-para}
7.
8.      \begin{par-para}
9.         ... <English paragraph> ...
10.     \othercol
11.        ... <French paragraph> ...
12.     \end{par-para}
13. \end{par-text}

Within this bilingual two-column environment, matching English/French paragraphs are set inside a par-para environment (lines 2/6 and 8/12). To signal the end of the English paragraph (in the left column) and the start of its matching French paragraph (right column), use \othercol (lines 4, 10). For make it easier to read the source file, separate each set of {par-para} with a blank line (line 7) or a % sign.

6.5.1 Modifying parameters

1. On line 1, it is possible to change the default widths of the two columns. The default widths are 15pc for English, 17pc for French, with a 2pc intercolumn space; these are automatically assigned to the appropriate column, depending on the initial language setup. Therefore there is no need to fill in the last two square braces of line 1.

To change the column widths from their default settings, the optional language argument must be specified (French, in the above example; or English, if column order is reverse), followed by the last two square braces with the revised column widths.

2. The default vertical space between lines is set at 1pc (= one blank line). To change this at specific points, explicit \vspace{...} commands can be inserted between sets of {par-para}. To change this for the entire

                                                          file, insert \parallelparsep{<some dimen.>} before
                                                          {par-text}.

6.6 Miscellaneous

1. For roman numerals, with only page numbers in the footers, insert the following lines at the end of the preamble, just above the \begin{document} line:

                                                             \pagestyle{cjpplain}
                                                             \pagenumbering{roman}

2. To add parentheses (or any other design element) to (roman) page numbers, insert the following ‘override’ command in the preamble, after all packages have been loaded:

                                                             \renewcommand\thepage{(\roman{page})}