last day (16 days later) » 

8:45 PM
0
Q: \edlineref produces wrong visual cross-reference when label set by \doinsidelinehook

K.G. FeuerhermI need to produce unique labels for each line of a text edition because I cite many many lines at random in my treatment. Also, I hyperlink the cross-references for ease of use by the reader. In the MWE below, I have used the \doinsidelinehook feature to generate unique labels automatically once...

 
The main problem is that \doinsidelinehook is down when the line number have been fixed for the typesetting, but not for cross-referencing. I try to find a way for your problem.
An other problem is that the time \doinsidelinehook is called is not the same as the main content of \pstart...\pend. So the value of the automatic label will be wrong.
In any case, I can't undertand how you could use your automtica labnel, as line breaking can change when you edit your texts / your geometry setting.
 
Hi and thanks. Actually, in my particular case, my lines are guaranteed not to change: every one of them is shorter (by force) than a full line, so once I've set them up they will never change. An alternative solution would be if I could write the actual line numbers out to an auxiliary file, then I could write a script to retrieve them from there and write the labels in a separate pass of my own, with another script. More work, but acceptable.
 
but if the line are determined, why do you need cross-ref? You could use fixed value.
 
I just added another example. The issue is that I want to do something like \linkto{<text no.>}{<line no.>} to an arbitrary place. If I have to create each label by hand (L2:3x for example) it is a long process and very error prone (every text restarts the numbering but some texts have continuous lines, some restart by section, some have annotations). Somehow I want to grab the numbers generated by reledmac (and the annotations when there are any). (I can send a live PDF by PM if it helps.)
@Maïeul Actually there may be a (safer?) solution outside the package.... just because of the structure of the text editions in this case. Checking this now.
En effet, j'ai trouvé une solution qui marche dans mon cas. Donc, j'ai écrit un script en gawk qui parcourt mes éditions et fait le calcul des numéros de marge, prenant soin de faire attention aux \setline, \advanceline, \skipnumbering, et \linenumannotation ainsi que la manière de numéroter pour chaque texte. C'est un peu risqué puisque cela dépend d'avoir été tout-à-fait conséquent dans ma manière de coder, et en plus on ne veut pas vraiment répliquer le calcul.... Mais... cela me dépanne.
Ce serait quand même peut-être util d'avoir un méchanisme par lequel un usager peu répérer le numero de ligne final, mais... ça fait du travaille pour vous. Peut-être serait-ce un 'feature request' pour le futur?
 

  last day (16 days later) »