next up previous
Next: Adding Labels. Up: Convenient Labelling of Graphics, Previous: Introduction

Detailed Example with Marked Points


Subsections The best way to explain how the WARMreader macros work is with an example. The figure below shows an EPS image prepared for a mathematics text [2]. Numbered xs are not part of the image but indicate ``marked points'', serving as anchors for placement of labels.

Figure 1: Imported image with ``marked points'' indicated explicitly.
\begin{figure}
\begin{xy}
%
\renewedcommand{next}{\xyShowAllMarkedPoints{}{Fig5.4.1}{eps}}%
\xyShowAllMarkedPoints{}{Fig5.4.1}{eps}
\end{xy}\end{figure}

Figure: Contents of the file Fig5.4.1.bb, containing the ``marked point'' information for figure 1.

%%Creator: PICT Displayer, by David Rand, Version 1.0, March 1999
%%Title: (Fig5.4.1.eps)
%%Date: 3/13/99¥8h49 PM
%%IMPORTANT: The following BoundingBox indicates only the size of the box, not its position!
%%BoundingBox: 0 0 224 134
%%Coordinates: LL
%%StartMarkedPoints
%%MarkedPoint: ( 38,118)  1 %F_{\lambda}^*t(m_{\lambda})
%%MarkedPoint: ( 77,115)  2 %t(m)
%%MarkedPoint: ( 62, 72)  3 %m
%%MarkedPoint: (130,123)  4 %integral curve of $X$
%%MarkedPoint: (155,107)  5 %t(m_{\lambda})
%%MarkedPoint: (113, 46)  6 %m_{\lambda}=F_{\lambda}(m)
%%MarkedPoint: (174, 38)  7 %X(m_{\lambda})
%%EndMarkedPoints

Information for the marked points in the figure above is contained in a file named Fig5.4.1.bb, with the graphic itself being named Fig5.4.1.eps. The .bb file gives the natural size (in points) of the imported graphic as well as coordinates for marked points.

In addition to being numbered in sequence, a text string may be given for each marked point. This can be used to help identify why the point has been marked. It may even provide the TEX code intended to be used to specify the label, though it is not at all necessary to use it for this purpose. For example, the code used to produce the above example was as follows:

\begin{xy}
 \xyShowAllMarkedPoints{}{Fig5.4.1}{eps}
\end{xy}
Techniques to create a file such as Fig5.4.1.bb, see below, are discussed towards the end of this article.

A side-effect of \xyShowAllMarkedPoints is to write the coordinates and text strings for each of the marked points into the TEX .log file.

Figure: Marked point information, as it appears in the .log file.
file: ./Fig5.4.1.bb
Bounding Box is (0,0)->(224,134)
Marked '1' point at ( 38,118) for F_{\lambda }^*t(m_{\lambda }).
Marked '2' point at ( 77,115) for t(m).
Marked '3' point at ( 62, 72) for m.
Marked '4' point at (130,123) for integral curve of $X$.
Marked '5' point at (155,107) for t(m_{\lambda }).
Marked '6' point at (113, 46) for m_{\lambda }=F_{\lambda }(m).
Marked '7' point at (174, 38) for X(m_{\lambda }).
Found 7 data points.

The purpose of this is to facilitate preparation of the required labels over several consecutive processing runs.


next up previous
Next: Adding Labels. Up: Convenient Labelling of Graphics, Previous: Introduction
Ross Moore 1999-07-30