LaTeX What is the solution for taller parentheses in a matrix using xy-pic in LaTeX?

  • Thread starter Thread starter Aikon
  • Start date Start date
  • Tags Tags
    Latex
AI Thread Summary
The discussion focuses on a LaTeX issue regarding the appearance of parentheses around a matrix created using the xy-pic package. The original code resulted in parentheses that were taller than the matrix itself, prompting a request for assistance. A solution was provided by suggesting the use of the \vcenter command to adjust the baseline of the matrix, ensuring it is centered within the parentheses. Additionally, a reference to a similar issue on LaTeX-Community.org was mentioned, where an \hbox was used within \vcenter for further refinement in specific cases.
Aikon
Messages
21
Reaction score
0
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:
\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,
 
Physics news on Phys.org
Hi Aikon,

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

Code:
\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
 
Back
Top