简单无边框表格

简单无边框表格

我想绘制没有边框的简单表格,但问题是第二列的内容超出了文档的边距,我该如何解决这个问题

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx} 

\begin{document}
    \begin{tabular}{cl}
    Year 2023-2024 & Very long very long text Very long very long text Very long very long text  \\
    Year 2022-2023 & Very long very long text Very long very long text Very long very long text \\
    Year 2021-2022 & Very long very long text Very long very long text Very long   \\
    Year 2020-2021 & Very long very long text Very long very long text Very long very long text  \\
    Year 2019-2020 & Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text  \\
    Year 2018-2019 & Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text  \\
    \end{tabular}
\end{document}

答案1

使用tabularxX列类型。这应该没问题:

\begin{tabularx}{\linewidth}{c>{\arraybackslash}X}
Year 2023-2024 & Very long very long text Very long very long text Very long very long text  \\
Year 2022-2023 & Very long very long text Very long very long text Very long very long text \\
Year 2021-2022 & Very long very long text Very long very long text Very long   \\
Year 2020-2021 & Very long very long text Very long very long text Very long very long text  \\
Year 2019-2020 & Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text  \\
Year 2018-2019 & Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text Very long very long text  \\
\end{tabularx}

相关内容