Next: Commands for Styled Labels.
Up: Detailed Example with Marked
Previous: Detailed Example with Marked
There are several commands provided for placing labels anchored
at marked points. The simplest, but not always the most effective,
of these is useful when the required labels are provided as the
text string accompanying each marked point.
For the moment, ignore the <mods> parameter; it will be explained
later.
\xyMarkedTxt <mods>{<num>}
\xyMarkedText <mods>{<num>}
\xyMarkedMath <mods>{<num>}
\xyMarkedTxtPoints <mods>{<list>}
\xyMarkedTextPoints <mods>{<list>}
\xyMarkedMathPoints <mods>{<list>}
The first two commands are just alternative names which give identical results.
These, and the third command, set the supplied text-string as a label
at marked point number <num>,
assuming it to contain TEX code valid in text or math mode,
as the name suggests.
Several marked points are handled simultaneously by the remaining commands,
where the <list> consists of numbers and number ranges.
Note that the third and fourth commands are simply alternative names
which give identical results.
With \xyMarkedMathPoints, the strings in the .bb file
are presumed to be valid math-mode source,
without the need for surrounding $...$
delimiters.
In the log-file
it can be seen that point number 4 requires text mode
whereas all others are meant for math mode.
One way to do this is with the following code,
which yields the results in
the figure below:
\WARMprocessEPS{Fig5.4.1}{eps}{bb}
\renewcommand{\labeltextmodifiers}{++!D}
\renewcommand{\labelmathmodifiers}{+!D}
\renewcommand{\labelmathstyle}{\scriptstyle}
\renewcommand{\labeltextstyle}{\footnotesize}
\begin{xy}
\xyMarkedImport{}
\xyMarkedMathPoints{1-3,5-}
\xyMarkedTextPoints{4}
\end{xy}
Figure 4:
Imported image, with attached labels.
|
Note the following points:
- The \WARMprocessEPS command uses its arguments to specify
the graphic image and the file to read for the marked-point information;
- The expansion of \labeltextmodifiers yields XY-pic <modifier>s
that affect the way a label is positioned with respect
to its marked point,
when using \xyMarkedTextPoints and other text mode commands.
For math-mode labels there is \labelmathmodifiers.
- \xyMarkedImport extends the XY-pic command \xyimport.
Its argument can be the name of the graphics file to be placed
into the TEX or LATEX document.
However, it is not required when \WARMprocessEPS has been used already.
- A <list> can be a comma-separated list of numbers or numeric ranges,
a-b.
For extra convenience in specifying lists,
the following commands are also available
to put labels on all but a specified <list> of marked points:
\xyMarkedTxtExcept <mods>{<list>}
\xyMarkedTextExcept <mods>{<list>}
\xyMarkedMathExcept <mods>{<list>}
The empty <list> always means to use all marked-points,
regardless of the `Except'.
Also, open-ended ranges such as -3 and 5-
refer to all numbers to or from the appropriate extremity.
Next: Commands for Styled Labels.
Up: Detailed Example with Marked
Previous: Detailed Example with Marked
Ross Moore
1999-07-30