From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17528 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: XML in ConTeXt & verbatim text Date: Wed, 15 Dec 2004 17:57:11 +0100 Message-ID: <41C06CE7.7040702@wxs.nl> References: <41BF0B35.4070301@kerio.com> <20041214172728.20974@news.comp.lancs.ac.uk> <41C05BA3.9010507@kerio.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1103129855 6276 80.91.229.6 (15 Dec 2004 16:57:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Dec 2004 16:57:35 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 15 17:57:22 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CecSo-0005EF-00 for ; Wed, 15 Dec 2004 17:57:22 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AC1A1127A0; Wed, 15 Dec 2004 17:57:21 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29816-01; Wed, 15 Dec 2004 17:57:18 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B8C7A12799; Wed, 15 Dec 2004 17:57:17 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 83BE512799 for ; Wed, 15 Dec 2004 17:57:15 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25330-08-3 for ; Wed, 15 Dec 2004 17:57:14 +0100 (CET) Original-Received: from mailrelay02.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id B74C71278C for ; Wed, 15 Dec 2004 17:57:14 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id iBFGvBSj017884 for ; Wed, 15 Dec 2004 17:57:11 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 7056917B57; Wed, 15 Dec 2004 17:56:59 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 1A34EF6E1 for ; Wed, 15 Dec 2004 16:56:58 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <41C05BA3.9010507@kerio.com> X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17528 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17528 Richard Gabriel wrote: > Hi Adam, > > I did so right now (thanks for the hint!). > But in that file ther's only solved a case when each line of the > verbatim text is placed in a special tag: > > > Dit \is nogal verbatim ! > Dit is {nogal} verbatim ! > Dit is verbatim ! > > > This is trivial because you can pass the contents of each element > as an argument to the \type command ( \defineXMLargument[line]{\type} ) > > But this solution is unusable e.g. for longer program or configuration > file listings, and, mainly, the DocBook DTD doesn't define such tags. > I need to process multiline verbatims enclosed in a single tag: > > > Line 1 > Line 2 > Line 3 > > > --- > Of course I have some "dirty" workaround, but the result is really ugly... > > \defineXMLenvironment[programlisting]{ > \bgroup > \startpacked > \tttf > \obeylines\obeyspaces\obeytabs > }{ > \stoppacked > \egroup > } > > The line breaks are processed correctly. But all the tabs and spaces are > treated as a single space. It seems the \obeyspaces and \obeytabs > command are ignored or they do not work the way I'd expect. This will > totally break the indentation and tabulation of the verbatim text... maybe the following is better \defineXMLenvironment [programlisting] {\processtaggeddisplayverbatim{}} {} \startbuffer Line 1 Line 2 Line 3 \stopbuffer \starttext \processXMLbuffer \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------