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

DM Smith dmsmith at crosswire.org
Sat Apr 13 06:01:19 MST 2013

On Apr 12, 2013, at 11:37 PM, Chris Little <chrislit at crosswire.org> wrote:

> 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.)

No problem keeping the prefix x-. Keeping it will minimize collisions and having duplicate selectors for a rule set is common in CSS.

Since this is a mapping of OSIS type and subType to HTML class, the CSS semantic should probably be used. This would have the values be separated by space. The character | is not an allowable for a CSS value.

In Him,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130413/6c91e645/attachment-0001.html>

More information about the sword-devel mailing list