# [luatex] Command to write directly from Lua to the aux file?

David Carlisle d.p.carlisle at gmail.com
Fri Feb 7 12:46:30 CET 2020

On Fri, 7 Feb 2020 at 11:45, luigi scarso <luigi.scarso at gmail.com> wrote:

>
>
> On Fri, Feb 7, 2020 at 12:36 PM David Carlisle <d.p.carlisle at gmail.com>
> wrote:
>
>>
>> Marcel points out that you can use the integer as used for TeX's \write,
>> as the first argument of texio.write (which is a nice feature) Could the
>> manual be updated to mention this, currently it only documents the first
>> argument being a string such as "log"
>>
>> David
>>
>>
> ok, I will check ( it should be   something inside do_texio_print )
> Do you have a mwe (for the records)  ?
>

yes this works, producing

aaa
Lua
bbb

but the manual says the argument 4 should be the strings "log" or "term"

\immediate\openout4=\jobname.txt

\immediate\write4{aaa}

\directlua{
texio.write(4,"Lua\string\n")
}

\immediate\write4{bbb}

\immediate\closeout4

\bye

> --
> luigi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20200207/5799f5f5/attachment.html>