[sword-devel] Vertical whitespace

Nic Carter niccarter at mac.com
Fri Feb 1 03:32:38 MST 2013

Is this caused by improperly formed modules that have fun with <l> poetry & <lb> ?
[I think I have already emailed through what I do after the filter gives me it's result in order to try to reduce the vertical whitespace!]

And while I'm on the topic of poetry, in Proverbs you often see couplets (altho are they termed that in the Bible?) where in a printed Bible the 2nd line is indented. Would we be able to do that to some degree? I don't know the OSIS tags that refer to this, but if someone were able to point me in the right direction, I may even be able to hack this together myself? I am looking around line 360 of osishtmlhref.cpp........

On 20/01/2013, at 8:12 AM, DM Smith <dmsmith at crosswire.org> wrote:

> I've noticed that OSIS modules sometimes render with a lot of vertical whitespace (blank lines).
> I'd like for this to be sorted as part of the next release. I don't think it'd be too hard. I've been in the osishtmlhref filter to see if I could figure it out, but it is beyond me.
> So this is a suggestion for others.
> Using the HTML notion of block and inline elements, I think we can classify OSIS elements as block or inline. Off the top of my head, <div>, <chapter>, <p>, <lb/>, <lg>, <l>, <title>, <table> and <row> are the block elements.
> The key feature of a block element is that block elements that follow each other stack one on top of each other.
> Some block elements allow nesting, such as <div>.
> In HTML, an empty <div> occupies no vertical space. A nested div does not cause additional vertical space.
> In HTML, a <p> has semantics as to whether it is preceded or followed by whitespace. A <p> at the beginning of a document is not preceded by a blank line. Nor is a </p> at the end of a document. This is also true after a heading element.
> I think that the SWORD renderers always cause a <div> to occupy vertical whitespace.
> The other issue with <div> is that we now have a "pre-verse" div, which is a great way of marking off what stands before a verse, but this <div> really shouldn't have any <div> semantic. It probably would have been better if we used <milestone> instead.
> I seem to remember that there is a "swollow" flag for whitespace (I think it might be for horizontal whitespace.) I think something like this could be used for vertical whitespace.
> The other part to this is when a chapter is shown verse-per-line. If because of rendering the pre-verse content the verse already starts on a new line, I don't think more vertical whitespace should be produced.
> Together in His Service,
> 	DM
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list