texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "special" spaces in Texinfo parsing and output


From: Karl Berry
Subject: Re: "special" spaces in Texinfo parsing and output
Date: Tue, 26 Mar 2013 21:19:03 GMT

(Switching to texinfo-devel.)

    I can very easily change that to preserving.

IMHO, don't.  Better to remove trailing whitespace.

    Does this still hold for spaces that are not [\r\n\t ]?  Do they start a 
    paragraph.  For instance with texinfo code like, is it 3 paragraphs, or 2?

     AA

     ^L

     BB

    (and same question with any of the unicode space).  Should the result be
    along

     AA
     ^L
     BB

    or

     AA

     ^L

     BB

Speaking about form feed specifically ... I think the output should be
like the latter.  The blank line after AA definitely ends that
paragraph, of course.

The form feed itself should not, it seems to me, necessarily start a
paragraph.  It would be strange to output
<p>^L</p>
but I suppose if that is what is natural to implement, then ok.
(I'm not sure form feeds make sense in HTML anyway, but that's a
different question.)

Then the blank line before BB definitely ends the form-feed paragraph,
if one had been started.  Thus, we end up with (HTML for example):
<p>AA</p>
^L
<p>BB</p>

A more problematic case is if there are no blank lines in the input:

AA
^L
BB

But I think the output, with ^L specifically, should be the same.  In
other words, ^L acts like a blank input line, ending the current
paragraph.  Thus, to switch to Info output, AA and BB would receive
normal paragraph indentation.  As in:

  AA
^L
  BB

There could also be a blank line inserted after the AA.  Either way is
ok there.  (Hmm, rereading this, maybe that was exactly your question,
but, well, I guess I'll just send this and await clarification on
whether it answers anything ...)


If there is whitespace after the ^L on the input line, it should just be
ignored, just like a line consisting only of SPC and TAB and CR
characters is still "blank" and separates paragraphs.  At least I hope
it does.  It should.


Finally, if instead of a ^L character, one of the other Unicode space
characters is used, I don't think the behavior should be the same.
Instead, the Unicode spaces should either be treated like SPC, or like
regular non-space characters.  Per the other msg and my other reply,
treating them as non-space is fine with me.

    > ----------------------
    > @example
    > Whatever
    > 
    > @end example
    > 
    > Outside example.
    > ----------------------
    > 
    > There is only one blank line with both C and Perl makeinfo.  I
    > intuitively would have expected two in that particular case, though --
    > that is, for all blank lines inside @example to be preserved regardless
    > of what happens outside.  (This is how texinfo.tex behaves.)
    > 
    > Wdyt?

    I don't care either way.  Changing it should certainly not be
    complicated.  Should I?

Yes please.

Thanks,
k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]