4

This is my code I want to do it in landscape but I failed.

\documentclass[a4paper,12pt]{report}
\usepackage{pdflscape}
\usepackage{rotating} 
\begin{document}
\begin{landscape}
    \begin{table}
        \centering
        \footnotesize
        \begin{tabular}{|c|c|c|c|c|c|c|c|c|}
            \hline
            \textbf{Characteristics}&\textbf{6LoWPAN}&\textbf{ZigBee}&\textbf{RFID}&\textbf{NFC}& \textbf{Cellular}& \textbf{Z-Wave}&\textbf{BLE} & \textbf{SigFox } \\ 
            \hline 
            Standard&IEEE 802.15.4& IEEE 802.15.4&RFID&ISO/IEC 1443 A and B, JIS X-6319-4&3GPP and GSMA, GSM/GPRS/EDGE(2G), UMTS/HSPA(3G), LTE(4G)&Z-Wave&IEEE 802.15.4 &SigFox\\              
            \hline     
            Network&WPAN&WPAN&Proximity&P2P Network&WNAN&WPAN&WPAN&LPWAN\\ 
            \hline 
            Range&Short Range 10-100m&Short Range 10-100m&Short Range upto 200m&Short Range 0-10cm 0-1m 10cm-1m&Several km&30m(indoors), 100m(outdoors)&Short Range ~15-30m&Long Range 10km(Urban) 50km(Rural)\\ 
            \hline 
            Data Rate&250kbps&250kbps&4Mbps&106/212/404kbps&NA&40kbps&1Mbps&100bps(UL), 600bps(DL)\\ 
            \hline 
            Features&Commonly Used Internet Access&Mesh Network&Low Cost&Security&Longer Range&Simple Prorocol&Low Power Version Available&Long battery life (upto 20 years), low cost\\ 
            \hline 
            Applications&Monitor and control via internet &Monitor, control home industry&Tracking,Inventory,Access&Payment,Access&M2M&Home monitoring and control &Wireless headsets, audio applications&Street Lighting Energy meters\\ 
            \hline
        \end{tabular} 
        \caption{Comparison Of IoT Communication Protocols \cite{al2017internet}}
        \label{block1} 
    \end{table}
\end{landscape}

\end{document}

Here is output

  • 2
    You can use p tpe columns (or tabularx) to allow linebreaks inside of table cells to make your table narrower. – leandriis Nov 16 at 8:35
6

Two different versions of your table using either tabularx or a combination of tabulary and booktabs:

enter image description here

\documentclass[a4paper,12pt]{report}
\usepackage{pdflscape}
%\usepackage{rotating} 
\usepackage{tabularx} % Only used for first example table

\usepackage{booktabs} % Only used for second example table
\usepackage{tabulary} % Onla used for second example table

\begin{document}
\begin{landscape}
    \begin{table}
        \centering
        \footnotesize
        \setlength{\tabcolsep}{4pt}
        \begin{tabularx}{\linewidth}{|l|*{8}{>{\raggedright\arraybackslash}X|}}
            \hline
            \textbf{Characteristics}&\textbf{6LoWPAN}&\textbf{ZigBee}&\textbf{RFID}&\textbf{NFC}& \textbf{Cellular}& \textbf{Z-Wave}&\textbf{BLE} & \textbf{SigFox } \\ 
            \hline 
            Standard & IEEE 802.15.4 & IEEE 802.15.4 & RFID & ISO/IEC 1443 A and B, JIS X-6319-4 & 3GPP and GSMA, GSM/ GPRS/ EDGE (2G), UMTS/ HSPA (3G), LTE (4G) & Z-Wave&IEEE 802.15.4 & SigFox\\              
            \hline     
            Network & WPAN & WPAN & Proximity & P2P Network & WNAN & WPAN & WPAN & LPWAN\\ 
            \hline 
            Range & Short Range 10-100m & Short Range 10-100m & Short Range up to 200m & Short Range 0-10cm 0-1m 10cm-1m & Several km & 30m (indoors), 100m (outdoors)& Short Range ~15-30m & Long Range 10km (Urban) 50km (Rural)\\ 
            \hline 
            Data Rate & 250kbps & 250kbps & 4Mbps & 106/ 212/ 404kbps & NA & 40kbps & 1Mbps & 100bps (UL), 600bps (DL)\\ 
            \hline 
            Features & Commonly Used Internet Access & Mesh Network & Low Cost & Security & Longer Range & Simple Protocol & Low Power Version Available & Long battery life (upto 20 years), low cost\\ 
            \hline 
            Applications & Monitor and control via internet & Monitor, control home industry & Tracking, Inventory, Access & Payment, Access & M2M & Home monitoring and control & Wireless headsets, audio applications & Street Lighting Energy meters\\ 
            \hline
        \end{tabularx} 
        \caption{Comparison Of IoT Communication Protocols \cite{al2017internet}}
        \label{block1} 
    \end{table}
