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

  • Context: LaTeX 
  • Thread starter Thread starter Aikon
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The discussion addresses the issue of disproportionate parentheses in a matrix created using the xy-pic package in LaTeX. The user initially encountered taller parentheses than the matrix itself. The solution provided involves using the \vcenter command to vertically center the matrix within the parentheses. Additionally, a reference to a similar solution on LaTeX-Community.org is mentioned, which incorporates an \hbox within \vcenter for enhanced formatting.

PREREQUISITES
  • Familiarity with LaTeX typesetting
  • Understanding of the xy-pic package for matrix representation
  • Knowledge of LaTeX commands such as \vcenter and \hbox
  • Basic concepts of mathematical notation in LaTeX
NEXT STEPS
  • Research the use of the \vcenter command in LaTeX for vertical alignment
  • Explore advanced features of the xy-pic package for complex diagrams
  • Learn about the \hbox command and its applications in LaTeX
  • Investigate additional formatting techniques for mathematical expressions in LaTeX
USEFUL FOR

LaTeX users, mathematicians, and anyone involved in typesetting complex mathematical documents who seeks to improve the visual presentation of matrices and mathematical expressions.

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
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
32K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
6K
Replies
4
Views
2K