From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82376 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: inclusion of tex code in xml context Date: Tue, 7 May 2013 12:18:05 +0000 Message-ID: <6F0C616B-48F5-4B7B-AB8F-F977243ED26C@uva.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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1367929108 10778 80.91.229.3 (7 May 2013 12:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 May 2013 12:18:28 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Tue May 07 14:18:28 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 1UZgqh-0005gc-7b for gctc-ntg-context-518@m.gmane.org; Tue, 07 May 2013 14:18:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A251D101E8; Tue, 7 May 2013 14:18:24 +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 XMhQ-yFMR+6s; Tue, 7 May 2013 14:18:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 34EE6101E4; Tue, 7 May 2013 14:18:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id AB4D9101E4 for ; Tue, 7 May 2013 14:18:17 +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 QYOjeirP2QfF for ; Tue, 7 May 2013 14:18:16 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 8D0CA101E0 for ; Tue, 7 May 2013 14:18:06 +0200 (CEST) Original-Received: from HUB01.uva.nl (hub01.uva.nl [146.50.108.230]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r47CI6bc007326 for ; Tue, 7 May 2013 14:18:06 +0200 Original-Received: from MBX02.uva.nl ([169.254.2.121]) by HUB01.uva.nl ([2002:9232:6737::9232:6737]) with mapi id 14.02.0342.003; Tue, 7 May 2013 14:18:05 +0200 Thread-Topic: inclusion of tex code in xml context Thread-Index: AQHOSxzslkvrV2WMl0KcjH8+jiTA0A== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] Content-ID: <71A3CA118D8282408B0EDCA07101EC79@uva.nl> X-Bayes-Prob: 0.6323 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.230; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0NJx0i6gP - 2ce54f96beef - 20130507 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:82376 Archived-At: I have some difficulties understanding the intake of ConTeXt-code in an XML processing environment. The setup is as follows. \startbuffer[buffername] \startuseMPgraphic{graphicname}{} .. \stopuseMPgraphic \stopbuffer Processing inside xmlsetup: \startxmlsetups xmlcommon:mpgraphic Here I want to read the buffer and then call it up with \useMPgraphic{graphicname}{} \stopxmlsetups This works if I pack the graphic definition in the buffer inside a node and call \xmlprocessbuffer{tex}{\xmlatt{#1}{buffer}}{} where is a ConTeXt processing setup. This actuallty works, but has the drawback of putting the ConTeXt code inside thereby makeing it difficult to reuse the definition of the graphic in a non XML-context. I thus want to get rid of the enclosure. I tried things like \xmlloadbuffer{tex}{\xmlatt{#1}{buffer}} \xmlsetup{tex}{xmlcommon:tex} <== the tex processing xmlsetups But this does not work. Because the graphic in this case is not found by \useMPgraphic. Clearly I am misunderstanding some of the intricacies of the xmlloading macros and probably the solution is quite simple. But I cannot find the right way to do it. Any help would be appreciated. Hans van der Meer ___________________________________________________________________________________ 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 ___________________________________________________________________________________