From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11078 Path: main.gmane.org!not-for-mail From: Guy Worthington Newsgroups: gmane.comp.tex.context Subject: Re: inlining pretty-printed XML Date: 18 Feb 2003 21:23:51 +0800 Sender: ntg-context-admin@ntg.nl Message-ID: References: <5.1.0.14.1.20030217011932.02ce5ec0@remote-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045574216 17618 80.91.224.249 (18 Feb 2003 13:16:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2003 13:16:56 +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 18l7cE-0004Zu-00 for ; Tue, 18 Feb 2003 14:16:54 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id E94AA10AEC; Tue, 18 Feb 2003 14:19:16 +0100 (MET) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by ref.ntg.nl (Postfix) with ESMTP id 64C7F10AB6 for ; Tue, 18 Feb 2003 14:17:19 +0100 (MET) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18l7aG-0004QC-00 for ; Tue, 18 Feb 2003 14:14:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ref.ntg.nl Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18l7aE-0004Pn-00 for ; Tue, 18 Feb 2003 14:14:50 +0100 Original-Lines: 48 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 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:11078 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11078 Hans Hagen wrote: > [to inline xml] try: > \setupcolors[state=start] > > \definetype[typeXML][option=XML,palet=colorpretty] > > test \typeXML{} test The code works, and, as usual, you've upstaged me with a much cleaner interface. > 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 Hans, you make life hard. I've been playing around with this, this afternoon, it's like magic. But now I've got to rethink how I format XML to exploit the pretty-printing capability, especially how I should group elements. > 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 Do you wake up in the morning and think to yourself I'll build a better version of lgrind? This I can use immediately. Thankyou. > $ texexec --pdf --use=xml-02 somexmlfile > > pretty print (recognized xsd, rlg, xml, exa) And it also comes in colour.