On 7/8/2010 11:31 PM, topspin1617 wrote:
Hey, this is my first post here.
Welcome aboard.
I'm using Lyx 1.6 and I want to draw a commutative diagram (abstract
algebra).
<shudder -- flashback from grad school>
The question is: I'm not sure if I even have xypic; how to figure out if I
do or not;
At a DOS prompt or terminal shell, run 'kpsewhich xypic.tex'. If it
displays a path, you have it; contrapositively, if you don't have it,
the command will fail silently.
and, if I don't, where I can download it and which files go where
(I'm not a computer person, I have no idea how to set that up right).
This depends on operating system and LaTeX distribution. Since you're
'not a computer person', we can probably rule out Linux, and since I'm
ignorant about Macs, we'll assume Windows. With Windows, your LaTeX
distribution is probably MiKTeX. Look in the Start menu for a MiKTeX
menu, and in it run Browse Packages. Type xypic in the Name box and
click Filter (or just scroll down the alphabetical list until you spot
it). If the "Installed on" field shows a date, you have it. Otherwise,
select the entry and click the + button to install it. You will need a
live Internet connection. MiKTeX will take care of all the housekeeping
chores associated with installing the package.
I'm looking at the help for this in Lyx itself. I'm following the
instrucions, and when it's time to test the xypic out, it says to try the
code
\xymatrix{A\ar[r]&B}
Which should give something like
A-->B
But what happens is, whenever I hit the { after typing \xymatrix, the
\xymatrix disappears (is just replaced by a little box to type into). Help?
The innermost box is where you type the formula. Once you are in the
inner box, use Edit > Rows and Columns > Insert column to create a
second column. (The ampersand above indicates a new column, but you
won't actually type it.) Now you'll have two insets (boxes) nested in a
box nested in a box. Type 'A\ar[r]' in the left innermost box and B in
the right innermost box, tnen use the space bar or right arrow to get
out of it. You don't need to type the braces; LyX supplies them
automatically.
Remember that you have to have instant preview turned on in order to see
the finished product in LyX. (With or without instant preview, View >
DVI will show you the correct result -- assuming xypic is installed, of
course.) To turn instant preview on, go to Tools > Preferences >
Display and switch the Instant Preview setting.
/Paul