AutoFit Table in Overleaf

574 views Asked by At

I am new to Overleaf and I want to know how can I fit content of table with AutoWidth on so that it will adjust according to format of page.


% 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}
1

There are 1 answers

0
samcarter_is_at_topanswers.xyz On

You can use the tabularx package:

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