# Problem in showing partial derivatives in a table

I'm writing the manuscript of my paper and I have to write partial derivatives in a table. While doing so, there is a problem when I use $$...$$ in table. For simplicity, I write a part of table as follows:

\begin{tabular}{ccc}
\toprule
Boundary &  Flow  \\
\midrule
Inlet &
$\textit {u=U_0, v=0}$\\
Outlet &
${\frac{\partial u}{\partial y}=\frac{\partial v}{\partial x}=0}$\\

\bottomrule
\end{tabular}


I would be grateful if someone give me a help with this issue. I have to mention that when I use the same equation NOT in table, the code is applied well:

$${\frac{\partial u}{\partial y}=\frac{\partial v}{\partial x}=0}$$


New contributor
Sam El is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Jun 23 at 16:10
• Welcome to SE. Please never give fragmented bits of code and provide a Minimal Working Example instead. Thank you. Jun 23 at 16:11
• Not quite clear. Do you want equation numbers in the table? Jun 23 at 16:18
• I can't even get your code to compile, so I'm not sure how far down a rabbit hole I should go. But your fundamental problem is that you can't have $...$ in a tabular (there are other problems as well). And don't ignore errors when compiling. And this has nothing to do with Overleaf. Jun 23 at 16:20
• If any of your cell is p{...}, then the content is put in a parbox (paragraph box), so if you want a displayed math there, you can have it. c,l, etc. are set in horizontal mode, that is, like a line of text (no paragraphs), so displayed math doesn't work. Jun 23 at 17:10

Here is a solution, without equation numbers, with the esdiff package:

    \documentclass{article}
\usepackage{amsmath}
\usepackage{esdiff}
\usepackage{array, booktabs}

\begin{document}

\begin{tabular}{c >{$}wc{3cm}<{$}}
\toprule
Boundary & \text{Flow} \\
\midrule
Inlet &
u=U_0, v=0 \\[1ex]
Outlet &
\diffp{u}{y} =\diffp{v}{x} =0 \\
\bottomrule
\end{tabular}

\end{document}


• Dear @Bernard thanks for your solution. I appreciate. Jun 23 at 17:07
• @SamEi: You're welcome. Always glad when I can help! Jun 23 at 18:02