[texhax] lineno and xr

Uwe Lueck uwe.lueck at web.de
Fri Feb 23 18:30:22 CET 2007

Hi Moshe, 

it's me who is the current maintainer of lineno.sty, 
so I would have been the proper addressee, 
especially when something doesn't work.  

Moshe Kamensky <samvimes at fastmail.fm> schrieb am 22.02.2007 21:03:02:
> I am trying to make lineno to work with xr: I want to refer to lines of 
> document A from document B. It appear to work, except for the pagewise 
> mode: even when I specify pagewise mode (in both documents), I get 
> global line numbers. Is it possible to make it work?

Oh my, this is a challenge. However, I have often mused 
about re-implementing references to pagewise numbers, 
and the re-implementation I have in mind should support xr. 
The current problem is that (in pagewise and switch mode) 
\linelabel writes 


to .aux files, not the actual line number on that page. 
The latter number is calculated by \getpagewiselinenumber 
-- however, this needs additional information from the 
document that issues the \linelabel. If your current document 
tries to calculate the line number, it looks for the needed 
informations in its own .aux. -- That re-implementation 
may need a few days since I am busy with other urgent things. 
> Also, a question regarding lineno alone: Can I use lineno (or some other 
> package) to refer to line numbers, without actually printing the line 
> numbers?

 After \usepackage...{lineno}, \let\LineNumber\relax should do this, 
or \renewcommand{\LineNumber}{} if you are a LaTeX purist. 

Actually I am working at a lineno package option doing this, 
the main purpose being to support moving wrapped figures 
within a paragraph in a comfortable way 
(without looking for a word after which a line break is good). 
A rudimentary version of this has worked in a project 
that just has been finished. The name of the option could be 
"invisible", or what do you think?



More information about the texhax mailing list