Hello, Did you take a look at the thread "How to Determine the Current File Name and Line Number in the ConTeXt Source?" from yesterday? On Wed, Jul 1, 2009 at 20:18, ivo welch wrote:
Current File Name There's \jobname, but if you read from other files this won't help you.
Line Number I don't know of any way, but TeX sometimes complains on errors and outputs the line number along. I could imagine an ugly hack: to trigger an artificial error, read the line number, ignore that number and continue ... but I don't know if that's doable. Another ugly hack would be "talking to synctex". SyncTeX definitely knows the current line number and file name, but I don't know if there's a way to fetch those variables back to TeX. In any case it's probably something that's equally difficult in ConTeXt than in plain TeX.
On the other hand, in LuaTeX there might exist elegant solutions.
AND PAGE NUMBER in the ConTeXt Source?
What do you mean by "page number in ConTeXt source"?
is there also a way to determine the current output page number on which typesetting is currently being made?
See Hans' response.
(I know this is a difficult problem in LaTeX, and I presume the same is the case for ConTeXt, because it uses the same underlying TeX engine.)
... but LuaTeX simplifies matters a lot. In LuaTeX that should be doable. Mojca