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

luigi scarso luigi.scarso at gmail.com
Fri Feb 7 12:55:46 CET 2020


On Fri, Feb 7, 2020 at 12:47 PM David Carlisle <d.p.carlisle at gmail.com>
wrote:

>
>
> 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
>
>
>
ok.
The code says
 if (selector != term_and_log && selector != log_only && selector !=
term_only) {
        if (! valid_write_file(selector)) {
            normalize_selector();   /* sets selector */
        }
    }

so yes, it seems that integer as said are ok.

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


More information about the luatex mailing list.