0

I created the table using below code, Table is appearing very cleary but today when I was run the command, Its not working kindly review it and help me, please

\begin{table*}[t]
\scriptsize
\captionsetup{size=small}
\caption{Resumen de las temperaturas de las paredes y los parámetros en la correlación $Nu=C\cdot Ra^{n}$ para casos estudiados}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\cellcolor\textbf{AR} & \textbf{Caso} & \cellcolor\textbf{T$_h$} & \cellcolor\textbf{T$_c$} & \cellcolor\textbf{T$_t$} & \cellcolor
\textbf{T$_b$} & \cellcolor$\boldsymbol \theta_C$ & \cellcolor $\boldsymbol \theta_H$ & 
\cellcolor $\boldsymbol \theta_T$ & 
\cellcolor $\boldsymbol \theta_B$ & \textbf{Gr} & \cellcolor\textbf{n} & 
\cellcolor\textbf{C} \\ \hline
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,2939 & 0,1692 \\ \cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,2993 & 0,1628 \\ \cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3238 & 0,1321 \\ \cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3531 & 0,102 \\ \cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3923 & 0,0723 \\ \cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & -0,0951 & 25,7397 \\ \cline{2-13} 
\multirow{-7}{*}{\textbf{0.5}} & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,2438 & 0,4845 \\ \hline
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,3046 & 0,1539 \\ \cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,3104 & 0,1474 \\ \cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3329 & 0,1207 \\ \cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3587 & 0,0954 \\ \cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3893 & 0,0725 \\ \cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & 0,4355 & 0,0583 \\ \cline{2-13} 
\multirow{-7}{*}{\textbf{1.0}} & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,6446 & 0,0034 \\ \hline
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,3227 & 0,1239 \\ \cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,3284 & 0,1183 \\ \cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3386 & 0,1081 \\ \cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3477 & 0,0997 \\ \cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3571 & 0,0917 \\ \cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & 0,3782 & 0,0761 \\ \cline{2-13} 
\multirow{-7}{*}{\textbf{2.0}} & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,3983 & 0,0638 \\ \hline
\end{tabular}%
}
\end{table*}

For more review kindly look here, https://www.overleaf.com/3163484882dpcnvhytmjsc

8
  • 1
    We do not have access to that project in OverLeaf. Note that things does not magically disappear. First of all does your project compile without errors?
    – daleif
    Jul 30 '20 at 13:10
  • Yes, all projects compile without error, We are working in a group I think someone may change the things which I don't know Jul 30 '20 at 13:24
  • I created the copy of latex file overleaf.com/3163484882dpcnvhytmjsc Kindly review it Jul 30 '20 at 13:25
  • Erh, that doesn't compile at all. Where is the definition of \cellcolor?
    – daleif
    Jul 30 '20 at 13:28
  • So what I have to be do to solve this issue? Could you please gudie me? Jul 30 '20 at 13:45
1

Assuming you load the colortbl package, which defines a macro called \cellcolor, you must provide an argument that's a recognized color, say, yellow to each of the 11 \cellcolor directives .

I can see no good reason for inflating the table size by wrapping the tabular material in a \resisebox directive. Similarly, I can see no reason for rendering the table's caption using \small.

Your tabular environment contains lots and lots of vertical and horizontal rules, creating the oppressive appearance of having to peer through a prison cell window at the poor numbers. Chances that your readers will actually want to look at such a forbidding table are vanishingly small. Do give them a friendly invitation to gaze for a while at the table by getting rid of all vertical rules and almost all horizontal rules.

Finally, I'd use the machinery of the siunitx package -- specifically, its S column type, to align the numbers in three columns on their respective decimal markers.

enter image description here

