View Issue Details

IDProjectCategoryView StatusLast Update
0000792luatexfeature requestpublic2015-10-23 11:50
ReporterPaul Isambert Assigned ToHans Hagen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.70.1 
Fixed in Version0.82.0 
Summary0000792: Make "reader" in "open_read_file" return a line number beside the string.
DescriptionThe "reader" function returned by "open_read_file" currently has the following syntax:

  function (<table> env)
    return <string> line

It would be nice if it were:

  function (<table> env)
    return <string> line, <number> lineno

where "lineno" would be the line number assigned to that line, no matter what it is in the original file. If missing, that number would be the previous line number + 1.

I often transform \input files on the fly from e.g.




If line numbers could be assigned as:

  1. one
  2. \environment
  2. two
  3. \endenvironment
  3. three

that'd make error reporting behave as if on the original file, and SyncTeX could also getting things right.
TagsNo tags attached.


Hans Hagen

2015-10-23 11:50

manager   ~0001474

adding it to the callback is complex and asks for problems (as we don't want to make a number returned mandate)

the following is more flexible anyway:

tex.getlinenumber() -- reports the current number
tex.setlinenumber(n) -- just sets it
tex.setlinenumber(n,true) -- adds n to the current number

Issue History

Date Modified Username Field Change
2012-12-24 10:48 Paul Isambert New Issue
2015-10-23 11:48 Hans Hagen Assigned To => Hans Hagen
2015-10-23 11:48 Hans Hagen Status new => assigned
2015-10-23 11:50 Hans Hagen Note Added: 0001474
2015-10-23 11:50 Hans Hagen Status assigned => closed
2015-10-23 11:50 Hans Hagen Resolution open => fixed
2015-10-23 11:50 Hans Hagen Fixed in Version => 0.82.0