For (copy) editing purposes I'd like to redefine the eqnarray envinronment to render its content in red (or any other colour). How can I do it?

Edit. I'll use this trick to better spot and (eventually) change the instances of eqnarray.

  • It would be better to explain why you want it. I remember about your job, other people might not.
    – egreg
    Jun 19, 2020 at 21:07

2 Answers 2


I think etoolbox can do the trick




  \dot x &=& v \\
  \dot v &=& F(x)

  • Exactly what I needed! Thank you!
    – Gabriele
    Jun 19, 2020 at 20:48

Of course, one shouldn't use eqnarray. A similar approach to the suggestion by @Denys Potapov works with the align environment from the amsmath package. Note that the equation numbers will be coloured with align, whereas I don't think they will with eqnarray.

a &= b \\
  &= c
  • I guess that the OP's aim is to visually find the instances of eqnarray so to be able to change them in the source.
    – egreg
    Jun 19, 2020 at 21:02
  • @egreg --- I fully support any effort to find and remove instances of eqnarray. Jun 19, 2020 at 21:04
  • 1
    The OP explained time ago that he's in charge of copy editing, so my guess.
    – egreg
    Jun 19, 2020 at 21:06
  • @egreg Indeed i'll use this trick to better spot and (eventually) change the instances of eqnarray ;-)
    – Gabriele
    Jun 19, 2020 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .