I have some drawings and matrices in written in Latex and I want to write them in tabular form. The problem is I am unable to center them.

\usetikzlibrary{angles, quotes}


    \tikz [x=0.25cm,y=0.60cm,line width=.2ex,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);%

\draw[->] (xyz cs:x=0) -- (xyz cs:x=5) node[above] {$z$};
\draw[rotate=15][->] (xyz cs:x=0) -- (xyz cs:x=5) node[above] {$z1$};

\draw[->] (xyz cs:y=0) --(xyz cs:y=5) node[right] {$x$};

\draw[->] (xyz cs:z=0) --(xyz cs:z=-5) node[above] {$y$};
\draw[rotate=15][->] (xyz cs:z=0) --(xyz cs:z=-5) node[above] {$y1$};
\draw (0,0)  -- (0,3)  node [midway] {\AxisRotator[rotate=-90]};
\draw (1,3) node {\(\phi\)};



\caption{Euler Elemental Rotations}
    Axis & Euler Elemental Rotation & Rotation Matrix\\
    x axis & \x & \(R_x(\phi) = \begin{bmatrix}
    1 & 0 & 0\\
    0 &cos\phi& -sin\phi \\
    0 &sin\phi &cos\phi
    \end{bmatrix} \) \\


enter image description here

How do I center everything in my table vertically and horizontally?

  • 1
    Unrelated to the alignment of elements inside of table cells, but probably nevertheless something to consider: Using the center environment inside of a table environment adds additional white space, which you might want to avoid. To nevertheless horizontally center the table within the textwidth, you may want to remove the center environment and use \centering instead. For an improved spacing between caption and table, you may want to use the caption package.
    – leandriis
    Jul 3, 2021 at 7:44

1 Answer 1


The p column type aligns cell contents vertically along the topmost common baseline across all rows. In the case of a tikzpicture object, though, the one and only "baseline" by default is placed at the bottom of the object. Hence, in your example, it looks like the three cells are actually aligned at the bottom, and not at either the top or middle.

I can think of two ways of achieving your formatting objective.

  • You could use the m column type instead of p. E.g., replace




    Note: In order to use the m column type, the array package must be loaded. Happily, that's is the case in your test document.

  • You could keep the p column type but modify the setup of the tikzpicture environment, so that the object's notional baseline is placed at the center rather than at the bottom of the object. One way to do this is to add the option baseline=(current bounding box.center) to the optional argument of the tikzpicture environment. E.g., change



                         baseline=(current bounding box.center)]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.