Headings of matrix in color

David just a moment. 1 answers, 0 views
matrices

Is there a simple way to create this matrix using LaTeX?

enter image description here

1 Answers


Piet van Oostrum 12/01/2016.

Must it be called a matrix? Or is tabular OK?

\documentclass{article}

\usepackage[table]{xcolor}
\usepackage{bigdelim}

\begin{document}

\begin{tabular}{l c c c c l}
   & & \color{blue}From: & & & \\
   & \color{blue}D & \color{blue}R & \color{blue}L & & \color{blue}To: \\
   \ldelim[{3}{*}[P = ] & .70 & .10 & .30 &\rdelim]{3}{*} & \color{blue}D \\
   & .20 & .80 & .30 & & \color{blue}R \\
   & .10 & .10 & .40 & & \color{blue}L \\
\end{tabular}

\end{document}

Language

Popular Tags