newlines in return Lua string

From \ctxlua{tex.print(hvdm.myluacall("\xmlatt{#1}{argument}"))} Lua returns a string containing newline characters '\n'. In ConTeXt this returned string is printed as one line, the embedded newlines are not honoured. I thought to replace with \crlf in this manner: string1 .. "\\crlf" .. string2 but the returned \crlf are not executed as such. How to force \crlf's in the executed return? dr. Hans van der Meer

On Sat, 15 Jun 2019, Hans van der Meer wrote:
From \ctxlua{tex.print(hvdm.myluacall("\xmlatt{#1}{argument}"))} Lua returns a string containing newline characters '\n'.
In ConTeXt this returned string is printed as one line, the embedded newlines are not honoured. I thought to replace with \crlf in this manner: string1 .. "\\crlf" .. string2 but the returned \crlf are not executed as such.
How to force \crlf's in the executed return?
Hard to say without a minimal example, but how about: \startluacode context.startlines() context(hvdm.myluacall("\xmlatt{#1}{argument}")) context.stoplines() \stopluacode or \startlines \ctxlua{context(hvdm.myluacall("\xmlatt{#1}{argument}))} \stoplines Aditya
participants (2)
-
Aditya Mahajan
-
Hans van der Meer