How to highlight text in table row (change background color to yellow)?

XPP v9.2.2.0 on Windows Server 2012

I'm trying to change the background color of a whole row of cells in a table. These items are new items and I need them to be easier to see. We've already used the main foreground colors to highlight other items at different stages that show well in print like cyan, red, magenta, and the other foreground colors do not show up well when printed, so my option is now limited to change the background of the row of items.

The foreground colors we don't use do not show up well because the print is so tiny and thin. And we cannot change the font size as each table row is packed with information.

I've tried these things all in a single macro called <inscolor>.

<co;8><chgrow;pt;;20><co;0> (supposed to change background color to yellow (color 8) at pattern 20%, but only changes to gray 20% background)

<chgrow;fcell;20;8;0> (supposed to change fill of cells to yellow (color 8) at 20% but only changes it to gray 20% background).

We've had this problem in previous versions of XPP (v7.2) where we could change the background color of text outside a table, but not inside a table using <chgrow> or other methods.

Have any ideas for me to try? Have you found something that works in a table?

Parents
  • Hi Chuck,

    This is not a bug. What you (and Chris) are both missing is that the delivered xy_sys <chgrow> macro only takes two arguments - not three or more.

    So you cannot just do <chgrow;fcell;20;8> (or <chgrow;fcell;20;8;0>) as <chgrow> will only do anything with the first two "fcell" and "20" arguments.

    As far as your attempting to do <co;8><chgrow;pt;;20><co;0>, well that just does not work on a number of different levels.

    • First, the <co;8> macro (if you typed correctly what you were doing) changes the foreground color to yellow, not the background color.
    • Second, the <chgrow> macro is only going to do anything with the first "pt" argument and the second empty argument and not see the "20" argument (assuming you typed correctly what you were doing).
    • Third, doing a color change (foreground or background) right before a <chgrow> and resetting it right after the <chgrow> is never going to work because what <chgrow> causes to happen in each cell will not "inherit" such a color change. The <chgrow> macro simply causes the specified macro (and one argument) to be output at the "beginning" of each cell in the row - but without any "inheritance" of other composition characteristics (e.g. color). It's just a simple way specify to output a (single argument) macro in each cell of a row.

    Not sure the "best" way you want to get your desired results, but one option would be to do it with just a single <fcell> where you are currently placing the <chgrow> (i.e. in the first cell of the row) - use the value "table" for the width argument of <fcell> to apply the tint to the entire row (or technically "rest of the row" if you don't have the <fcell> in the first cell).

    Another option is to define a custom macro that specifies most or all of the desired arguments to <fcell> and then use that in a <chgrow> macro. Your custom macro (to be used with <chgrow>) can have one argument to be able to variably specify at least one of the <fcell> arguments.

  • I have what is perhaps a better (easier) solution in the first cell of a row you put <chgstyle;row;macro_name> and then you write a macro which has <fcell;50;8> or whatever the requirement is. It seems to work on our system!
Reply Children