\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{\extracolsep{\fill}}|[c]@{}}
\hline
\multicolumn{2}{| r |}{\cellcolor{gray!25} Begin of Table}\\
\hline
A) Something & B) something j\\
\hline
C) Something & D) something j\\
\hline
\endfirsthead
\hline
\endfoot
\endlastfoot
\end{longtable}
答案1
目前尚不清楚您想要获取哪个表格。如果是第一个,并且末尾的表格长度超过一页,则解决方案可以是:
\documentclass{article}
\usepackage{geometry}
\usepackage[table]{xcolor}
\usepackage{longtable, tabularx}
%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
with \verb+longtable+:
\begin{longtable}{|*{2}{p{\dimexpr0.5\linewidth-2\tabcolsep-\arrayrulewidth\relax}|}}
\hline
\multicolumn{2}{| c |}{\cellcolor{gray!25} Begin of Table}\\
\hline
A) Something & B) something j \\
\hline
C) Something & D) something j\\
\hline
\end{longtable}
with \verb+tabularx+:
\begin{center}
\begin{tabularx}{\linewidth}{|X|c|X|c|}
\hline
\rowcolor{gray!25}
\multicolumn{4}{| l |}{What is capital of Canada?} \\
\hline
Berlin & C & Ottawa & A \\
\hline
Rome & D & Canberra & B \\
\hline
\end{tabularx}
\end{center}
\end{document}
给予