bug-texinfo
[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: Eli Zaretskii
Subject: Re: "special" spaces in Texinfo parsing and output
Date: Sat, 23 Mar 2013 15:12:22 +0200

> Date: Sat, 23 Mar 2013 14:06:56 +0100
> From: Patrice Dumas <address@hidden>
> 
> [...] in Plaintext/Info
> spaces are removed as part of paragraph/lines formatting, also lines
> consisting only of spaces are emptied in @example and the like and lines
> consisting only of spaces between paragraphs are completly removed.

I think @example should have all whitespace retained as in the
original Texinfo.  Isn't that what C makeinfo did?  @example is not
filled, so any whitespace there should be output verbatim, I think.

> Now, what is in \s?  It turns out that it is not that simple.  It is
> explained in
> http://perldoc.perl.org/perlrecharclass.html#Backslash-sequences
> in the 'Whitespace' part.  The smallest set is [\t\n\f\r ], which
> includes the '^L' character (\f).  But depending on the setting, there
> may be additional characters, like '0x2000 EN QUAD'.  I have tested that
> all those appears in html output, but none in Info (except for LINE
> TABULATION) with @documentencoding utf-8.  I attach the file.
> 
> So, this means that all those spaces except for LINE TABULATION have
> their special meaning not kept.  I think that what should be nice would
> be to have both something sensible and consistent with TeX/LaTeX, having
> something sensible coming first.  It seems that that the makeinfo in C
> considered explicitly spaces to be something along [\r\n\t ].
> 
> So, what should be done?  Do something different for parsing or is
> it ok to have all the space like characters be considered as spaces?
> And for the output?  Break words only at [\r\n\t ]?  Keep the first 
> space character only if it is not [\r\n]?

I think this should be user-configurable, with the default being
[\r\n\t ], as in C makeinfo.  I'm not sure what you are asking about
parsing; I answered only the "which characters should be treated as
spaces while filling paragraphs" part.



reply via email to

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