表格不适合放在页面的中心或左侧?

表格不适合放在页面的中心或左侧?

我尝试将下表放在一页上,但左侧空间很大,无法放在中间。有什么建议吗?

\begin{table}[h]
  \centering
  \resizebox{0.72\textwidth}{!}{\begin{minipage}{\textwidth}
    \centering
        \caption{\textbf{The first five embryonic developmental stages of \emph{Drosophila}} \citep{campos}}
  \label{table: fly stages}
        \begin{tabular}{|c|c|c|}
   \hline
Stages & Age in minute & Developmental progresses \\ 
\hline
    1 & 0-15 & Pronuclear fusion \\ 
\hline
 2 & 15-70 & Preblastoderm (mitotic cycles 1-9) - early cell division - start of cleavage \\ 
\hline
 3 & 70-90 & Pole bud formation - nuclear division 9 \\ 
\hline
 4 & 90-130 & Syncytial blastoderm (mitotic cycles 10-13) - end of cleavage divisions \\ 
\hline
 5 & 130-180 & Cellularization of the blastoderm \\ 
\hline

  \end{tabular}

      \end{minipage}}
\end{table}

答案1

如果你坚持你的方法,请这样做:

\documentclass{article}
\usepackage{graphicx,showframe,natbib}
\begin{document}
  \begin{table}[h]
  \centering
    \caption[]{\footnotesize\textbf{The first five embryonic developmental stages of \emph{Drosophila}} \citep{campos}}
  \label{table: fly stages}
  \resizebox{\textwidth}{!}{%
        \begin{tabular}{|c|c|c|}
   \hline
Stages & Age in minute & Developmental progresses \\
\hline
    1 & 0-15 & Pronuclear fusion \\
\hline
 2 & 15-70 & Preblastoderm (mitotic cycles 1-9) - early cell division - start of cleavage \\
\hline
 3 & 70-90 & Pole bud formation - nuclear division 9 \\
\hline
 4 & 90-130 & Syncytial blastoderm (mitotic cycles 10-13) - end of cleavage divisions \\
\hline
 5 & 130-180 & Cellularization of the blastoderm \\
\hline
  \end{tabular}%
  }%
\end{table}
\end{document}

在此处输入图片描述

请记住,还有一个adjustbox提供相同工作所需的密钥的center包。max width

这就是我会做的

\documentclass{article}
\usepackage{showframe,natbib}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
  \begin{table}[h]  
  \centering
    \caption[]{The first five embryonic developmental stages of \emph{Drosophila} \citep{campos}}
  \label{table: fly stages}
    \begin{tabular}{|C{0.1\textwidth}|
                     C{0.2\textwidth}|
                     C{\dimexpr0.7\textwidth-6\tabcolsep-4\arrayrulewidth\relax}|}
   \hline
Stages & Age in minute & Developmental progresses \\
\hline
    1 & 0-15 & Pronuclear fusion \\
\hline
 2 & 15-70 & Preblastoderm (mitotic cycles 1-9) - early cell division - start of cleavage \\
\hline
 3 & 70-90 & Pole bud formation - nuclear division 9 \\
\hline
 4 & 90-130 & Syncytial blastoderm (mitotic cycles 10-13) - end of cleavage divisions \\
\hline
 5 & 130-180 & Cellularization of the blastoderm \\
\hline
  \end{tabular}%
\end{table}
\end{document}

在此处输入图片描述

答案2

我不确定我是否理解了您所说的表格不适合页面的中心或左侧的意思。我建议您加载包tabularx并使用tabularx环境而不是tabular

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx,ragged2e,natbib}
\newcolumntype{C}{>{\Centering\arraybackslash}X}
\begin{document}
\begin{table}[h]
\caption{\textbf{The first five embryonic developmental stages of \emph{Drosophila}} \citep{campos}}
  \label{table: fly stages}
\begin{tabularx}{\textwidth}{|c|c|C|}
   \hline
Stages & Age in minutes & Developmental progresses \\ 
\hline
    1 & 0--15 & Pronuclear fusion \\ 
\hline
 2 & 15--70 & Preblastoderm (mitotic cycles 1--9) -- early cell division -- start of cleavage \\ 
\hline
 3 & 70--90 & Pole bud formation -- nuclear division 9 \\ 
\hline
 4 & 90--130 & Syncytial blastoderm (mitotic cycles 10--13) -- end of cleavage divisions \\ 
\hline
 5 & 130--180 & Cellularization of the blastoderm \\ 
\hline
\end{tabularx}
\end{table}
\end{document}

答案3

您的代码无法工作:您在行尾写了\而不是\\。此外,您不需要使用\resizebox:只需small在表格开头使用 ,和tabularx。我还用尾划线替换了连字符,并加载了caption包以使标题和表格主体之间有正确的垂直间距,并使cellspace行顶部和底部的垂直间距最小:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier, heuristica}

