Re: [quickbook] Phrase templates containing blocks
Daniel James <[email protected]> Sun, 23 Jun 2013 17:15:40 +0100
| Newsgroups | gmane.comp.lib.boost.documentation |
|---|---|
| Message-ID | <CAHOE3ycCxO77xm8GzD41ACK77k-hw3SOVPW9emw0yLDMNbqMYg@mail.gmail.com> |
On 23 June 2013 16:51, Paul A. Bristow <[email protected]> wrote: > > >> -----Original Message----- >> From: Boost-docs [mailto:[email protected]] On Behalf Of Daniel James >> Sent: Sunday, June 23, 2013 4:08 PM >> To: Discussion of Boost Documentation >> Subject: Re: [Boost-docs] [quickbook] Phrase templates containing blocks >> >> On 23 June 2013 15:53, Paul A. Bristow <[email protected]> wrote: >> > >> > >> >> -----Original Message----- >> >> From: Boost-docs [mailto:[email protected]] On >> >> Behalf Of Daniel James >> >> Sent: Sunday, June 23, 2013 10:24 AM >> >> To: Discussion of Boost Documentation >> >> Subject: [Boost-docs] [quickbook] Phrase templates containing blocks >> >> >> >> Hi, >> >> >> >> I've recently done a little on changing the way phrase and block >> >> templates work for 1.7. My >> > initial >> >> version (not in subversion yet) works by just changing the parser to >> >> allow blocks in phrase >> > templates, and >> >> letting the block handling code deal with it. This works okay, but >> >> can be surprising. For example >> > this: >> >> >> >> [template thing[] Text before table. [table]. Text after table.] >> >> >> >> Text before template. [thing] Text after template. >> >> >> >> Generates: >> >> >> >> Text before template. >> >> >> >> Text before table. >> >> >> >> [table] >> >> >> >> Text after table. >> >> >> >> Text after template. >> >> >> >> But I imagine most people would expect: >> >> >> >> Text before template. Text before table. >> >> >> >> [table] >> >> >> >> Text after table. Text after template. >> > >> >> Does that look right to you? >> > >> > If I've understood this right, I suppose so, but I think people can >> > cope with either, but it's better to have an 'extra newline' than >> > being tempted (forced?) into using an explicit forbidden newline. >> >> I'm not sure what you mean as "an explicit forbidden newline". > > I mean "an explicit forbidden newline" = a [br] Ah, okay. Btw. it turns out that in quickbook 1.6 an empty block tag can be used to force a paragraph break. [template para [block] ] * Paragraph 1 [para] Paragraph 2 * Paragraph 3 [para] Paragraph 4 The resulting markup is pretty weird, but I'm going to try to fix that. It wan't intentional, but I think it's okay. > I think I'm not really OK with blocks and phrases, (nor layout as part of syntax as I've complained > before) but I'll have to live with all of that ;-) Yes, I don't entirely agree but I think if I was to design such a language from scratch, I'd do it a little differently. For a start, I wouldn't use indentation for code blocks.