[Top][All Lists]

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

Re: "special" spaces in Texinfo parsing and output

From: Dumas Patrice
Subject: Re: "special" spaces in Texinfo parsing and output
Date: Mon, 12 Aug 2013 10:52:14 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Sun, Aug 11, 2013 at 05:47:35PM +0000, Karl Berry wrote:
>     * in Docbook remove all the ^L as they are not allowed in XML.
>     ...
>     * in XML keep it everywhere.  In attribute escape \ as \\, ^L as \f and
>       end of line as \n.
> If they're not allowed in any XML, then why can we have them at all in
> our TexinfoXML output?

Because we don't really have form feeds.  In attribute, they are escaped
as \f, in the text they appear as &formfeed; which is itself
<formfeed/>.  We can do that because we control the format and DTD of
Texinfo XML, but we cannot do that for DocBook, or any other XML format.

> Anyway, as you saw from the commit, below is what I added to the manual.
> Is it ok?

I have a reservation on Info which I cut and paste from my answer on the
commit below.

> @item Info
> Output as-is, as part of the normal text stream.

This is not exactly true.  Indeed, the form feeds that end up being
considered as part of normal text (not special spaces, not between
paragraphs) may not be kept.  They are indeed considered as regular
spaces in this context, therefore are kept as are regular spaces, which
mostly means that if they are the first space or the second after a
punctuation they are kept, otherwise they are not kept.

For example, in the following, in @emph ^L are regular text:

  Something @emph{text^L other text ^L and punct. ^L A new sentence}.

Therefore, the first and third ^L are kept, but not the second one.

It may be that the code needs to be modified such that ^L are considered
differently, for instance they may be considered like non-breaking
spaces.  Or maybe the documentation should take into account that
sometime ^L may be treated as regular spaces.


reply via email to

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