Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\begin{align*}
  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}
\end{align*}

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

2 Answers 2

Use \usepackage{color} and

 \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 at 10:34
    
@Kit No, each cell is a group –  daleif Feb 28 at 10:34

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

screenshot

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}
\documentclass{article}
\usepackage{amsmath}
\usepackage{hf-tikz}

\begin{document}

\begin{align*}
    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}
\end{align*}

\end{document}
share|improve this answer

Your Answer

 
discard

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.