# Color symbols individually in math mode (unicode-math clash)

The solution in the post https://tex.stackexchange.com/a/100625 is highly efficient. Unfortunately it can not be used with unicode-math, which erases the individualized symbol colors. While unicode-math does allow individual symbol coloring via \setmathfont, if too many symbols are independently colored in this way, the source will not compile.

Is there any way to make the \colorizemath code (linked above) compatible with unicode-math ?

• If you have an example that fails in unicode-math, please submit a bug in the issue tracker: github.com/wspr/unicode-math/issues . I'm not surprised you run into problems, but I might be able to develop an alternative interface if I can see what you're trying to do. – Will Robertson Aug 30 '18 at 1:52
• Honestly I cannot tell whether this is a bug, or an abuse of the package by yours truly. I have been using \setmathfont one glyph at a time to individualize colour etc. If \setmathfont is called more than a handful of times, the symbol font limit is exceeded; hence the source does not compile. If unicode-math wants to allow dozens of characters to be customized, one \setmathfont by one, I will happily submit a bug. Unicode-math continues to be my favourite package, with its prints all over documents like dropbox.com/s/m95ta9o6ac0l8wg/Project1Report_BenBarlow.pdf?dl=0 – Benjamin Barlow Sep 6 '18 at 5:39
• Nice example! Probably one glyph at a time is excessive, but I see you are using lots of difference colours :) – Will Robertson Sep 6 '18 at 14:13

\begingroup
\lccode~=x
\mathcodex="8000
`