[英]AutoFit Table in Overleaf
我是 Overleaf 的新手,我想知道如何使用 AutoWidth 來調整表格的內容,以便根據頁面的格式進行調整。
% Please add the following required packages to your document preamble:
% \usepackage[table,xcdraw]{xcolor}
% If you use beamer only pass "xcolor=table" option, i.e. \documentclass[xcolor=table]{beamer}
\begin{table}[]
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
& Google Map & MapQuest & RouteXL & Onfleet & OptimoRoute & Workwave & Route4Me \\ \hline
\begin{tabular}[c]{@{}l@{}}Limitations\\ (Orders)\end{tabular} &
10/Person &
26/Person &
20/Person &
Total 2500 &
250/Person &
- &
- \\ \hline
Price & Free & Free & Free & \$449 & \$19/Driver & \$49/Driver & \$199 \\ \hline
Interface & - & - & - & - & - & - & - \\ \hline
Order Split & - & - & - & - & Available & Available & Extra Charge \\ \hline
Upload File & Manual & Supported CSV & Manual & & Supported CSV & & \\ \hline
App & Available & Available & - & Available & Available & Available & Available \\ \hline
ETA & Available & Available & Available & & Available & - & Available \\ \hline
API &
Available with Extra Charge &
- &
Available &
&
Available with Extra Charge &
&
Available \\ \hline
Other & Manual & - & - & & & & \\ \hline
\end{tabular}
\end{table}
您可以使用tabularx
:
\documentclass{article}
\usepackage{geometry}
\usepackage[table,xcdraw]{xcolor}
\usepackage{tabularx}
\begin{document}
% Please add the following required packages to your document preamble:
% \usepackage[table,xcdraw]{xcolor}
% If you use beamer only pass "xcolor=table" option, i.e. \documentclass[xcolor=table]{beamer}
\begin{table}[]
\begin{tabularx}{\linewidth}{|X|X|X|X|X|X|X|X|}
\hline
& Google Map & MapQuest & RouteXL & Onfleet & Optimo\-Route & Workwave & Route4Me \\ \hline
Limitations (Orders) &
10/Person &
26/Person &
20/Person &
Total 2500 &
250/Person &
- &
- \\ \hline
Price & Free & Free & Free & \$449 & \$19/Driver & \$49/Driver & \$199 \\ \hline
Interface & - & - & - & - & - & - & - \\ \hline
Order Split & - & - & - & - & Available & Available & Extra Charge \\ \hline
Upload File & Manual & Supported CSV & Manual & & Supported CSV & & \\ \hline
App & Available & Available & - & Available & Available & Available & Available \\ \hline
ETA & Available & Available & Available & & Available & - & Available \\ \hline
API &
Available with Extra Charge &
- &
Available &
&
Available with Extra Charge &
&
Available \\ \hline
Other & Manual & - & - & & & & \\ \hline
\end{tabularx}
\end{table}
\end{document}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.