This is probably close to the last xslt issue in MT. I've noticed that when there's a long note in the margin, the line numbers (which we've set to appear on the right hand side of the page in Missionary Travels) sometimes get messed up.
Most of the time, the line number gets pushed to the right. This only seems to happen if the marginal note is of multiple lines.
A related issue is that the line numbers seem to be including each line of the marginal note in their total count. That doesn't particularly bother me but on one occasion the result is that the line numbers end up in the wrong order and on another occasion two line numbers appear directly beside each other (liv_000100_0230 and liv_000099_0059).
I've spotted about a dozen messed up line numbers in vols 1 and 2 (which are now integrated), which I'll list below. You can look at these in the integrated xml files (Integrated_liv_000099_0001-00381_TEI and Integrated_liv_000100_0001-0476_TEI). The user would have to have to be paying close attention to catch some of these, but if fixable it would be great
liv_000099_0059 – Line number 10 and 15 appear alongside each other. There is a long note in the margin that is throwing these off.
liv_000099_0162 – Line no 35 has been pushed out to the right, presumably because of the long note in the margin.
liv_000099_0344 – Line no 40 is being pushed out to the right, because of the long note in the margin.
liv_000099_0355 – Line no 40 is being pushed to the right as a result of the marginal note
liv_000099_0364 – Line no 5 is being pushed out as a result of the marginal addition.
liv_000099_0369 – Line no 25 is being pushed out by the marginal addition
liv_000100_0019 – Line no 5 is being pushed out by the marginal addition
liv_000100_0101 – Line no 20 is being pushed out by the marginal addition
liv_000100_0217 – Line no 15 is being pushed out by the marginal addition
liv_000100_0230 – Line no 15 is being pushed out by the marginal addition and the numbers 15 and 20 are in the wrong order
liv_000100_0235 – Line no 5 is being pushed out by the marginal addition
p.s. If this proves tricky, I'm not against cutting the line numbers. They kind of box the transcription in a way that I like, but the Livingstone Online viewer provides that sort of effect anyway.
I've come up with a kind of odd solution that appears to do the trick. See what you think. Basically, it excludes counting <lb/>s that are in an <add place="marginleft">. So it appears to count only new lines of text, not anything added in the left margin at least.
What this also means is that the numbering, although correct in these parameters, will look like it's not counting lots of lines. Take a look at the instances you cite for liv_000099 above and you'll see what I mean. Also see screen shot:
Another solutions is to show all line numbers. Then you can see that certain additions, no matter how many linebreaks they have, are all being counted as part of the same line. So if something is added to line 10, then the addition will each show line 10 in the margin. The issue is that sometimes you put an addition on its own line, see for instance the one on liv_000099_0355 that begins "Dasy peltus." Also see screen shot:
With the coding as it is now, there are some instances where the same number shows up for multiple lines, but that's correct as the edition might break over several lines, but it's being added into one line of the manuscript. See screen shot for an example.
I think having only certain line numbers repeated might look a bit odd. Having inspected it a little, it seems that multi-line additions will get the repeated line numbers if they begin on a multiple of 5 (i.e. on one of the numbers that currently appear).
This makes me think that turning them on for every line, as you show above, might be better. Repeated line numbers would make a lot more sense to the user if they could see that every multi-line addition was being considered part of one line. It also gives a pretty nice granularity. Could you turn it on for me so I can have a look at it?
p.s. you're absolutely right that the addition you flag up shouldn't be on its own line. Hopefully there won't be too many examples of this, since I've tried to be consistent across the m.s. Thanks for drawing it to my attention.
I've also come up with three options for you for displaying line numbers for marginal comments. Here's a summary, but also see screen shots. It all has to do with changing one line in the XSL. We can do whichever one you like. Right now 1 is implemented.
ALL MARGINAL LINES SEPARATE AND COUNTED
Option 1: Marginal addition in text counted as separate lines
Marginal additions in margin counted but not displayed
<xsl:number level="any" from="pb"/>
HYBRID
Options 2: Marginal addition in text counted as separate lines
Marginal additions in margin not counted (because treated as part of one in-text line)
<xsl:number level="any" from="pb" count="lb[not(ancestor::add[@place='marginleft'])]|lb[not(ancestor::add[@place='marginleft']/note)]"/>
ALL MARGINAL LINES TREATED AS ONE LINE
Option 3: Marginal additions in text counted as one line
Marginal additions in margin not counted (because treated as part of one in-text line)
<xsl:number level="any" from="pb" count="lb[not(ancestor::add[@place='marginleft'])]"/>
Thanks again for all these variations. I've gone for option 2, which counts marginal additions in the body of the text but which doesn't count marginal additions floating in the margins. I think it's the tidiest looking system – and I think it would be the clearest for users. I'm very happy with this, so thank you!
For now, I've kept line numbers appearing on every line. But I'm happy to go with every 5 lines if you'd prefer it had more consistency with the rest of Livingstone Online.
Hi Adrian,
This is probably close to the last xslt issue in MT. I've noticed that when there's a long note in the margin, the line numbers (which we've set to appear on the right hand side of the page in Missionary Travels) sometimes get messed up.
Most of the time, the line number gets pushed to the right. This only seems to happen if the marginal note is of multiple lines.
A related issue is that the line numbers seem to be including each line of the marginal note in their total count. That doesn't particularly bother me but on one occasion the result is that the line numbers end up in the wrong order and on another occasion two line numbers appear directly beside each other (liv_000100_0230 and liv_000099_0059).
I've spotted about a dozen messed up line numbers in vols 1 and 2 (which are now integrated), which I'll list below. You can look at these in the integrated xml files (Integrated_liv_000099_0001-00381_TEI and Integrated_liv_000100_0001-0476_TEI). The user would have to have to be paying close attention to catch some of these, but if fixable it would be great
liv_000099_0059 – Line number 10 and 15 appear alongside each other. There is a long note in the margin that is throwing these off.
liv_000099_0162 – Line no 35 has been pushed out to the right, presumably because of the long note in the margin.
liv_000099_0344 – Line no 40 is being pushed out to the right, because of the long note in the margin.
liv_000099_0355 – Line no 40 is being pushed to the right as a result of the marginal note
liv_000099_0364 – Line no 5 is being pushed out as a result of the marginal addition.
liv_000099_0369 – Line no 25 is being pushed out by the marginal addition
liv_000100_0019 – Line no 5 is being pushed out by the marginal addition
liv_000100_0101 – Line no 20 is being pushed out by the marginal addition
liv_000100_0217 – Line no 15 is being pushed out by the marginal addition
liv_000100_0230 – Line no 15 is being pushed out by the marginal addition and the numbers 15 and 20 are in the wrong order
liv_000100_0235 – Line no 5 is being pushed out by the marginal addition
p.s. If this proves tricky, I'm not against cutting the line numbers. They kind of box the transcription in a way that I like, but the Livingstone Online viewer provides that sort of effect anyway.
I've come up with a kind of odd solution that appears to do the trick. See what you think. Basically, it excludes counting
<lb/>
s that are in an<add place="marginleft">
. So it appears to count only new lines of text, not anything added in the left margin at least.What this also means is that the numbering, although correct in these parameters, will look like it's not counting lots of lines. Take a look at the instances you cite for liv_000099 above and you'll see what I mean. Also see screen shot:
Another solutions is to show all line numbers. Then you can see that certain additions, no matter how many linebreaks they have, are all being counted as part of the same line. So if something is added to line 10, then the addition will each show line 10 in the margin. The issue is that sometimes you put an addition on its own line, see for instance the one on liv_000099_0355 that begins "Dasy peltus." Also see screen shot:
With the coding as it is now, there are some instances where the same number shows up for multiple lines, but that's correct as the edition might break over several lines, but it's being added into one line of the manuscript. See screen shot for an example.
This is great progress. Thanks Adrian!
I think having only certain line numbers repeated might look a bit odd. Having inspected it a little, it seems that multi-line additions will get the repeated line numbers if they begin on a multiple of 5 (i.e. on one of the numbers that currently appear).
This makes me think that turning them on for every line, as you show above, might be better. Repeated line numbers would make a lot more sense to the user if they could see that every multi-line addition was being considered part of one line. It also gives a pretty nice granularity. Could you turn it on for me so I can have a look at it?
p.s. you're absolutely right that the addition you flag up shouldn't be on its own line. Hopefully there won't be too many examples of this, since I've tried to be consistent across the m.s. Thanks for drawing it to my attention.
To show every line number, see screen shot.
Hi Adrian. Great, I'll try them out with every line to see what it looks like.
Thanks for the alternate solution, which sounds good. Have you committed this to github though, because it's not showing up for me when I sync?
I spoke too soon. It's now showed up. Thanks!
I've also come up with three options for you for displaying line numbers for marginal comments. Here's a summary, but also see screen shots. It all has to do with changing one line in the XSL. We can do whichever one you like. Right now 1 is implemented.
ALL MARGINAL LINES SEPARATE AND COUNTED Option 1: Marginal addition in text counted as separate lines Marginal additions in margin counted but not displayed
<xsl:number level="any" from="pb"/>
HYBRID Options 2: Marginal addition in text counted as separate lines Marginal additions in margin not counted (because treated as part of one in-text line)
<xsl:number level="any" from="pb" count="lb[not(ancestor::add[@place='marginleft'])]|lb[not(ancestor::add[@place='marginleft']/note)]"/>
ALL MARGINAL LINES TREATED AS ONE LINE Option 3: Marginal additions in text counted as one line Marginal additions in margin not counted (because treated as part of one in-text line)
<xsl:number level="any" from="pb" count="lb[not(ancestor::add[@place='marginleft'])]"/>
Wow, thanks for your amazing work on this. These options are fabulous. I'll study them and will get back to you!
Sure. And of course we can show every five line numbers of every single one.
Thanks again for all these variations. I've gone for option 2, which counts marginal additions in the body of the text but which doesn't count marginal additions floating in the margins. I think it's the tidiest looking system – and I think it would be the clearest for users. I'm very happy with this, so thank you!
For now, I've kept line numbers appearing on every line. But I'm happy to go with every 5 lines if you'd prefer it had more consistency with the rest of Livingstone Online.