[Xy-pic] \cdot as arrowshaft
Ross Moore
ross at ics.mq.edu.au
Tue Jan 30 04:03:04 CET 2007
Hi Michael,
On 22/01/2007, at 7:36 AM, Michael Barr wrote:
> Is it possible to define a new shaft type that uses \cdot instead
> of the
> minuscule (and nearly invisible) dots that @{.} gets you? I have
> perused
> the manual and it doesn't seem to be mentioned.
You can do it with \newdir and \object (or \composite ).
Study the following example (using french Babel):
\newbox\cdotbox
\setbox\cdotbox=\hbox{\lower1.1ex\hbox{$\cdot$}}
\newdir{d}{\object{\copy\cdotbox}}
$$
\catcode`\! 12 \catcode`\; 12 \catcode`\: 12 \catcode`\? 12
\xy /r.2pc/:
\POS(0,0)*+!!<0ex,.5ex>{A}="A",\ar@{>}^-{f}(20,0)*+{B}="B"
% \POS?(.3)*_{g}
\POS?(.3)*_+!U{g}
\endxy $$
\medskip
$$
\catcode`\! 12 \catcode`\; 12 \catcode`\: 12 \catcode`\? 12
\xy /r.2pc/:
\POS(0,0)*+!!<0ex,.5ex>{A}="A",{\ar@{{}{d}>}^-{f}(20,0)*+{B}="B"}
,"A",\ar@{}"B",
\POS?(.3)*_+!U{g}
\endxy $$
I've not tested this where the arrow is sloped at some angle.
The trickiest part will be adjusting the size of the contents
of \cdotbox to ensure appropriate spacing of the dots,
for arrows at different angles.
Cheers,
Ross
>
> Michael Barr
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list