[texhax] lineno and xr

Moshe Kamensky samvimes at fastmail.fm
Sat Feb 24 09:28:04 CET 2007


Hi Uwe,

* Uwe Lueck <uwe.lueck at web.de> [23/02/07 17:39]:
> 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.  

Yes, I know, I was counting on you reading the list ;)

> 
> 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 
> 
>     \getpagewiselinenumber{<absolute_line_number>}
> 
> 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. 

That's what I saw. What I don't quite understand (because I don't know 
enough about TeX) is at which point the command in this file are read 
and expanded. Maybe it's possible to force the expansion of 
\getpagewiselinenumber before writing it to the file? that would solve 
the problem.
>  
> > 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?

From the point of view of my usage, something like 'refonly' would make 
sense (I am trying to generate a list of changes for my thesis, and I 
would like to include the line numbers where these changes occurred, but 
without adding numbers to the thesis itself.)

Anyway, for me the method you mentioned above is good enough.

Thanks,
Moshe

> 
> Cheers, 
> 
>   Uwe. 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20070224/e184a109/attachment.bin 


More information about the texhax mailing list