Download TEXsis
Transcript
Figures and Tables
45
7. Figures and Tables
Technical papers often include tables and/or figures. Regardless of how the contents of
the figures or tables are created, these have a lot in common in the way they are generally
treated. TEXsis makes use of TEX’s floating insertion capabilities (see Chapter 15 of The
TEXbook) to insert figures and tables on the current page or on a following page. It
is also possible to have figures or tables saved and printed at the end of the document.
Captions are easily added either above or below the figure or table. Both kinds of objects
are automatically assigned numbers, which are associated with internal labels so that they
may be referred to in the text without having to know their order. It is possible to create
a list of the figures and tables which appear in a document, much like creating a table of
contents. Figures themselves are generally created outside of TEX, either by hand or by
computer graphics programs, while tables can be created using TEX commands. The most
complicated tables have vertical and horizontal lines (called “rules”) to guide the reader’s
eye and to make the table more readable. TEXsis has some very easy to use commands for
making ruled tables.
Before discussing TEXsis’s figure and table making macros in detail we should mention that TEXsis also adds a new insertion class to those of Plain TEX. In Plain TEX
saying \topinsert, \midinsert or \pageinsert begins a floating insertion (ended by
\endinsert) which will appear somewhere on the current page or a following page. Material entered with a \topinsert appears at the top of the current page, if there is room for
it, or at the top of the next page where there is room. A \midinsert attempts to insert
the text into the current page right where it is invoked, but if the insertion won’t fit it
becomes a \topinsert. Saying \pageinsert creates an insertion which takes up a whole
page by itself. In TEXsis you can also say \bottominsert to make a floating insertion that
will appear at the bottom of the current page, if it will fit, or at the bottom of the next
page where it will fit. There is also \heavyinsert, which like \midinsert tries first to
insert the material into the current page right where it is called, but in this case becomes
a \bottominsert if the material wont’ fit.
7.1. Figures
TEX is designed for technical typesetting, but does not include a graphics standard, so
to include a figure or drawing in a document it is necessary to leave blank space and to
either glue the drawing in later or to arrange for the figure material to be inserted by some
mechanism outside of TEX when the page is actually printed (e.g., using the \special
command or the \epsfbox command described later).
Imagine that you wish to insert into the text a drawing of a “penguin diagram,” which
is about 6 cm tall. You could create the space for this figure at the top of a page, along
with a caption, with the following commands:
\figure{Penguin}
\hrule
\vskip 2cm
\line{\hss (glue your penguin here) \hfil}
\vskip 2cm