\documentclass[twocolumn]{article} % or some other suitable document class
\usepackage[spanish]{babel}
\usepackage{amsmath,multirow,array,booktabs}
\usepackage[table]{xcolor} % for "\cellcolor" macro
\usepackage{siunitx} % for 'S' column type
\sisetup{output-decimal-marker={,}}
\newcolumntype{T}[1]{S[table-format=#1]}

\begin{document}
\begin{table*}[t]
\caption{Resumen de las temperaturas de las paredes y los parámetros 
         en la correlación $Nu=C\cdot Ra^{n}$ para casos estudiados}

\smallskip
\centering
\begin{tabular}{ cccc T{3.0} cccccc T{-1.4} T{2.4} }
\hline
\cellcolor{yellow}\textbf{AR} & 
\textbf{Caso} & 
\cellcolor{yellow}\textbf{T$_h$} & 
\cellcolor{yellow}\textbf{T$_c$} & 
\cellcolor{yellow}\textbf{T$_t$} & 
\cellcolor{yellow}\textbf{T$_b$} & 
\cellcolor{yellow}$\boldsymbol{\theta}_C^{\mathstrut}$ & 
\cellcolor{yellow}$\boldsymbol{\theta}_H$ & 
\cellcolor{yellow}$\boldsymbol{\theta}_T$ & 
\cellcolor{yellow}$\boldsymbol{\theta}_B$ & 
\textbf{Gr} & 
\cellcolor{yellow}\textbf{n} & 
\cellcolor{yellow}\textbf{C}
\\ \hline
\multirow{7}{*}{\textbf{0.5}} 
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,2939 & 0,1692 \\ %\cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,2993 & 0,1628 \\ %\cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3238 & 0,1321 \\ %\cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3531 & 0,102 \\ %\cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3923 & 0,0723 \\ %\cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & -0,0951 & 25,7397 \\ %\cline{2-13} 
 & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,2438 & 0,4845 \\ 
\midrule
\multirow{7}{*}{\textbf{1.0}}
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,3046 & 0,1539 \\ %\cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,3104 & 0,1474 \\ %\cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3329 & 0,1207 \\ %\cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3587 & 0,0954 \\ %\cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3893 & 0,0725 \\ %\cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & 0,4355 & 0,0583 \\ %\cline{2-13} 
 & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,6446 & 0,0034 \\ 
\midrule
\multirow{7}{*}{\textbf{2.0}}
 & 1 & 81 & 15 & 39 & 15 & 0 & 1 & 0,35 & 0 & 1,82E+08 & 0,3227 & 0,1239 \\ %\cline{2-13} 
 & 2 & 81 & 15 & 50 & 15 & 0 & 1 & 0,52 & 0 & 1,82E+08 & 0,3284 & 0,1183 \\ %\cline{2-13} 
 & 3 & 81 & 15 & 70 & 15 & 0 & 1 & 0,83 & 0 & 1,82E+08 & 0,3386 & 0,1081 \\ %\cline{2-13} 
 & 4 & 81 & 15 & 81 & 15 & 0 & 1 & 1,00 & 0 & 1,82E+08 & 0,3477 & 0,0997 \\ %\cline{2-13} 
 & 5 & 81 & 15 & 90 & 15 & 0 & 1 & 1,14 & 0 & 1,82E+08 & 0,3571 & 0,0917 \\ %\cline{2-13} 
 & 6 & 81 & 15 & 108 & 15 & 0 & 1 & 1,42 & 0 & 1,82E+08 & 0,3782 & 0,0761 \\ %\cline{2-13} 
 & 7 & 81 & 15 & 120 & 15 & 0 & 1 & 1,60 & 0 & 1,82E+08 & 0,3983 & 0,0638 \\ 
\bottomrule
\end{tabular}
\end{table*}
\end{document}
4
  • Thanks a lot for providing me solution but may I know, please why Caso and Gr is not appearing in yellow background Jul 30 '20 at 14:44
  • 1
    @SagarkumarZalavadiya Because they aren't in a \cellcolor command in this answer or in your original table. Note also that Mico used the booktabs package, which helps make tables look nicer by removing the need for so many horizontal and vertical rules (and some of those \hline should probably be \toprule or \midrule).
    – Teepeemm
    Jul 30 '20 at 14:50
  • 1
    @SagarkumarZalavadiya - The reason why the "Caso" and "Gr" cells aren't colored is because you didn't provide \cellcolor directives for them. Incidentally, if you want an entire or to be colored (in yellow, say), you'd be better off providing a single \rowcolor{yellow} directive at the start of that row.
    – Mico
    Jul 30 '20 at 14:58
  • @Teepeemm - Actually, the two \hline directives, above and below the header line, are there by design. If you replace them with \toprule and \midrule, respectively, you'll get an even worse problem. Of course, I'm not endorsing the idea of giving visual prominence to the header row by using both coloring and boldfacing, as the OP appears to be willing to do.
    – Mico
    Jul 30 '20 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.