From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71897 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: processing style inside verbatim in XML Date: Fri, 21 Oct 2011 22:18:35 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016364eecae1e9fec04afd4c75b X-Trace: dough.gmane.org 1319228339 11913 80.91.229.12 (21 Oct 2011 20:18:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2011 20:18:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 21 22:18:54 2011 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 1RHLYM-0002m4-CT for gctc-ntg-context-518@m.gmane.org; Fri, 21 Oct 2011 22:18:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D092FCB07F; Fri, 21 Oct 2011 22:18:52 +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 0ZQLXRH33uuz; Fri, 21 Oct 2011 22:18:50 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 44AC3CB082; Fri, 21 Oct 2011 22:18:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96EE5CB082 for ; Fri, 21 Oct 2011 22:18:48 +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 BmPhS1+AW7nZ for ; Fri, 21 Oct 2011 22:18:37 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 91F4FCB07F for ; Fri, 21 Oct 2011 22:18:37 +0200 (CEST) Original-Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com [209.85.216.176]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9LKIZZ9021980 for ; Fri, 21 Oct 2011 22:18:36 +0200 Original-Received: by qyk30 with SMTP id 30so4880775qyk.14 for ; Fri, 21 Oct 2011 13:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Vl2woioZV99dsgKDEl53wc4FBBevkqWt8OilUGOWHGI=; b=RsK0xk466IpF6i/3SmDheZI/Xecn1NYouMShH+pIO2E2AUY9k8nDyVPzZRJFalTyj5 wa5/8RHhEZ6qJT2gDAyqi5LiwMBms9f2j5b/koZl06yPRUuVfFBiKPL+4+rr+7YzSnhk ztF72V4XNiNgnpqxYmMOcCVDbBBNATub41mts= Original-Received: by 10.229.12.67 with SMTP id w3mr3478453qcw.224.1319228315442; Fri, 21 Oct 2011 13:18:35 -0700 (PDT) Original-Received: by 10.229.105.12 with HTTP; Fri, 21 Oct 2011 13:18:35 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.176; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xFLwiA4E - a9b9ae514280 - 20111021 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:71897 Archived-At: --0016364eecae1e9fec04afd4c75b Content-Type: text/plain; charset=UTF-8 Hello, Is there any simple way to typeset the following example properly in ConTeXt? I have an example of text that has to obey lines and spaces, but I would like to apply some color to make it more readable. The attachment contains an example of HTML which displays fine in my browser, and it should look similar with ConTeXt. I have problems with literal typesetting of (that should have applied style instead), but maybe I only have wrong settings in my parser. When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I cannot color the numbers. When I use, according to Wolfgang's suggestion, \startxmlsetups pre \setuplines[style=mono,space=yes] \startlines \xmlflush{#1} \stoplines \stopxmlsetups then all the spaces are eaten up by XML parser (or somewhere else), so that I don't get the desired result. Any ideas about this? I'm also sending a self-contained example with \setuplines which doesn't really work in the desired way. Thank you very much, Mojca --0016364eecae1e9fec04afd4c75b Content-Type: text/html; charset=US-ASCII; name="hyp.html" Content-Disposition: attachment; filename="hyp.html" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gu19hpe30 PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIGh0bWwgUFVC TElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIgImh0dHA6Ly93d3cudzMub3Jn L1RSL3hodG1sMS9EVEQveGh0bWwxLXN0cmljdC5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3 dy53My5vcmcvMTk5OS94aHRtbCI+Cgo8aGVhZD4KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgog ICAgLm4geyBjb2xvcjogcmVkOyB2ZXJ0aWNhbC1hbGlnbjogc3ViOyB9CiAgPC9zdHlsZT4KPC9o ZWFkPgo8Ym9keT4KCjxwcmU+Ci4gaCB5IHAgaCBlIG4gYSB0IGkgbyBuIC4KLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLQogICAgICAgICAgIDxzcGFuIGNsYXNzPSJuIj4xPC9zcGFuPm4gYQogICAg ICAgICAgICAgICA8c3BhbiBjbGFzcz0ibiI+MTwvc3Bhbj50IGkgbwogICAgICAgICAgICAgICAg IDxzcGFuIGNsYXNzPSJuIj4yPC9zcGFuPmkgbwogICAgICAgIGggZTxzcGFuIGNsYXNzPSJuIj4y PC9zcGFuPm4KICAgICAgICBoIGUgbjxzcGFuIGNsYXNzPSJuIj41PC9zcGFuPmEgdAogICAgICAg IGggZSBuIGE8c3BhbiBjbGFzcz0ibiI+NDwvc3Bhbj4KICBoIHk8c3BhbiBjbGFzcz0ibiI+Mzwv c3Bhbj5wIGgKICAgICAgICAgICAgbjxzcGFuIGNsYXNzPSJuIj4yPC9zcGFuPmEgdAogICAgICAg ICAgICAgICAgICAgIG88c3BhbiBjbGFzcz0ibiI+Mjwvc3Bhbj5uCi0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0KLiBoIHk8c3BhbiBjbGFzcz0ibiI+Mzwvc3Bhbj5wIGggZTxzcGFuIGNsYXNzPSJu Ij4yPC9zcGFuPm48c3BhbiBjbGFzcz0ibiI+NTwvc3Bhbj5hPHNwYW4gY2xhc3M9Im4iPjQ8L3Nw YW4+dDxzcGFuIGNsYXNzPSJuIj4yPC9zcGFuPmkgbzxzcGFuIGNsYXNzPSJuIj4yPC9zcGFuPm4u CjwvcHJlPgo8L2JvZHk+CjwvaHRtbD4K --0016364eecae1e9fec04afd4c75b Content-Type: application/x-tex; name="hyp.tex" Content-Disposition: attachment; filename="hyp.tex" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gu1mgh8n1 XHN0YXJ0YnVmZmVyW3Rlc3QxXQo8P3htbCB2ZXJzaW9uPSIxLjAiI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JuIj41PC9zcGFuPmE8 c3BhbiBjbGFzcz0ibiI+NDwvc3Bhbj50PHNwYW4gY2xhc3M9Im4iPjI8L3NwYW4+aSBvPHNwYW4g Y2xhc3M9Im4iPjI8L3NwYW4+bi4KPC9wcmU+CjwvYm9keT4KPC9odG1sPgpcc3RvcGJ1ZmZlcgoK XHN0YXJ0eG1sc2V0dXBzIGFsbDpodG1sCiAgIFx4bWxzZXRzZXR1cHttYWlufXtwcmV9eyp9Clxz dG9weG1sc2V0dXBzCgpcc3RhcnR4bWxzZXR1cHMgYWxsOmh0bWwKCVx4bWxzZXRzZXR1cHttYWlu fXtoZWFkfGgxfHByZX17Kn0KCSUgXHhtbHNldGZ1bmN0aW9ue21haW59e3ByZX17bHhtbC5kaXNw bGF5dmVyYmF0aW19ClxzdG9weG1sc2V0dXBzCgpcc3RhcnR4bWxzZXR1cHMgcHJlClxzZXR1cGxp bmVzW3N0eWxlPW1vbm8sc3BhY2U9eWVzLGluZGVudGluZz15ZXNdClxzdGFydGxpbmVzClx4bWxm bHVzaHsjMX0KXHN0b3BsaW5lcwpcc3RvcHhtbHNldHVwcwoKXHhtbHJlZ2lzdGVyc2V0dXB7YWxs Omh0bWx9Cgpcc3RhcnR0ZXh0CiUgSSBoYXZlIHNvbWUgdGV4dCBmaXJzdApceG1scHJvY2Vzc2J1 ZmZlcnttYWlufXt0ZXN0MX17fQolIFx4bWxwcm9jZXNzYnVmZmVye21haW59e3Rlc3QyfXt9Clxz dG9wdGV4dA== --0016364eecae1e9fec04afd4c75b 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 ___________________________________________________________________________________ --0016364eecae1e9fec04afd4c75b--