From barr at math.mcgill.ca Sun Mar 26 14:40:26 2017 From: barr at math.mcgill.ca (Michael Barr) Date: Sun, 26 Mar 2017 08:40:26 -0400 (EDT) Subject: [Xy-pic] \newdir Message-ID: <1758963272.4144464.1490532026644.JavaMail.zimbra@math.mcgill.ca> 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. 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. On the other hand, if I comment out his macro then \documentclass{article} \usepackage[barr]{xy} % \newdir_{ (}{{ }*!/-.5em/@_{(}}% \begin{document} $$\bfig \Square/ (->`>`>`>/[A`B`C`D;```] \efig$$ \end{document} compiles fine and produces a hooked arrow. There is a \newdir{ (}{{ }*!/-.5em/@^{(}}. Can anyone tell me what is going on here. What does the underscore in his \newdir mean anyway? Michael From ross.moore at mq.edu.au Mon Mar 27 00:58:27 2017 From: ross.moore at mq.edu.au (Ross Moore) Date: Sun, 26 Mar 2017 22:58:27 +0000 Subject: [Xy-pic] \newdir In-Reply-To: <1758963272.4144464.1490532026644.JavaMail.zimbra@math.mcgill.ca> References: <1758963272.4144464.1490532026644.JavaMail.zimbra@math.mcgill.ca> Message-ID: Hi Michael, > On 26 Mar 2017, at 23:40, Michael Barr 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/ (->`>`>`>/[A`B`C`D;```] > \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 adds a variant version of something that you already have. > > 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 [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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 4605 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: texshop_image.pdf Type: application/pdf Size: 27945 bytes Desc: texshop_image.pdf URL: From ross.moore at mq.edu.au Mon Mar 27 01:47:33 2017 From: ross.moore at mq.edu.au (Ross Moore) Date: Sun, 26 Mar 2017 23:47:33 +0000 Subject: [Xy-pic] \newdir In-Reply-To: <550463765.4151567.1490571552717.JavaMail.zimbra@math.mcgill.ca> References: <1758963272.4144464.1490532026644.JavaMail.zimbra@math.mcgill.ca> <550463765.4151567.1490571552717.JavaMail.zimbra@math.mcgill.ca> Message-ID: <0CF44CF2-0A68-423A-B531-FBBBE7B25413@mq.edu.au> Hi Michael, On 27 Mar 2017, at 10:39, Michael Barr > wrote: Now I am really confused. I tried the file you sent below and it didn't compile with an error that style file matrix not found. So I changed {matrix} to [matrix] and got a message that \ar not defined. So I changed [matrix] to [all] and it stopped with the following error message ! Xy-pic error: illegal : \dir { (} not defined. \xyerror@ ...#2}\fi \errmessage {Xy-pic error: #1} } l.9 \xymatrix{A & B\\ C\ar@{{ (}->}[ur] & D } \qquad ? Sorry, it should start with \usepackage[barr,matrix]{xy} to pick up the \newdir{ (}{?.} command. Then the variant \newdir_{ (}{?.} can be defined also. Think: "you cannot have a variant of something that isn?t yet defined". I am using the 2016 version of TeXLive, if it matters. Michael 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 [cid:image001.png at 01D030BE.D37A46F0] 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 4605 bytes Desc: image001.png URL: