TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to color only one line of this display equation:

  i_{fb} &= - \frac{v_o}{Z_F} \\
  F(s) = \frac{i_{fb}}{v_o} &= - \frac{1}{Z_F} \\
  \color{red} F(s) &= - \frac{1 + sR_F C_F}{R_F}

How do I do it? The above example only provides color to F(s). Enclosing whole line in {} causes ref to appear at the right side.

share|improve this question

Use the color package and do

\color{red} F(s) &\color{red}= - \frac{1 + sR_F C_F}{R_F}
share|improve this answer
So \color{...} does not work across alignment columns? – Kit Feb 28 '14 at 10:34
@Kit No, each cell is a group – daleif Feb 28 '14 at 10:34

You can use the hf-tikz package, which was built as a result of Beamer: highlighting aligned math with overlay.


Here's a MWE- note that I had to use \tikzmarkin{c}(0.1,-0.4)(-0.1,0.5) to get the boundaries corrected- you might want to adjust them further as you see fit :)

% arara: pdflatex
% arara: pdflatex
% !arara: indent: {overwrite: yes}


    i_{fb}                                 & = - \frac{v_o}{Z_F}                         \\
    F(s) = \frac{i_{fb}}{v_o}              & = - \frac{1}{Z_F}                           \\
    \tikzmarkin{c}(0.1,-0.4)(-0.1,0.5)F(s) & = - \frac{1 + sR_F C_F}{R_F}\tikzmarkend{c}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.