# [Xy-pic] \newdir

Ross Moore ross.moore at mq.edu.au
Mon Mar 27 00:58:27 CEST 2017

Hi Michael,

> On 26 Mar 2017, at 23:40, Michael Barr <barr at math.mcgill.ca> wrote:
>
> I got an email from a user that said:
>
> in xybarr.tex the line
>
> \newdir_{ (}{{ }*!/-.5em/@_{(}}%
>
> is missing, necessary to make certain hooked arrows with extra space
> work correctly.

We’d need to see an example of just what he means.

>
> He called it a bug.  Now I never claimed to put every arrow type into diagxy (= xybarr, not my name for it) and I admit to understanding \newdir much less well than I would like to, but I cannot get his macro to work.

> In fact, if I try to compile a diagram not even using his macro, it stops on a missing number error.

I don’t get that error at all.

Look at the following comparison, when  _{ (}  is defined,
and try it for yourself when not.

>> \documentclass{article}
>> \usepackage{matrix}{xy}
>> \newdir_{ (}{{ }*!/-.5em/@_{(}}
>>
>> \begin{document}
>> $>> \xymatrix{A & B\\ C\ar@{^(->}[ur] & D }\qquad >> \xymatrix{A & B\\ C\ar@{_(->}[ur] & D }\qquad >> \xymatrix{A & B\\ C\ar@{{ (}->}[ur] & D }\qquad >> \xymatrix{A & B\\ C\ar@{_{ (}->}[ur] & D } >>$
>>
>> \end{document}

> On the other hand, if I comment out his macro then
>
> \documentclass{article}
> \usepackage[barr]{xy}
>
>
>  % \newdir_{ (}{{ }*!/-.5em/@_{(}}%
>
> \begin{document}
>
>
> $$\bfig > \Square/ (->>>>/[ABCD;] > \efig$$
>
> \end{document}
>
> compiles fine and produces a hooked arrow.  There is a \newdir{ (}{{ }*!/-.5em/@^{(}}.

Yes, but it hooks the wrong way.

> Can anyone tell me what is going on here.  What does the underscore in his \newdir mean anyway?

According to §6.1 on p.16 of  xyrefer.pdf
the _ is a  ⟨variant⟩ specifier, which can modify directionals, as is done here.

So I’d say the suggestion here is a good one, as it just

>
> Michael
>
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic

Hope this helps

Ross

Dr Ross Moore
Mathematics Dept | 12 Wally’s Walk, 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955  |  F: +61 2 9850 8114
M:+61 407 288 255  |  E: ross.moore at mq.edu.au

http://www.maths.mq.edu.au

<http://mq.edu.au/>
[cid:012ee078-93c1-4769-9dbb-27f0a3c45705 at ausprd01.prod.outlook.com]

CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xy-pic/attachments/20170326/5253f04c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <http://tug.org/pipermail/xy-pic/attachments/20170326/5253f04c/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.pdf
Type: application/pdf
Size: 27945 bytes
Desc: texshop_image.pdf
URL: <http://tug.org/pipermail/xy-pic/attachments/20170326/5253f04c/attachment-0001.pdf>
`