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