我有一张下面的大表格,我想把它放在页面的中间。
我有以下两个要求:
- 表格应在新页面上
- 表格需要垂直和水平对齐。
我试过了centering
,但是没有用。欢迎指点。
\RequirePackage{fix-cm}
%
%\documentclass{svjour3} % onecolumn (standard format)
%\documentclass[smallcondensed]{svjour3} % onecolumn (ditto)
\documentclass[smallextended,anonymous]{svjour3} % onecolumn (second format)
%\documentclass[twocolumn]{svjour3} % twocolumn
\usepackage{float}
\usepackage{rotating}
\usepackage{booktabs} % for \toprule, \midrule, and \bottomrule macros
\usepackage{siunitx} % for better formatting columns with decimal numbers
\usepackage{adjustbox}
\begin{document}
\begin{sidewaystable}
\centering
\scriptsize
\setlength\tabcolsep{3pt}
\begin{tabular}{@{}S[table-format=1.1]*{12}{S[table-format=2.3]}@{}}
\toprule
\multicolumn{11}{c}{} & \multicolumn{2}{c}{retro} \\
\cmidrule{12-13}
{Svieq} & {000436xa} & {000594xa} & {001715xa} & {001932ya} & {006040ya} & {006263xa} & {007162ya} & {007257ya} & {IT0605ya} & {IT0790xa} & {emiliaeo} & {emilians} \\ \midrule
0.4 & 2.447 & 2.177 & 2.304 & 4.921 & 4.298 & 2.121 & 3.928 & 3.478 & 3.462 & 1.751 & 0.875 & 0.525 \\
0.8 & 4.894 & 4.354 & 4.609 & 9.843 & 8.597 & 4.241 & 7.857 & 6.957 & 6.924 & 3.502 & 1.750 & 1.049 \\
1.2 & 7.341 & 6.530 & 6.913 & 14.764 & 12.895 & 6.362 & 11.785 & 10.435 & 10.386 & 5.252 & 2.625 & 1.574 \\
\bottomrule
\end{tabular}
\caption{Caption}
\end{sidewaystable}
\end{document}
% end of file template.tex
此处该表格应位于页面的中间。
答案1
\RequirePackage{fix-cm}
%
%\documentclass{svjour3} % onecolumn (standard format)
%\documentclass[smallcondensed]{svjour3} % onecolumn (ditto)
\documentclass[smallextended,anonymous]{svjour3} % onecolumn (second format)
%\documentclass[twocolumn]{svjour3} % twocolumn
\usepackage{float}
\usepackage{rotating}
\usepackage{rotating}
%% ************ from https://tex.stackexchange.com/a/363799/161015
\setlength{\rotFPtop}{0pt plus 1fil}% % added <<<<<<<<<<<<<<
\setlength{\rotFPbot}{0pt plus 1fil}%
\usepackage{caption}% added <<<<<<<<<<<<<<
%% ***********
\usepackage{booktabs} % for \toprule, \midrule, and \bottomrule macros
\usepackage{siunitx} % for better formatting columns with decimal numbers
\usepackage{adjustbox}
\begin{document}
\begin{sidewaystable}
\centering
\scriptsize
\setlength\tabcolsep{3pt}
\begin{tabular}{@{}S[table-format=1.1]*{12}{S[table-format=2.3]}@{}}
\toprule
\multicolumn{11}{c}{} & \multicolumn{2}{c}{retro} \\
\cmidrule{12-13}
{Svieq} & {000436xa} & {000594xa} & {001715xa} & {001932ya} & {006040ya} & {006263xa} & {007162ya} & {007257ya} & {IT0605ya} & {IT0790xa} & {emiliaeo} & {emilians} \\ \midrule
0.4 & 2.447 & 2.177 & 2.304 & 4.921 & 4.298 & 2.121 & 3.928 & 3.478 & 3.462 & 1.751 & 0.875 & 0.525 \\
0.8 & 4.894 & 4.354 & 4.609 & 9.843 & 8.597 & 4.241 & 7.857 & 6.957 & 6.924 & 3.502 & 1.750 & 1.049 \\
1.2 & 7.341 & 6.530 & 6.913 & 14.764 & 12.895 & 6.362 & 11.785 & 10.435 & 10.386 & 5.252 & 2.625 & 1.574 \\
\bottomrule
\end{tabular}
\caption{Caption}
\end{sidewaystable}
\end{document}