0

I'm trying to build a table with equations listed in the left column, but it gives me error. The table is as follows:

% Please add the following required packages to your document preamble:
% \usepackage{multirow}
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{|c|c|}
\hline
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}$\displaystyle\\ q=\mu_f h_{fg} {\left[\frac{g\left(\rho_l-\rho_v\right)}{g_c \sigma}\right]}^{1/2} {\left(\frac{c_{pl} \Delta T}{C_{sf} h_{fg} {Pr}^s_l}\right)}^3\\ $\end{tabular}}                                                                                                                                                                                                                                                                           & $\mu$: coeficiente de viscosidad dinámica                  \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $h_{fg}$: calor latente de vaporización                    \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $g$: aceleración de la gravedad                            \\ \hline
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}$\displaystyle\\ q_{\text{máx}}=\frac{\pi}{24}h_{fg}\rho_v{\left[\frac{\sigma g g_c \left(\rho_l-\rho_v\right)}{\rho^2_v}\right]}^{1/4}{\left(1+\frac{\rho_v}{\rho_l}\right)}^{1/2}\\ $\end{tabular}}                                                                                                                                                                                                                                                           & $\rho$: densidad                                           \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $g_c$: constante adimensional                              \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $\sigma$: tensión superficial de la interfaz líquido/vapor \\ \hline
\multirow{5}{*}{\begin{tabular}[c]{@{}c@{}}$\displaystyle\\ Nu_D=\frac{h_bD}{k_v}=0,62{\left[\frac{g\rho_v\left(\rho_l-\rho_v\right)\left(h_{fg}+0,4c_{pv}\Delta T\right)D^3}{\mu_vk_v\Delta T}\right]}^{1/4}$\\ $\\ \\ $\displaystyle\\ q\_r=h\_r\Delta T$\\ $h\_r=\frac\{\sigma\_\{SB\}\epsilon\left(T\textasciicircum 4\_s-T\textasciicircum 4\_\{sat\}\right)\}\{T\_s-T\_\{sat\}\}\\ $\\ \\ $\displaystyle\\ h=h\_r+h\_b\{\left(\frac\{h\_b\}\{h\}\right)\}\textasciicircum \{1/3\}\\ \$\end{tabular}} & $c_{p}$: calor específico a presión constante              \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $C_{s}$: cantidad empírica                                 \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $Pr$: número de Prandtl                                    \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $Nu$: número de Nusselt                                    \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $D$: diámetro del cilindro                                 \\ \hline
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}$\displaystyle\\ q_{\text{mín}}=0,09\rho_vh_{fg}{\left(\frac{\sigmag\left(\rho_l-\rho_v}{{\left(\rho_l+\rho_v}^2}\right)}^{1/4}\\ $\end{tabular}}                                                                                                                                                                                                                                                                                                               & $k$: conductividad térmica                                 \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $\sigma_{SB}$: constante de Stefan-Boltzmann               \\ \cline{2-2} 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           & $\epsilon$: emisividad radiativa                           \\ \hline
\end{tabular}
\end{table}

Would anyone know how to fix it?

3
  • Welcome to TeX SX: You have plenty of \left( without the paired \right).
    – Bernard
    Commented Aug 16, 2017 at 2:00
  • \left( can be replaced by \bigg(, \big(, etc, and similarly for the other parenthesis. These don't give problems.
    – c.p.
    Commented Aug 16, 2017 at 11:03
  • Incidentally, the title of your posting says (I think) that you want to create numbered equations; however, there's no indication in the body of the example you gave that the equations are, in fact, supposed to be numbered. Please clarify you objective(s).
    – Mico
    Commented Aug 16, 2017 at 11:15

2 Answers 2

2

There's an astounding number of syntax errors of many varieties in your code. Sorry that there's no less-direct/more-polite way to break the news. Moreover, no effort appears to be made to assure that the table will fit inside the available width.

The following code attempts to rectify many of the issues contained in your example. I suggest you perform a line-by-line comparison between your original code and the one below to figure out how you need to adapt (and improve) your LaTeX coding practices. Among the changes I made were (a) get rid of unnecessary pairs of curly braces, (b) use fewer \left and \right directives, (c) don't write \_, \^, \{ and \} when you, in fact, mean to have _, ^, { and }, and (d) don't use textmode-only macros, such as \textasciicircum, in math mode. For sure, never attempt to write T\textasciicircum 4; instead, just write T^4.

I'm afraid I was unable to figure out what's supposed to be in the lower-left cell. Sorry. To begin with, there are too many \left directives without corresponding \right directives.

enter image description here

\documentclass[spanish]{article}
\usepackage{babel,multirow,amsmath,tabularx,ragged2e,geometry}
\newcolumntype{C}{>{$\displaystyle}c<{$}}          % for 1st column of "tabularx"
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X} % for 2nd col. of "tabularx"
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{table}
\caption{My caption}
\label{my-label}
\setlength\extrarowheight{2pt} % for a less-cramped "look"

\begin{tabularx}{\textwidth}{|c|L|} % use a "tabularx" env., not a "tabular" env.
\hline
\multirow{5}{*}{%
  \begin{tabular}[c]{@{}C@{}} 
  q=\mu_f h_{\mathit{fg}} \left[\frac{g(\rho_l-\rho_v)}{g_c \sigma}\right]^{1/2} 
    \left(\frac{c_{pl} \Delta T}{C_{sf} h_{\mathit{fg}} {\mathit{Pr}}^s_l}\right)^3\\
\end{tabular}}
 & $\mu$: coeficiente de viscosidad dinámica \\ \cline{2-2}
 & $h_{\mathit{fg}}$: calor latente de vaporización   \\ \cline{2-2}
 & $g$: aceleración de la gravedad  \\ 
\hline
\multirow{4}{*}{
  \begin{tabular}[c]{@{}C@{}} q_{\text{máx}}=\frac{\pi}{24}h_{\mathit{fg}}\rho_v
  \left[\frac{\sigma g g_c (\rho_l-\rho_v)}{\rho^2_v}\right]^{1/4}
  \left( 1+\frac{\rho_v}{\rho_l}\right)^{1/2}\\
  \end{tabular}}
  & $\rho$: densidad  \\ \cline{2-2}
  & $g_c$: constante adimensional \\ \cline{2-2}
  & $\sigma$: tensión superficial de la interfaz líquido\slash vapor \\ 
\hline
\multirow{7}{*}{\begin{tabular}[c]{@{}C@{}}
\begin{aligned}
  \mathit{Nu}_D&=\frac{h_bD}{k_v}=0{,}62\biggl[\frac{g\rho_v
  (\rho_l-\rho_v)(h_{\mathit{fg}}+0{,}4c_{pv}\Delta T)D^3}{\mu_vk_v\Delta T}\biggr]^{1/4^{\mathstrut}}\\
  q_r&=h_r\Delta T\\
  h_r&=\frac{\sigma_{SB}\epsilon(T^ 4_s-T^ 4_{\mathit{sat}})}{T_s-T_{\mathit{sat}}} \\ 
  h  &=h_r+h_b\biggl(\frac{h_b}{h}\biggr)^{1/3}
  \end{aligned}
  \end{tabular}}
  & $c_{p}$: calor específico a presión constante              \\ \cline{2-2}
  & $C_{s}$: cantidad empírica                                 \\ \cline{2-2}
  & $\mathit{Pr}$: número de Prandtl                                    \\ \cline{2-2}
  & $\mathit{Nu}$: número de Nusselt                           \\ \cline{2-2}
  & $D$: diámetro del cilindro                                 \\ \cline{2-2} 
  & \\
  & \\
\hline
\multirow{4}{*}{
  \begin{tabular}[c]{@{}C@{}} 
  q_{\text{mín}}=0{,}09\rho_v h_{\mathit{fg}} % sorry, just too many errors to deal with
  %% no idea how to fix the following equation
  %\left(\frac{\sigma_g \left(\rho_l-\rho_v}{{\left(\rho_l+\rho_v}^2}\right)^{1/4}
  \\
  \end{tabular}}
  & $k$: conductividad térmica                                 \\ \cline{2-2}
  & $\sigma_{SB}$: constante de Stefan-Boltzmann               \\ \cline{2-2}
  & $\epsilon$: emisividad radiativa                           \\ \hline
\end{tabularx}
\end{table}
\end{document}
2

Here's a possible implementation:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{booktabs,array}

\newcommand{\eqdesc}[2]{%
  \begin{tabular}{@{}>{\raggedright\arraybackslash}p{#1}@{}}#2\end{tabular}%
}

\begin{document}

\begin{table}[htp]
\centering
\caption{My caption}\label{my-label}

\begin{tabular}{@{} >{$\displaystyle}l<{$} c @{}}
\toprule
q=\mu_f h_{fg} \left(\frac{g(\rho_l-\rho_v)}{g_c \sigma}\right)^{\!1/2}
     \left(\frac{c_{pl} \Delta T}{C_{sf} h_{fg} {Pr}^s_l}\right)^{\!3}
&
\eqdesc{.3\textwidth}{
 $\mu$: coeficiente de viscosidad dinámica \\
 $h_{fg}$: calor latente de vaporización \\
 $g$: aceleración de la gravedad
}
\\
\midrule
q_{\max} = \frac{\pi}{24}h_{fg}\rho_v 
           \left(\frac{\sigma g g_c (\rho_l-\rho_v)}{\rho^2_v}\right)^{\!1/4}
           \left(1+\frac{\rho_v}{\rho_l}\right)^{\!1/2}
&
\eqdesc{.3\textwidth}{
 $\rho$: densidad \\
 $g_c$: constante adimensional \\
 $\sigma$: tensión superficial de la interfaz líquido/vapor
}
\\
\midrule
\begin{aligned}
  \mathit{Nu}_D
    &=\frac{h_bD}{k_v} \\
    &=0{,}62\left(\frac{g\rho_v(\rho_l-\rho_v)(h_{fg}+0{,}4c_{pv}\Delta T)D^3}
                   {\mu_vk_v\Delta T}\right)^{\!1/4}
  \\
  q_r&=h_r\Delta T
  \\
  h_r&=\frac{\sigma_{\mathrm{SB}}\epsilon(T^4_s-T^4_{\mathrm{sat}})}{T_s-T_{\mathrm{sat}}}
  \\
  h&=h_r+h_b\left(\frac{h_b}{h}\right)^{\!1/3}
\end{aligned}
&
\eqdesc{.3\textwidth}{
 $c_{p}$: calor específico a presión constante \\
 $C_{s}$: cantidad empírica \\
 $\mathit{Pr}$: número de Prandtl \\
 $\mathit{Nu}$: número de Nusselt \\
 $D$: diámetro del cilindro
}
\\
\midrule
q_{\min}=0{,}09\rho_vh_{fg}\left(\frac{\sigma g(\rho_l-\rho_v)}{(\rho_l+\rho_v)^2}\right)^{\!1/4}
&
\eqdesc{0.3\textwidth}{
 $k$: conductividad térmica \\
 $\sigma_{\mathrm{SB}}$: constante de Stefan-Boltzmann \\
 $\epsilon$: emisividad radiativa
}
\\
\bottomrule
\end{tabular}

\end{table}

\end{document}

enter image description here

A possible improvement, without intermediate rules:

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{booktabs,array}

\begin{document}

\begin{table}[htp]
\centering
\caption{My caption}\label{my-label}

\begin{tabular}{@{} c c @{}}
\toprule
$\begin{aligned}
&q=\mu_f h_{fg} \left(\frac{g(\rho_l-\rho_v)}{g_c \sigma}\right)^{\!1/2}
     \left(\frac{c_{pl} \Delta T}{C_{sf} h_{fg} {Pr}^s_l}\right)^{\!3}
\\[1ex]
&q_{\max} = \frac{\pi}{24}h_{fg}\rho_v 
           \left(\frac{\sigma g g_c (\rho_l-\rho_v)}{\rho^2_v}\right)^{\!1/4}
           \left(1+\frac{\rho_v}{\rho_l}\right)^{\!1/2}
\\[1ex]
&\begin{aligned}
  \mathit{Nu}_D
  &=\frac{h_bD}{k_v} \\
  &=0{,}62\left(\frac{g\rho_v(\rho_l-\rho_v)(h_{fg}+0{,}4c_{pv}\Delta T)D^3}
                   {\mu_vk_v\Delta T}\right)^{\!1/4}
  \end{aligned}
\\[1ex]
&q_r=h_r\Delta T
\\[1ex]
&h_r=\frac{\sigma_{\mathrm{SB}}\epsilon(T^4_s-T^4_{\mathrm{sat}})}{T_s-T_{\mathrm{sat}}}
\\[1ex]
&h=h_r+h_b\left(\frac{h_b}{h}\right)^{\!1/3}
\\[1ex]
&q_{\min}=0{,}09\rho_vh_{fg}\left(\frac{\sigma g(\rho_l-\rho_v)}{(\rho_l+\rho_v)^2}\right)^{\!1/4}
\end{aligned}$
&
\begin{tabular}{@{}>{\raggedright\arraybackslash}p{.3\textwidth}@{}}
 $\mu$: coeficiente de viscosidad dinámica \\
 $h_{fg}$: calor latente de vaporización \\
 $g$: aceleración de la gravedad \\
 $\rho$: densidad \\
 $g_c$: constante adimensional \\
 $\sigma$: tensión superficial de la interfaz líquido/vapor \\
 $c_{p}$: calor específico a presión constante \\
 $C_{s}$: cantidad empírica \\
 $\mathit{Pr}$: número de Prandtl \\
 $\mathit{Nu}$: número de Nusselt \\
 $D$: diámetro del cilindro \\
 $k$: conductividad térmica \\
 $\sigma_{\mathrm{SB}}$: constante de Stefan-Boltzmann \\
 $\epsilon$: emisividad radiativa
\end{tabular}
\\
\bottomrule
\end{tabular}

\end{table}

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .