我想排版2范畴的中间四个交换律。在 中xypic
,我设法排版了以下令人厌恶的东西:
代码如下:
\xymatrix {
\text{Middle} & \text{Four} & \text{Interchange} & \text{Law:} & & & \;\rruppertwocell{\a}\ar[rr] & & \;\rruppertwocell{\b}\ar[rr] & & \;\\
\;\rruppertwocell{\a}\rrlowertwocell{\;\a^{\prime}}\ar[rr] & & \circ\rruppertwocell{\b}\rrlowertwocell{\;\b^{\prime}}\ar[rr] & & \; & = & \;\rrlowertwocell{\;\a^{\prime}}\ar[rr]\ar@/^{0.7pc}/@[white][rrrr]^{\bullet} & & \;\rrlowertwocell{\;\b^{\prime}}\ar[rr] & & \;
}
但是间距太可怕了。我想要的是这样的:
但我真的不知道如何解决间距问题。我完全不知道tikz
,但只要它不需要我付出太多努力,我并不介意使用它的解决方案。
注意-我在 LyX 工作。
答案1
您可以制作两个单独的 xymatrices 并将它们并排放在 minipages 中。第二个 xymatrix 包含三行,项目符号位于中间行,各行之间的距离更近@R-2pc
(2 pica)。MWE:
\documentclass{article}
\usepackage[all,2cell,graph]{xy} \UseAllTwocells
\begin{document}
\begin{minipage}[l]{0.65\textwidth}
\xymatrix {
\txt{Middle} & \txt{Four} & \txt{Interchange} & \txt{Law:} & \\
\;\rruppertwocell{\alpha}\rrlowertwocell{\;\alpha^{\prime}}\ar[rr] & & \circ\rruppertwocell{\beta}\rrlowertwocell{\;\beta^{\prime}}\ar[rr] & & \quad \; =
}
\end{minipage}
\begin{minipage}[r]{0.35\textwidth}
\xymatrix@R-2pc{
\rruppertwocell{\alpha}\ar[rr] & & \rruppertwocell{\beta}\ar[rr] & & \\
& & \bullet & &\\
\rrlowertwocell{\alpha^{\prime}}\ar[rr] & & \rrlowertwocell{\beta^{\prime}}\ar[rr] & &
}
\end{minipage}
\end{document}
答案2
这里有一个使用tikz-cd:
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\newcommand{\arrowtcupp}[2]{\arrow[bend left=50, ""{name=U, below,inner sep=1}]{#1}\arrow[Rightarrow,from=U,to=MU,"#2"]}
\newcommand{\arrowtclow}[2]{\arrow[bend right=50, ""{name=L,inner sep=1}]{#1}\arrow[Rightarrow,from=LM,to=L]{}[]{#2}} % if you want to change some parameter of the label.
\newcommand{\arrowtcmid}[2]{\arrow[""{name=MU,inner sep=1},""{name=LM,below,inner sep=1}]{#1}[pos=.1]{#2}}
\newcommand{\dummy}{\textcolor{white}{\bullet}}
\begin{document}
Middle Four Interchange Law:
\[
\begin{tikzcd}[column sep=2cm]
\dummy \arrowtcmid{r}{} \arrowtcupp{r}{\alpha}\arrowtclow{r}{\alpha\smash'} & \circ \arrowtcmid{r}{} \arrowtcupp{r}{\beta}\arrowtclow{r}{\beta\smash'} & \dummy
\end{tikzcd}
=
\begin{tikzcd}[column sep=2cm, row sep=-.15cm]
\dummy \arrowtcmid{r}{}\arrowtcupp{r}{\alpha} & \dummy \arrowtcmid{r}{}\arrowtcupp{r}{\beta} & \dummy \\
& \bullet & \\
\dummy \arrowtcmid{r}{}\arrowtclow{r}{\alpha\smash'} & \dummy \arrowtcmid{r}{}\arrowtclow{r}{\beta\smash'} & \dummy
\end{tikzcd}
\]
\end{document}