長桌子的問題

長桌子的問題
\documentclass{article}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{ragged2e}
\usepackage{longtable}            
\usepackage{rotating}
\newcolumntype{R}{>{\RaggedRight\let\newline\\\arraybackslash\hspace{0pt}}X}
\usepackage{pdflscape}
\begin{document}

\begin{landscape}
  \centering


\begin{longtable}{\textwidth}{|R|R|R|R|R|R|R|R|}
\hline
\textbf{Mobility  Model} &   \multicolumn{7}{c|}{\textbf{Parameter}}  \\
        \cline{2-8}
        & \textbf{Basic Description} 
        & \textbf{Adaptability for AANETs} 
        & \textbf{Support to higher node mobility and Frequent topology updates} 
        & \textbf{Safety parameters} 
        & \textbf{Mechanical and aerodynamic constraint} 
        & \textbf{Degree of Randomness} & \textbf{Applications} \\
\hline

\end{longtable}%

\end{landscape}%
\end{document}

答案1

這是一個可能的解決方案,使用結合了withltablex功能的套件。tabularxlongtable

\documentclass{article}
\usepackage{tabularx}
\usepackage{ragged2e}
\usepackage{longtable}            
\newcolumntype{R}{>{\RaggedRight\let\newline\\\arraybackslash\hspace{0pt}}X}
\usepackage{pdflscape}
\usepackage{ltablex}

\begin{document}

\begin{landscape}
  \centering

\begin{tabularx}{\linewidth}{|R|R|R|R|R|R|R|R|}
\hline
\textbf{Mobility  Model} &   \multicolumn{7}{c|}{\textbf{Parameter}}  \\
        \cline{2-8}
        & \textbf{Basic Description} 
        & \textbf{Adaptability for AANETs} 
        & \textbf{Support to higher node mobility and Frequent topology updates} 
        & \textbf{Safety parameters} 
        & \textbf{Mechanical and aerodynamic constraint} 
        & \textbf{Degree of Randomness} & \textbf{Applications} \\
\hline
\endhead
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\
1\\

\end{tabularx}%

\end{landscape}%
\end{document}

請注意,所有這些1\\1\\1\\都只是為了顯示表格的分頁行為而添加的。我還添加了\endhead以便在所有後續頁面上重複列標題。

答案2

我建議加載該包並使用其同名環境,它結合了和xltabular的可能性。另請注意,在環境中,對於全寬表格,您必須使用or ,但不能使用。最後,您可以在單元格加載中獲得一些空間,如果您不使用邊距註釋,則設定為較低的值(預設為6 pt,我將其設為3)並使用較小的字體大小,則該空間具有更合理的邊距。longtabletabularxlandscape\linewidth\textheight\textwidthgeometry\tabcolsep

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{xltabular}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{ragged2e}
\usepackage{longtable}
\usepackage{rotating}
\renewcommand{\tabularxcolumn}[1]{>{\RaggedRight\arraybackslash}m{#1}}
\usepackage{pdflscape}

\begin{document}

\begin{landscape}
\setlength{\tabcolsep}{3pt}
\setlength{\extrarowheight}{3pt}
 \centering
\begin{xltabular}{\linewidth}{|*{8}{X|}}
\hline
\multirow{8.45}{=}{\textbf{Mobility Model} }& \multicolumn{7}{c|}{\textbf{Parameter}} \\
        \cline{2-8}
        & \textbf{Basic Description}
        & \textbf{Adaptability for AANETs}
        & \textbf{Support to higher node mobility and Frequent topology updates\smallskip}
        & \textbf{Safety parameters}
        & \textbf{Mechanical and aerodynamic constraint}
        & \textbf{Degree of Randomness} & \textbf{Applications} \\
\hline
\end{xltabular}%
\end{landscape}%

\end{document}

在此輸入影像描述

相關內容