\end{landscape}



\begin{landscape}
    \begin{table}
        \centering
        \footnotesize
        \begin{tabulary}{\linewidth}{l*{8}{L}}
            \toprule
            \textbf{Characteristics}&\textbf{6LoWPAN}&\textbf{ZigBee}&\textbf{RFID}&\textbf{NFC}& \textbf{Cellular}& \textbf{Z-Wave}&\textbf{BLE} & \textbf{SigFox } \\ 
            \midrule 
            Standard & IEEE 802.15.4 & IEEE 802.15.4 & RFID & ISO/IEC 1443 A and B, JIS X-6319-4 & 3GPP and GSMA, GSM/ GPRS/ EDGE (2G), UMTS/ HSPA (3G), LTE (4G) & Z-Wave&IEEE 802.15.4 & SigFox\\              
            \addlinespace     
            Network & WPAN & WPAN & Proximity & P2P Network & WNAN & WPAN & WPAN & LPWAN\\ 
            \addlinespace 
            Range & Short Range 10-100m & Short Range 10-100m & Short Range up to 200m & Short Range 0-10cm 0-1m 10cm-1m & Several km & 30m (indoors), 100m (outdoors)& Short Range ~15-30m & Long Range 10km (Urban) 50km (Rural)\\ 
            \addlinespace 
            Data Rate & 250kbps & 250kbps & 4Mbps & 106/ 212/ 404kbps & NA & 40kbps & 1Mbps & 100bps (UL), 600bps (DL)\\ 
            \addlinespace 
            Features & Commonly Used Internet Access & Mesh Network & Low Cost & Security & Longer Range & Simple Protocol & Low Power Version Available & Long battery life (upto 20 years), low cost\\ 
            \addlinespace 
            Applications & Monitor and control via internet & Monitor, control home industry & Tracking, Inventory, Access & Payment, Access & M2M & Home monitoring and control & Wireless headsets, audio applications & Street Lighting Energy meters\\ 
            \bottomrule
        \end{tabulary} 
        \caption{Comparison Of IoT Communication Protocols \cite{al2017internet}}
        \label{block1} 
    \end{table}
\end{landscape}

\end{document}
  • Thank you very much. Your answer really helped – Rami Far Nov 16 at 15:32
3

Here's a solution that's quite similar to @leandriis's second solution, with the following two main differences: (a) no \footnotesize, and (b) no bolding in the header cells.

Note also that I replaced all instances of / ("slash" symbol) with the macro \slash; the latter allows line breaking after the / symbol, whereas hard-coding it as / does not. Making this change is particularly important to the "Cellular" column.

enter image description here

\documentclass[a4paper,12pt]{report}
\usepackage[margin=2.5cm]{geometry} % set appropriate page parameters
%\usepackage{pdflscape}
\usepackage{rotating,tabularx,ragged2e,booktabs}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}

\begin{document}
\begin{sidewaystable}
\setlength\tabcolsep{4pt} % default is '6pt'

\begin{tabularx}{\textwidth}{@{} l *{8}{L} @{}}
\toprule
Characteristics & 6LoWPAN & ZigBee & RFID & NFC & Cellular & Z-Wave & BLE & SigFox \\ 
\midrule
Standard & IEEE 802.15.4 & IEEE 802.15.4 & RFID & ISO\slash IEC 1443 A and B, JIS X-6319-4 & 3GPP and GSMA, GSM\slash GPRS\slash EDGE(2G), UMTS\slash HSPA(3G), LTE(4G) & Z-Wave & IEEE 802.15.4 & SigFox\\              
\addlinespace     
Network & WPAN & WPAN & Proximity & P2P Network & WNAN & WPAN & WPAN & LPWAN\\ 
\addlinespace 
Range & Short Range 10--100m & Short Range 10--100m & Short Range up to 200m & Short Range \mbox{0--10cm} \mbox{0--1m} \mbox{10cm--1m} & Several km & 30m (indoors), 100m (outdoors) & Short Range $\approx$15--30m & Long Range 10km (Urban) 50km (Rural)\\ 
\addlinespace 
Data Rate & 250kbps & 250kbps & 4Mbps & 106\slash 212\slash 404kbps & NA & 40kbps & 1Mbps & 100bps (UL), 600bps (DL)\\ 
\addlinespace 
Features & Commonly Used Internet Access & Mesh Network & Low Cost & Security & Longer Range & Simple Prorocol & Low power version available & Long battery life (up to 20 years), low cost\\ 
\addlinespace 
Applications & Monitor and control via Internet & Monitor, control home industry & Tracking, Inventory, Access & Payment, Access & M2M & Home monitoring and control & Wireless headsets, audio applications & Street lighting energy meters\\ 
\bottomrule
\end{tabularx} 
\caption{Comparison of IoT Communication Protocols \cite{al2017internet}}
\label{block1} 
\end{sidewaystable}

\end{document}

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