View Issue Details

IDProjectCategoryView StatusLast Update
0000571luatexluatex bugpublic2015-11-09 19:14
ReporterHans Hagen Assigned ToHans Hagen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Target Version0.85.0 
Summary0000571: newlins inconsistency
DescriptionThe write_nl function forces a newline when needed and sets the internal flag that keeps track of this. One can add \n at the end of the string to make sure that following (say) messages start on newline as well, so that the write_nl content guaranteed gets its own line.

In texlua this works as expected. It also does when in luatex but only after the newlinechar has been initialized. Before that moment, i.e. before the banner is written, an \n at the end of the string results in an extra newline. So, we need to move some initialization in texlua upto before the stub lua fils is loaded.

texlua, currently, as expected:

<line>
<line>
<line>

luatex, currently:

<line>
<extra nl>
<line>
<extra nl>
<banner>
<line>
<line>
<line>

luatex, expected:

<line>
<line>
<banner>
<line>
<line>
<line>
TagsNo tags attached.

Activities

Hans Hagen

2011-02-08 09:45

manager   ~0000734

actually, it's different (some of the pre banner code came from elsewhere, but it's tricky to see where the boundary lays):

write_nl("string\n")

texlua:

<line> <extra line> <line> <extra line> <line>

luatex

<line> <line> <line>

so it's a difference between texlua and luatex which shows up when shared code is used; so, the question is if we need a way to control texlua to behave like luatex in this respect

here is a testcase

texio.write_nl("oeps\n")
texio.write_nl("oeps\n")

in texlua we get

oeps

oeps

and in luatex

oeps
oeps

The difference is probably a side effect of luatex tracking newlines and texlua not.

Somewhat tricky this.

Hans Hagen

2015-11-09 19:14

manager   ~0001530

probaly already solved as i can't reproduce it

Issue History

Date Modified Username Field Change
2011-02-08 09:23 Hans Hagen New Issue
2011-02-08 09:23 Hans Hagen Status new => assigned
2011-02-08 09:23 Hans Hagen Assigned To => Taco
2011-02-08 09:45 Hans Hagen Note Added: 0000734
2011-04-12 11:09 Taco Target Version 0.70.0 => 0.80.0
2014-03-30 11:56 Hans Hagen Assigned To Taco => Hans Hagen
2015-10-25 11:44 Hans Hagen Target Version 0.80.0 => 0.85.0
2015-11-09 19:14 Hans Hagen Note Added: 0001530
2015-11-09 19:14 Hans Hagen Status assigned => closed
2015-11-09 19:14 Hans Hagen Resolution open => no change required