<div dir="ltr"><div dir="ltr"><div>Hi list,</div><div><br></div><div>this idea is on the frontier between diagxy and XyPic, but I thought</div><div>that this would be the best place to discuss it.</div><div><br></div><div>Consider, for example, this diagram in diagxy:</div><div><br></div><div>  \documentclass{article}</div><div>  \input diagxy</div><div>  \xyoption{curve}</div><div>  \begin{document}</div><div>  $$\bfig</div><div>    \morphism(0,-675)|a|/{@{->}@<2.5pt>@/^15pt/}/<900,675>[{X}`{Y};{f}]</div><div>    \morphism(0,-675)|b|/->/<900,675>[{X}`{Y};{g}]</div><div>    \morphism(900,0)|a|/{@{->}@<2.5pt>@/^15pt/}/<900,-675>[{Y}`{Z};{h}]</div><div>    \morphism(900,0)|b|/->/<900,-675>[{Y}`{Z};{i}]</div><div>    \morphism(0,-675)|a|/{@{->}@/^15pt/}/<1800,0>[{X}`{Z};{k}]</div><div>    \morphism(0,-675)|m|/->/<1800,0>[{X}`{Z};{j}]</div><div>    \morphism(0,-675)|m|/{@{->}@<-15pt>}/<1800,0>[{X}`{Z};{hf}]</div><div>    \morphism(0,-675)|m|/{@{->}@<-15pt>@/_15pt/}/<1800,0>[{X}`{Z};{ig}]</div><div>    \morphism(225,-337)|a|/->/<225,0>[{\phantom{O}}`{\phantom{O}};{\beta}]</div><div>    \morphism(1350,-337)|a|/<-/<225,0>[{\phantom{O}}`{\phantom{O}};{\delta}]</div><div>    \morphism(900,-540)|l|/{@{<-}@<-15pt>}/<0,-450>[{\phantom{O}}`{\phantom{O}};{t}]</div><div>    \morphism(900,-652)|r|/{@{<-}@<15pt>}/<0,-225>[{\phantom{O}}`{\phantom{O}};{s}]</div><div>    \efig</div><div>  $$</div><div>  \end{document}</div><div><br></div><div>If we take a look at diagxy.tex, that in my machine is in this path,</div><div><br></div><div>  /usr/local/texlive/2018/texmf-dist/tex/generic/barr/diagxy.tex</div><div><br></div><div>we see that the high-level macro "\morphism" can be called with some</div><div>of its arguments omitted; it calls "\morphismp", that calls</div><div>"\morphismpp", that calls "\morphismppp", that calls "\morphismppp",</div><div>that call "\domorphism", and "\domorphism" has lots of "if"s and lots</div><div>of calls to XyPic. The first of them is:</div><div><br></div><div>  \POS(#1,#2)*+!!<0ex,\axis>{#7}\ar#4^-{#9} (\xend,\yend)*+!!<0ex,\axis>{#8}%</div><div><br></div><div>If we replace it by</div><div><br></div><div>  \XYPIC{\POS(#1,#2)*+!!<0ex,\Axis>{#7}\ar#4^-{#9} (\Xend,\Yend)*+!!<0ex,\Axis>{#8}}%</div><div><br></div><div>and do the same for all the other calls to XyPic, and define</div><div><br></div><div>  \def\XYPIC#1{{%</div><div>    \def\POS       {POS }%</div><div>    \def\ar        {ar }%</div><div>    \def\labelstyle{labelstyle }%</div><div>    \def\beta      {beta }%</div><div>    \def\delta     {delta }%</div><div>    \def\phantom   {phantom }%</div><div>    \def\Axis{\the\axis}%</div><div>    \def\Xend{\the\xend}%</div><div>    \def\Yend{\the\yend}%</div><div>    \directlua{print("#1")}%</div><div>  }}</div><div><br></div><div>then we get this on stdout:</div><div><br></div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}@<2.5pt>@/^15pt/^-{f} (900,0)*+!!<0ex,2.5pt>{Y}</div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}_-{g} (900,0)*+!!<0ex,2.5pt>{Y}</div><div>  POS (900,0)*+!!<0ex,2.5pt>{Y}ar @{->}@<2.5pt>@/^15pt/^-{h} (1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (900,0)*+!!<0ex,2.5pt>{Y}ar @{->}_-{i} (1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}@/^15pt/^-{k} (1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}|-*+<1pt,4pt>{labelstyle j}(1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}@<-15pt>|-*+<1pt,4pt>{labelstyle hf}(1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (0,-675)*+!!<0ex,2.5pt>{X}ar @{->}@<-15pt>@/_15pt/|-*+<1pt,4pt>{labelstyle ig}(1800,-675)*+!!<0ex,2.5pt>{Z}</div><div>  POS (225,-337)*+!!<0ex,2.5pt>{phantom {O}}ar @{->}^-{beta } (450,-337)*+!!<0ex,2.5pt>{phantom {O}}</div><div>  POS (1350,-337)*+!!<0ex,2.5pt>{phantom {O}}ar @{<-}^-{delta } (1575,-337)*+!!<0ex,2.5pt>{phantom {O}}</div><div>  POS (900,-540)*+!!<0ex,2.5pt>{phantom {O}}ar @{<-}@<-15pt>_-{t} (900,-990)*+!!<0ex,2.5pt>{phantom {O}}</div><div>  POS (900,-652)*+!!<0ex,2.5pt>{phantom {O}}ar @{<-}@<15pt>^-{s} (900,-877)*+!!<0ex,2.5pt>{phantom {O}}</div><div><br></div><div>that is ALMOST the XyPic code that diagxy calls, except for the</div><div>missing backslashes - that I don't know how to add.</div><div><br></div><div>The code is here:</div><div><br></div><div>  <a href="http://angg.twu.net/LATEX/2019diagxyhack.tex">http://angg.twu.net/LATEX/2019diagxyhack.tex</a></div><div><br></div><div>  Cheers,</div><div>    Eduardo Ochs</div><div>    <a href="http://angg.twu.net/dednat6.html">http://angg.twu.net/dednat6.html</a></div><div>    <a href="http://angg.twu.net/math-b.html">http://angg.twu.net/math-b.html</a></div><div><br></div></div></div>