[NTG-context] noalign hassles

Aditya Mahajan adityam at umich.edu
Sat Mar 16 23:50:31 CET 2013


On Sat, 16 Mar 2013, H. van der Meer wrote:

> I am stuck with the following problem.
>
> Inside an \halign (table) I can insert a colored rule with:
>  \noalign{\color[red]{\hrule height#1 depth\zeropoint}}
>
> Now I want something more involved like:
>  \color[red]{\hrule height#1 width2mm}% fixed length colored block
>  \color[black]{\hrule height#1}% filling the width left
>  \color[red]{\hrule height#1 width2mm}% fixed length colored block
> producing
>  [red][black black black …][red]
>
> However, this doesn't work. I tried various options as: enclosing in \vbox, \hbox, box with leaders. Nothing worked out.

IIUC, you want the frame at the bottom of the first and last column to be 
red, and rest of the columns to be black.

\noalign is the wrong construct for this. You want aligned rules. So, 
create a new row (of approrpriate height) and set the rule in each column.

> Is there some guru who knows how to accomplish this?

Why are using inserting color rule manually. Both the table and the TABLE 
mechanisms allow you to easily adjust the color of the rules. Why not use 
those for creating tables.

Aditya


More information about the ntg-context mailing list