K L U W E R A C A D E M I C P U B L I S H E R S

Using the Technical Book Style for LaTEX Author-Prepared Compuscripts

Amy Hendrickson TEXnology Inc.

USING THE KLUWER ACADEMIC PUBLISHERS LATEX MACRO PACKAGE

Technical Book Style

Welcome to the use of the Kluwer LaTEX macro package for the production of technical books to be published by Kluwer Academic Publishers. You will find that most of the commands found in the LaTEX book will work exactly the same with the use of this package. The few new commands, or commands that are used somewhat differently will be shown here, followed by a set of sample pages. The sample pages will be interspersed with pages of the LaTEX code that produced them, so that by comparing the code with the results you can quite quickly see how to use the commands needed to format your article. If you are preparing an article for an edited book, please see the documentation for edited books, editedbk.doc. If you find that you are having a problem after you have read this documentation carefully, help may be had by sending email to Suzanne Rumsey at prod@world.std.com. If possible, please email a small sample file demonstrating your problem.

CONTENTS Getting Started: Style Files, and Optional Style Files 2 New Uses for Double Backslashes 4 Front matter commands 5 Chapter and Section headings 8 Listing 9 Figure and Table Captions, normal, double, narrow, continued and lettered. 9 Lettered equations 13 Programming Examples 15 Algorithm Examples 17 References 18 Using BibTeX 19 Appendices 23 Commands for Index preparation and formatting 24–38 Sample Pages 39

Getting Started: Style Files, and Optional Style Files

These are the files that are part of the book macro package, with a description of their use:

kluwerbk.sty The basic set of macros for technical book style.

psfonts.sty Optional style file if you want to use PostScript fonts.

dblspace.sty Optional style file to make your text double spaced for easier proofing.

booksamp.tex A sample file showing the macros in use.

booksamp.srt The sorted index file to be used when LaTEX is run on booksamp.tex.

The Basic Style

The basic documentstyle for Kluwer books is ‘kluwerbk’.

\documentstyle{kluwerbk}

Font style files

The default font selection will be Computer Modern, but the user can choose to use PostScript fonts, which will give the book a more finished look. Your choice should be determined by which fonts you have available on your system. Most likely the final version of your book will be produced using PostScript fonts but in the earlier versions it is fine to print your book using Computer Modern fonts.

There is no difference in the use of the macros in whether or not you use PostScript. You may notice that the command \bit which will produce bold italics with the PostScript font file, but will produce Computer Modern bold when the cmfonts file is used.

The optional style file ‘[psfonts]’ is used for PostScript font declarations, used like this:

\documentstyle[psfonts]{kluwerbk}

Changes in the psfonts.sty file

If you do use PostScript fonts, you may need to make changes in the psfonts.sty file to make the PostScript font name match the names available on your system. The PostScript names vary according to what driver program (dvips, dvi2ps, dvipsone, etc.) you use to translate your .dvi file into PostScript to appear on your printer. The naming conventions used here are those used by the Arbortext dvips driver.

There are comments in the psfonts.sty file to show you where to make the changes, and what the Adobe font names are for each font named.

If you look in your directory where the .tfm files are stored, you can find the names of your PostScript fonts. Then you can change the psfonts.sty file, as in the following examples.

Part of the original file:

Example Code

...
%% Times-Roman
\def\timesroman{psmtimr }
%% Times-Bold
\def\timesbold{psmtimb }
...

Changed version, using the Y&Y font names:

Example Code

...
%% Times-Roman
\def\timesroman{tirx }
%% Times-Bold
\def\timesbold{tibx }
...

Double Space Option

You may also use the dblspace option to increase the vertical distance between lines in your text, to make an easy to read draft version of your article. Use one of the following documentstyle declarations:

\documentstyle[psfonts,dblspace]{kluwerbk}
\documentstyle[dblspace]{kluwerbk}

Edited book style

To make an edited book for Kluwer, you must use the optional style file, editedbk.sty, i.e.,

\documentstyle[psfonts,editedbk]{kluwerbk}

Please see the documentation that is written specifically for edited books: editedbk.doc.

New Use for Double Backslashes

Double backslashes maybe used to start a new line in the title, chapter title, author names, appendix title, and section heads.

For instance:\section{This is a\\ Test Section Head}

Example Results

1.1 THIS IS A TEST SECTION HEAD

Front Matter Commands

This section shows the beginning commands in the preparation of your book. A full sample is found on the next section ‘Sample Front Matter’.

The user should enter the following commands underneath the \begin{document} command:

\title{(Title of Book)}

Double backslashes may be used to arrange the lines in the book title on the title page.

\author{(First LAST)}
\affil{(Author affiliation)}
\location{(Author location)}

This set of three commands should be used for each author. All three are needed for correct macro functioning. Note that the author’s last name should be entered in all caps.

If you want to have several authors, with a single affiliation, you may separate authors with a double backslash.

\author{Carolyn SMYTHE\\ George SANTAYANA}
\affil{Cambridge University}
\location{Cambridge, UK}

If you have a number of authors with separate affiliations, enter a new group of

\author \affil \location

as you see on the sample page.

\author{Second AUTHOR}
\affil{Second Affiliation}
\location{Second Location}

Title page and Author title page

After the above commands are entered, the title page and author title page commands may be used:

\titlepage
\authortitlepage

\title, \author, \affil, and \location should all be entered before using the commands

\titlepage and \authortitlepage.

Table of Contents, List of Figures and List of Tables

Table of contents, LOF, and LOT are produced the same way with this package as they are with standard LaTEX.

\tableofcontents
\listoffigures
\listoftables

List of figures and list of tables are at the author’s option. You may find it necessary to edit the *.lot or *.lof file in the following case. If you have a chapter that does not include any figures or tables, you may want to remove the chapter call from the .lof or .lot file, i.e.,

\contentsline {listenv}{{\pbf Chapter\ 3}}{33}

for instance, if there are no figures found in that chapter.

Preface

Making the preface is done with \preface Here is your preface....

Sample Front Matter

The beginning of the sample file, booksamp.tex, shows all of these commands being used. The following example shows the beginning of the file. You can see the results of these commands in the sample pages, later in this documentation.

Example Code

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% booksamp.tex File
%% for kluwerbk.sty, Kluwer Technical Book style
%% Comments included.
%% You may use either [psfonts] as an optional style file:
%  \documentstyle[psfonts]{kluwerbk}
\documentstyle{kluwerbk}
\begin{document}
%%   You may use \\ to break lines in title, chapter title, and section heads.
\title{Qualitative\\ Motion\\ Understanding}
\author{Wilhelm BURGER}
\affil{Johannes Kepler University}
\location{Linz, Austria}
\author{Bir BHANU}
\affil{University of California}
\location{Riverside, California, USA}
%%   \title, \author, \affil, and \location should be entered before
%%    calling for \titlepage and \authortitlepage
\titlepage
\authortitlepage
\tableofcontents
%\listoffigures
%\listoftables
\preface
This is a sample preface.

Part, Chapter and Section Heads

The command for making a part or chapter is not changed from ordinary LaTEX

\part{Your Part Title}. \chapter{Your Chapter Title}.

Remember that you may use double backslashes if you want to specify when a new line starts in the chapter title.

