Taco Hoekwater wrote:
Tad Ashlock wrote:
Looks like we're always getting the xstrdup() branch of the conditional.
Probably because you are not reading from a file at that level,
but from a token list. Do you want filename to be a file even
if the current input is not directly from a file at
Tad Ashlock wrote:
Now you say that ConTeXt may not be reading from a file at that level.
That I can accept (being a non-expert), but status.linenumber always
returns the correct line number for the ConTeXt file being processed
(even if the file is being \input from another file). It
Tad Ashlock wrote:
Looks like we're always getting the xstrdup() branch of the conditional.
Probably because you are not reading from a file at that level,
but from a token list. Do you want filename to be a file even
if the current input is not directly from a file at all
(doable, but less
Hans Hagen wrote:
Tad Ashlock wrote:
Is there a convenient way within a Lua block to determine the current
file name and line number of the source file being processed by
ConTeXt?
[snip]
i have no time now to figure out while filenames are not known but
here's a (wikifyable) hack:
Tad Ashlock wrote:
Hans Hagen wrote:
Tad Ashlock wrote:
Is there a convenient way within a Lua block to determine the current
file name and line number of the source file being processed by
ConTeXt?
[snip]
i have no time now to figure out while filenames are not known but
here's
Is there a convenient way within a Lua block to determine the current
file name and line number of the source file being processed by ConTeXt?
For example: (test.tex)
-
\def\ShowLineNumber{%
\ctxlua{print('current line number:', tex.current_line_number())
Tad Ashlock wrote:
Is there a convenient way within a Lua block to determine the current
file name and line number of the source file being processed by ConTeXt?
For example: (test.tex)
-
\def\ShowLineNumber{%
\ctxlua{print('current line number:',