[Tex/LaTex] “Preamble” menu item does not appear in LyX

lyxpreamblexy-pic

I'm trying to use xy-pic in LyX to create diagrams and using this tutorial. It says on page 3 to go Layout->Document->Preamble to enable the xy-pic package. However, there is no "Layout" menu on my LyX installation. There is a "Document" menu, but it doesn't contain any option "Preamble."

When I type \xymatrix, the command appears in the autocomplete list. However, when I type \ar within the \xymatrix context to create an arrow, it does not appear. \ar causes compile errors, and both \ar and \xymatrix cause compile errors when used in an evil red text context (between dollar signs) rather than a LyX math context.

I'm using LyX 2.0.1 on a Mac OSX Lion machine. This issue has been a problem in the past as well, but I haven't been able to find any information on it. Any ideas?

Best Answer

Go to Document > Settings > LaTeX Preamble and in there you can type \usepackage[all]{xy}

Note that it doesn't matter whether you have 2.0.4 or 2.0.1 for this particular point but you might as well upgrade.