[sword-devel] Sword support of indents and line breaks

Chris Little chrislit at crosswire.org
Fri Apr 12 20:37:02 MST 2013

On 4/12/2013 12:12 PM, DM Smith wrote:
> Regarding paragraph formats, the <p> element does not define any.
> There is no notion of "justified", "indented", "line-spacing",
> "centering", .... that most word processors provide. These have to
> use the type/subType attribute extension. And as you noted, SWORD
> does not support these. Chris has suggested that we could allow <p
> type="x-indent"> as a way of handling this. I'd go a bit further and
> allow any type and subType x-yyy values on any element, to become a
> class attributes (without the x- ) on the resulting html element.

This sounds like a great idea.

Some things to consider:

Should we necessarily strip the x-? I don't think keeping it harms 
anything, but removing it looses the information that the type is a 
defined OSIS type. Removing the x- also introduces the possibility of 
collisions (e.g. the note types 'allusion' and 'x-allusion' would be 
mapped to the same class value), but this might be a desirable feature.

Should types & subTypes be composed or listed? E.g., if a note has type 
'variant' and subType 'MT', would the class value be:
'variant MT'
or something like
'variant|MT'. (I don't know whether | is necessarily a good character 
for making compound classes.)


More information about the sword-devel mailing list