[Xy-pic] bad positioning of an arrow tail

Chris Heunen heunen at cs.ru.nl
Mon Sep 15 15:22:47 CEST 2008


That is because latex treats the @ sign differently in sty files.
If you tell it not to, by
  \makeatother
  \newdir{ >}{...}
  \makeatletter
then it works out fine.

Best wishes,
Chris Heunen

> I have a problem with the positioning of an arrow tail using the
> \xymatrix command in latex. The problem appears when I load the xypic
> package and define the tail inside a custom package. I attach a couple
> of examples.
> 
> The following code produces the expected result, an arrow of shape
>> ---->
> 
> File: test1.tex
> 
>   \documentclass[a4paper,11pt]{article}
> 
>   \usepackage[all]{xy}
>   \newdir{ >}{{}*!/-10pt/@{>}}
> 
>   \begin{document}
>     $$\xymatrix{A \ar@{ >->}[d]\\ B}$$
>   \end{document}
> 
> But I want to include the \usepackage and \newdir commands inside a
> custom package in order to avoid large preambles in my latex files. A
> minimal example of this goes as follows:
> 
> File: testpkg.sty
> 
>   \ProvidesPackage{testpkg}
>   \RequirePackage[all]{xy}
>   \newdir{ >}{{}*!/-10pt/@{>}}
> 
> 
> File test2.tex
> 
>   \documentclass[a4paper,11pt]{article}
> 
>   \usepackage{testpkg}
> 
>   \begin{document}
>     $$\xymatrix{A \ar@{ >->}[d]\\ B}$$
>   \end{document}
> 
> When I compile test2.tex the arrow tail is drawn shifted to the right
> from the expected position.
> 
> Anyone has an idea of what is happening and how to solve it ?
> 
> Thank you very much.
> 
> Abdó.
> 
> 
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic



More information about the xy-pic mailing list