[Xy-pic] Pointed shafts

Ross Moore ross at ics.mq.edu.au
Wed Jan 2 22:02:20 CET 2008


On 01/01/2008, at 7:50 AM, Michael Barr wrote:

> Hi and happy new year:
>
> Some time ago you sent me the following macros to make pointed  
> shafts for arrows:
>
>  \newbox\cdotbox
>  \setbox\cdotbox=\hbox{\lower1.1ex\hbox{$\cdot$}}
>  \newdir{d}{\object{\copy\cdotbox}}
>
> Recently, I have discovered that the following works just as well,  
> if not better:
>
> \newdir{p}{\object{.}}
>
> This is fine, but has to be used as {}{p}> .  Since I cannot  
> imagine wanting to use .> since it gives nearly invisible dots I  
> would like to ask if there is an easy way to substitute my dot, but  
> leave myself able to use the simpler syntax.  It is not an  
> important issue, obviously, but it would simplify the typing.

Sure.
Just use    \newdir{.}{\object{.}}
You'll get a warning such as

      Xy-pic Warning: `\dir{.}' redefined [barr-2:37].


It doesn't affect doubled arrows though.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 21727 bytes
Desc: not available
Url : http://tug.org/pipermail/xy-pic/attachments/20080103/fa011900/attachment-0001.tiff 
-------------- next part --------------


In the attached image, the top one uses the \cdotbox as  \ar@{{}{d}>}
whereas the 2nd uses a modified @{.} via  \ar@{.>}
with the third using   \ar@{:>} .

To get double-dotted arrows working, you may have to muck around
a bit with explicit widths, such as this:

\makeatletter
\xydef@\widepoint@{\pointlike@{{\kern-1.5\p at .\kern1.5\p@}}{2\p@}}
\xydefcsname@{dir2{.}}{\widepoint@ \double@\xydashh@}
\xyletcsnamecsname@{dir{:}}{dir2{.}}
\makeatother

which will generate warnings:

    Xy-pic Warning: `\dir2{.}' redefined [barr-2:56].

    Xy-pic Warning: `\dir{:}' redefined [barr-2:57].

but work as follows:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 12417 bytes
Desc: not available
Url : http://tug.org/pipermail/xy-pic/attachments/20080103/fa011900/attachment-0001.jpeg 
-------------- next part --------------


using   \ar@{:>} .


>
> Michael


Hope this helps,

	Ross

------------------------------------------------------------------------
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