Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LaTeX - problems with xy-pic

  1. May 29, 2012 #1
    Hi,

    I am trying to show the reader what is the main diagonal of a matrix, so i wrote the code using the xy-pic package, this is the code:
    Code (Text):

    \begin{displaymath}
    \left(
    \xymatrix @=0.5pc
    {
    a \ar@{-}[dr] & b\\
    c & d\\
    }
    \right)
    \end{displaymath}
     
    In the compiled file the parenthesis are taller than the matrix, and i couldn't found a solution, so i am asking help!
    :smile:
    Thanks,
     
  2. jcsd
  3. Jun 24, 2012 #2
    Hi Aikon,

    the problem here is the baseline of the matrix, which is not at the center. You can fix that by \vcenter:

    Code (Text):
    \begin{displaymath}
    \left(\vcenter{
    \xymatrix @=0.5pc
    {
    a \ar@{-}[dr] & b\\
    c & d\\
    }}
    \right)
    \end{displaymath}
    xymatrix.png

    On LaTeX-Community.org, it has been made similarly here: Parentheses around a sigma sum with huge subscript. There just an additional \hbox has been used within \vcenter, which an be a good idea in some cases.

    Stefan
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: LaTeX - problems with xy-pic
  1. LaTeX in PowerPoint (Replies: 2)

  2. Latex Help (Replies: 9)

  3. LaTeX help (Replies: 2)

Loading...