From: Jon Crump <jjcrump@uw.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: line numbers in margin from xml in context mkiv
Date: Tue, 26 Apr 2011 16:26:27 -0700 [thread overview]
Message-ID: <BANLkTin=yZPFsdKCa3VfpuHzuw_OEtegAQ@mail.gmail.com> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2011-04-26 23:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 23:26 Jon Crump [this message]
2011-04-27 11:28 ` Hans Hagen
[not found] ` <BANLkTintKaT5XVKbfr5hqKHCCt3u4JHL3g@mail.gmail.com>
2011-05-27 16:51 ` Jon Crump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTin=yZPFsdKCa3VfpuHzuw_OEtegAQ@mail.gmail.com' \
--to=jjcrump@uw.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).