Re: [Dev-luatex] # => ## in \directlua

2008-10-08 Thread Jonathan Sauer
Hello, > > So with \luaescapestring, the `#' is not doubled anymore, without it > > still is. Although most of the time, strings will be passed to Lua > > through \luaescapestring, this behaviour still creates problems when > > `#' is used inside Lua code (as in the commented line A above, where

Re: [Dev-luatex] # => ## in \directlua

2008-10-08 Thread Taco Hoekwater
Jonathan Sauer wrote: > > So with \luaescapestring, the `#' is not doubled anymore, without it > still is. Although most of the time, strings will be passed to Lua > through \luaescapestring, this behaviour still creates problems when > `#' is used inside Lua code (as in the commented line A abo

Re: [Dev-luatex] # => ## in \directlua

2008-10-08 Thread Jonathan Sauer
Hello, > Actually the problem was with \luaescapestring. Commit #1544 changes > the behaviour of \luaescapestring so that it no longer duplicates > characters with catcode 6. Please verify that that does what you want. Thank you very much! I tried it with the following (simpler) example: %&luat

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread Taco Hoekwater
Jonathan Sauer wrote: > Hello, > >> So `#' is transformed into `##' when passed from TeX to Lua. [...] This currently uses TeX's tokenlist print function, but I could make it behave differently, no problem (after all, this generated string is only 'seen' by the lua inter

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread Jonathan Sauer
Hello, > >> >> So `#' is transformed into `##' when passed from TeX to Lua. > >> [...] > >> This currently uses TeX's tokenlist print function, but I could > >> make it behave differently, no problem (after all, this > >> generated string is only 'seen' by the lua interpreter). > > > > In that ca

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread David Kastrup
"Jonathan Sauer" <[EMAIL PROTECTED]> writes: > Hello, > >> >> So `#' is transformed into `##' when passed from TeX to Lua. >> [...] >> This currently uses TeX's tokenlist print function, but I could >> make it behave differently, no problem (after all, this >> generated string is only 'seen' by t

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread Taco Hoekwater
David Kastrup wrote: >> >> So `#' is transformed into `##' when passed from TeX to Lua. > > No, when TeX prints. You are saying the same thing. The tokenlist that results from the that is read after the \directlua is internally converted to a string before the lua interpreter gets a look at it

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread Jonathan Sauer
Hello, > >> So `#' is transformed into `##' when passed from TeX to Lua. > [...] > This currently uses TeX's tokenlist print function, but I could > make it behave differently, no problem (after all, this > generated string is only 'seen' by the lua interpreter). In that case: Please make it so.

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread Manuel Pégourié-Gonnard
David Kastrup a écrit : >> So `#' is transformed into `##' when passed from TeX to Lua. > > No, when TeX prints. > >> Is this a bug or a feature? > > Feature. Quite an annoying one in my opinion, but there you are. > By the way, using LaTeX, the "ted" package has a command \ShowTokens which is

Re: [Dev-luatex] # => ## in \directlua

2008-10-07 Thread David Kastrup
"Jonathan Sauer" <[EMAIL PROTECTED]> writes: > take the following PlainTeX file: > > %&luatex > \def\recatcode#1{% > \directlua0{% > tex.sprint('\luaescapestring{\unexpanded{#1}}')% > texio.write_nl('\luaescapestring{\unexpanded{#1}}')% > }% > } > > \recatco

[Dev-luatex] # => ## in \directlua

2008-10-07 Thread Jonathan Sauer
Hello, take the following PlainTeX file: %&luatex \def\recatcode#1{% \directlua0{% tex.sprint('\luaescapestring{\unexpanded{#1}}')% texio.write_nl('\luaescapestring{\unexpanded{#1}}')% }% } \recatcode{% \def\test#1{`#1'}% } \bye This res