如何调整大型整页表的大小以适合页面?

如何调整大型整页表的大小以适合页面?

我正在制作一张表格来展示问答示例,代码如下:

\documentclass[twocolumn]{article}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{xcolor}
\definecolor{mygreen}{RGB}{0,255,0}
\usepackage{tabularx}
\usepackage{caption}
\renewcommand{\theadfont}{\footnotesize\bfseries}

\usepackage[inline]{enumitem}
\newlist{tabenum}{enumerate}{1}
\setlist[tabenum]{label*=\alph*),
                  font=\bfseries,
                  leftmargin=*,
                  nosep,
                  before=\begin{minipage}[t]{\hsize},
                  after=\end{minipage}}

\setlength\fboxsep{0pt}
\newcommand{\correctitem}{\item[\stepcounter{tabenumi}\colorbox{mygreen}{\thetabenumi}]}
\begin{document}

\begin{table*}
\footnotesize
\caption{Examples}
\label{tab:subject_wise}
\begin{tabularx}{\textwidth}{ccX}
\toprule
 \thead{Question\\ Type} & \thead{Percent.} & \thead{Example} \\
\midrule
Type 1  &  0.47 & Which is not a side effect of the progestogen-only pill (POP)?  \\
        &       & \begin{tabenum}
                  \correctitem Ovarian cysts
                  \item  Venous thromboembolism
                  \item  Increased risk of diabetes mellitus 
                  \item  Ectopic pregnancy
                  \end{tabenum}
 \\
\midrule
Type 1  &  0.47 & Which is not a side effect of the progestogen-only pill (POP)? Ths question is a lot longer, this question is a lot longer \\
        &       & \begin{tabenum}
                  \correctitem Ovarian cysts
                  \item  Venous thromboembolism
                  \item  Increased risk of diabetes mellitus 
                  \item  Ectopic pregnancy
                  \end{tabenum}
 \\
\bottomrule
\end{tabularx}

\end{table*}

\end{document}

显示如下:

在此处输入图片描述

如果我添加更多问题,则会超出页面长度限制并显示警告

在此处输入图片描述

在此处输入图片描述

如何调整此表的大小以适合一页?

相关内容