这是我的代码,我想在横向模式下执行它,但是失败了。
\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}
答案1
使用 和之一tabularx
或组合的两个不同版本的表格:tabulary
booktabs
\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}
答案2
这是一个与@leandriis 的第二个解决方案非常相似的解决方案解决方案,主要有以下两个区别:(a)没有\footnotesize
,以及(b)无粗体在标题单元格中。
/
还请注意,我用宏替换了所有(“斜线”符号)实例\slash
;后者允许在/
符号后换行,而将其硬编码为则/
不允许。进行此更改对于“蜂窝”列尤其重要。
\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}