[Tex/LaTex] Tiny table problem

fontsizetables

I'm trying to make a table like this:
enter image description here

But when i use this code to generate it:

\begin{table}[h!]
\centering
 \caption{Elastic properties of tissue}
 \label{jj}
\begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio}
\huge
\begin{tabular}{cccccccc}
\hline
 \multicolumn{4}{c}{decagonal prism-shaped tumor}& \multicolumn{4}{c}{10-winged star-shaped base tumor}\\
 \hline
Number of elements & Element type&Maximum relative error(\%) &Computational time(sec)&Number of elements & Element type&Maximum relative error(\%)&Computational time(sec)\\
\hline
21796 & C3D4T &0&19.27&22362&C3D4T&0&21.49\\
\hline
29725 & C3D4T &0.0751&23.44&29869&C3D4T&0.0665&23.56\\
\hline
44029 & C3D4T &0.0382&29.82&43366&C3D4T&00269&30.81\\
\hline
\end{tabular}
\end{adjustbox}
\end{table}

I get this:
enter image description here

Which the inside text is so tiny.

How can i fix that?

Best Answer

Like this?

enter image description here

In comparison to your code snipped I make the following changes:

  • made complete MWE
  • use tabularx instead tabular
  • renewcommand for column type X
  • use booktabs for horizontal rules
  • reduce font size to \small

Complete MWE:

\documentclass{article}
\usepackage{booktabs,tabularx}
\usepackage{ragged2e}
\renewcommand\tabularxcolumn[1]{b{#1}}

\usepackage[showframe]{geometry}

\begin{document}
\begin{table}[htb]
    \centering
    \small
\caption{Elastic properties of tissue}
    \label{jj}
\begin{tabularx}{\textwidth}{*{8}{>{\Centering\arraybackslash}X}}
    \toprule
\multicolumn{4}{c}{decagonal prism-shaped tumor}
    &   \multicolumn{4}{c}{10-winged star-shaped base tumor}            \\
    \cmidrule(lr){1-4} \cmidrule(lr){5-8}
Number of elements  & Element type  & Maximum relative error (\%)   & Computa\-tional time (sec) 
    & Number of elements    & Element type  & Maximum relative error (\%)   & Computa\-tional time (sec)    \\
    \midrule
21796   &   C3D4T   &   0       &   19.27   &   22362   &   C3D4T   &   0       &   21.49       \\
29725   &   C3D4T   &   0.0751  &   23.44   &   29869   &   C3D4T   &   0.0665  &   23.56       \\
44029   & C3D4T     &   0.0382  &   29.82   &   43366   &   C3D4T   &   00269   &   30.81       \\
    \bottomrule
\end{tabularx}
    \end{table} 
\end{document}
Related Question