Extending on the brilliant (!!!) solution provided by muzimuzhi Z here: https://tex.stackexchange.com/a/543860/305561,:
- could we have a capability to ignore empty/non-numeric cells in a column, and leave them with the default white background?
(Having empty cells in the latex answer/code provided leads to compilation error, something e.g.
"Package color Error: Argument 1.01212 not in range [0,1].", as the empty cells gets treated as a value=0).
A. One solution that works is to mark every empty cell as \multicolumn{1}{l}{} or a cell to be ignored as \multicolumn{1}{l}{text to be ignored}. But this is tedious, and I wonder if there is a latex script to ignore empty/non-numeric cells automatically.
- could we determine min and max values in a column automatically to determine color scaling? i.e. instead of explicitly stating
P{-0.0015}{0.003}as in the answer provided in the link above, i.e. could we have an automaticP{\auto_evaluated_min_in_column}{\auto_evaluated_max_in_column}?
\colorfromval(except for the last line\tablenum[#3]{#4}) in\ifstrempty{#4}{}{<original definition>}. (I just added a revised example in my previous answer.) As for question 2, first a second compilation is required if still usingtabularenvironment, then currently I don't know how to get a distinct naming perPcolumn (to store the min/max value to aux file). Maybe it's easier withtabularray, a recent tabular package. – muzimuzhi Z Oct 08 '23 at 14:06