Math & Sciencelong formulas in xypic

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
smurfette
Posts: 4
Joined: Thu Sep 10, 2009 6:57 pm

long formulas in xypic

Post by smurfette »

Hello,

I have xypic diagrams with pretty long formulas in them and I would like to write those formulas on several lines but I want them to be all in the same entry in my xymatrix. Is that possible?

Thanks in advance for your help.

Smurfette

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

long formulas in xypic

Post by gmedina »

Hi,

I've never used the xypic package (I find its syntax rather "obscure") and perhaps I am misundertanding your question, but can't you just use the \\ command?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: long formulas in xypic

Post by Stefan Kottwitz »

Hi Smurfette,

welcome to the board!
You could use an array environment inside a xymatrix entry, or for instance amsmath macros like genfrac.

Stefan
LaTeX.org admin
smurfette
Posts: 4
Joined: Thu Sep 10, 2009 6:57 pm

long formulas in xypic

Post by smurfette »

gmedina wrote:Hi,

I've never used the xypic package (I find its syntax rather "obscure") and perhaps I am misundertanding your question, but can't you just use the \\ command?
No that won't work, the \\ command is interpreted as starting a new line in the xymatrix.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

long formulas in xypic

Post by Stefan Kottwitz »

smurfette wrote: the \\ command is interpreted as starting a new line in the xymatrix.
that's why I suggested to use a new environment like an array in the cell.

Stefan
LaTeX.org admin
smurfette
Posts: 4
Joined: Thu Sep 10, 2009 6:57 pm

long formulas in xypic

Post by smurfette »

Stefan_K wrote:
smurfette wrote: the \\ command is interpreted as starting a new line in the xymatrix.
that's why I suggested to use a new environment like an array in the cell.

Stefan
I tried that too, but it doesn't seem to support the array environment in an xymatrix entry...
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

long formulas in xypic

Post by gmedina »

smurfette wrote:...I tried that too, but it doesn't seem to support the array environment in an xymatrix entry...
As I said before, I haven't used this package; however, it seems to support array environments, as the following simple variation of an example of the documentation shows:

Code: Select all

\documentclass{article}
\usepackage{xypic}

\begin{document}

\xymatrix{
A \ar@<1ex>[dr]^a_{.} \\
& B \ar@<1ex>[ul]^{\begin{array}{c}f \\ g\end{array}} \ar@<1ex>[r]^c
& C \ar@<1ex>[l]^d_{.} }

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

long formulas in xypic

Post by Stefan Kottwitz »

smurfette wrote:
Stefan_K wrote: that's why I suggested to use a new environment like an array in the cell.
I tried that too, but it doesn't seem to support the array environment in an xymatrix entry...
I know it does. As long as you don't post your code we cannot correct it.

Stefan
LaTeX.org admin
smurfette
Posts: 4
Joined: Thu Sep 10, 2009 6:57 pm

Re: long formulas in xypic

Post by smurfette »

Oh I'm sorry for having bothered... I simply forgot to put { } around the entry... :S Thanks for your help!
Post Reply