From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83050 Path: news.gmane.org!not-for-mail From: Sander Maijers Newsgroups: gmane.comp.tex.context Subject: Re: embedding ConTeXt code in an xtable Date: Mon, 17 Jun 2013 22:58:27 +0200 Message-ID: <51BF7873.607@student.ru.nl> References: <51BC8FE1.7070601@student.ru.nl> <5913A6CD-E69F-4C15-AB15-17D6CA7411F6@gmail.com> <51BDD438.1040000@student.ru.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371502725 26422 80.91.229.3 (17 Jun 2013 20:58:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Jun 2013 20:58:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 17 22:58:47 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UogVf-0002B4-Qx for gctc-ntg-context-518@m.gmane.org; Mon, 17 Jun 2013 22:58:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DABB210212; Mon, 17 Jun 2013 22:58:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id D2J7yiZMpgs2; Mon, 17 Jun 2013 22:58:41 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 41773101F1; Mon, 17 Jun 2013 22:58:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 95CAE101F1 for ; Mon, 17 Jun 2013 22:58:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UANbImOtbkNy for ; Mon, 17 Jun 2013 22:58:38 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 3713A101EE for ; Mon, 17 Jun 2013 22:58:28 +0200 (CEST) Original-Received: from smtpout4.ru.nl (smtpout4.ru.nl [131.174.59.197]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5HKwRmI018513 for ; Mon, 17 Jun 2013 22:58:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by smtpout4.ru.nl (Postfix) with ESMTP id 5732F5F7E5 for ; Mon, 17 Jun 2013 22:58:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at uci.ru.nl Original-Received: from smtp.ru.nl ([127.0.0.1]) by localhost (aum.ru.nl [127.0.0.1]) (amavisd-new, port 10025) with LMTP id k5E7kFGsENcL for ; Mon, 17 Jun 2013 22:58:27 +0200 (CEST) Original-Received: from [10.0.0.77] (vhe-400104.sshn.net [195.169.216.170]) by smtp.ru.nl (Postfix) with ESMTP id 37749A4C47 for ; Mon, 17 Jun 2013 22:58:27 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=131.174.59.197; country=NL; region=03; city=Nijmegen; latitude=51.8333; longitude=5.8667; http://maps.google.com/maps?q=51.8333,5.8667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03JNwWrsz - 2c857f7d2a70 - 20130617 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83050 Archived-At: On 16-06-13 20:40, Wolfgang Schuster wrote: > > Am 16.06.2013 um 17:05 schrieb Sander Maijers : > >> On 15-06-13 19:42, Wolfgang Schuster wrote: >>> >>> Am 15.06.2013 um 18:01 schrieb Sander Maijers : >>> >>>> I am now using xtable to have an XMLish document to store a table. How I can embed ConTeXt code like $\Delta{}N_{\text{test}}$ >>>> in the external XML file file with the table? In other words, having mathematical notiation in the table header? >>>> >>>> I tried various things such as: >>>> \expanded{\xmlflush{#1}} >>> >>> 1. Have you looked at the cals table module? >> >> No. I was able to find some references to CALS and ConTeXt with Google, but no documentation for the module you describe. > > A simple example I found online: > > \usemodule[cals] > > \starttext > > \startbuffer > > > > > > Any text > > > > > Any text > > > > > \stopbuffer > > \processXMLbuffer > > \stoptext Are there advantages for CALS tables in ConTeXt vs. the xtable solution? I have R scripts (a programming language) that produce HTML tables and write them to files. Not very robust or complete but it works. This is easy to use with xtables and \xmlprocessfile . But I am interested in a more well-defined format such as CALS tables, of course. Anything I can also easily embed in DocBook documents would be very nice. >>> 2. Can you provide a example for your problem? >> >> No, not at this time, because I am very pressed for time now. But I will come back to this later. > > When the content of the cells is normal context code you can use \xmlflushcontext instead of \xmlflush. Thank you. Do you know of a quick way to map an attribute, say the "id" of the "table" element to a ConTeXt ID/name? (So that I can refer to the table with \in.) At the moment there are no table numbers/descriptions for xtables at all in my document. I am using this code based on Thomas Schmitz's example in the xtables manual: \startxmlsetups xml:testsetups \xmlsetsetup{main}{TABLE|TR|TD|TH}{xml:*} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:TABLE \startembeddedxtable[\xmlatt{#1}{id}] \xmlflush{#1} \stopembeddedxtable \stopxmlsetups \startxmlsetups xml:TR \startxrow \xmlflush{#1} \stopxrow \stopxmlsetups \startxmlsetups xml:TD \startxcell \xmlflush{#1} \stopxcell \stopxmlsetups \startxmlsetups xml:TH \startxcell[background=color,backgroundcolor=gray] \xmlflushcontext{#1} \stopxcell \stopxmlsetups > Wolfgang > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > 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 > ___________________________________________________________________________________ > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! 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 ___________________________________________________________________________________