Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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*}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.