I've a long LaTeX document with many tables. Now I want to show negative values in cell in red color. I wonder how to do globally. My MWE is below:
\documentclass{article}
\begin{document}
\begin{tabular}{ l c r }
1 & 2 & 3 \\
-4 & 5 & 6 \\
7 & 8 & -9 \\
\end{tabular}
\end{document}
Edited
Thanks all who provided answers. From provided answers it seems that I have to make edits in my all tables which have negative values and there is no automated solution. But still I will keep this question for better solution. One more clarification, I need negative values in red not their background. Thanks
Best Answer
This could work in your document. But it is a bit drastic and may well break some things.