此代码有很多错误,可能是 .tex 文件中没有正确的 usepackages。我只需要将其以横向模式放在一页中。此外,标题和数据之间应该有粗体分隔。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{tabu}
\begin{document}
\setlength{\heavyrulewidth}{1.5pt}
\setlength{\abovetopsep}{4pt}
\begin{table*}[tb]
\small
\caption{\label{table2}Some values of parameters $(K,X_{\mathrm{max}})$ for which well-behaved charge fluid sphere can be generated.}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ccccccccccccc@{}}
\toprule
$p$&$m$&$\delta$&$a$&$\left(K_{\mathrm{min}},X_{\mathrm{max}}\right)$&$A_2$&$B_2$&$\left(P_r/c^2\rho\right)_c$&$\sqrt{\left(dP_r/c^2d\rho\right)_c}$ &$\sqrt{\left(dP_t/c^2d\rho\right)_c}$&$2M/R$&$Q/R$&$Q/M$\\
\midrule
\multicolumn{13}{c}{\emph{Case I} $n=0$}\\
\midrule
0.20&$10^4$&0 &0 &(0.093,\,0.672)&$-$2.5122&0.1165&0.1974&0.5887&0.5887&0.8246&0.3878&0.9406\\
0.22&$10^4$&0.2&0.71&(0.103,\,0.699)&$-$2.5488&0.1111&0.1898&0.5684&0.5619&0.8306&0.3891&0.9368\\
0.23&$10^4$&0.2&0.71&(0.094,\,0.700)&$-$2.5439&0.1109&0.1908&0.5696&0.5631&0.8307&0.3891&0.9366\\
0.24&$10^4$&0.2&0.71&(0.086,\,0.700)&$-$2.5403&0.1109&0.1915&0.5706&0.5641&0.8306&0.3889&0.9365\\
\midrule
\multicolumn{13}{c}{\emph{Case II} $n=0$}\\
\midrule
\multirow{2}{*}{$-1$}&$2$&0&0&(2.063,\,0.612)&$-$2.9967&0.1295&0.1116&0.4086&0.4086&0.8042&0.3751&0.9327\\
&$2$&0.2&0.64&(1.866,\,0.708)&$-$2.9714&0.0988&0.1154&0.4116&0.4056&0.8638&0.3899&0.9028\\
\bottomrule
\end{tabular*}
\end{table*}
\end{document}
答案1
使用包rotating
将桌子旋转90度。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{showframe}% Show the type block
\usepackage{array}
\newcolumntype{M}{>{$}c<{$}}
\begin{document}
%\setlength{\heavyrulewidth}{1.5pt}
%\setlength{\abovetopsep}{4pt}
\begin{sidewaystable}
\small
\caption{\label{table2}Some values of parameters
($K,X_{\mathrm{max}}$) for which well-behaved charge fluid sphere can be generated.}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}MMMMMMMMMMMMM@{}}
\toprule\addlinespace
p&m&\delta&a&\left(K_{\mathrm{min}},X_{\mathrm{max}}\right)&A_2&B_2&\left(P_r/c^2\rho\right)_c&\sqrt{\left(dP_r/c^2d\rho\right)_c}
&\sqrt{\left(dP_t/c^2d\rho\right)_c}&2M/R&Q/R&Q/M\\\addlinespace
\midrule
\multicolumn{13}{c}{\emph{Case I} $n=0$}\\
\midrule
0.20&10^4&0 &0 &(0.093,\,0.672)&-2.5122&0.1165&0.1974&0.5887&0.5887&0.8246&0.3878&0.9406\\
0.22&10^4&0.2&0.71&(0.103,\,0.699)&-2.5488&0.1111&0.1898&0.5684&0.5619&0.8306&0.3891&0.9368\\
0.23&10^4&0.2&0.71&(0.094,\,0.700)&-2.5439&0.1109&0.1908&0.5696&0.5631&0.8307&0.3891&0.9366\\
0.24&10^4&0.2&0.71&(0.086,\,0.700)&-2.5403&0.1109&0.1915&0.5706&0.5641&0.8306&0.3889&0.9365\\
\midrule
\multicolumn{13}{c}{\emph{Case II} $n=0$}\\
\midrule
\multirow{2}{*}{-1}&2&0&0&(2.063,\,0.612)&-2.9967&0.1295&0.1116&0.4086&0.4086&0.8042&0.3751&0.9327\\
&2&0.2&0.64&(1.866,\,0.708)&-2.9714&0.0988&0.1154&0.4116&0.4056&0.8638&0.3899&0.9028\\
\bottomrule
\end{tabular*}
\end{sidewaystable}
\end{document}