Shortened Version of Chapter Title

You may need a shortened version of your chapter title so that it will fit in the running head. This is how to do it:

\chapter{Here is an Extremely\\ Verbose Chapter Title}
\chaptermark{Shortened Title for Running Heads}

Section Heads

There is little that needs be said about section heads except that you can break lines with the double backslash, and that they should be entered using upper case for the first letter of important words and lower case for the rest. Even though the section heads appear in the text with all caps, the upper and lower case is necessary when the section head appears in the table of contents.

Example Code

\section{This is a Section}
\subsection{This is a Subsection Head}
\subsubsection{This is a Subsubsection Head}

Example Results

1.2 THIS IS A SECTION

1.2.1 This is a Subsection Head

This is a Subsubsection Head Itemized List

The default level of itemized list produces square bullets. Generally this is the form of list to use in your book.

Example Code

\begin{itemize}
\item
This is a sample list item. This is a sample list item.
\item
Here is the second list item. Here is the second list item.
Here is the second list item. Here is the second list item.
\end{itemize}

Example Results

This is a sample list item. This is a sample list item.

Here is the second list item. Here is the second list item. Here is the second list item. Here is the second list item.

Figure and Table Captions

With the Kluwer macros, the normal caption is entered as in standard LaTEX:

\begin{figure}
\caption{(Write caption here.)}
\end{figure}

However we also have some special use captions.

For double captions:

\begin{figure}
\dblcaption{(Write caption here.)}{(Write second caption here.)}
\end{figure}

For continued captions:

\begin{figure}
\contcaption{(Write caption here.)}
\end{figure}

Narrow captions are made to be positioned next to the illustration instead of beneath it.

For narrow captions:

\begin{figure}
\narrowcaption{(Write caption here.)}
\end{figure}

For narrow continued captions:

\begin{figure}
\narrowcontcaption{(Write caption here.)}
\end{figure}

To make a figure caption to be turned sideways:

\begin{widefigure}
\caption{(write caption here.)}
\end{widefigure}

Table Captions

Table captions work the same way, except the table instead of the figure environment is used, i.e.,

\begin{table}
\contcaption{(Write caption here.)}
\end{table}

If you want more space between the table caption and the table you can set the dimensions:

\abovetableskip=<dimen> and \belowtableskip=<dimen>.

There is also a command to make a table caption that is intended to be printed sideways on the page:

\begin{widetable}
\caption{(write caption here.)}
\end{widetable}

Lettered figure and table captions

The Kluwer macros give you the opportunity to use a letter with your caption number. The resulting number/letter combination can be cross-referenced. The new command to use is

\letteredcapion{<letter>}{<caption>}.

Example Code

\begin{figure}[h]
\letteredcaption{a}{Lettered figure caption.}
\label{figure1a}
\end{figure}
\begin{figure}[h]
\letteredcaption{b}{Lettered figure caption.}
\label{figure1b}
\end{figure}
\begin{figure}[h]
\caption{Normal figure caption.}
\label{normalfig}
\end{figure}

Example Results And, of course, this works just the same for table captions:

Figure 1.1a Lettered figure caption.

Figure 1.1b Lettered figure caption.

Figure 1.2 Normal figure caption.

Example Code

\begin{table}[h]
\letteredcaption{a}{A short table caption.}
\centering
\begin{tabular}{lcr}\hline
$\alpha\beta\Gamma\Delta$ One&Two&Three\cr\hline
one&two&three\cr
one&two&three\cr\hline
\end{tabular}
\label{table1a}
\end{table}
\noindent Showing references: first lettered table is \ref{table1a}, first
lettered figure is \ref{figure1a}, second lettered figure is \ref{figure1b}.

Example Results

Table 1.1a A short table caption.

αβΓΔ One Two Three
one  two three
one  two three

Showing references: first lettered table is 1.1a, first lettered figure is 1.1a, second lettered figure is 1.1b.

The command \lettereddblcaption{<letter>}{<caption>} {<letter>}{<caption>} will al-

low you to use letters for a double figure or table caption:

Example Code

\begin{figure}[h]
\lettereddblcaption{a}{(Write caption here.)}
{b}{(Write second caption here.)}
\end{figure}

Example Results

Figure 1.2a (Write caption here.)

Figure 1.2b (Write second caption here.)

Making Lettered Equations

Equations are made as they normally are in LaTEX, with the exception that in the Kluwer book style you have the option of lettered equations, as demonstrated here. You can use the command \mathletter{<letter>} to determine the letter. The equation counter will advance only the first time that mathletter{<letter>} is used until the next equation that is unlettered.

Example Code

Lettered equation,
\begin{equation}
g_i(y|f)=\sum_x P(x|F_n)f_i(y|x)\mathletter{a}
\end{equation}
Second lettered equation
\begin{equation}
g_i(y|f)=\sum_x P(x|F_n)f_i(y|x)\mathletter{b}
\end{equation}
Unlettered equation
\begin{equation}
g_i(y|f)=\sum_x P(x|F_n)f_i(y|x)
\end{equation}

Example Results

g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.1a)
g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.1b)
g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.2)

Lettered equation, Second lettered equation Unlettered equation

To use letters with eqnarray:

Example Code

Formally, this amounts to calculating:
\begin{eqnarray}
g_i(y|f)&=\sum_x P(x|F_n)f_i(y|x)\mathletter{a}\\
g_2(y|f)&=\sum_x P(x|F_n)f_i(y|x)\mathletter{b}\\
g_3(y|f)&=\sum_x P(x|F_n)f_i(y|x)\mathletter{c}\\
g_4(y|f)&=\sum_x P(x|F_n)f_i(y|x)
\end{eqnarray}
where $g_i(y|F_n)$ is the function specifying...

Example Results

Formally, this amounts to calculating:

g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.3a)
g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.3b)
g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.3c)
g_{i}(y|f) = ∑_{x} P (x|F_{n})f_{i}(y|x)  (1.4)

where g_{i}(y|F_{n}) is the function specifying...

Macros for Programming Examples

Boxed code examples

\begin{codebox}{(width of box)}...\end{codebox} are used to call attention to a particular

piece of programming code.

