From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/467 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: two table questions Date: Mon, 31 May 1999 16:26:35 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <37529C1B.8AF4620C@wxs.nl> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035391325 24326 80.91.224.250 (23 Oct 2002 16:42:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:42:05 +0000 (UTC) Cc: Context List Original-To: Matthew.Baker@gmd.de Xref: main.gmane.org gmane.comp.tex.context:467 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:467 Matthew Baker wrote: > ! Math formula deleted: Insufficient symbol fonts. This has something to do with your local font setup, maybe taco knows the answer? > Second question: I'm trying to use \BC and \BL to to colour cells in a > table. I'd like to have all cells in the first row in one colour, then > most cells in the other rows in white but with a few in a third colour, eg First a remark. Color support is not natural to tex. Although context can do a rather decent job, sometimes color is tricky. In tables for instance, I use a rather dirty trick: coloring rules that are stretched by tex, skipping back and overlaying the text. The macros are hooked into the table package (which is the only foreign piece of code in context). When I find the time, I will rewrite the table package from scratch, which will make things a bit more secure. Like always with tables, anything interfering (noalign stuff) will break the mechanism completely, especially because there is also automatic table breaking across pages and error tracing (partially turned on by default) and error recovery (as good as possible). Concerning your problem, I cross my fingers that the next hack will not break other things. Change this in core-tab.tex and remake the format (or put this code in cont-new.tex, but don't forget to delete that file when you update). \def\TableBC% {\ifTABLEgrayline \normalTABLEquote \else \TABLEnoalign\bgroup \global\let\nextTABLEgrayline=\executeTABLEgrayline \global\let\TABLEgrayline\empty \let\BL=\doTableBL \let\BC=\doTableBC \expandafter\doTableBC \fi} \def\TableBL% {\TABLEnoalign\bgroup \global\let\nextTABLEgrayline=\executeTABLEgrayline \global\let\TABLEgrayline\empty \let\BL=\doTableBL \let\CL=\doTableCL \let\RL=\doTableRL \let\BC=\doTableBC \doTableBL} \def\TableCL% {\TABLEnoalign\bgroup \global\let\nextTABLEgrayline=\executeTABLEgrayline \global\let\TABLEgrayline\empty \let\BL=\doTableBL \let\CL=\doTableCL \let\RL=\doTableRL \let\BC=\doTableBC \doTableCL} \def\TableRL% {\TABLEnoalign\bgroup \global\let\nextTABLEgrayline=\executeTABLEgrayline \global\let\TABLEgrayline\empty \let\BL=\doTableBL \let\CL=\doTableCL \let\RL=\doTableRL \let\BC=\doTableBC \doTableRL} Here are your tables: \setupcolors[state=start] \starttable[|c|c|c|] \HL \VL A \VL B \VC[red] C \VL\SR \HL \VL A1 \VL B1 \VC B1 \VL\FR \VL A3 \VL B3 \VC B3 \VL\LR \HL \stoptable \starttable[|c|c|c|] \HL \BL[c,red] \BC \SR \VL A \VL B \VL C \VL\SR \HL \BR\FR \VL A1 \VL B1 \VL B1 \VL\FR \BR\MR \VL A1 \VL B1 \VL B1 \VL\MR \BR\LR \VL A3 \VL B3 \VL B3 \VL\LR \HL \stoptable \starttable[|c|c|c|] \HL \BL[c,red] \BC \SR \VL A \VL B \VL C \VL\SR \HL \BL[c,red] \BC \FR \VL A1 \VL B1 \VL B1 \VL\FR \VL A1 \VL B1 \VL B1 \VL\MR \BL[c,red] \BL[c,green] \MR \VL A1 \VL B1 \VL B1 \VL\MR \BL[c,red] \BL[c,green] \MR \VL A1 \VL B1 \VL B1 \VL\MR \BL[c,red] \BL[c,green] \LR \VL A3 \VL B3 \VL B3 \VL\LR \HL \stoptable Or something along these lines. It is btw not (yet) possible to color neigbouring cells. Sorry. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl -----------------------------------------------------------------