LaTeX长表格自动换行(longtable)

文章目录

前言

如题,给出解决方案。

解决方案

没自动换行之前的效果:
LaTeX长表格自动换行(longtable)

自动换行之后的效果:(以及相应代码)

LaTeX长表格自动换行(longtable)

\documentclass[]{article}

%for long table
\usepackage{longtable}
%for table toprule line
\usepackage{booktabs}

\begin{document}

% \begin{center}
    \begin{longtable}{ccp{6cm}p{6cm}}
        \caption{A list of all tool urls}
        \label{tab:all_tool_urls} \\
        \toprule
        Name & Year & Targeted Area & Url \\
        \midrule
        EvoMaster & \citep{arcuri2021evomaster} & Test case generation for REST APIs  
        Test case generation for REST APIsTest case generation for REST APIsTest case generation for REST APIsTest case generation for REST APIsTest case generation for REST APIsTest case generation for REST APIs
        & \url{https://github.com/EMResearch/EvoMaster https://github.com/EMResearch/EvoMaster https://github.com/EMResearch/EvoMaster} \\ 
        \bottomrule
    \end{longtable}
% \end{center}

\end{document}

关键的改动:

\begin{longtable}{cccc} 改成 \begin{longtable}{ccp{6cm}p{6cm}} 就行啦。

参考《Latex 入门》 (刘海洋著):
LaTeX长表格自动换行(longtable)

参考文献

上一篇:Token generation


下一篇:[论文学习]Learn to Dance with AIST++: Music Conditioned 3D Dance Generation