(This is a Stylesheets ticket)
Instead of rendering lines as <br>
s, I'd like to use something like <span class="line">...</span>
.
I have a couple of scenarios where this may be very useful. As we all know, the decision was taken early on to handle lines in an edition using <lb/>
and I continue to think that is a correct decision. However, for display purposes, it may be desirable to encapsulate lines so that CSS can be used to format them. Consider https://papyri.info/ddbdp/p.heid;11;459 for example. I am currently using weird an slightly evil Javascript to pad out lines of Arabic so that they are right-aligned in the edition. It would be much easier and probably better if each line was wrapped in an HTML span so that I could just right align the Arabic ones and left align the Greek.
Handling Inset and outset lines are another area where this might be very useful. Another is allowing a hanging indent for long lines that wrap, which would make some texts much easier to read.
I can (and probably will) do this in the Papyri.info Stylesheets if no one here thinks it's a good idea, but wanted to ask your opinion on whether it seems sensible to do for the core XSLTs. There are overlap issues, but I suspect it could be done in post-processing since most, if not all, of those get resolved during conversion to HTML.
I think (but we should check) that there are all sorts of still overlapping elements in the HTML output of some EpiDoc projects that would be broken by this code.
Would it be possible to parameterise this so that it only (for example) adds
<span>
to ddbdp Leiden-style (and anyone else who opts-in), while leaving line unwrapped by default?I think it probably shouldn't be a default, but an option, though not necessarily pegged to DDbDP style. I've been looking through our stuff and actually most of the line-spanning markup (apparatus, reg/orig, sic/corr, etc.) ends up coming out as strings.
Like I said though, if is seems like an option people don't want in the core XSLTs, I'll just do it in papyri.info's.
I'd try to avoid forking Papyri.info from EpiDoc again if we can—we only just got several years worth of code submissions synced!—and this clearly is something that might be useful to others.
And yes, perhaps a different parameter than Leiden-style might be more sensible.
This is principally with the goal of making lines CSS-addressable, right? (Although in principle it might also make them URI addressable…)
@hcayless: (1) did you implement this for Papyri.info already?
(2) Is this redundant with ticket [FR 165]?
(3) Either way, please can we implement this in the EpiDoc Stylesheets with a
test="$parm-leiden-style='ddbdp'"
for the time being, so people can add their own projects if they want to implement this in the future?