Subject: Re: [Boost-docs] [quickbook] Changes for 1.43
From: Daniel James (dnljms_at_[hidden])
Date: 2010-03-02 09:08:06
On 2 March 2010 02:15, Joel de Guzman <joel_at_[hidden]> wrote:
>
> Don't we support block style templates too? But I see your point.
Yes, but they are parsed in the phrase parser, so they're always
inside a paragraph regardless of whether they're a block or not. If
we're going to make more use of templates this is something that will
need to be improved.
A possible way of dealing with this is stop parsing paragraphs, but
instead think of block separators which occur at the start of block
markup, at the end of the file and whenever there are two or more
consecutive newlines (and probably some other places). At these
points, if there is any non-block output waiting, it'll be wrapped in
a paragraph and output. I think that should simplify the grammar and
generate better output than the current implementation. For example,
it might be best if all the markups and template calls were in the
block grammar, but the phrase markups wouldn't cause a separator.
Looking crudely at docbook, there are tags which are blocks that
contain blocks (e.g. lists), blocks that contain phrases (headers),
phrases that contain blocks (footnotes) and phrases that contain
phrases (bold). So it might be too simplistic to think of templates as
just blocks or phrases. But I haven't really thought about that much
and most tags are either blocks that contain blocks or phrases that
contain phrases so there might just need to be a few special cases.
> I'm quite eager to see the Spirit2 port moving forward. I'd love to
> work some bit on the template stuff + generic regex based syntax
> highlighters and a most requested feature: making it really usable
> for non-boost docs.
The html generation should help here. Also, perhaps a switch for
generating plain docbook which complains if boostbook specific markup
is used. That's probably also needed for html as well, although I've
half considered creating a boostbook style extension for html. It
might be awkward to implement though. FWIW, I think I've got the
interface for encoding html/boostbook wrong, I think it should
actually be more like a template call.
Daniel
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC