Discussion:
XYpic or other diagram tools
topspin1617
2010-07-09 03:31:31 UTC
Permalink
Hey, this is my first post here.

I'm using Lyx 1.6 and I want to draw a commutative diagram (abstract
algebra).

The question is: I'm not sure if I even have xypic; how to figure out if I
do or not; 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).

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?
--
View this message in context: http://lyx.475766.n2.nabble.com/XYpic-or-other-diagram-tools-tp5272860p5272860.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Paul A. Rubin
2010-07-09 12:41:42 UTC
Permalink
Post by topspin1617
Hey, this is my first post here.
Welcome aboard.
Post by topspin1617
I'm using Lyx 1.6 and I want to draw a commutative diagram (abstract
algebra).
<shudder -- flashback from grad school>
Post by topspin1617
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.
Post by topspin1617
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.
Post by topspin1617
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
Stefan_K
2010-07-29 10:55:21 UTC
Permalink
Hi,
Post by topspin1617
I'm using Lyx 1.6 and I want to draw a commutative diagram (abstract
algebra).
an alternative way to typeset commutative diagrams is TikZ, though it's more
powerful.
Perhaps have a look at the examples here:

http://texblog.net/latex-archive/maths/tikz-commutative-diagram-edges-over-under/
Commutative diagrams with crossing edges
http://texblog.net/latex-archive/maths/pgf-tikz-commutative-diagram/ Chains
with labeled edges
http://texblog.net/latex-archive/maths/tikz-diagrams-tutorial/ Tutorial:
Commutative Diagrams using TikZ

Another alternative to xypic is amscd. If you still want to use xypic, let
us know, perhaps we could work it out with you.

Stefan
--
View this message in context: http://lyx.475766.n2.nabble.com/XYpic-or-other-diagram-tools-tp5272860p5347148.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Loading...