表格:标题在上,标题在下?

表格:标题在上,标题在下?

我有一张表格,我想在上面放标题,在下面放说明文字。直观地讲(虽然我知道在 LaTeX 之类的软件中直觉是多么麻烦),我应该能够按如下方式操作:

\begin {table}[H]
\caption {Table Title} \label{tab:title} 
\begin{center}
\begin{tabular}{ >{\centering\arraybackslash}m{1.25in}  >{\centering\arraybackslash}m{.85in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in}}
\toprule[1.5pt]
{\bf Variable Name} & {\bf Regression 1} & {\bf Mean} & {\bf Std. Dev} & {\bf Min} & {\bf Max}\\ 
\midrule
text        &  text     & text      &  text     &  text     &text\\

\bottomrule[1.25pt]
\end {tabular}
\caption {Should be a caption}
\end{center}
\end {table}

上述代码生成:

              Table 1: Table Title
===================================================
Name   Regression 1   Mean   Std. Dev.   Min  Max
---------------------------------------------------
text    text           text    text     text   text
===================================================
         Table 5: Should be a caption

我怎样才能强制乳胶抑制编号/以常规意义创建“标题”?

答案1

使用默认文本作为第二个“标题”。但是,如果您不想浮动表格,则不应使用表格环境。改用迷你页面,tabularx在这种情况下也是如此:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tabularx,ragged2e,booktabs,caption}
\newcolumntype{C}[1]{>{\Centering}m{#1}}
\renewcommand\tabularxcolumn[1]{C{#1}}
\begin{document}

\begin{minipage}{\linewidth}
\centering
\captionof{table}{Table Title} \label{tab:title} 
\begin{tabular}{ C{1.25in} C{.85in} *4{C{.75in}}}\toprule[1.5pt]
\bf Variable Name & \bf Regression 1 & \bf Mean & \bf Std. Dev & \bf Min & \bf Max\\\midrule
text        &  text     & text      &  text     &  text     &text\\
\bottomrule[1.25pt]
\end {tabular}\par
\bigskip
Should be a caption
\end{minipage}

\bigskip
\begin{minipage}{\linewidth}
\centering
\captionof{table}{Table Title} \label{tab:title2} 
\begin{tabularx}{\linewidth}{@{} C{1in} C{.85in} *4X @{}}\toprule[1.5pt]
\bf Variable Name & \bf Regression 1 & \bf Mean & \bf Std. Dev & \bf Min & \bf Max\\\midrule
text        &  text     & text      &  text     &  text     &text\\
\bottomrule[1.25pt]
\end {tabularx}\par
\bigskip
Should be a caption
\end{minipage}

\end{document}

在此处输入图片描述

答案2

您可以使用caption包。它提供了一个\caption*命令,可以制作不带数字或条目的标题到表格列表中。

\begin{table}
\caption{Table Title}
\begin{tabular}
...
\end{tabular}
\\[10pt]
\caption*{The caption without a number}
\end{table}

答案3

您可以简单地在表格环境中添加文本,使其显示为标题,如下所示:

\begin {table}[H]
 \caption {Table Title} \label{tab:title} 
 \begin{center}
  \begin{tabular}{ >{\centering\arraybackslash}m{1.25in}  >{\centering\arraybackslash}m{.85in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in}}
   \toprule[1.5pt]
{\bf Variable Name} & {\bf Regression 1} & {\bf Mean} & {\bf Std. Dev} & {\bf Min} & {\bf Max}\\ 
   \midrule
   text        &  text     & text      &  text     &  text     &text\\
  \bottomrule[1.25pt]
  \end {tabular}
  \\[1.5] %You can adjust how far below the table the text should appear
  Is just like a caption
 \end{center}
\end {table}

答案4

您可以使用另一个包含一列的表格:

\begin {table}[H]
\caption {Table Title} \label{tab:title} 
\begin{center}
\begin{tabular}{ >{\centering\arraybackslash}m{1.25in}  >{\centering\arraybackslash}m{.85in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in} >{\centering\arraybackslash}m{.75in}}
\toprule[1.5pt]
{\bf Variable Name} & {\bf Regression 1} & {\bf Mean} & {\bf Std. Dev} & {\bf Min} & {\bf Max}\\ 
\midrule
text        &  text     & text      &  text     &  text     &text\\

\bottomrule[1.25pt]
\end {tabular}
\begin{tabular} 
\small Should be a caption
\end {tabular}
\end{center}
\end {table}

相关内容