ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* line numbers in margin from xml in context mkiv
@ 2011-04-26 23:26 Jon Crump
  2011-04-27 11:28 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Crump @ 2011-04-26 23:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-27 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 23:26 line numbers in margin from xml in context mkiv Jon Crump
2011-04-27 11:28 ` Hans Hagen
     [not found]   ` <BANLkTintKaT5XVKbfr5hqKHCCt3u4JHL3g@mail.gmail.com>
2011-05-27 16:51     ` Jon Crump

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).