Equality between two separate xy-pic diagrams in LaTeX

I have two xy-pic diagrams that are generated by the script. In the LaTeX equation environment, I would like to write something like

diagram1 = diagram2

where diagram 1 and diagram 2 are two separate xy-pic diagrams created by this script, with two vertically centered (as well as with the = symbol).

Is there an easy way to do this without editing the diagrams and rewriting them as a large xy-pic diagram?

+3
source share
1 answer

If I understand correctly, I think that you can accomplish what you want using mini files. You may need futz with distances and widths, but something like this works in my test:

\begin{minipage}[c]{0.38\textwidth}
\begin{xy}
    (0,-20)="a", (0,0)="b"
    \ar@{<.||}  @<24mm>  "a";"b"
    \ar@^{<.||} @<16mm>  "a";"b"
    \ar@_{<.||} @<8mm>   "a";"b"
    \ar@0{<.||}          "a";"b"
    \ar@1{<.||} @<-8mm>  "a";"b"
    \ar@2{<.||} @<-16mm> "a";"b"
    \ar@3{<.||} @<-24mm> "a";"b"
\end{xy}
\end{minipage}
\hspace{0.03\textwidth}
\begin{minipage}[c]{0.05\textwidth}
~~~~~\Large =
\end{minipage}
\hspace{0.08\textwidth}
\begin{minipage}[c]{0.44\textwidth}
\begin{xy}
    (0,-20)="a", (0,0)="b"
    \ar@{<.||}  @<24mm>  "a";"b"
    \ar@^{<.||} @<16mm>  "a";"b"
    \ar@_{<.||} @<8mm>   "a";"b"
    \ar@0{<.||}          "a";"b"
    \ar@1{<.||} @<-8mm>  "a";"b"
    \ar@2{<.||} @<-16mm> "a";"b"
    \ar@3{<.||} @<-24mm> "a";"b"
\end{xy}
\end{minipage}
+1
source

Source: https://habr.com/ru/post/1751651/


All Articles