调整交换图的宽度

调整交换图的宽度

我的图表太大,我想调整框的宽度,但一直出现编译错误missing } inserted }

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage[all,cmtip,color]{xy}
\nc{\conv}[1][]{\mathop{\circ}\limits_{#1}}
\nc{\muhom}{\mu hom}
\begin{document}

$$
\resizebox{width}{!}{
&&\xymatrix{
    (\muhom(F_{1},F_{2})\conv\muhom(G_{1},G_{2}))\circ\muhom(H_{1},H_{2})\ar[d]_-{\sim}\ar[r]&\muhom(F_{1}\conv G_{1},F_{2}\conv G_{2})\circ\muhom(H_{1},H_{2})\ar[r]&\muhom((F_{1}\conv G_{1})\conv H_{1},(F_{2}\conv G_{2})\conv H_{2})\ar[d]^-{\sim}\\
    \muhom(F_{1},F_{2})\conv(\muhom(G_{1},G_{2})\circ\muhom(H_{1},H_{2}))\ar[r]&\muhom(F_{1},F_{2})\circ\muhom(G_{1}\conv H_{1},G_{2}\conv H_{2})\ar[r]&\muhom(F_{1}\conv (G_{1}\conv H_{1}),F_{2}\conv (G_{2}\conv H_{2}))\\
}
}
\end{document}

有人有想法吗?或者是否可以处理大型图表以使其宽度适合文档?

答案1

你可以调整它的大小,但它会变得不可读。如果你转置它,情况就不会那么糟糕了。

我重新定义了你的\conv\muhom命令。

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor,graphicx}
\usepackage[all,cmtip,color]{xy}

\usepackage{showframe} % just for the picture

\newcommand{\conv}[1][]{%
  \mathbin{%
    \mathop{\circ}%
    \if\relax\detokenize{#1}\relax\limits_{#1}\fi
  }%
}
\newcommand{\muhom}{\operatorname{\mu{\hom}}}

\begin{document}

\[
\resizebox{\displaywidth}{!}{%
  \xymatrix{
    (\muhom(F_{1},F_{2})\conv\muhom(G_{1},G_{2}))\circ\muhom(H_{1},H_{2})
      \ar[d]_-{\sim} \ar[r] &
    \muhom(F_{1}\conv G_{1},F_{2}\conv G_{2})\circ\muhom(H_{1},H_{2})
      \ar[r] &
    \muhom((F_{1}\conv G_{1})\conv H_{1},(F_{2}\conv G_{2})\conv H_{2})
      \ar[d]^-{\sim}
    \\
    \muhom(F_{1},F_{2})\conv(\muhom(G_{1},G_{2})\circ\muhom(H_{1},H_{2}))
      \ar[r] &
    \muhom(F_{1},F_{2})\circ\muhom(G_{1}\conv H_{1},G_{2}\conv H_{2})
      \ar[r] &
    \muhom(F_{1}\conv (G_{1}\conv H_{1}),F_{2}\conv (G_{2}\conv H_{2}))
  }%
}
\]

\[
\resizebox{\displaywidth}{!}{%
  \xymatrix@C-6pt{
    (\muhom(F_{1},F_{2})\conv\muhom(G_{1},G_{2}))\circ\muhom(H_{1},H_{2})
      \ar[r]_-{\sim} \ar[d] &
    \muhom(F_{1},F_{2})\conv(\muhom(G_{1},G_{2})\circ\muhom(H_{1},H_{2}))
      \ar[d]
    \\
    \muhom(F_{1}\conv G_{1},F_{2}\conv G_{2})\circ\muhom(H_{1},H_{2})
      \ar[d] &
    \muhom(F_{1},F_{2})\circ\muhom(G_{1}\conv H_{1},G_{2}\conv H_{2})
      \ar[d]
    \\
    \muhom((F_{1}\conv G_{1})\conv H_{1},(F_{2}\conv G_{2})\conv H_{2})
      \ar[r]^-{\sim} &
    \muhom(F_{1}\conv (G_{1}\conv H_{1}),F_{2}\conv (G_{2}\conv H_{2}))
}}
\]

\end{document}

在此处输入图片描述

答案2

这是一个(有效的)起点。如果插入第 3 列,图表应该会更小(并且可能无法阅读)以适应线宽。

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx} % <-- to use resizebox
\usepackage[all,cmtip]{xy}
%\newcommand{\conv}[1][]{\mathop{\circ}\limits_{#1}}
\newcommand{\muhom}[1]{\mu_{\hom(#1_{1},#1_{2})}}
\begin{document}
\[
\resizebox{\linewidth}{!}{%
\xymatrix{
( \muhom{F}\circ \muhom{G} ) \circ \muhom{H} \ar[r]^-{\sim} \ar[d] & \muhom{F}\circ ( \muhom{G}  \circ \muhom{H} ) \ar[d] \\
\mu_{\hom{(F_1\circ G_1, F_2\circ G_2)}} \circ \muhom{H} \ar[r]^-{\sim} & \muhom{F}\circ \mu_{\hom{(G_1\circ H_1, G_2\circ H_2)}}
}}
\]
\end{document}

相关内容