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

John Austin gpl.programs.info at gmail.com
Fri Apr 12 21:42:51 MST 2013



On 04/13/2013 09:24 AM, Chris Little wrote:
> On 4/12/2013 11:18 AM, John Austin wrote:
>>
>>
>> On 04/12/2013 07:45 PM, Chris Little wrote:
>
>
>>>> I've worked with many, many SFM texts, and they often do not follow SFM
>>>> rules or play nice in a variety of ways. All of this greatly
>>>> complicates
>>>> an already serious conversion from SFM to Sword. The proof may in the
>>>> the pudding. Simple is sometimes better in the real world. Sure, IBT
>>>> could recreate their modules using container elements, but that still
>>>> would not provide the reliability or control enjoyed by the existing
>>>> modules. I still don't see (beyond theory and arguable semantics) a
>>>> good
>>>> reason to deny "customers" a sound and working solution.
>>>
>>> As a rule, we don't do things incorrectly when we know that they are
>>> wrong beforehand. Indent milestones are arbitrary, ad hoc, bad
>>> engineering practice, and bad markup practice. Generating  s as
>>> pretend paragraph indentation is bad (X)HTML and completely inflexible.
>>> (What happens when a content provider wants a half indent? A hanging
>>> indent?) The proposal is a big kludge. We should instead implement the
>>> correct method of generating indented and other paragraph types.
>> They work perfectly well. They validate against the OSIS schema. They
>> are good engineering practice because they solve a difficult problem
>> without negative effects of any kind. We can argue about bad markup etc.
>> but some grace should be given to an approach that is proven and
>> perfectly valid, which already exists in practice, and which has solved
>> a nagging real life problem.
>
> They don't work perfectly well.
>
> In terms of representation, the milestones represent something that
> isn't there and should instead be a property of something that actually
> is there.
>
> In terms of the formatted output (the (X)HTML), you're emitting
> something extremely bad. You want indentation, which is a formatting
> matter. To achieve your intended formatting you are corrupting the
> character data stream by inserting NBSPs to cause a side effect:
> horizontal spacing. If you want to change horizontal position, you
> should do so through one of the established methods, not as a side
> effect of inserting characters that have different semantics.
>
> Consider this: When you copy & paste text from a front end or webpage,
> should the indentation be copied as a bunch of NBSPs? Hopefully you
> agree it should not. The NBSPs are noise that has been inserted into the
> character stream. (If you try this on the PDF you linked and the
> rendering by phpsword, you can see that they behave differently when you
> copy text and paste it into a word processor or text editor. That's
> because the PDF does formatting correctly using PDF layout methods, but
> phpsword relies on a side effect.)

The issue is not how the indent is implemented by the engine. It is the 
acceptance of these translator dictated elements as valid milestone 
content in the OSIS file, and Sword recognizing and implementing these 
indents as indents.

>
>
>> Actually, the line I copied above is the whole "paragraph"- it is not a
>> multi-line anything. See
>> http://ibt.org.ru/en/text.htm?m=UZVL&l=Ruth.1.15&g=0 for the real
>> location of this example. These two words are not a paragraph in
>> anyone's book, and to call this a paragraph, as you insist that I must
>> do to use Sword, is in my book: "arbitrary, ad hoc, bad engineering
>> practice, and bad markup practice", and just wrong. Let publishers
>> decide what it is and what it will look like- users of Sword will all be
>> glad!
>
> Abstractly, it's multi-line. Some (most?) of these paragraphs are
> multi-line. Even your two word example would be multi-line with a
> sufficiently narrow column. These paragraphs break in exactly the same
> way as other paragraphs.
>
> I still can't see the argument for these not being paragraphs. I would
> accept that they could be a different type of paragraph from the type
> that starts at the start of a sentence, but they are clearly paragraphs.
> Paragraphs with hanging indents are markedly more different than these,
> but they're still paragraphs.

I still can't see the argument for requiring that everyone call these 
questionable instances paragraphs, and require that they must always be 
marked up as such. Why not give the publisher the option of calling it a 
paragraph if they consider it a paragraph, or else calling it an indent 
if they think it will be more correctly understood as an indent? For 
instance, many people consider that a paragraph should be followed by a 
blank line (between paragraphs). What if I desire that this indented 
line in my translation should never have a blank line after it, and that 
it is an actual indent which is the content I intend to add- in order to 
make my text more understandable? Then I should be able to call it an 
indent. I would be very correct in doing so. Future readers of my OSIS 
file would also unambiguously understand my intentions as well.


>
> --Chris
>
>
>
> _______________________________________________
> 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