bug-texinfo
[Top][All Lists]
Advanced

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

Re: @part command and docbook


From: Dumas Patrice
Subject: Re: @part command and docbook
Date: Mon, 5 May 2014 17:33:51 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Sat, Apr 26, 2014 at 11:15:45PM +0300, Aharon Robbins wrote:
> Hi Patrice.
> 
> Me:
> > > Right now if I use @docbook, I'm getting:
> > > 
> > >   <part>
> > >   introductory blah blah here
> > > 
> > >   </section>      <-------- these are from what came before the part
> > >   </preface>
> > > 
> > >   <chapter> ... 
> > >   </part>
> 
> Patrice:
> > That looks like a bug, the DocBook produced does not even seem to be
> > valid?  I am missing something?
> 
> So, I misspoke. I get the above if I manually insert the docbook.  But,
> if I use @part, makeinfo does produce mostly correct docbook.
> 
> There is one issue, which is the lack of <partintro> tags. I had to
> manually insert them around all the text between the @part and the
> first @chapter.  If makeinfo would insert them for me, I would be set.
> 
> So, we might be able to have a happy ending after all. :-)

Indeed, it even seems mandatory to product valid DocBook to have the
text before the chapter be in <partintro>.  It may not be that easy to
avoid producing empty <partintro>, but aside from that it could be doable
as the @part indeed has the text associated in the internal texi2any
tree.

But I still have a reservation, as it seems to me that the Texinfo would
be invalid.  Indeed, in the Texinfo manual, there is

   Because parts are not associated with nodes, no general text can
 follow the '@part' line.  To produce the intended output, it must be
 followed by a chapter-level command (including its node).

makeinfo/texi2any has no trouble parsing and even processing the Texinfo
output.  HTML output is good, but Info output is rather ugly because the 
part text is associated to the previous node, so appears after the
previous node menu.  And it makes complete sense because it is before
the @node.

Texi2dvi adds a full page for the text after @part, it is acceptable, I
think.


It is possible to produce better Info by using a construct like

 @node node before part
 @path the part

 In the part text

 @chapter Some chapter

but it is still invalid and even leads to a warning stating that part
cannot be associated to nodes.



Here is what I propose:
* in any case, add <partintro> in DocBook output
* decide whether
  - we revisit the "no text after @part" rule and decide something 
    for Info.  I think that the best would be simply ignore text
    between @part and the next @node/@chapter instead of putting it
    as part of the previous node.  This means that the trick I proposed
    above with the warning would not work as expected anymore.
  - we do not change anything for the other formats

Karl and others, opinions?

-- 
Pat



reply via email to

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