在 Latex 表中插入矩陣

在 Latex 表中插入矩陣

如何將矩陣作為值包含在 Latex 表中?例如,在下面提供的程式碼中,我需要將 C 用括號寫成矩陣格式。

@code
\begin{table}[h]
\begin{tabular}{c c c} 
\hline % inserting line
 A & B & C
\\ [0.1ex] 
\hline % inserts single-line
\\ [0.2ex] 
% Entering 1st row
\raisebox{1.5ex}{4} & \raisebox{1.5ex}{3}&\raisebox{1.5ex}{[00; 11; 10;  01]}
\\[0.2ex]
\hline % inserts single-line
\end{tabular}
\label{tab:PPer}
\end{table}

答案1

像其中之一嗎?

% arara: pdflatex

\documentclass{article}
\usepackage{booktabs}
\usepackage{mathtools}

\begin{document}
\begin{table}[h]
    \begin{tabular}{ccc} 
        \toprule
        A & B & C\\
        \midrule
        $4$ & $3$&$\begin{bmatrix}00\\11\\10\\01\end{bmatrix} [00; 11; 10;  01]$\\
        $[00; 11; 10;  01]$ \\
        \bottomrule
    \end{tabular}
    \label{tab:PPer}
\end{table}
\end{document}

在此輸入影像描述

相關內容