0

I am trying to impose similar heights for 2 different boxes. I am trying to use \parbox but this doesn't work very well since the boxes have still different heights :

\documentclass{beamer}

\usepackage{fancybox}

\begin{document}

\begin{frame}
    \begin{equation*}
\ovalbox{\parbox[b][0.75\baselineskip]{0.5\linewidth}{$\nabla \zeta_0 = -\frac{\delta r}{h^{*}}  \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H}$}
}
\
\ovalbox{\parbox[b][0.75\baselineskip]{0.5\linewidth}{$\alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0$}
}
    \end{equation*}
\end{frame}
\end{document}

What am I missing here ?

enter image description here

Thank you in advance,

2 Answers 2

1

Adaptations

  • Replace position b (bottom) by c (center)
  • increased height a little bit (using 1 \baselineskip)

Result

enter image description here

Code

\documentclass{beamer}

\usepackage{fancybox}

\begin{document}

\begin{frame}
    \begin{equation*}
\ovalbox{\parbox[c][\baselineskip]{0.5\linewidth}{$\nabla \zeta_0 = -\frac{\delta r}{h^{*}}  \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H}$}
}
\
\ovalbox{\parbox[c][\baselineskip]{0.5\linewidth}{$\alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0$}
}
    \end{equation*}
\end{frame}
\end{document}
1

As already said for your previous question, hf-tikz is more powerful, including options to specify the height:

\documentclass{beamer}

\usepackage[beamer,customcolors,nofill]{hf-tikz}
\hfsetbordercolor{black}

\begin{document}

\begin{frame}
    \begin{equation*}
    \tikzmarkin<1->{a}(0.1,-0.4)(-0.1,0.6) 
    \nabla \zeta_0 = -\frac{\delta r}{h^{*}}  \ \text{avec :}\ \frac{1}{h^{*}} = \frac{1}{\alpha h_p} - \frac{1}{H} 
    \tikzmarkend{a}
    \quad
    \tikzmarkin<1->{b}(0.1,-0.4)(-0.1,0.6) 
    \alpha = 1 - \frac{n}{n'} \ \text{et :} \ h_p = h_0
    \tikzmarkend{b}
    \end{equation*}
\end{frame}
\end{document}

enter image description here

1
  • @Wiss I think using this approach would be better as the suggested package hf-tikz is made for your use case and you don't have to set a width manually.
    – dexteritas
    Sep 13 at 12:12

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.