表格分为两列 - 换行

表格分为两列 - 换行

我想在那张桌子上休息一下。你能帮我一下吗?

在此处输入图片描述

\documentclass[11pt,twocolumn,conference]{IEEEtran}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[latin9]{inputenc}
\usepackage[english]{babel}
\usepackage[final]{graphicx}
\usepackage{natbib}
\setlength{\bibsep}{0.0pt}
\usepackage{geometry}
\geometry{verbose,margin=3cm}
\usepackage{caption}% <-- added
\captionsetup[table]{skip = 3pt}
\usepackage{tabulary}
\usepackage[para]{threeparttable}
\usepackage{array,booktabs,longtable,tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}% <-- added
\usepackage{ltablex}% <-- added
\usepackage{siunitx}% <-- added
\usepackage{caption}% <-- added
\setlength{\LTcapwidth}{7in}
\usepackage[flushleft]{threeparttablex}

\flushbottom

\begin{document}
\section{INTRODUCTION}
This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section.

Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. 

\begin{table}[!htb]
\captionsetup{size=footnotesize}
\caption{Year Wise Treatment Frequencies} \label{tab:freq}
\setlength\tabcolsep{0pt} % let LaTeX compute intercolumn whitespace
\footnotesize\centering
This table provides the frequencies.

\smallskip 
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}}rcccr}
\toprule
  Year  & Nones& Option  1 & Option 2 & Total \\
\midrule
  2001& 126   & 16    & 2     & This section is the introduction section. \\
  2002& 114   & 9     & 4     & 127 \\
  2003& 115   & 7     & 1     & 123 \\
  2004& 114   & 6     & 4     & 124 \\
  2005& 104   & 5     & 8     & 117 \\
  2006& 96    & 3     & 6     & 105 \\
  2007& 93    & 2     & 4     & 99 \\
  2008& 93    & 2     & 2     & 97 \\
  2009& 85    & 2     & 11    & 98 \\
  2010& 83    & 0     & 7     & 90 \\
  2011& 74    & 0     & 12    & 86 \\
  \midrule
  Total & 1,097 & 52    & 61    & 1,210 \\
\bottomrule
\end{tabular*}
\end{table}

This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction.This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. 

Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction.
Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. 

Here is a the text about the introduction.Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction. This section is the introduction section. Here is a the text about the introduction.
\end{document}

答案1

选项1

正在删除\usepackage{ltablex}

用于tabularx 表格。(最后一列居中看起来更好)。

陣容

\begin{table}[!htb]
    \captionsetup{size=footnotesize}
    \caption{Year Wise Treatment Frequencies} \label{tab:freq}
    \setlength\tabcolsep{0pt} % let LaTeX compute intercolumn whitespace
    \footnotesize\centering
    This table provides the frequencies.
    
    \smallskip 
    \begin{tabularx}{\columnwidth}{@{\extracolsep{8pt}}lccc>{\centering\arraybackslash}X}
        \toprule
        Year  & Nones& Option  1 & Option 2 & Total \\
        \midrule
        2001& 126   & 16    & 2     & This section is the introduction section. \\
        2002& 114   & 9     & 4     & 127 \\
        2003& 115   & 7     & 1     & 123 \\
        2004& 114   & 6     & 4     & 124 \\
        2005& 104   & 5     & 8     & 117 \\
        2006& 96    & 3     & 6     & 105 \\
        2007& 93    & 2     & 4     & 99 \\
        2008& 93    & 2     & 2     & 97 \\
        2009& 85    & 2     & 11    & 98 \\
        2010& 83    & 0     & 7     & 90 \\
        2011& 74    & 0     & 12    & 86 \\
        \midrule
        Total & 1,097 & 52    & 61    & 1,210 \\
        \bottomrule
    \end{tabularx}
\end{table}

选项 2

正在删除\usepackage{ltablex}

添加\usepackage{makecell}到序言中(以便能够\\在单元格内使用)。

用于tabularx 表格。

请注意,现在第一行垂直居中,长文本单元格左对齐,这要归功于命令 \renewcommand\cellalign{lc}

米

\begin{table}[!htb]
    \renewcommand\cellalign{lc} % added <<<
    \captionsetup{size=footnotesize}
    \caption{Year Wise Treatment Frequencies} \label{tab:freq}
    \setlength\tabcolsep{0pt} % let LaTeX compute intercolumn whitespace
    \footnotesize\centering
    This table provides the frequencies.
    
    \smallskip 
    \begin{tabularx}{\columnwidth}{@{\extracolsep{\fill}}lcccc}
        \toprule
        Year  & Nones& Option  1 & Option 2 & Total \\
        \midrule
        2001& 126   & 16    & 2     & \makecell{This section is the\\ introduction section.} \\% changed
        2002& 114   & 9     & 4     & 127 \\
        2003& 115   & 7     & 1     & 123 \\
        2004& 114   & 6     & 4     & 124 \\
        2005& 104   & 5     & 8     & 117 \\
        2006& 96    & 3     & 6     & 105 \\
        2007& 93    & 2     & 4     & 99 \\
        2008& 93    & 2     & 2     & 97 \\
        2009& 85    & 2     & 11    & 98 \\
        2010& 83    & 0     & 7     & 90 \\
        2011& 74    & 0     & 12    & 86 \\
        \midrule
        Total & 1,097 & 52    & 61    & 1,210 \\
        \bottomrule
    \end{tabularx}
\end{table}

选项 3

正在删除\usepackage{ltablex}

使用tabular*

嵌套表格

\begin{tabular}{@{}c@{}} This section is the \\introduction section.\end{tabular}

n

\begin{table}[!htb]
    \captionsetup{size=footnotesize}
    \caption{Year Wise Treatment Frequencies} \label{tab:freq}
    \setlength\tabcolsep{0pt} % let LaTeX compute intercolumn whitespace
    \footnotesize\centering
    This table provides the frequencies.
    
    \smallskip 
    \begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}}lcccc}
        \toprule
        Year  & Nones& Option  1 & Option 2 & Total \\
        \midrule
        2001& 126   & 16    & 2     & \begin{tabular}{@{}l@{}} This section is the \\introduction section.\end{tabular} \\
        2002& 114   & 9     & 4     & 127 \\
        2003& 115   & 7     & 1     & 123 \\
        2004& 114   & 6     & 4     & 124 \\
        2005& 104   & 5     & 8     & 117 \\
        2006& 96    & 3     & 6     & 105 \\
        2007& 93    & 2     & 4     & 99 \\
        2008& 93    & 2     & 2     & 97 \\
        2009& 85    & 2     & 11    & 98 \\
        2010& 83    & 0     & 7     & 90 \\
        2011& 74    & 0     & 12    & 86 \\
        \midrule
        Total & 1,097 & 52    & 61    & 1,210 \\
        \bottomrule
    \end{tabular*}
\end{table}

相关内容