enter image description here

How can I make a fancy box around equations like the one in the left? I tried many time on my own but nothing satisfactory obtained!

  • 1
    Just start with a block: \begin{block}{} equation here \end{block}. Then you can add some block styles. – Sigur Feb 2 '15 at 13:41

Here are some options with empheq and tcolorbox adopting code from this answer.


\tcbset{highlight math style={enhanced,

\newtcbox{\mybox}[1][]{nobeforeafter,math upper,tcbox raise base,
  enhanced,frame hidden,boxrule=0pt,interior style={top color=green!10!white,
  bottom color=green!10!white,middle color=green!50!yellow},
  fuzzy halo=1pt with green,drop large lifted shadow,#1}


E&=mc^2 + \int_a^a x\, dx

\begin{empheq}[box={\tcbhighmath[colback=blue!20!white,arc=0pt,outer arc=0pt,toprule=0pt,drop large lifted shadow]}]{align}
E&=mc^2 + \int_a^a x\, dx

E&=mc^2 + \int_a^a x\, dx


enter image description here

  • I cannot find drop large lifted shadow in the documentation of tcolorbox. Do you use a development version or is it just undocumented? – Henri Menke Feb 2 '15 at 15:07
  • @HenriMenke It is there in documentation, page 155, of tcolorbox version 3.36 (9-1-2015) – user11232 Feb 2 '15 at 15:09
  • Ah, I see. Then texdoc.net is not up-to-date. – Henri Menke Feb 2 '15 at 15:44
  • @HenriMenke I tried to implement your codes but I got an error message: "File 'tcolorbox.sty' not found". I found it by search and then I got another error message: "I can't find file tcbskins.code.tex". I also found this file by search but I do not know what should I do. Do you know how to solve this issues? – Moody Feb 2 '15 at 16:55

This should be a starting point. I used tcolorbox for the fancy equation box. The font is biolinum.

\setbeamertemplate{itemize item}[circle]
\defbeamertemplate{footline}{sky blue}
\setbeamertemplate{footline}[sky blue]
\setbeamertemplate{navigation symbols}{}



  enhanced,drop fuzzy midday shadow,

\title{Controllo di Processo e dei Sistemi di Produzione -- A.a.\ 2009/09}
\author{\textcopyright\ 2009 by A.\ Bemporad}

\begin{frame}{Receding horizon philosophy}
    \item \underline{At time $t$:} solve and \markit{optimal control}
      problem over a finite future horizon of \markit{$N$} steps:
      \begin{fancyeqbox}[ams align*,width=\linewidth+.7cm,enlarge left by=-.7cm]
        &\left\{ \sum_{k=0}^{N-1} \| {\color{sred} y_{t+k} - r(t)} \|^ 2 + \right. \\
        &\quad\left. \rho \| {\color{sred} u_{t+k} - u_r(t)} \|^2 \right\} \\
        & {\color{sblue} x_{t+k+1} = f(x_{t+k},u_{t+k})} \\
        & {\color{sblue} y_{t+k} = g(x_{t+k},u_{t+k})} \\
        & {\color{sgreen} u_{\mathrm{min}} \leq u_{t+k} \leq u_{\mathrm{max}}} \\
        & {\color{sgreen} y_{\mathrm{min}} \leq y_{t+k} \leq y_{\mathrm{max}}} \\
        & x_{t} = x(t), k=0,\ldots,N-1

  \item Only apply the firt optimal move \markit{$u^*(t)$}
  \item \underline{At time $t+1$:} \markit{Get new measurements},
    repeat the optimization. And so on\ldots
    \colorbox{spink}{Advantage of repeated on-line optimization: \textcolor{red}{FEEDBACK!}}

enter image description here

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.