I'm trying to use lyx to make an xymatrix
with narrowed spacing between the rows. I found in Peter Gumm's notes http://www.mathematik.uni-marburg.de/~gumm/LyX/xypic/xypic.pdf that I could add to the preamble the following code.
\newcommand{\xyR}[1]{%
\xydef@\xymatrixrowsep@{#1}
} % end of \xyR
and then use \xyR{}
preceding the matrix entries.
For me, though, in the instant preview I get several mysterious braces preceding the matrix. And when I compile to pdf, I recieve errors "Missing number, treated as zero" and "Illegal unit of measure (pt inserted)."
Alternatively, when I use \xyR
(without the braces) preceding the matrix entires, in the instant preview I see the entire matrix in a single row, and when I compile to pdf I recieve "Misplaced alignment tab character &."
Here's the code:
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[all]{xy}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\makeatletter
\newcommand{\xyR}[1]{%
\xydef@\xymatrixrowsep@{#1}
} % end of \xyR
\makeatother
\usepackage{babel}
\begin{document}
$\xyR\xymatrix{A & B\\
C & D\\
E & F
}
$
\end{document}
Any ideas? Thanks.
\makeatletter
before and\makeatother
after those three lines. – egreg Jul 28 '15 at 10:03