如何将希腊字母以良好的形状放置在单元格(表格)的对角线周围?

如何将希腊字母以良好的形状放置在单元格(表格)的对角线周围?

我有下表

\documentclass{article}


\usepackage{lscape}

\usepackage{float} 
\usepackage{booktabs}
\usepackage{multirow}

\usepackage{diagbox}

\usepackage[para,online,flushleft]{threeparttable}


\begin{document}

\begin{table}[H!]
    \centering
    \resizebox{\textwidth}{!}
    {
    \begin{tabular}{cccccccccccc}\toprule
        \diagbox[width=2em]{\raisebox{-1pt}{$\beta$}}{\quad $\alpha$}& 1 & 1.1 & 1.2 & 1.3 & 1.4 & 1.5 & 1.6 & 1.7 & 1.8 & 1.9 & 2\\ \midrule
        0 & $0.013$ & $0.013$ & $0.02$ & $0.015$ & $0.015$ & $0.02$ & $0.023$ & $%
        0.023$ & $0.024$ & $0.026$ & $0.035$ \\ 
        0.25 & $0.013$ & $0.013$ & $0.02$ & $0.015$ & $0.015$ & $0.02$ & $0.023$ & $%
        0.023$ & $0.024$ & $0.025$ & $0.035$ \\ 
        0.5 & $0.013$ & $0.013$ & $0.015$ & $0.015$ & $0.015$ & $0.02$ & $0.023$ & $%
        0.023$ & $0.024$ & $0.025$ & $0.035$ \\ 
        0.75 & $0.013$ & $0.013$ & $0.015$ & $0.015$ & $0.015$ & $0.02$ & $0.023$ & $%
        0.023$ & $0.024$ & $0.025$ & $0.035$ \\ 
        1 & $0.013$ & $0.013$ & $0.015$ & $0.015$ & $0.015$ & $0.02$ & $0.023$ & $%
        0.023$ & $0.024$ & $0.025$ & $0.035$ \\ 
        \bottomrule
    \end{tabular}
    }
    \caption{All possible values of $F(v)$ for varying $(\alpha ,\beta)$ when $T=400$ for $95\%$ CI}
    \label{table:CI95}
\end{table}

\end{document}

我想将 alpha 和 beta 正确地放置在对角线上。我该怎么做?

答案1

我建议您不要使用\diagbox,而且不要使用\resizebox。相反,只需稍微重新组织标题材料,并且重要的是,使用tabular*环境,将宽度设置为\textwidth。将数字数据与小数点对齐也不错。

在此处输入图片描述

\documentclass{article}
\usepackage{booktabs,siunitx,caption}
\begin{document}

\begin{table}
\small
\setlength\tabcolsep{0pt} % let 'tabular*' determine whitespace
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}*{11}{S[table-format=1.3]}}
\toprule
    & \multicolumn{11}{c}{$\alpha$} \\
\cmidrule{2-12}
    $\beta$ & {1} & {1.1} & {1.2} & {1.3} & {1.4} & {1.5} & {1.6} & {1.7} & {1.8} & {1.9} & {2}\\ 
\midrule
    0 & 0.013 & 0.013 & 0.02 & 0.015 & 0.015 & 0.02 & 0.023 & 0.023 & 0.024 & 0.026 & 0.035 \\ 
    0.25 & 0.013 & 0.013 & 0.02 & 0.015 & 0.015 & 0.02 & 0.023 & 0.023 & 0.024 & 0.025 & 0.035 \\ 
    0.5 & 0.013 & 0.013 & 0.015 & 0.015 & 0.015 & 0.02 & 0.023 & 0.023 & 0.024 & 0.025 & 0.035 \\ 
    0.75 & 0.013 & 0.013 & 0.015 & 0.015 & 0.015 & 0.02 & 0.023 & 0.023 & 0.024 & 0.025 & 0.035 \\ 
    1 & 0.013 & 0.013 & 0.015 & 0.015 & 0.015 & 0.02 & 0.023 & 0.023 & 0.024 & 0.025 & 0.035 \\ 
\bottomrule
\end{tabular*}
\captionsetup{font=small}
\caption{All possible values of $F(v)$ for varying $(\alpha ,\beta)$ when $T=400$ for 95\%~CI}
\label{table:CI95}
\end{table}

\end{document}

相关内容