From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68025 Path: news.gmane.org!not-for-mail From: Jon Crump Newsgroups: gmane.comp.tex.context Subject: line numbers in margin from xml in context mkiv Date: Tue, 26 Apr 2011 16:26:27 -0700 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1303860414 4914 80.91.229.12 (26 Apr 2011 23:26:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2011 23:26:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 27 01:26:50 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 1QErea-0003j1-UA for gctc-ntg-context-518@m.gmane.org; Wed, 27 Apr 2011 01:26:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0D4BFCAC52; Wed, 27 Apr 2011 01:26: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 WgfJ0OGVkIJR; Wed, 27 Apr 2011 01:26:45 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D714BCAC4F; Wed, 27 Apr 2011 01:26:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0BF40CAC4F for ; Wed, 27 Apr 2011 01:26:43 +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 q8fvkvbK4UYu for ; Wed, 27 Apr 2011 01:26:30 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 6C998CAC4B for ; Wed, 27 Apr 2011 01:26:30 +0200 (CEST) Original-Received: from mail-iw0-f169.google.com (mail-iw0-f169.google.com [209.85.214.169]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p3QNQR6h027420 for ; Wed, 27 Apr 2011 01:26:29 +0200 Original-Received: by iwg8 with SMTP id 8so1377602iwg.14 for ; Tue, 26 Apr 2011 16:26:27 -0700 (PDT) Original-Received: by 10.43.60.210 with SMTP id wt18mr1755365icb.25.1303860387173; Tue, 26 Apr 2011 16:26:27 -0700 (PDT) Original-Received: by 10.42.79.20 with HTTP; Tue, 26 Apr 2011 16:26:27 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.169; 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: 05EAnqs8M - c9c4f821b7a6 - 20110427 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:68025 Archived-At: All, After being away from my project for a while I returned to find that something that worked now no longer does. I updated the minimals on my Mac and context is running as I would expect: jjc% context --version mtx-context | main context file: /Users/jjc/context/tex/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2011.04.24 15:15 But now, while running my environment.tex file against my target TEI/xml file context complains: ! Undefined control sequence. l.77 \defineinmargin [lineNumbers] [normal] ? My own fragile understanding of what I'm doing may well be at fault, but perhaps something relevant has changed with the minimals? I had an environment file that I'd arrived at by much trial and error that renders page/line numbers encoded in the xml/TEI source in the margins of my pdf output: \startxmlsetups xml:pb \def\svopage{\xmlatt{#1}{n}.} \xmlflush{#1} \stopxmlsetups \startluacode function filter(lb) if math.mod(lb,5) == 0 then context.svopage() context(lb) end end \stopluacode \define[1]\MyNumber% {\ctxlua{filter(#1)}\endgraf} \startxmlsetups xml:lb \xmldoifelse{#1}{ancestor::head[@type='diarytitle']} {\\} {\lineNumbers{\tfxx\MyNumber{\xmlatt{#1}{n}}}} \xmlflush{#1} \stopxmlsetups \defineinmargin [lineNumbers] [normal] Any suggestions would be gratefully received. Jon ___________________________________________________________________________________ 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 ___________________________________________________________________________________