2
\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}
  • table is not in proper shape as row and column are not spanning – monika Mar 10 at 11:23
  • 1
    Without using an appropriate package that combines the features of longtable and tabularx you can not use X type (or derived column types) in a longtable. Possible packages for this task are ltxtable and ltablex – leandriis Mar 10 at 11:25
  • They're not spanning what? – Bernard Mar 10 at 11:26
  • "row and column are not spanning" is not exactly clear. Please clarify your objective. E.g., are you trying to get a table that's longer than one page? – Mico Mar 10 at 11:27
4

Here is a possible solution using the ltablex package that combines the features of tabularx with longtable.

\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}

Please note that all the 1\\1\\1\\ are just added to show the page breaking behaviour of the table. I have also added \endhead in order to repeat the column headers on all following pages.

3

I propose to load the xltabular package and use its eponymous environment, which combines the possibilities of longtable and tabularx. Also, note that in the landscape environment, for a full width table, you have to use \linewidth or \textheight, but not \textwidth. Last, you can gain some space in cells loading geometry, which has more sensible margins if you don't use margin notes, setting \tabcolsep to a lower value (6 pt by default, I set it to 3) and using a smaller fontsize.

\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}

enter image description here

  • i am having error "Undefined control sequence \addparagraphcolumntypes". – monika Mar 10 at 13:00
  • 1
    Oops! Sorry, remove that line. It's a remnant of another trial, and I removed the package which defines this command. – Bernard Mar 10 at 13:03
  • 1
    thanks sir, this is what i need – monika Mar 10 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.