Lines will be preserved as you see them on the screen, as will spaces at the beginning of the line. To produce printed ‘{’ brackets, precede them with \string.

You may use codebox in a figure, as in the following example:

Example Code

\begin{figure}[h]
\begin{codebox}{\textwidth}
DO*(j=(l+1), p)\string{
          float t; int i;
          t=0.0
              DO(i=1, n)\string{
                  t=t+col[i]
\string}
\end{codebox}
\caption{This is an example of some programming code.}
\end{figure}

Example Results

DO*(j=(l+1), p){

float t; int i; t=0.0

DO(i=1, n){

t=t+col[i] }

Figure 1.3 This is an example of some programming code.

Unboxed code sample

The command \begin{codesamp}... \end{codesamp} are used when you want to demonstrate some programming code, unboxed. As with codebox, lines will be preserved as you see them on the screen, as will spaces at the beginning of the line, and to produce printed ‘{’ brackets, precede them with \string.

\begin{codebox}...\end{codebox} can be inserted within codesamp, and will be positioned at the same distance from right margin as text. Codebox needs an argument for the width of the box,

as in \begin{codebox}{2.5in} below.

Occassionally, not often, you might need to add \newpage before the \begin{codebox} command in the middle of codesamp, in order to keep the box and the code on the same page.

Example Code

\begin{codesamp}
sqrdc(a, n)(a, qraux)\string{
  \underline{DARRAY float[180] a[180];}
  float qraux[180], col[180], nrmxl,t;
  DO(1=0, n)\string{
         \underline{ALIGN*(i=1, n) col[i]=a[l][i];}
         \begin{codebox}{2.5in}
         init*\string{ nrmxl=0.0;\string}
         DO*(i=l, n)\string{
           nrmxl += col[i]*col[i];\string}
         combine*\string{nrmxl;\string}
         \end{codebox}
                    \underline{ALIGN*(i=1, n)a[1][i]=col[i];}
\string}
\end{codesamp}

Example Results

sqrdc(a, n)(a, qraux){

DARRAY float[180] a[180];

float qraux[180], col[180], nrmxl,t;

DO(1=0, n){

ALIGN*(i=1, n) col[i]=a[l][i]; init*{ nrmxl=0.0;} DO*(i=l, n){

nrmxl += col[i]*col[i];} combine*{nrmxl;}

ALIGN*(i=1, n)a[1][i]=col[i]; }

To Illustrate an Algorithm

This is the command to use when you want to illustrate an algorithm with some pseudo code. A backslash followed with a space will indent the line. Every line will be printed as it is seen on the screen. Blank lines will be preserved. Math and font changes may be used.

Remember \bit will produce bold italics if you are using PostScript fonts, boldface in Computer Modern.

Example Code

\begin{algorithm}
{\bit Evaluate-Single-FOE} ({\bf x$_f$, I$_0$, I$_1$}):
\ {\bf I}+ := {\bf I}$_1$;
\ ($\phi,\theta$) := (0,0);
\ {\it repeat}\note{/*usually only 1 interation required*/}
\ \ (s$_{opt}${\bf E}$_\eta$) := {\bit Optimal-Shift} ({\bf I$_0$,I$^+$,I$_0$,x$_f$});
\ \ ($\phi^+$, $\theta^+$) := {\bit Equivalent-Rotation} ({\bf s}$_{opt}$);
\ \ ($\phi$, $\theta$) := ($\phi$, $\theta$) + ($\phi^+$, $\theta^+$);
\ \ {\bf I}$^+$:= {\bit Derotate-Image} ({\bf I}$_1$, $\phi$, $\theta$);
\ \ {\it until} ($|\phi^+|\leq\phi_{max}$ \& $|\theta^+|\leq\theta_{max}$);
\ {\it return} ({\bf I}$^+$, $\phi$, $\theta$, E$_\eta$).
End pseudo-code.
\end{algorithm}

Example Results

Evaluate-Single-FOE (x_{f}, I_{0}, I_{1}):

I+ := I_{1}; (ϕ, θ) := (0,0); repeat /*usually only 1 interation required*/

(s_{opt}E_{η}) := Optimal-Shift (I_{0},I^{+},I_{0},x_{f});

(ϕ^{+}, θ^{+}) := Equivalent-Rotation (s_{opt});
(ϕ, θ) := (ϕ, θ) + (ϕ^{+}, θ^{+});
I^{+}:= Derotate-Image (I_{1}, ϕ, θ);
until (|ϕ^{+}| ≤ ϕ_{max} & |θ^{+}| ≤ θ_{max});

return (I^{+}, ϕ, θ, E_{η}).

End pseudo-code.

References

References may be made with or without Bibtex. This section will demonstrate how to make references without Bibtex; the following section will describe the steps needed to make a bibliography with BibTeX.

The reference section can be made with the commands

\begin{references}
....
\end{references}

Each reference item starts with the command \bibitem followed by a term surrounded by curly brackets which is used for cross-referencing the bibliographic entry. The number of the bibliographic entry will be printed when the term is used with \cite: \cite{jacobs}, for example. (The file must be LaTEXed twice for this to work. The first time the file is processed, \cite{label} will produce ‘[?]’.)

Example Code

Here is a citation from the reference section: \cite{jacobs}.
\begin{references}
\bibitem{jacobs}Jacobs, E., ``Design Method Optimizes Scanning
Phased Array,'' Microwaves, April 1982, pp.\ 69--70.
\bibitem{francis} Francis, M., ``Out-of-band response of array antennas,''
Antenna Meas.  Tech. Proc., September 28--October 2, 1987, Seattle, p.~14.
\end{references}

Example Results

Here is a citation from the reference section: [1]

REFERENCES

[1] Jacobs, E., “Design Method Optimizes Scanning Phased Array,” Microwaves, April 1982, pp. 69–70.

[2] Francis, M., “Out-of-band response of array antennas,” Antenna Meas. Tech. Proc., September 28–October 2, 1987, Seattle, p. 14.

Using BibTeX

The Kluwer style does allow the use of BibTeX.

BibTeX is a separate program which can be used with LaTeX to produce a database file and build a bibliography. Its use is described in the LaTeX book, p. 74–75, and p. 140–147. If you have never used Bibtex before, you might consider doing so. The major advantages to using BibTeX are that you can build a database of your references that you can reuse for other books or articles, and you can choose from a number of bibliographic styles.

To use BibTeX follow these steps:

1. Make a xxx.bib file, with ‘xxx’ being any file name you choose. This is the database file including all the references. The form that these entries should take is described in the LaTeX book.

2. In your .tex file enter \bibliographystyle{(style)}. Your choices of bibliography style are:plain, unsrt, alpha, abbrv. The styles are described on p. 74 of the LaTeX book. Next you must write \bibliography{xxx}, with ‘xxx’ being the name of the .bib database file that you have written. You can also use more than one .bib file, in which case you must separate the filenames with a comma: \bibliography{xxx,yyy}.

3. Run Latex on the .tex document, producing the usual .aux file. When you look at the .aux file

you will see that it now contains \bibstyle{(style)} and \bibdata{xxx}.

4. Run BibTex on the .tex document, producing a .bbl file,

5. And, finally, run LaTeX on the .tex file, and Voila! there is your bibliography, neatly done in the style you have chosen. The citations in the text will also take the form you have chosen when you named the bibliography style.

Here is an example:

First we make a file called sample.bib which contains these entries:

@BOOK (samp:key,
AUTHOR = "Strunk, Jr., William and E. B. White",
TITLE= "The Elements of Style",
PUBLISHER = "Macmillan",
EDITION = "Third",
YEAR = 1979,
ADDRESS = "New York")
@BOOK (second:thing,
AUTHOR = "Calvin Coolidge",
TITLE= "The Cats of Maine",
PUBLISHER = "Silly Press",
YEAR = 1984,
ADDRESS = "Chatham, Maine, USA")

Then, in our .tex file we enter citations and the two bibliography commands:

Example Code

Here are citations, \cite{samp:key}, \cite{second:thing}.
\bibliographystyle{plain}
\bibliography{sample}

Next, we run LaTeX on the .tex file. When we look at the .aux file we have just produced, we see that it now contains these entries:

\bibstyle{plain}
\bibdata{sample}
...

Then we run BibTeX on the same .tex file to produce the .bbl file. You can look at, and edit the .bbl file if you’d like.

Finally, we re-LaTeX our .tex file and produce these results:

Example Results

Here are citations, [2], [1].

REFERENCES

[1] Calvin Coolidge. The Cats of Maine. Silly Press, Chatham, Maine, USA, 1984.

[2] William Strunk, Jr. and E. B. White. The Elements of Style. Macmillan, New York, third edition, 1979.

If we were to use \bibliographystyle{alpha}, we would get these results:

Example Results

Here are citations, [SW79], [Coo84].

REFERENCES

[Coo84] Calvin Coolidge. The Cats of Maine. Silly Press, Chatham, Maine, USA, 1984.

[SW79] William Strunk, Jr. and E. B. White. The Elements of Style. Macmillan, New York, third edition, 1979.

Making an Appendix

Entering the command \appendix in your text will make the commands \chapter, section commands and equation and caption numbering change to form an appendix.

When using the \chapter command, you may supply an appendix title but a title is not necessary. You must supply facing curly brackets if you do not want a appendix title.

Example Code

\appendix
\chapter{This is a Sample\\ Appendix}

Example Results

A

THIS IS A SAMPLE APPENDIX

Example Code

%% Appendix without a Title
\appendix
\chapter{} %%

Example Results

A^{APPENDIX}

MAKING YOUR INDEX

There are four steps needed to make an index:

Marking the words to be indexed in the text,

Running LaTEX on the file,

Sorting the .inx file, and

Printing the formatted index.

Each step will be explained briefly here, and in more detail in the following sections.

Marking the text

There are two kinds of index entries in the text:

\inx{word or words}, and
\inxx{word or words}.

The first form will print the term between curly brackets on the page and will also send it to an .inx file along with the current page number.

The second, called a ‘silent’ entry, will not print on the page but will send the material between curly brackets to the .inx file along with the current page number. CAREFUL: Do not leave an empty space between the silent index entry and the word preceding

it. An extra space will appear in your text if there is a space both before and after the \inxx command. Your input should look like this:

. . . some words\inxx{index entry}. . .

Not

. . . some words \inxx{index entry}. . .

Remember that starting a new line in your editor will also generate an empty space, so do not do this either:

. . . some words
\inxx{index entry}. . .

Subheadings in the Index

To form an index entry as a subheading of another index entry, repeat the first entry and follow it with the new entry.

For example:

After you have typed \inx{trees} or \inxx{trees},

you may type \inxx{trees,green} to cause ‘green’ and its associated page number to be placed in the index under the entry for ‘trees.’

A third level of subheading is produced in the same way: \inxx{trees,green,pointy}. This will format ‘pointy’ underneath the entry for ‘green’.

LaTEXing the file

When you LaTEX filename.tex containing the marked entries you will automatically produce a

filename.inx.

Sorting the .inx file

You can sort the filename.inx file with a sorting routine on your system.

The MS-DOS command is sort < filename.inx > filename.srt.
The Vax VMS command is sort filename.inx filename.srt.
The UNIX command is sort -f filename.inx > filename.srt.

Apparently there is no sort routine as part of the Macintosh software but there are public domain Macintosh sorting packages available.

Marking the .srt file

If you want to make additions to the index entries such as “See Also Douglas Firs” or to change the fonts of certain entries or to add a large letter and a ruled line before each new alphabetical group, you can do this in filename.srt. However, you do not need to even look at this file if you do not wish to make changes to the index.

For more information see “Making typeface changes to index entries” and “Adding material to your sorted file” below.

Printing the Index

The command: \printindex will print the index. This command will input the filename.srt file to generate your index, formed in double columns, with a dash between sequential page numbers and with subsidiary entries formatted below their major entry.

More information on each step follows.

Entering words to be indexed in the text

As described earlier, entries are to be marked either

\inx{(entry)}

or

\inxx{(entry)}

CAREFUL: When you mark an index entry with \inx the word or words will print in the text as well as in the auxiliary file. However, don’t try to use this method of marking a word or phrase if it is in the argument of another macro. To index a word or words that are inside a macro argument, use the second method: rewrite the word or words outside the macro and precede it with \inxx. If in doubt follow the second method which may be slightly more effort, but whose results will be more predictable.

To call attention to a particular pagenumbers in the index:

You may mark index entries with one or two asterisks.

\inx{index entry∗} or \inxx{index entry∗} will cause the page number to be underlined.

\inx{index entry∗∗} or \inxx{index entry∗∗} will cause the page number to appear in boldface. You may want to use this as a method of calling attention to the definition of a term (underlined) or an example of the term in use (boldface).

Examples of first, second or third level index entries

As mentioned above, second level entries are produced by writing the primary term, then a comma, then the word you are indexing. For example, index entries written on a page 33:

\inx{First Level} (or \inxx{First Level})
\inxx{First Level,Second Level}

will yield the index entries

First Level, 33

Second Level, 33 with the page numbers produced automatically.

The third level is produced similarly:

\inx{First Level} (or \inx{First Level})
\inxx{First Level,Second Level}
\inxx{First Level,Second Level,Third Level}

Results in:

First Level, 33

Second Level, 33 Third Level, 101

CAREFUL:

Spaces: Notice that there are no spaces after the comma in the index entry. It is important to keep spaces from appearing between entry levels for the index formatter to work correctly.

Consistency: Capital and small letters will not be distinguished by the index formatter but will be sorted differently. Therefore you must be careful to be consistent in capitalization.

Commas: Since commas are used to separate arguments in the index entries, you must write \, when you actually want a comma to appear in the formatted index. For example:

   \inxx{Nixon\, Richard Milhous}

will print in the index as:

Nixon, Richard Milhous, 72 If you forgot to put the backslash in front of the comma after ‘Nixon’ as in the following:

   \inxx{Nixon, Richard Milhous}

The results will be Nixon

Richard Milhous, 72

How to make a first or second level entry Without page numbers

You may occassionally want to have a major or secondary index entry that doesn’t have a page number associated with it, but is used as a heading for the following entries.

To do this, type the second or third level entries as you would do ordinarily, but do not make an index entry for the first level term by itself.

For example, if these \inxx entries have been used in the text:

\inxx{Cows,Holstein-Friesen}
\inxx{Cows,Jersey}
\inxx{Cows,Holy}

The index will look like this:

Cows Holstein-Friesen, 33 Jersey, 43 Holy, 23

The same sequence follows for second and third level entries; when the third level is being looked at by the index formatter it will check to see if the second level has been printed. If it hasn’t the formatter will supply the second level entry without a page number.

The second level without a page number is produced like this:

\inxx{Cows,Four-legged,black and white}
\inxx{Cows,Four-legged,gentle brown}
\inxx{Cows,Four-legged,invisible}

Results in:

Cows

Four-legged black and white, 101 gentle brown, 201 invisible, 32

Index Error Control

You might have inadvertantly neglected to supply a first level entry and asked for second or third level entries that were to appear under the first level entry. In this case the index formatter will supply the first level entry without a page number, just as if that was your intention. Similarly, if third level entries have been called for without the preceding second level entry ever being asked for by itself, the second level entry will print without a page number, as if that was your intention. Thus, you have a method of index error control, that will let you know if you neglected to enter a term with \inxx that you intended. Scan your completed index to see if there are entries without page numbers. If this was not your intention, either edit your original file to supply the appropriate \inxx term, or edit the .srt file to supply the term and page number.

OK, the index entries are marked, now what?

The first thing to do is LaTEX the file that contains the marked index entries.

You will automatically produce an auxilary file named filename.inx with ‘filename’ being the name of the file you LaTEXed and the .inx extension being added automatically.

How to sort the .inx file

The next step is to sort the contents of the file. On a VAX running VMS, you do this by typing

sort filename.inx filename.srt.
The UNIX command is sort -f filename.inx > filename.srt.
The MS-DOS command is sort <filename.inx > filename.srt.

If you are using another system, you must find the sorting command for that system.

Looking at the .srt file

You can look at the sorted file in your editor. Notice that the page numbers that are less than 10 will be preceded with two zeros, and those that are more than 10 but less than 100 will be preceded with one zero. These ‘leading zeros’ will not print but are necessary for the sort algorithm to work correctly.

Special use characters: > and ˜

There is a ‘>’ at the top of the .srt file and a ‘˜ ’ at the end of the file. These are commands to make the index formatter work correctly. > must immediately precede the index entries and ˜ must immediately follow them, so do not change their position.

You can use ˜ as you would normally, except you may not use ˜ at the beginning of an index entry (and I can think of no reason that you would want to) except as an accent (\~ ...).

Making changes in the .srt file

You can make typeface changes, add or delete index entries, add comments to the index with the \addtoindex command, and separate the index into alphabetical sections with the use of the \ltr command. However, remember: These changes will disappear the next time you sort the .inx file to produce a new .srt file.

Making typeface changes to index entries

If you want to change the typeface of an index entry, you can do this in your sorted file with these commands:

\indexit{index entry} |1{003}
\indexbf{index entry} |1{003}
\indextt{index entry} |1{003}
\indexsl{index entry} |1{003}

As you may have guessed, \indexit will produce italics, \indexbf will produce bold face, \indextt will produce typewriter font, and \indexsl will produce slanted typeface.

Assuming that you will be using this command on first level index entries, each of these commands will cause the first letter to be capitalized. If you want the first letter to be lower-case use this form:

\lcindexit{index entry} |1{003}
\lcindexbf{index entry} |1{003}
\lcindextt{index entry} |1{003}
\lcindexsl{index entry} |1{003}

If you change the typeface on any index entry, remember to do the same thing for every entry of the term on the same level. The reason that this is important is that the index formatter will not recognize two entries as being the same if one is ‘\indexbf{index entry}’

and the next is ‘index entry’. If the formatter sees the entries as different, the second entry would print on its own line.

Using \addtoindex

If you want to add a comment to your index you can enter the commands \addtoindex...\endadd. These commands will temporarily interrupt the index formatter and allow you to enter text or extra vertical space at any point in the index. See examples of this in ‘Indexing Examples’ following.

If you want a horizontal line or lines to appear, write \hrule. You will probably want to include extra vertical space if you use \hrules since there is no interline space added by default for hrules. You must end \addtoindex with \endadd. Here is a complete example;

Grass |1{001}
\addtoindex
\vskip10pt
See also, Blue-green grass.
\vskip10pt
\endadd

Making a page range to use with ff

If you want to direct your reader to a page range in which he/she will find information on a particular topic, you can use \addtoindex:

\addtoindex
Grass, 51--65 {\it ff}
\endadd

or

\addtoindex
See also, Grass, 51--65 {\it ff}
\endadd

Separating index into alphabetical sections

The command \ltr{Letter } makes it easy to format the index into separate alphabetical areas. Before the first entry for each new letter, use

\addtoindex, \ltr{Letter}, \endadd.

For instance, before the B’s:

\addtoindex
\ltr{B}
\endadd

Compare the code in the example at the end of this section with the resulting index to see this macro at work.

Other editing changes in the .srt file

You can also edit the .srt file in other ways, if you’d like. You can add or delete entries, or change the page number to appear underlined or bold by adding \global\spcount =1 or \global\spcount =2 within the curly brackets that surround the page number.

Formatting the Index

Once you have made any desired changes to your .srt file you can format the index in the originating file by writing this command where you want the index to appear:

\printindex

Changing the Format of the Index

Automatic Capitalization of the First Letter

Your index will be formatted automatically with the first letter of each first level index term being capitalized. The second and third level index terms will not print in uppercase unless they were typed that way with the \inxx command. If for any reason you do not like this, you can read the instructions at the end of the macro file where you see this:

%% CHANGE INDEX FORMAT HERE ====>
%% If you DO NOT want the first letter of each first level index
%% entry to be capitalized, delete the % in front of the following line,
%% and put % in front of the next line:
%\let\capthis\relax
\def\capthis#1{\uppercase{#1}}%
\indexindent=8pt %% indentation for index subentries
\indexwrap=24pt  %% indentation when term is too wide for column,
                 %% continues on following lines indented this much.

These commands can be changed to meet your requirements.

Indexing Examples

Sample of text marked for indexing

Here is \inx{Edward Bear*}, coming downstairs, bump, bump,bump,
on the back of his head, behind \inx{Christopher Robin}.  It is,
as far as he knows, the only way of \inx{coming downstairs}, but
sometimes he feels\inxx{coming downstairs,bumping}\inxx{coming
downstairs,stop bumping} that there really is another way, if
only he could stop bumping for a moment and think of it.
\newpage
And then he feels that perhaps there isn't.  Anyhow, here he is
at the bottom, and ready to be introduced to you\inxx{coming
downstairs,stop bumping,at the bottom}. \inx{Winnie-the-Pooh**}.

\newpage
\section*{One Day}
One day when he was out walking, he came to an open place in the
middle of the forest, and in the middle of this place was a
large \inx{oak-tree}, and, from the top of the tree, there came a
loud buzzing-noise.\inxx{oak-tree,large}\inxx{oak-tree,large,top}
\inxx{buzzing}\inxx{buzzing-noise}
\newpage
Winnie-the-Pooh sat down at the foot of the tree, put his head
between his paws and began to think.\inxx{oak-tree,large,foot}
\inxx{trees,oak}\inxx{trees,maple}\inxx{trees,pine}

Sample .inx file

When TEX is run on the preceding text an .inx file will be made. It will look like this:

>
~
Edward Bear |{001\global \spcount =1}
Christopher Robin |{001}
coming downstairs |{001}
coming downstairs,bumping |{001}
coming downstairs,stop bumping |{001}
coming downstairs,stop bumping,at the bottom |{002}
Winnie-the-Pooh |{002\global \spcount =2}
oak-tree |{003}
oak-tree,large |{003}
oak-tree,large,top |{003}
...

Sample .srt file

The .inx file must be sorted to produce a .srt file. That file will look like the following example. Notice the leading zeros which are needed for the sorting algorithm to work correctly.

>
buzzing |{003}
buzzing-noise |{003}
coming downstairs |{001}
coming downstairs,bumping |{001}
coming downstairs,stop bumping |{001}
coming downstairs,stop bumping,at the bottom |{002}
Christopher Robin |{001}
Edward Bear |{001\global\spcount =1}
oak-tree |{003}
oak-tree,large |{003}
oak-tree,large,foot |{004}
oak-tree,large,top |{003}
...
~

Sample formatted index

The command \printindex will cause the .srt file to be input into the original file. Notice ‘trees’ which was never a first level entry, but is used as the first part of several second level entries, and so is formatted as an entry without a page number. The index will be formatted and look like this: Buzzing, 3 Buzzing-noise, 3 Coming downstairs, 1 bumping, 1 stop bumping, 1 at the bottom, 2

Christopher Robin, 1 Edward Bear, \underline{1} Oak-tree, 3 large, 3 foot, 4 top, 3

Trees maple, 4 oak, 4 pine, 4 Winnie-the-Pooh, 2

Making changes or additions to the .srt file

Here is the same .srt file with some comments added with \addtoindex, and Winnie-the-Pooh changed to boldface:

>
buzzing |{003}
buzzing-noise |{003}
\addtoindex
{\it See also, oak-tree}
\endadd
coming downstairs |{001}
coming downstairs,bumping |{001}
coming downstairs,stop bumping |{001}
coming downstairs,stop bumping,at the bottom |{002}
Christopher Robin |{001}
\addtoindex
Christopher Robin's relationship to animals, 1--99 {\it ff}
\endadd
Edward Bear |{001\global\spcount =1}
oak-tree |{003}
oak-tree,large |{003}
oak-tree,large,foot |{004}
oak-tree,large,top |{003}
trees,maple |{004}
trees,oak |{004}
trees,pine |{004}
\indexbf{Winnie-the-Pooh} |{002\global\spcount =2}
~

Which will produce the index on the following page:

Buzzing, 3 Buzzing-noise, 3 See also, oak-tree Coming downstairs, 1 bumping, 1 stop bumping, 1 at the bottom, 2

Christopher Robin, 1 Christopher Robin’s relationship to an-

imals, 1–99 ff Edward Bear, \underline{1} Oak-tree, 3 large, 3 foot, 4 top, 3

Trees maple, 4 oak, 4 pine, 4 Winnie-the-Pooh, 2 Here is an example of using \ltr to separate the entries by their first letter and the results:

>
\addtoindex
\ltr{B}
\endadd
buzzing |{003}
\addtoindex
See Also, Bees
\endadd
buzzing-noise |{003}
\addtoindex
\ltr{C}
\endadd
\indexit{Christopher Robin} |{001}
coming downstairs |{001}
coming downstairs,bumping |{001}
coming downstairs,stop bumping |{001}
coming downstairs,stop bumping,at the bottom |{002}
\addtoindex
\ltr{E}
\endadd
Edward Bear |{001\global\spcount =1}
\addtoindex
\ltr{O}
\endadd
oak-tree |{003}
oak-tree,large |{003}
oak-tree,large,foot |{004}
oak-tree,large,top |{003}
\addtoindex
\ltr{W}
\endadd
Winnie-the-Pooh |{002\global\spcount =2}
~

Which when formatted, will look like this: B Buzzing, 3 See Also, Bees Buzzing-noise, 3 C Christopher Robin, 1 Coming downstairs, 1 bumping, 1 stop bumping, 1 at the bottom, 2

E Edward Bear, \underline{1} O Oak-tree, 3 large, 3 foot, 4 top, 3

W Winnie-the-Pooh, 2

SAMPLE PAGES

The following part will compare finished sample pages with the code that produced it. This sample uses Computer Modern fonts. To use PostScript fonts, start your document with

\documentstyle[psfonts]{kluwerbk}.

All other commands will be used in exactly the same way with either font set.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% booksamp.tex File
%% for kluwerbk.sty, Kluwer Technical Book style
%% Comments included.
%% You may use either [psfonts] as an optional style file:
%  \documentstyle[psfonts]{kluwerbk}
\documentstyle{../kluwerbk}
\begin{document}
%%   You may use \\ to break lines in title, author,
%%   chapter and appendix title, and section heads.
\title{Qualitative\\ Motion\\ Understanding}
\titlepage

QUALITATIVE

MOTION

UNDERSTANDING

\author{Wilhelm BURGER\\ George SANTAYANA}
\affil{Johannes Kepler University}
\location{Linz, Austria}
\author{Bir BHANU}
\affil{University of California}
\location{Riverside, California, USA}
%%   \title, \author, \affil, and \location should be entered before
%%    calling for \authortitlepage
\authortitlepage

QUALITATIVE MOTION

UNDERSTANDING

Wilhelm BURGER George SANTAYANA

Johannes Kepler University Linz, Austria

Bir BHANU

University of California Riverside, California, USA

KLUWER ACADEMIC PUBLISHERS Boston/London/Dordrecht

\tableofcontents
%\listoffigures
%\listoftables

CONTENTS

PREFACE  iii

1 FRAMEWORK FOR QUALITATIVE MOTION UNDERSTANDING 1

1.1 First Section 1 1.2 All the Things that can be Done with Figure Captions 2 1.3 The Same Things Can be Donewith Table Captions 5 1.4 An Example of Some Programming Code 8 1.5 Indexing Samples 10

A THIS IS A SAMPLE APPENDIX 11

A.1 First Section 11

\preface
This is a sample preface.

PREFACE

This is a sample preface.

\chapter{Framework for Qualitative\\
Motion Understanding}

%% To make a shortened version of title for running head use \chaptermark
%\chaptermark{Framework for Motion Understanding}

\section{First Section \label{thistest}}
The images that are acquired by a camera mounted on a moving vehicle
are subject to continuous change.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text.
We are showing references here; The first section is \ref{thistest},
the first figure is \ref{Firstfig},
the second figure is \ref{secondfig}, and the table caption is
numbered \ref{tabcaption}.
Here is a citation from the reference section: \cite{jacobs}.

\subsection{First Subsection}
Here is our first subsection.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.

\subsubsection{First Subsubsection}
This is normal text.  This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.

FRAMEWORK FOR QUALITATIVE MOTION UNDERSTANDING

1.1 FIRST SECTION

The images that are acquired by a camera mounted on a moving vehicle are subject to continuous change. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text.

We are showing references here; The first section is 2.1, the first figure is 2.1, the second figure is 2.2, and the table caption is numbered 2.1. Here is a citation from the reference section: [1].

1.1.1 First Subsection

Here is our first subsection. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text.

First Subsubsection

This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text.

%% Example of broken lines in subsubsection
\subsubsection{This is a\\ Subsubsection}
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text. This is normal text. This is normal text.
This is normal text.
\begin{equation}
\alpha\beta\Gamma\Delta\left\{\sum\right\}
\end{equation}
%% Default level will produce square bullets
\begin{itemize}
\item
This is a sample list item. This is a sample list item.  This is a
sample list item. This is a sample list item.  This is a sample list
item. This is a sample list item.  This is a sample list item. This
is a sample list item.  This is a sample list item.
\item
This is a sample list item. This is a sample list item.  This is a
sample list item. This is a sample list item.  This is a sample list
item. This is a sample list item.  This is a sample list item. This
is a sample list item.  This is a sample list item.
\end{itemize}

2 Chapter 1

This is a Subsubsection

This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text. This is normal text.

αβΓΔ {∑}  (1.1)

This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item.

This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item. This is a sample list item.

\section {All the Things that can be Done with Figure Captions}
\begin{figure}[h]
\caption{This is the figure caption.
This is the figure caption. This is the figure caption.
This is the figure caption. This is the figure caption.
$\alpha\beta\Gamma\Delta\sum_{123}^{345}$
This is the figure caption. This is the figure caption.\label{Firstfig}}
\end{figure}
%% For continued caption. Same figure number used as for last caption.
\begin{figure}[h]
\contcaption{This is a continued caption.}
\end{figure}
\begin{figure}[h]
\contcaption{This is another continued caption.}
\end{figure}
%% Double captions:
A Double caption.
\begin{figure}[h]
\dblcaption{This caption will go on the left side of
the page. It is the first of two side-by-side captions.}
{This caption will go on the right side of
the page. It is the second of two side-by-side captions.}
\end{figure}
%% To make narrow caption:
\begin{figure}[h]
\narrowcaption{This is a narrow caption.  This is a narrow caption.
This is a narrow caption.  This is a narrow caption. This is a narrow
caption.  This is a narrow caption. This is a narrow caption.  This
is a narrow caption. This is a narrow caption.  This is a narrow
caption. This is a narrow caption.}
\end{figure}

Framework for Qualitative Motion Understanding 3

1.2 ALL THE THINGS THAT CAN BE DONE WITH FIGURE CAPTIONS

Figure 1.1 This is the figure caption. This is the figure caption. This is the figure caption. This is the figure caption. This is the figure caption. αβΓΔ ∑_{123}^{345} This is the figure caption. This is the figure caption.

Figure 1.1 (continued) This is a continued caption.

Figure 1.1 (continued) This is another continued caption.

A Double caption.

Figure 1.2 This caption will go on the left side of the page. It is the first of two side-by-side captions.

Figure 1.3 This caption will go on the right side of the page. It is the second of two side-by-side captions.

Figure 1.4 This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption. This is a narrow caption.

%% To make narrow continued caption:
\begin{figure}[h]
\narrowcontcaption{This is a narrow continued caption.  This is a
narrow continued caption. This is a narrow continued caption.  This
is a narrow continued caption. This is a narrow continued caption.
This is a narrow continued caption. This is a narrow continued caption.
This is a narrow continued caption. This is a narrow continued caption.}
\end{figure}
%% To use boxed code example in figure. \begin{codebox} needs a dimension
%% for its argument. Here the dimension is \textwidth, the width of the
%% printed page, but any dimension can be used, i.e., 2in.
%% Blank space at the beginning of the line will be preserved.
%% Lines will be printed as seen on the screen.
%% Notice that to print a curly bracket, precede it with \string, i.e.,
%% `\string{'     or  `\string}'
\begin{figure}[h]
\begin{codebox}{\textwidth}
DO*(j=(l+1), p)\string{
          float t; int i;
          t=0.0
              DO(i=1, n)\string{
                  t=t+col[i]
\string}
\end{codebox}
\caption{This is an example of some programming code.}
\end{figure}
%% THIS EXAMPLE NOT PRINTED ====>
%% This is how to make a figure caption to be turned sideways on page.
\begin{widefigure}\vspace*{2in}
\caption{This is a wide figure caption.  It is meant to be printed in
landscape mode (sideways).  This page should be turned sideways when
the driver program is used to translate the .dvi file to the file
that is sent to the printer.}
\end{widefigure}

Figure 1.4 (continued) This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption. This is a narrow continued caption.

DO*(j=(l+1), p){
float t; int i;
t=0.0
DO(i=1, n){
t=t+col[i]
}

Figure 1.5 This is an example of some programming code.

\section{The Same Things Can be Done\\ with Table Captions}
\begin{table}[h]
\begin{center}
\begin{tabular}{||c||c||}
\hline
  %% On the next line is an example of how to get extra vertical space in
  %% a line: Use a \vrule with width 0pt and the height or depth that you
  %% want.
\bf Cell\vrule height 14pt width 0pt depth 4pt
&\bf Time (sec.)\cr
\hline
\hline
1&432.22\vrule height 12pt width0pt\cr
%%
%% On the next line, see how to line up numbers aligned on their decimal point
2&\phantom{3}32.32\cr
3&\phantom{33}2.32\cr
\hline
\end{tabular}
\end{center}
\caption{Here is the first table caption.\label{tabcaption}}
\end{table}

\begin{table}[h]
\contcaption{This is a continued caption.}
\end{table}
\begin{table}[h]
\contcaption{This is another continued caption.}
\end{table}

Framework for Qualitative Motion Understanding 5 1.3 THE SAME THINGS CAN BE DONE

WITH TABLE CAPTIONS

Cell Time (sec.)
1  432.22
2  32.32
3  2.32

Table 1.1 Here is the first table caption. Table 1.1 (continued) This is a continued caption.

Table 1.1 (continued) This is another continued caption.

\begin{table}[h]
\caption{This caption is not continued so it has a new caption number.}
\end{table}
\begin{table}[h]
\narrowcaption{This is a narrow table caption.
This is a narrow table caption.  This is a narrow table caption.
This is a narrow table caption.  This is a narrow table caption.
This is a narrow table caption.  This is a narrow table caption.
This is a narrow table caption.  This is a narrow table caption.}
\end{table}

\begin{table}[h]
\narrowcontcaption{This is a narrow continued table
caption.  This is a narrow continued table caption.  This is a narrow
continued table caption.  This is a narrow continued table caption.
This is a narrow continued table caption.  This is a narrow continued
table caption.  This is a narrow continued table caption.
This is a narrow table caption.}
\end{table}

%% THIS EXAMPLE NOT PRINTED =====>
%% This is how to make a table caption to be turned sideways on page.
\begin{widetable}
\vspace*{2in}
\caption{This is a wide table caption.
It is meant to be printed in landscape mode (sideways).
This page should be turned sideways when the driver program
is used to translate the .dvi file to the file that is
sent to the printer.}
\end{widetable}

Table 1.2 This caption is not continued so it has a new caption number.

Table 1.3 This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption. This is a narrow table caption.

Table 1.3 (continued) This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow continued table caption. This is a narrow table caption.

\section{An Example of Some Programming Code}
When you want to demonstrate some programming code, these are
the commands to use. Lines will be preserved as you see them
on the screen, as will spaces at the beginning of the line.
% Notice that to produce printed `{' brackets, precede them with \string
% Notice that \begin{codebox}...\end{codebox} can be inserted within
%   codesamp, and will be positioned at the same distance from right
%   margin as text. codebox needs an argument for the width of the box,
%   as in  \begin{codebox}{2.5in} below.
\begin{codesamp}
sqrdc(a, n)(a, qraux)\string{
  \underline{DARRAY float[180] a[180];}
  float qraux[180], col[180], nrmxl,t;
  int n,i,j,k,l;
  DO(1=0, n)\string{
         \underline{ALIGN*(i=1, n) col[i]=a[l][i];}
         \begin{codebox}{2.5in}
         init*\string{ nrmxl=0.0;\string}
         DO*(i=l, n)\string{
           nrmxl += col[i]*col[i];\string}
         combine*\string{nrmxl;\string}
         \end{codebox}
         nmxl=sqrt(nrmxl);
         if (nrmxl != 0.00)\string{
            if (col[1]=1.0+col[1];
%\newpage
%% You may need to insert a \newpage to start a new page to keep the
%% code and box on the same page.
            \begin{codebox}{1.5in}
            DO*(j=(l+1), p)\string{
              float t; int i;
              t=0.0
              DO(i=1, n)\string{
                  t=t+col[i]
            \string}
            \end{codebox}
            qraux[1]=col[1]
            col[1]= -nrmxl;
            \underline{ALIGN*(i=1, n)a[1][i]=col[i];}
        \string}
   \string}
\string}
\end{codesamp}

Framework for Qualitative Motion Understanding 7

1.4 AN EXAMPLE OF SOME PROGRAMMING CODE

When you want to demonstrate some programming code, these are the commands to use. Lines will be preserved as you see them on the screen, as will spaces at the beginning of the line.

sqrdc(a, n)(a, qraux){
  DARRAY float[180] a[180];
  float qraux[180], col[180], nrmxl,t;
  int n,i,j,k,l;
  DO(1=0, n){
         ALIGN*(i=1, n) col[i]=a[l][i];
          init*{ nrmxl=0.0;}
          DO*(i=l, n){
            nrmxl += col[i]*col[i];}
          combine*{nrmxl;}
         nmxl=sqrt(nrmxl);
         if (nrmxl != 0.00){
            if (col[1]=1.0+col[1];
             DO*(j=(l+1), p){
               float t; int i;
               t=0.0
               DO(i=1, n){
                   t=t+col[i]
             }
            qraux[1]=col[1]
            col[1]= -nrmxl;
            ALIGN*(i=1, n)a[1][i]=col[i];
        }
   }
}

\subsubsection{To Illustrate an Algorithm}
This is the command to use when you want to illustrate an algorithm
with some pseudo code. A backslash followed with a space will
indent the line. Every line will be printed
as it is seen on the screen. Blank lines will be preserved.
Math and font changes may be used.
%% \bit will produce bold italics if you are using PostScript fonts,
%% boldface in Computer Modern.
\begin{algorithm}
{\bit Evaluate-Single-FOE} ({\bf x$_f$, I$_0$, I$_1$}):
\ {\bf I}+ := {\bf I}$_1$;
\ ($\phi,\theta$) := (0,0);
\ {\it repeat}\note{/*usually only 1 interation required*/}
\ \ (s$_{opt}${\bf E}$_\eta$) := {\bit Optimal-Shift} ({\bf I$_0$,I$^+$,I$_0$,x$_f$});
\ \ ($\phi^+$, $\theta^+$) := {\bit Equivalent-Rotation} ({\bf s}$_{opt}$);
\ \ ($\phi$, $\theta$) := ($\phi$, $\theta$) + ($\phi^+$, $\theta^+$);
\ \ {\bf I}$^+$:= {\bit Derotate-Image} ({\bf I}$_1$, $\phi$, $\theta$);
\ \ {\it until} ($\|\phi^+\|\leq\phi_{max}$ \& $\|\theta^+\|\leq\theta_{max}$);
\ {\it return} ({\bf I}$^+$, $\phi$, $\theta$, E$_\eta$).
End pseudo-code.
\end{algorithm}

To Illustrate an Algorithm

This is the command to use when you want to illustrate an algorithm with some pseudo code. A backslash followed with a space will indent the line. Every line will be printed as it is seen on the screen. Blank lines will be preserved. Math and font changes may be used.

Evaluate-Single-FOE (x_{f}, I_{0}, I_{1}): I+ := I_{1}; (ϕ, θ) := (0,0); repeat /*usually only 1 interation required*/

(s_{opt}E_{η}) := Optimal-Shift (I_{0},I^{+},I_{0},x_{f}); (ϕ^{+}, θ^{+}) := Equivalent-Rotation (s_{opt}); (ϕ, θ) := (ϕ, θ) + (ϕ^{+}, θ^{+}); I^{+}:= Derotate-Image (I_{1}, ϕ, θ); until (∥ϕ^{+}∥ ≤ ϕ_{max} & ∥θ^{+}∥ ≤ θ_{max});

return (I^{+}, ϕ, θ, E_{η}).

End pseudo-code.

\appendix
%% After the \appendix command, \chapter, \section, equation numbering
%% and caption numbering will all be adjusted to work correctly as appendix.
\chapter{This is a Sample\\ Appendix}
\section{First Appendix Section}
Some text.

\begin{figure}[h]
\caption{This is the caption for a figure found in
an appendix.}
\end{figure}

\begin{table}[h]
\caption{This is the caption for a table found in
an appendix.}
\end{table}
\begin{equation}
\alpha\beta\Gamma\Delta\left\{\sum\right\}\end{equation}

A

THIS IS A SAMPLE APPENDIX

A.1 FIRST APPENDIX SECTION

Some text.

Figure A.1 This is the caption for a figure found in an appendix. Table A.1 This is the caption for a table found in an appendix.

αβΓΔ {∑}  (A.1)

%% Appendix without a Title
\chapter{} %% Appendix
\section{First Section in New Appendix}
Some text.

B^{APPENDIX}

B.1 FIRST SECTION IN NEW APPENDIX

Some text.

%% The terms below that are arguments of \bibitem can be cited in
%% the text above with \cite, i.e., \cite{jacobs}, which will
%% produce the appropriate reference number, [1] in this case.
\begin{references}
\bibitem{jacobs}Jacobs, E., ``Design Method Optimizes Scanning
Phased Array,'' Microwaves, April 1982, pp.\ 69--70.
\bibitem{yaw}Yaw, D. F., ``Antenna Radar Cross Section,'' Microwave
Journal, September 1984, p.\ 197.
\bibitem{francis} Francis, M., ``Out-of-band response of array antennas,''
Antenna Meas.  Tech. Proc., September 28--October 2, 1987, Seattle, p.~14.
\bibitem{shrank6/86} Shrank, H., ``Comparison of low sidelobe
distributions,'' IEEE AP
Newsletter, Jun 1986, pp.~22-23.
\bibitem{shrank8/86} Shrank, H., ``Gain factor vs
sidelobe level for circular Taylor
with optimum n-bar,'' IEEE AP Newsletter, Aug 1986.
\end{references}

REFERENCES

[1] Jacobs, E., “Design Method Optimizes Scanning Phased Array,” Microwaves, April 1982, pp. 69–70.

[2] Yaw, D. F., “Antenna Radar Cross Section,” Microwave Journal, September 1984, p. 197.

[3] Francis, M., “Out-of-band response of array antennas,” Antenna Meas. Tech. Proc., September 28–October 2, 1987, Seattle, p. 14.

[4] Shrank, H., “Comparison of low sidelobe distributions,” IEEE AP Newsletter, Jun 1986, pp. 22-23.

[5] Shrank, H., “Gain factor vs sidelobe level for circular Taylor with optimum n-bar,” IEEE AP Newsletter, Aug 1986.

(Assuming you have already made a bibliography file called sample.bib)

\bibliographystyle{plain}
\bibliography{sample}

REFERENCES

[1] Calvin Coolidge. The Cats of Maine. Silly Press, Chatham, Maine, USA, 1984.

[2] William Strunk, Jr. and E. B. White. The Elements of Style. Macmillan, New York, third edition, 1979.