3

I would like to right justify the columns in a border matrix. Is this possible? Default seems to be centre

 \documentclass{article} 
 \begin{document}

    $
     \bordermatrix{~ & 5 & 6\cr
                  5 & 1 & 0 \cr
                  6 & 0 & -1 \cr}
    $
 \end{document}
5

I don't know if it is possible with bordermatrix, but it is with kbordermatrix by issuing

\kbalignrighttrue

The following lines are to simulate the behavior of bordermatrix

\renewcommand{\kbldelim}{(}
\renewcommand{\kbrdelim}{)}
\renewcommand{\kbrowstyle}{\displaystyle}
\renewcommand{\kbcolstyle}{\displaystyle}

MWE:

\documentclass{article}

\usepackage{kbordermatrix}
\kbalignrighttrue
\renewcommand{\kbldelim}{(}
\renewcommand{\kbrdelim}{)}
\renewcommand{\kbrowstyle}{\displaystyle}
\renewcommand{\kbcolstyle}{\displaystyle}

\begin{document}

    $
     \kbordermatrix{~ & 5 & 6\cr
                  5 & 1 & 0 \cr
                  6 & 0 & -1 \cr}
    $

\end{document} 

Output

enter image description here

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.