Hello LuaTeX developers, I have a few questions I'd like to ask you. In log message, luatex engine produces slightly different error context from what pdftex does. Here is a sample code: ---------------------------------------------------------------------- Nullam eu ante vel est convallis dignissim. } Nulla posuere. \bye ---------------------------------------------------------------------- When I process this file by luatex, it results in the following error: ------ luatex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- On the other hand, pdftex results in: ------ pdftex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- The output of luatex is shifted by two characters compared with that of pdftex. (I'm using TeX Live 2021.) This discrepancy confuses preview-latex (subsystem of AUCTeX), which depends on the precise position of the log messages: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54200 I'm not sure whether this behavior is a bug or not, but is it something I can expect to be fixed? If not, is there any workaround to make the output the same as pdftex? (e.g. command line option) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine
On Thu, Mar 10, 2022 at 9:25 AM Ikumi Keita
Hello LuaTeX developers,
I have a few questions I'd like to ask you. In log message, luatex engine produces slightly different error context from what pdftex does. Here is a sample code: ---------------------------------------------------------------------- Nullam eu ante vel est convallis dignissim. } Nulla posuere. \bye ---------------------------------------------------------------------- When I process this file by luatex, it results in the following error: ------ luatex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- On the other hand, pdftex results in: ------ pdftex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- The output of luatex is shifted by two characters compared with that of pdftex. (I'm using TeX Live 2021.)
This discrepancy confuses preview-latex (subsystem of AUCTeX), which depends on the precise position of the log messages: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54200
I'm not sure whether this behavior is a bug or not, but is it something I can expect to be fixed? If not, is there any workaround to make the output the same as pdftex? (e.g. command line option)
I will check, but , in case , for sure no fix for this texlive: 1) the "write to stdout/stderr/log " apparatus is complex/complicated, it's very easy to break something; 2) pdftex and luatex are different engines, it is expected that some outputs are anf will be different. Example: %%test.tex %% replace <TEXT> with %% a very long line in japanese text, longer than 79 "chars", without newline. \wlog{% <TEXT> } \bye You can compare the log with pdftex and luatex. These are the kind of things that should be addressed at the format level, if possible, or modifying the parsing method, if possible, being open to the fact: "different engines, different output". -- luigi
Hi luigi, thanks for response.
luigi scarso
writes: I will check, but , in case , for sure no fix for this texlive:
Of course, no problem.
2) pdftex and luatex are different engines, it is expected that some outputs are anf will be different. Example: %%test.tex %% replace <TEXT> with %% a very long line in japanese text, longer than 79 "chars", without newline. \wlog{% <TEXT> } \bye You can compare the log with pdftex and luatex.
Indeed.
These are the kind of things that should be addressed at the format level, if possible, or modifying the parsing method, if possible, being open to the fact: "different engines, different output".
I think it would be diffcult to address this issue by parsing only, because the latter part of the error context, placed on the second line, sometimes begins with whitespace: ---------------------------------------------------------------------- l.6 ...ity of an initial subsequence of length \(n\) is \(2^{-n}\). For exampl... ^ This whitespace is actually the first character of the latter part. ---------------------------------------------------------------------- Can you tell whether the amount of shift varies or is fixed to 2 characters? If fixed, preview-latex can take care of it. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine
On Mon, Mar 21, 2022 at 5:12 PM Ikumi Keita
Hi Luigi,
luigi scarso
writes: I will check it this weekend. Was there any progress with respect to this issue?
I have checked it but luatex and pdftex manage the split the line in different way. For example this gives a different log Nullam eu ante vel est convallis dignissim.0123456789} Nulla posuere. \bye I will look at the xetex output closely. -- luigi
luigi scarso
writes: I have checked it but luatex and pdftex manage the split the line in different way. For example this gives a different log Nullam eu ante vel est convallis dignissim.0123456789} Nulla posuere. \bye I will look at the xetex output closely.
I see. I'll wait another week. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine
Hello LuaTeX developers,
I have a few questions I'd like to ask you. In log message, luatex engine produces slightly different error context from what pdftex does. Here is a sample code: ---------------------------------------------------------------------- Nullam eu ante vel est convallis dignissim. } Nulla posuere. \bye ---------------------------------------------------------------------- When I process this file by luatex, it results in the following error: ------ luatex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- On the other hand, pdftex results in: ------ pdftex result ------------------------------------------------- ! Too many }'s. l.1 Nullam eu ante vel est convallis dignissim. } Nulla posuere. ---------------------------------------------------------------------- The output of luatex is shifted by two characters compared with that of pdftex. (I'm using TeX Live 2021.)
This discrepancy confuses preview-latex (subsystem of AUCTeX), which depends on the precise position of the log messages: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54200
I'm not sure whether this behavior is a bug or not, but is it something I can expect to be fixed? If not, is there any workaround to make the output the same as pdftex? (e.g. command line option) Because file and token input follows a different route in luatex an dcan also be influenced by lua mix-in (which itself can result in intermediate flushing or position adjustments of log outpout) it is best to assume that it's not the same as in pdftex. To a large extent is it
On 3/10/2022 9:18 AM, Ikumi Keita wrote: the same but there are definitely differences. In this case I'd strip / ignore spaces before comparing. So here it probably more a side effect than a bug and 'fixing' this might as well introduce side effects someplace else. (there are various position states wrt logging: terminal as well as log file and they can run in sync or out of sync depending on the situation and log related parameters, as well as writing from lua or tex, combined with configuration setting ... so we have sort of a complex commprimis) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans and luigi,
Hans Hagen
writes: Because file and token input follows a different route in luatex an dcan also be influenced by lua mix-in (which itself can result in intermediate flushing or position adjustments of log outpout) it is best to assume that it's not the same as in pdftex. To a large extent is it the same but there are definitely differences. In this case I'd strip / ignore spaces before comparing. So here it probably more a side effect than a bug and 'fixing' this might as well introduce side effects someplace else.
(there are various position states wrt logging: terminal as well as log file and they can run in sync or out of sync depending on the situation and log related parameters, as well as writing from lua or tex, combined with configuration setting ... so we have sort of a complex commprimis)
Thanks for your insights. I understand the complexity involved in this issue.
luigi scarso
writes: I will check it this weekend.
Thank you, I'll wait. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine
participants (3)
-
Hans Hagen
-
Ikumi Keita
-
luigi scarso