From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11073 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: inlining pretty-printed XML Date: Mon, 17 Feb 2003 02:14:19 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20030217011932.02ce5ec0@remote-1> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1045472890 29954 80.91.224.249 (17 Feb 2003 09:08:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2003 09:08:10 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18khFu-0007mn-00 for ; Mon, 17 Feb 2003 10:08:06 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 7A4F510ABB; Mon, 17 Feb 2003 10:10:27 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 4FC4910AB6 for ; Mon, 17 Feb 2003 10:07:00 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id h1H96teP029137 for ; Mon, 17 Feb 2003 10:06:55 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.3/8.12.2) with ESMTP id h1H96ut7020088 for ; Mon, 17 Feb 2003 10:06:57 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11073 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11073 At 05:03 PM 2/16/2003 +0800, Guy Worthington wrote: >I'm seem to be using this mailing list as private correspondence, I'll >try to keep my posting down in future. But.. > >Following up on my question on how to inline XML code, I vaguely >remember reading that the TeX primitive \par, has no effect in >restricted horizontal mode, (I think that's what it's called, anyways >the horizontal mode that's not paragraph mode). So on that >assumption, I forced the verbatim pretty printer to operate inside an >\hbox, with the following code: > >-------------------------------------------------- > >%output=pdf >\definetyping [XMLtag] [option=XML] >\setuptyping [XMLtag] [before={\ \hbox\bgroup}, > after={\egroup\ }, > palet=colorpretty] > >\setupcolors[state=start] > >\starttext > >This is a >\startXMLtag > >\stopXMLtag >tag inline; and this is a comment >\startXMLtag > >\stopXMLtag > >\startXML > >
>\stopXML > >\stoptext did you try: \setupcolors[state=start] \definetype[typeXML][option=XML,palet=colorpretty] test \typeXML{} test \startXML \stopXML (ps i just found out that the palet is not predefined here, but the previous code should work ok) Another nice one is: %\setupXMLfile[level=2] %\showXMLlin[here,there] %\showXMLwrd[whow] (ign,lin,wrd,par,txt,nop,emp) \startbuffer oeps \stopbuffer \showXMLbuffer there is also \showXMLfile i'll add an \showXMLtext{ oeps } \showXMLtext{oeps} this trickery is used in: texexec --pdf --use=xml-01 somexmlfile [--mode=packed,wide] : use pdftotext afterwards and you'll have a prettier xml file texexec --pdf --use=xml-02 somexmlfile : pretty print (recognized xsd, rlg, xml, exa) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------