From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71962 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: xml and lua again Date: Thu, 27 Oct 2011 11:53:23 +0200 Message-ID: References: <4EA2F34E.6080202@uni-bonn.de> <4EA53B44.1040105@wxs.nl> <4EA55792.9090408@uni-bonn.de> <4EA5598A.4060109@wxs.nl> <4EA599BE.2050304@uni-bonn.de> <4EA5B2F2.2050700@wxs.nl> <4EA684D9.2040702@uni-bonn.de> <4EA68CB4.30809@wxs.nl> <4EA68F04.4090706@uni-bonn.de> <4EA9231F.6080001@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1319709236 16276 80.91.229.12 (27 Oct 2011 09:53:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2011 09:53:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 27 11:53:51 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 1RJMej-0008HS-KR for gctc-ntg-context-518@m.gmane.org; Thu, 27 Oct 2011 11:53:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B6E52CB0A5; Thu, 27 Oct 2011 11:53: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 qnTnefuZdBAp; Thu, 27 Oct 2011 11:53:42 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9B53ACB09F; Thu, 27 Oct 2011 11:53:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6B59ECB09F for ; Thu, 27 Oct 2011 11:53:41 +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 sVSPBexJ8SP1 for ; Thu, 27 Oct 2011 11:53:26 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 849A7CB09D for ; Thu, 27 Oct 2011 11:53:26 +0200 (CEST) Original-Received: from mail-fx0-f41.google.com (mail-fx0-f41.google.com [209.85.161.41]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9R9rPiT018465 for ; Thu, 27 Oct 2011 11:53:26 +0200 Original-Received: by faat2 with SMTP id t2so3431732faa.14 for ; Thu, 27 Oct 2011 02:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=xTV9UhInsraK+2Zx06oyhUiRiDYRn+PqNB1ot/3DF5o=; b=EmlZu6E7xfgAbgcCAaZP6hcrpFlOU+c4uRZZHkcaM707L/1PLtslc8X4y3wvgIamdp Thb0R3Nu+H7UNYUHBxnXKrXIGNe9H/QEhg4H99kBsMJdfYukxehT+ldN3yubgHraLp5a ac6A6zS2tZDjkOUuYCaChCCipM2wZb4CnotwE= Original-Received: by 10.223.61.138 with SMTP id t10mr50876654fah.20.1319709205586; Thu, 27 Oct 2011 02:53:25 -0700 (PDT) Original-Received: from [192.168.2.35] (p5482C766.dip.t-dialin.net. [84.130.199.102]) by mx.google.com with ESMTPS id u6sm9994869fan.17.2011.10.27.02.53.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Oct 2011 02:53:24 -0700 (PDT) In-Reply-To: <4EA9231F.6080001@uni-bonn.de> X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.41; 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: 0eFNJRpUa - d6de4e46a3dc - 20111027 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:71962 Archived-At: Am 27.10.2011 um 11:23 schrieb Thomas A. Schmitz: > On 10/25/2011 12:27 PM, Thomas A. Schmitz wrote: >> Wolfgang, Hans, >> = >> thanks a lot, this works now. Will now try and move the code to a >> ctxluafile and see if I can make it work again. If not, I'll be back; no >> good deed goes unpunished... >> = >> Thomas > = > OK, I'm slowly making progress processing xml in lua. One naive question = now: how can I have access to and manipulate the textwidth dimension? In ot= her words, given > = > 0.4\textwidth > = > what would be the equivalent in lua code? I tried > = > 0.4 * tex.dimen.textwidth > = > or > = > 0.4 * tex.dimen["textwidth"] > = > but couldn't make that work. Also tried grepping the tex/context/base/*.l= ua files for width, but couldn't find anything immediately obvious. With =93tex.dimen[=85]=94 you get the value in scaled points but util-dim.l= ua provides some functions to convert the value in points, centimeter etc. \starttext \startluacode context.blackrule{ width =3D number.topoints(tex.dimen["textwidth"]/2) } \stopluacode \stoptext Wolfgang ___________________________________________________________________________= ________ 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.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________