Hello, I encountered a weird error. The following code prints correctly to the console: ---- \starttext \startluacode print("\n@T") \stopluacode Abc \stoptext ---- Gives correct: " ... fonts > virtual math > unable to resolve name mapsfromchar fonts > fallback modern rm 12pt is loaded @T backend > xmp > using file 'c:/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml' ... " But the following code fails (?!): ---- \starttext \startluacode print("\nT") \stopluacode Abc \stoptext ---- With: " ... fonts > fallback modern rm 12pt is loaded ! Undefined control sequence. system > tex > error on line 4 in file D:/Lukas/ConTeXt/Test/Env3/Test.mkiv: Undefined control sequence ... 1 \starttext 2 \startluacode 3 print("\nT") 4 >> \stopluacode 5 6 Abc 7 \stoptext 8 print("\nT ") \luat_start_lua_code_indeed ...tlua \zerocount {#1 }} l.4 \stopluacode ... " Any explanation? TIA. Best regards, Lukas
On Sat, 03 Nov 2012 08:47:33 +0100, Peter Münster
On Fri, Nov 02 2012, Procházka Lukáš wrote:
print("\nT")
print("\n" .. "T")
Any explanation?
\nT is an unknown command.
Thanks for your advice, I learned some more also at http://wiki.contextgarden.net/Programming_in_LuaTeX. Best regards, Lukas
On Fri, Nov 2, 2012 at 10:12 PM, Procházka Lukáš
Hello,
I encountered a weird error.
The following code prints correctly to the console:
---- \starttext \startluacode print("\n@T") \stopluacode
Abc \stoptext ----
Gives correct:
" ... fonts > virtual math > unable to resolve name mapsfromchar fonts > fallback modern rm 12pt is loaded
@T backend > xmp > using file 'c:/ConTeXt/tex/texmf-context/** tex/context/base/lpdf-pdx.xml' ... "
But the following code fails (?!):
---- \starttext \startluacode print("\nT") \stopluacode
Abc \stoptext ----
With:
" ... fonts > fallback modern rm 12pt is loaded ! Undefined control sequence.
system > tex > error on line 4 in file D:/Lukas/ConTeXt/Test/Env3/ **Test.mkiv: Undefined control sequence ...
1 \starttext 2 \startluacode 3 print("\nT") 4 >> \stopluacode 5 6 Abc 7 \stoptext 8
print("\nT ") \luat_start_lua_code_indeed ...tlua \zerocount {#1 }} l.4 \stopluacode ... "
Any explanation?
It's about catcode. You can the difference with \loggingall \startluacode context("\n@T") \stopluacode \stoptext and \loggingall \startluacode context("\nT") \stopluacode \stoptext -- luigi
participants (3)
-
luigi scarso
-
Peter Münster
-
Procházka Lukáš