\usepackage[showframe,nomarginpar]{geometry}
\usepackage{graphicx}
\usepackage{array}

\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{>{\centering\arraybackslash}m{#1}}

\usepackage{cellspace}
\addparagraphcolumntypes{X}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}

\usepackage{caption}
\captionsetup{font = {bf, small}}

\begin{document}

\mbox{}
\begin{table}[h]
\centering \small%
\caption{The first five embryonic developmental stages of \emph{Drosophila}}\label{table: fly stages}
\begin{tabularx}{0.72\linewidth}{|c|c|S{X}|}
\hline
Stages & Age in minute & Developmental progresses \\
\hline
1 & 0--15 & Pronuclear fusion \\
\hline
2 & 15--70 & Preblastoderm (mitotic cycles 1-9) -- early cell division -- start of cleavage \\
\hline
3 & 70--90 & Pole bud formation -- nuclear division 9 \\
\hline
4 & 90--130 & Syncytial blastoderm (mitotic cycles 10-13) -- \linebreak end of cleavage divisions \\
\hline
5 & 130--180 & Cellularization of the blastoderm \\
\hline
\end{tabularx}
\end{table}

\end{document} 

在此处输入图片描述

如果您想要一个更像您使用代码获得的布局,这里有一种方法可以实现。请注意,使用resizebox会导致标题字体小于正文字体,但代价是代码更复杂。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier, heuristica}

\usepackage[showframe,nomarginpar]{geometry}
\usepackage{graphicx}
\usepackage{array}

\usepackage{cellspace}
\setlength\cellspacetoplimit{3pt}
\setlength\cellspacebottomlimit{3pt}

\usepackage{caption}
\captionsetup{font = {bf, scriptsize}}

\begin{document}
\mbox{}

\begin{table}[h]
\centering \scriptsize%
\caption{The first five embryonic developmental stages of \emph{Drosophila}}\label{table: fly stages}
\begin{tabular}{|c|c|Sc|}%{0.72\linewidth}
\hline
Stages & Age in minute & Developmental progresses \\
\hline
1 & 0--15 & Pronuclear fusion \\
\hline
2 & 15--70 & Preblastoderm (mitotic cycles 1-9) --- early cell division --- start of cleavage \\
\hline
3 & 70--90 & Pole bud formation --- nuclear division 9 \\
\hline
4 & 90--130 & Syncytial blastoderm (mitotic cycles 10-13) --- end of cleavage divisions \\
\hline
5 & 130--180 & Cellularization of the blastoderm \\
\hline
\end{tabular}
\end{table}

With your code:

\begin{table}[h]
\centering\resizebox{0.72\textwidth}{!}{\begin{minipage}{\textwidth}
\centering
\caption{\textbf{The first five embryonic developmental stages of \emph{Drosophila}}}%\citep{campos}
\label{table: fly stages}
\begin{tabular}{|c|c|c|}
\hline
Stages & Age in minute & Developmental progresses \\
\hline
1 & 0-15 & Pronuclear fusion \\
\hline
2 & 15-70 & Preblastoderm (mitotic cycles 1-9) - early cell division - start of cleavage \\
\hline
3 & 70-90 & Pole bud formation - nuclear division 9 \\
\hline
4 & 90-130 & Syncytial blastoderm (mitotic cycles 10-13) - end of cleavage divisions \\
\hline
5 & 130-180 & Cellularization of the blastoderm \\
\hline
\end{tabular}
\end{minipage}}
\end{table}

\end{document} 

在此处输入图片描述

答案4

可能一个好的解决方案是像段落一样,不居中,最后一列:

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{table}[h]
  \centering
        \caption{\textbf{The first five embryonic developmental stages of \emph{Drosophila}} %\citep{campos}
}
  \label{table: fly stages}
        \begin{tabular}{|c|c|p{7cm}|}
   \hline
Stages & Age in minute & \multicolumn{1}{c|}{Developmental progresses} \\ 
\hline
    1 & 0--15 & Pronuclear fusion \\
\hline
 2 & 15--70 & Preblastoderm (mitotic cycles 1--9) --- early cell division --- start of cleavage \\ 
\hline
 3 & 70--90 & Pole bud formation --- nuclear division 9 \\ 
\hline
 4 & 90--130 & Syncytial blastoderm (mitotic cycles 10--13) --- end of cleavage divisions \\ 
\hline
 5 & 130--180 & Cellularization of the blastoderm \\ 
\hline
  \end{tabular}
\end{table}

\end{document}

在此处输入图片描述

请注意将连字符改为短破折号或长破折号。

我已将\minipage其从您的代码片段中删除,因为在这种情况下它是无意义的,并且\citep是无法访问的。

相关内容