On Thu, 17 Mar 2011, R. Ermers wrote:

Dear All,

I am still trying to typeset cals tables.

I have
1. an environment document with instructions.
2. an xml docbook file containing cals tables

Note that the original cals tables (docbook standard) use <table, <tgroup, etc. but 
for ConTeXt purposes this  - as far as I understand - needs to be: <cals:table, 
<cals:tgroup, etc. (My xml reader does not recognize them anymore.)

There is a bug in lxml-dir.lua. Open lxml-dir.lua and change

local collection = xml.applylpath({ getid(xml.load(filename)) },"directive") -- 
is { } needed ?


local collection = xml.applylpath(getid(xml.load(filename)),"directive") -- AM: removed { }

[@Hans: I do not checked if this affects other uses of directives.load(...).]

Then run c --make to regenerate formats. After that create three files:

%% directives.xml
<?xml version="1.0" standalone="yes"?>
  <directive attribute="cdx" value="color" element="cals:table"

%% table.xml
<?xml version="1.0" standalone="yes"?>

<cals:table cdx="color">
  <cals:tgroup cols="3">

%% test.tex

\startsetups cdx:cals:table:colors


Then compile test.tex to get a table with a red background.

If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net

Reply via email to