LabNote: LaTeX matrix when MatLab publishing

Wrong syntax

  • This snippet may not work for publishing a matrix in MatLab markup
%%
% R_x(\alpha) = \begin{pmatrix}
% 1 &   0         & 0           \\
% 0 & \cos \alpha & -\sin \alpha \\
% 0 & \sin \alpha &  \cos \alpha
% \end{pmatrix}

Working syntax

  • This may work:
%%
% $$ R_x(\alpha) = \pmatrix{1 &   0  & 0 \cr
% 0 & \cos \alpha & -\sin \alpha \cr
% 0 & \sin \alpha &  \cos \alpha} $$