next up previous
Next: Strategies for marking points. Up: Detailed Example with Marked Previous: Commands for Styled Labels.


Fine Adjustment of Labels.

The labelled image in the previous example looks quite good but there are blemishes: e.g. the text label ``integral curve...'' overlaps with the curved arrow, the math label `` m$\scriptstyle \lambda$ = ...  '' is too far from the large dot which it is meant to be labelling, and the ``t(m)'' and `` t(m$\scriptstyle \lambda$)'' are perhaps too close to the arrows they are meant to label.

The position of the text label, at marked-point number 4, could be adjusted by choosing a different set of XY-pic modifiers for the expansion of the macro \labeltextmodifiers. This works when there is just a single label to fine-tune but is no good when more than one needs special adjustment.

To allow many specialised adjustments, all the commands introduced so far allow XY-pic modifiers to be specified. These come immediately after the command-name, but before the opening brace:


\xyMarkedMathExcept <mods>{<style>}{<list>}
\xyMarkedStyledPoints <mods>{<style>}{<list>}
\xyMarkedStyledTxtPoints <mods>{<style>}{<list>}

The <mods> are just XY-pic <modifiers>.

Figure 5: Imported image, with fine adjustments to the positions of labels.
\begin{figure}
\WARMprocessEPS{Fig5.4.1}{eps}{bb}
\renewedcommand{labelmathmodi...
...yMarkedMathExcept{2,4-6}
\xyMarkedTxtPoints ++!D!L(.2){4}%
\end{xy}\end{figure}

The above example shows how this could be done. The source code is as follows. Note how three of the math labels are positioned with explicit XY-pic modifiers while the others use \labelmathmodifiers. The single text label is also positioned explicitly, to good effect, so there is no need for \labeltextmodifiers.

\WARMprocessEPS{\exnamei}{eps}{bb}
\renewcommand{\labelmathmodifiers}{+!D}
\renewcommand{\labelmathstyle}{\scriptstyle}
\renewcommand{\labeltextstyle}{\footnotesize}
\begin{xy}
 \xyMarkedImport{}
 \xyMarkedMathPoints ++!D!L(.1){2}
 \xyMarkedMathPoints +!D!L(.3){5}
 \xyMarkedMathPoints ++!D{6}
 \xyMarkedMathExcept{2,4-6}
 \xyMarkedTxtPoints ++!D!L(.2){4}
\end{xy}

Recall the effect of the XY-pic modifiers, e.g. +!D!L(.3).
First, TEX sets an \hbox containing the typeset label. Usually this box is centered so that if there were no <modifier>s the center of the label would be anchored at the marked point.
The modifier + adds a small margin, increasing the size of the box both vertically and horizontally.
Next the !D shifts the reference point ( $ \underline{\mathrm{D}}$own) within the box to the bottom edge; with no further modifiers, the label now appears entirely above the position of the marked point, with the bottom edge occuring the width of the margin away from it.
Finally the !L(.3) nudges the reference point towards the $ \underline{\mathrm{L}}$efthand edge, by an amount .3 of the distance to it so that now more of the label appears on the righthand side of the marked point.

Note that nudging using !D, !L, !R and !U ( $ \underline{\mathrm{U}}$p), has the effect of shifting the label in the opposite direction to the specified nudge. Numerical <factor>s, such as (.3), are optional; if omitted, the reference point is moved all the way to the specified edge2.



Footnotes

... edge2
Refer to the XY-pic Reference Manual [6], for details of the XY-pic language for structured diagrams.

next up previous
Next: Strategies for marking points. Up: Detailed Example with Marked Previous: Commands for Styled Labels.
Ross Moore 1999-07-30