Math & ScienceEquation highlighting

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
theo moore
Posts: 72
Joined: Thu Jan 15, 2009 3:16 pm

Equation highlighting

Post by theo moore »

Hi, I'm making a Beamer presentation and I'd like to highlight certain equations in a frameless colored box (for example, light beige). How would I do this?

(I realise there are \alert and \highlight commands in Beamer, but this isn't what I want).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

fatra2
Posts: 126
Joined: Fri May 01, 2009 1:43 pm

Equation highlighting

Post by fatra2 »

Hi there,

Why don't you just nest your equation into a parbox environment, and add some color to it???

Something like this:

Code: Select all

\colorbox{red}{\parbox{0.5\textwidth}{
      \begin{eqnarray}
	a + b = c
      \end{eqnarray}
  }}
Hope this is the result you are expecting.

Cheers
theo moore
Posts: 72
Joined: Thu Jan 15, 2009 3:16 pm

Equation highlighting

Post by theo moore »

fatra2 wrote:Hi there,

Why don't you just nest your equation into a parbox environment, and add some color to it???

Something like this:

Code: Select all

\colorbox{red}{\parbox{0.5\textwidth}{
      \begin{eqnarray}
	a + b = c
      \end{eqnarray}
  }}
Hope this is the result you are expecting.

Cheers
Yup. Works for me. Thanks!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Equation highlighting

Post by localghost »

Just for the record. The eqnarray should not be used any more because of known inconsistencies and misbehaviour in some cases. Highlighting of math environments can be done with the empheq package from the mh bundle.


Best regards
Thorsten
Post Reply