\begin{table}[]
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline
Ref &
\multicolumn{1}{l|}{Manufacturers} &
Model &
DC Motor(Brushed) &
AC Induction Motor &
PM Brushed DC Motor &
\multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}PM-Sync Reluctance \\ Motor(PM-SynRM)\end{tabular}} &
\multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}Permanent Magnet Synchronous \\ Motor(PMSM)\end{tabular}} \\ \hline
\multirow{2}{*}{} & \multicolumn{1}{c|}{\multirow{2}{*}{Toyota}} & Toyota Prius & & &\\
\hhline{~~----} & \multicolumn{2}{c}{} Toyota RAV4 & & & \\ \hline
\multirow{2}{*}{} & \multicolumn{1}{c|}{\multirow{4}{*}{Tesla}} & Model S & & &\\
\hhline{~~----} & \multicolumn{2}{c}{} Model X & & & \\
\hhline{~~----} & \multicolumn{2}{c}{} Model 3 & & & \\
\hhline{~~----} & \multicolumn{2}{c}{} Model Y & & & \\ \hline
& Nissan &Nissan Leaf & & & & & \\ \hline
& Porsche &Porsche Taycon & & & & & \\ \hline
& Audi &Audi e-tron & & & & & \\ \hline
\multirow{2}{*}{} & \multicolumn{1}{c|}{\multirow{2}{*}{BMW}} & BMW i3 & & &\\
\hhline{~~----} & \multicolumn{2}{c}{} BMW-Mini E & & & \\ \hline
& General Motors &GM EV1 & & & & & \\ \hline
& Fiat Panda &Fiat Panda Elettra & & & & & \\ \hline
\multirow{2}{*}{} & \multicolumn{1}{c|}{\multirow{2}{*}{KIA}} & Soul EV & & &\\
\hhline{~~----} & \multicolumn{2}{c}{} Niro EV & & & \\ \hline
& Ather Energy &Ather 450X & & & & & \\ \hline
\end{tabular}%
}
\end{table}
- 3,142
- 83
3 Answers
Here are some alternative approaches:
PErsonally, I'd suggest using a table with no vertical and less horizontal lines, such as the following:
\documentclass{ieeeaccess}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{calc}
\usepackage{rotating}
\usepackage{booktabs}
\begin{document}
\lipsum
\begin{table}
\begin{tabular}{\linewidth}{@{\extracolsep{\fill}}|c|l|l|c|c|c|c|c|}
\hline
Ref &
\thead{Manufacturers} &
\thead{Model} &
\thead{DC Motor\ (Brushed)} &
\thead{AC Induction\ Motor} &
\thead{PM Brushed\ DC Motor} &
\thead{PM-Sync Reluctance \ Motor(PM-SynRM)} &
\thead{Permanent Magnet\ Synchronous Motor(PMSM)} \ \hline
& \multirow{2}{}{Toyota} & Toyota Prius & & & & & \ \cline{3-8}
& & Toyota RAV4 & & & & & \
\hline
& \multirow{4}{}{Tesla} & Model S & & & & & \ \cline{3-8}
& & Model X & & & & & \ \cline{3-8}
& & Model 3 & & & & & \ \cline{3-8}
& & Model Y & & & & & \
\hline
& Nissan & Nissan Leaf & & & & & \
\hline
& Porsche & Porsche Taycon & & & & & \
\hline
& Audi & Audi e-tron & & & & & \
\hline
& \multirow{2}{}{BMW} & BMW i3 & & & & & \ \cline{3-8}
& & BMW-Mini E & & & & & \
\hline
& General Motors & GM EV1 & & & & & \
\hline
& Fiat Panda & Fiat Panda Elettra & & & & & \
\hline
& \multirow{2}{}{KIA} & Soul EV & & & & & \ \cline{3-8}
& & Niro EV & & & & & \
\hline
& Ather Energy & Ather 450X & & & & & \
\hline
\end{tabular}
\end{table}
\lipsum
\begin{table}
\scriptsize
\renewcommand{\theadfont}{\scriptsize}
\settowidth\rotheadsize{\theadfont DC Motor (Brushed)}
\begin{tabular}{|c|m{\widthof{General}}|m{\widthof{Model X}}|c|c|c|c|c|}
\hline
Ref &
\thead{Manu-\facturers} &
\thead{Model} &
\rothead{DC Motor (Brushed)} &
\rothead{AC Induction Motor} &
\rothead{PM Brushed DC Motor} &
\rothead{PM-Sync Reluctance Motor (PM-SynRM)} &
\rothead{Permanent Magnet Synchronous Motor (PMSM)} \ \hline
& \multirow{3}{}{Toyota} & Toyota Prius & & & & & \ \cline{3-8}
& & Toyota RAV4 & & & & & \
\hline
& \multirow{4}{}{Tesla} & Model S & & & & & \ \cline{3-8}
& & Model X & & & & & \ \cline{3-8}
& & Model 3 & & & & & \ \cline{3-8}
& & Model Y & & & & & \
\hline
& Nissan & Nissan Leaf & & & & & \
\hline
& Porsche & Porsche Taycon & & & & & \
\hline
& Audi & Audi\newline e-tron & & & & & \
\hline
& \multirow{4}{}{BMW} & BMW i3 & & & & & \ \cline{3-8}
& & BMW-Mini E & & & & & \
\hline
& General Motors & GM EV1 & & & & & \
\hline
& Fiat Panda & Fiat Panda Elettra & & & & & \
\hline
& \multirow{2}{}{KIA} & Soul EV & & & & & \ \cline{3-8}
& & Niro EV & & & & & \
\hline
& Ather Energy & Ather 450X & & & & & \
\hline
\end{tabular}
\end{table}
\lipsum
\begin{table}
\setlength{\tabcolsep}{5pt}
\settowidth\rotheadsize{\theadfont PM-SynRM}
\begin{tabular}{\linewidth}{@{\extracolsep{\fill}} c l l c c c c c @{}}
\toprule
Ref &
\thead{Manufacturers} &
\thead{Model} &
\rothead{DCM} &
\rothead{ACIndM} &
\rothead{PMBDCM} &
\rothead{PM-SynRM} &
\rothead{PMSM} \
\midrule
& Toyota & Toyota Prius & & & & & \
& & Toyota RAV4 & & & & & \
\addlinespace
& Tesla & Model S & & & & & \
& & Model X & & & & & \
& & Model 3 & & & & & \
& & Model Y & & & & & \
\addlinespace
& Nissan & Nissan Leaf & & & & & \
\addlinespace
& Porsche & Porsche Taycon & & & & & \
\addlinespace
& Audi & Audi e-tron & & & & & \
\addlinespace
& BMW & BMW i3 & & & & & \
& & BMW-Mini E & & & & & \
\addlinespace
& General Motors & GM EV1 & & & & & \
\addlinespace
& Fiat Panda & Fiat Panda Elettra & & & & & \
\addlinespace
& KIA & Soul EV & & & & & \
& & Niro EV & & & & & \
\addlinespace
& Ather Energy & Ather 450X & & & & & \
\midrule
\multicolumn{8}{@{}p{\linewidth}@{}}{DCM:~DC Motor (Brushed); ACIndM:~AC Induction Motor; PMBDCM:~PM Brushed DC Motor; PM-SynRM:~PM-Sync Reluctance Motor; PMSM:~Permanent Magnet Synchronous Motor} \
\bottomrule
\end{tabular}
\end{table}
\lipsum
\EOD
\end{document}
- 62,593
-
thanks for helping me with this. Its really helpful and i got my desired result – Ch Qasim Mar 22 '21 at 08:28
Here's a solution that does not use \scalebox or \resizebox, employs a landscape format layout, a tabularx environment to allow automatic line-breaking in the final four columns, dispenses with all vertical rules and most horizontal rules, and simplifies the entries in column 3, "Model". For instance, "Prius" and "RAV4" is just as informative, and less repetitious, as "Toyota Prius" and "Toyota RAV4".
\documentclass{article}
\usepackage{booktabs,ragged2e,rotating,tabularx}
\begin{document}
\begin{sidewaystable}
\setlength\tabcolsep{5pt} % default: 6pt
\begin{tabularx}{\textwidth}{@{} lll *{5}{>{\RaggedRight}X} @{}}
\toprule
Ref &
Manufacturer &
Model &
DC Motor (Brushed) &
AC Induction Motor &
PM Brushed DC Motor &
PM-Sync Reluctance Motor \mbox{(PM-SynRM)} &
Permanent Magnet Synchronous Motor (PMSM)\\
\midrule
& Toyota & Prius & & & \\
& & RAV4 & & & \\ \addlinespace
& Tesla & Model S & & & \\
& & Model X & & & \\
& & Model 3 & & & \\
& & Model Y & & & \\ \addlinespace
& Nissan & Leaf & & & & & \\ \addlinespace
& Porsche& Taycon & & & & & \\ \addlinespace
& Audi & e-tron & & & & & \\ \addlinespace
& BMW & i3 & & & \\
& & Mini E & & & \\ \addlinespace
& GM & EV1 & & & & & \\ \addlinespace
& Fiat & Panda Elettra & & & & & \\ \addlinespace
& KIA & Soul EV & & & \\
& & Niro EV & & & \\ \addlinespace
& Ather Energy & 450X & & & & & \\
\bottomrule
\end{tabularx}
\end{sidewaystable}
\end{document}
- 506,678
As @ Jes suggested, the latex table generator will do the job
\documentclass{article}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}
\begin{table}[h!]
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
Ref &
Manufactures &
Models &
\begin{tabular}[c]{@{}l@{}}DC\ Motor\ (Brushed)\end{tabular} &
\begin{tabular}[c]{@{}l@{}}AC\ Induction\ Motor\end{tabular} &
\begin{tabular}[c]{@{}l@{}}DC\ (Brushless)\ Motor\end{tabular} &
\begin{tabular}[c]{@{}l@{}}PM-Sync\ Reluctance\ Motor\ (PMSyncRM)\end{tabular} &
\begin{tabular}[c]{@{}l@{}}Permanent\ Magnet-Sync.\ Motor (PMSM)\end{tabular} \ \hline
\multirow{2}{}{} & \multirow{2}{}{Toyota} & \begin{tabular}[c]{@{}l@{}}Toyota\ Primus\end{tabular} & & & & & \ \cline{3-8}
& & \begin{tabular}[c]{@{}l@{}}Toyota\ RAV4\end{tabular} & & & & & \ \hline
\multirow{4}{}{} & \multirow{4}{}{TESLA} & Model S & & & & & \ \cline{3-8}
& & Model X & & & & & \ \cline{3-8}
& & Model 3 & & & & & \ \cline{3-8}
& & Model Y & & & & & \ \hline
& Nissan & Nissan Leaf & & & & & \ \hline
& Porsche & \begin{tabular}[c]{@{}l@{}}Porsche\ Taycan\end{tabular} & & & & & \ \hline
& Audi & Audi e-tron & & & & & \ \hline
\multirow{2}{}{} & \multirow{2}{}{BMW} & BMW i3 & & & & & \ \cline{3-8}
& & BMW-Mini E & & & & & \ \hline
& \begin{tabular}[c]{@{}l@{}}General\ Motors\end{tabular} & GM EV1 & & & & & \ \hline
& Fiat Panda & \begin{tabular}[c]{@{}l@{}}Fiat Panda\ Elettra\end{tabular} & & & & & \ \hline
\multirow{2}{}{} & \multirow{2}{}{KIA} & Soul EV & & & & & \ \cline{3-8}
& & Nitro EV & & & & & \ \hline
& Ather Energy & Ather 450X & & & & & \ \hline
\end{tabular}%
}
\end{table}
\end{document}
- 2,322
-
Thank you soo much, it's really helpful and I get this one. Once again thank you – Ch Qasim Mar 20 '21 at 11:42
-
1Using
\resizeboxin order to make a table fit into a given space will inevitably lead to inconsistent font sizez, something you might want to avoid. – leandriis Mar 20 '21 at 12:02 -
-
3
scaleboxalso leads to inconsistent font sized and so doesadjustbox. For some alternative approaches that don't involve scaling tables, you might ant to take a look at My table doesn't fit; what are my options? – leandriis Mar 20 '21 at 12:14 -






resizebox{\textwidth}. Maybe it's not considering that is a two column document? – Jes Mar 20 '21 at 11:21