From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/74043 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: Re: include file in xml processing Date: Fri, 20 Jan 2012 09:46:40 +0000 Message-ID: <309758F8-126C-4BB4-A6A2-9732DAE8F63C@uva.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0564318524==" X-Trace: dough.gmane.org 1327052831 8929 80.91.229.12 (20 Jan 2012 09:47:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 09:47:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 20 10:47:06 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RoB3p-0000Z3-W5 for gctc-ntg-context-518@m.gmane.org; Fri, 20 Jan 2012 10:47:06 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D5B1CCB20B; Fri, 20 Jan 2012 10:47:04 +0100 (CET) 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 oNh+Kik2IlLQ; Fri, 20 Jan 2012 10:46:59 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 72549CB1F8; Fri, 20 Jan 2012 10:46:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EA9C6CB1F8 for ; Fri, 20 Jan 2012 10:46:57 +0100 (CET) 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 ZjEcJ42QBT4V for ; Fri, 20 Jan 2012 10:46:43 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id EEFF1CB1F0 for ; Fri, 20 Jan 2012 10:46:42 +0100 (CET) Original-Received: from jansen.uva.nl (jansen.uva.nl [146.50.108.229]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0K9kg0x030934 for ; Fri, 20 Jan 2012 10:46:42 +0100 Original-Received: from vanthoff.uva.nl (146.50.108.242) by jansen.uva.nl (146.50.108.229) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 20 Jan 2012 10:46:42 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by vanthoff.uva.nl ([::1]) with mapi id 14.01.0355.002; Fri, 20 Jan 2012 10:46:41 +0100 Thread-Topic: [NTG-context] include file in xml processing Thread-Index: AQHM1upzKbGVs5v+vUil0/w9vwNdHJYU8jgA In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.229; 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: 0rGnJKGdy - cbad15cab98c - 20120120 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:74043 Archived-At: --===============0564318524== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_309758F8126C4BB4A6A29732DAE8F63Cuvanl_" --_000_309758F8126C4BB4A6A29732DAE8F63Cuvanl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have seen that I can load a file (containing ConTeXt code) with \startxmlsetups xmlcommon:texinclude \writestatus{TEST HVDM}{file: \xmlatt{#1}{file}} \xmlload{#1}{\xmlatt{#1}{file}} \stopxmlsetups But how to use these loaded data? I want them included in ConTeXt-processin= g like this but it doesn't work: \useMPgraphic{xyz}{param=3D285} The node is just a wrapper around \xmlcontext{#1}{.} Someone who can put me on the right track? Hans van der Meer On 19 jan. 2012, at 21:38, Hans van der Meer wrote: I have the following setup for use of ConTeXt code in an xml-processing set= up: % Usage: ... \startxmlsetups xmlcommon:tex \ignorespaces \xmlstripnolines{#1}{.} % need to strip sufficient space characters \xmlcontext{#1}{.} \stopxmlsetups Since I need some MetaPost drawings repeatedly I thought to include those f= rom a separate file: \input thedirectory/thefile \useMPgraphic{lfsr}{stages=3D285} The file is read, but typeset as is, MetaPost processing does not occur. By= the way, inserting the MetaPost code in place of the \input works ok. I also tried \usemodule[thedirectory/thefile] instead, but then nearly ever= ything MetaPost encounters is undefined. Does someone know how to get the file inclusion right? Hans van der Meer ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.n= l/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 ___________________________________________________________________________= ________ --_000_309758F8126C4BB4A6A29732DAE8F63Cuvanl_ Content-Type: text/html; charset="us-ascii" Content-ID: <65F7391E17BDF1469B3CBA0A4E543475@uva.nl> Content-Transfer-Encoding: quoted-printable I have seen that I can load a file (containing ConTeXt code) with
\startxmlsetups xmlcommon:texinclude
\writestatus{TEST HVDM}{file: \xmlatt{#1}{file}}
\xmlload{#1}{\xmlatt{#1}{file}}
\stopxmlsetups

But how to use these loaded data? I want them included in ConTeXt-processin= g like this but it doesn't work:
<texinclude file=3D"filename"/>
<tex>
\useMPgraphic{xyz}{param=3D285}
</tex>
The <tex> node is just a wrapper around \xmlcontext{#1}{.}<= /div>

Someone who can put me on the right track?

Hans van der Meer



On 19 jan. 2012, at 21:38, Hans van der Meer wrote:

I have the following setup for use of ConTeXt code in an xml-processin= g setup:

% Usage: <tex> ... </tex>
\startxmlsetups xmlcommon:tex
\ignorespaces
\xmlstripnolines{#1}{.} % need to strip sufficient space characters
\xmlcontext{#1}{.}
\stopxmlsetups

Since I need some MetaPost drawings repeatedly I thought to include those f= rom a separate file:
<tex>
\input thedirectory/thefile
\useMPgraphic{lfsr}{stages=3D285}
</tex>

The file is read, but typeset as is, MetaPost processing does not occur. By= the way, inserting the MetaPost code in place of the \input works ok.

I also tried \usemodule[thedirectory/thefile] instead, but then nearly ever= ything MetaPost encounters is undefined.

Does someone know how to get the file inclusion right?

Hans van der Meer



___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context"> 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
___________________________________________________________________________= ________

--_000_309758F8126C4BB4A6A29732DAE8F63Cuvanl_-- --===============0564318524== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0564318524==--