## LaTeX forum ⇒ LyX ⇒ Changing equation number colour

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Jos Gibbons
Posts: 4
Joined: Thu Sep 10, 2015 10:59 am

### Changing equation number colour

I'm writing my thesis in LyX. I frequently use long greyedout notes that contain display-line equations.* One-line equations in my thesis automatically number themselves, but some multi-line equation environments are necessary, because of multiple related equations or equations too long for one line. I manually number the ends of equations in these environments. While automatic numbers in greyedout notes are the same colour as the greyedout text, the manual ones are black (which is rather jarring). How can I make them grey instead?

*I explain to the reader early on that I use these notes for discussions that are too long for footnotes, but need to be differently coloured to indicate the sentences immediately after them follow from those immediately before. For example, "it can be shown that X; grey proof of X; one corollary of X is..."

Tags:

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Hi and welcome to the LaTeX community!

Can you give us some example code how you're creating these multi line equations? Maybe some minimal LyX document? You could attach it to your next post.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Johannes_B
Site Moderator
Posts: 3904
Joined: Thu Nov 01, 2012 4:08 pm
Seems a bit like an xy-problem to my. Instead of adjusting the colouring of the manually set numbers, wouldn't it be easier to automatically create numbers. Advantage: If for any reason your numbers change, you don't have to retag equations.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Jos Gibbons
Posts: 4
Joined: Thu Sep 10, 2015 10:59 am
Perhaps my automatic/by-hand description was misleading. The numbers still automatically update as things change, track equation labels that I add etc. It's just that right-click --> add equation number results in black text, whereas 1-line equations that are automatically numbered due to preamble code have grey numbers.

Johannes_B
Site Moderator
Posts: 3904
Joined: Thu Nov 01, 2012 4:08 pm
Can you show us a minimal LyX file, or even better, a LaTeX export, so we see what is actually going on? For a LaTeX helper, the words i click on button xy is like saying Take a look at this nice flower to a blind person. LaTeX code on the other hand can be read even by blind people.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Jos Gibbons
Posts: 4
Joined: Thu Sep 10, 2015 10:59 am
I apologise for not noticing cgneider's post. Here's the LaTeX output of a minimal example:

Johannes_B
Site Moderator
Posts: 3904
Joined: Thu Nov 01, 2012 4:08 pm
the eqnarray environment has several issues, it is recommended not to use it. Using amsmath (or rather mathtools for some extra features) you can use align for the very same functunality.


I am pretty sure that LyX can use align with ease. Else it would be a horrible tool and not be used by many people.

btw: Redefining \[ isn't really a good idea. It works, but it is really against convention.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Jos Gibbons
Posts: 4
Joined: Thu Sep 10, 2015 10:59 am
Thank you. Replacing eqnarray with align fixed the colour problem.