11

I've drawn some figures using xymatrix, but they're much larger than I'd like them to be. Is there a way to resize them? I'd be happy to cut them down to a fixed percentage of the original or to a given size. I know how to change the size of the entries using the standard font size changing commands, but I really want to make the arrows shorter as well.

11

If you're using \xymatrix, you can change the row spacing, the column spacing, or both by adding the appropriate command in between the \xymatrix command and the opening brace. The file xyguide.pdf, in section 3.3 (Spacing and Rotation), on page 10, lists the commands as:

@=dimen   set spacing
@C=dimen  set column spacing
@R=dimen  set row spacing
You use this as in, e.g.,
\begin{equation*}
  \xymatrix@C=1em{
    {A} \ar[r] \ar[d]
    & {B} \ar[d]\\
    {C} \ar[r]
    & {D}
  }
\end{equation*}
7

I think you can use \resizebox

\resizebox{width}{height}{your stuff}

If you want to specify only the width, write

\resizebox{width}{!}{your stuff}

wight or height can be any length like 3cm, 4em or 1\textwidth

4

To change the distance between the entries using xy-pic, you need to define \xymatrixrowsep and \xymatrixcolsep to change the distance between rows and columns. That is, the following code

\[
\xymatrixrowsep{1in}
\xymatrixcolsep{2in}
\xymatrix
{
A\ar[r]\ar[d] & B\ar[d]\\
C\ar[r] & D
}
\]

gives a square with A and B separated by 2 inches, and A and C separated by 1 inch.

1
  • If my diagram is of size 4×3, I only want the distance of the last 2 rows closer, do you know if there is a way to do so? – Lao-tzu Apr 3 '18 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy