From lists@pdimov.com Tue Jun 10 10:07:49 2014 From: Peter Dimov To: boost@lists.preview.boost.org Subject: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 17:07:38 +0300 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5529377439812937398==" --===============5529377439812937398== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Does Quickbook support or an equivalent? This is useful for the 'Authors' sections in Core, which don't need to clutter the ToC. --===============5529377439812937398==-- From dnljms@gmail.com Tue Jun 10 10:22:13 2014 From: Daniel James To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 15:21:49 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2392359022451445229==" --===============2392359022451445229== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10 June 2014 15:07, Peter Dimov wrote: > Does Quickbook support or an equivalent? This is useful for the > 'Authors' sections in Core, which don't need to clutter the ToC. Not built in, but you can use templates: [template simplesect[title] [block ''''''[title]'''''']] [template endsimplesect[] [block '''''']] [simplesect Authors] Content.... [endsimplesect] --===============2392359022451445229==-- From lists@pdimov.com Tue Jun 10 10:33:37 2014 From: Peter Dimov To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 17:33:26 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2700972991849763410==" --===============2700972991849763410== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel James wrote: > On 10 June 2014 15:07, Peter Dimov wrote: > > Does Quickbook support or an equivalent? This is useful for > > the 'Authors' sections in Core, which don't need to clutter the ToC. > > Not built in, but you can use templates: > > [template simplesect[title] > [block ''''''[title]'''''']] > > [template endsimplesect[] > [block '''''']] Very nice! What are the best practices of defining templates in .qbk files that are part of the combined documentation build? Are the templates local to their file? --===============2700972991849763410==-- From dnljms@gmail.com Tue Jun 10 10:44:25 2014 From: Daniel James To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 15:44:00 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4939024205102475694==" --===============4939024205102475694== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10 June 2014 15:33, Peter Dimov wrote: > > Very nice! > > What are the best practices of defining templates in .qbk files that are > part of the combined documentation build? Are the templates local to their > file? Since the different libraries' documentation is translated to boostbook separately templates can't affect other libraries, so you don't have to worry about that. The rules for templates depend on the quickbook version of your document, for older versions of quickbook templates are defined globally, in 1.6 templates are scoped to the file they were defined in. In 1.6 they can be imported from another file using [import file.qbk], so that it's still possible to create a template library file. --===============4939024205102475694==-- From dnljms@gmail.com Tue Jun 10 11:00:06 2014 From: Daniel James To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 15:59:42 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7956400640126961531==" --===============7956400640126961531== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10 June 2014 15:44, Daniel James wrote: > > The rules for templates depend on the quickbook version of your > document, for older versions of quickbook templates are defined > globally, in 1.6 templates are scoped to the file they were defined > in. That's not quite right, in the implementation a file scope means a file plus any included files, but that's not what most people would think of as 'scoped to the file'. So, I should have said, they're available in the file they were defined in/imported into, and any files included after that. --===============7956400640126961531==-- From lists@pdimov.com Tue Jun 10 11:01:04 2014 From: Peter Dimov To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 18:00:53 +0300 Message-ID: <5E68E622360F451EA2DEECF6803664EB@pdimov5> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8062633733539604310==" --===============8062633733539604310== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel James wrote: > [template simplesect[title] > [block ''''''[title]'''''']] > > [template endsimplesect[] > [block '''''']] > > [simplesect Authors] > > Content.... > > [endsimplesect] Doesn't seem to work, unfortunately. This: [simplesect Authors] * Brad King * Douglas Gregor * Peter Dimov [endsimplesect] produces the following XML: [block Authors] Brad King Douglas Gregor Peter Dimov [block ] I've tried fiddling around with the template definitions, but all my attempts have made matters worse. :-) --===============8062633733539604310==-- From dnljms@gmail.com Tue Jun 10 11:24:30 2014 From: Daniel James To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 16:24:08 +0100 Message-ID: In-Reply-To: <5E68E622360F451EA2DEECF6803664EB@pdimov5> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0361520313857403793==" --===============0361520313857403793== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10 June 2014 16:00, Peter Dimov wrote: > Daniel James wrote: >> >> [template simplesect[title] >> [block ''''''[title]'''''']] >> >> [template endsimplesect[] >> [block '''''']] >> >> [simplesect Authors] >> >> Content.... >> >> [endsimplesect] > > > Doesn't seem to work, unfortunately. Sorry, you have to be using the '[quickbook 1.6]' tag in your docinfo, core is currently using '[quickbook 1.5]'. I just tried changing it and scoped_enum.qbk had an error, which can be fixed by putting [quickbook 1.5] at the top of the file, so that quickbook will treat it as a 1.5 file (1.6 is a bit stricter). The reason for the error is a bit awkward, the documentation contains what 1.5 interprets as a code block after a list, which is probably meant to be a code block in a list, which 1.6 detects but can't deal with. 1.7 will fix this, it should be released in boost 1.57. --===============0361520313857403793==-- From lists@pdimov.com Tue Jun 10 11:39:42 2014 From: Peter Dimov To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 18:39:33 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0196868431025280154==" --===============0196868431025280154== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel James wrote: > Sorry, you have to be using the '[quickbook 1.6]' tag in your docinfo, > core is currently using '[quickbook 1.5]'. I just tried changing it and > scoped_enum.qbk had an error, which can be fixed by putting [quickbook > 1.5] at the top of the file, so that quickbook will treat it as a 1.5 file > (1.6 is a bit stricter). That worked, thanks. Except that now enable_if complains: Error: no ID for constraint linkend: core.enable_if.using_enable_if.enable_if_lazy. Error: no ID for constraint linkend: core.enable_if.using_enable_if.enable_if_0x. and I'm not sure what it doesn't like. --===============0196868431025280154==-- From dnljms@gmail.com Tue Jun 10 11:57:02 2014 From: Daniel James To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 16:56:39 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1075851402552991027==" --===============1075851402552991027== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10 June 2014 16:39, Peter Dimov wrote: > Daniel James wrote: >> >> Sorry, you have to be using the '[quickbook 1.6]' tag in your docinfo, >> core is currently using '[quickbook 1.5]'. I just tried changing it and >> scoped_enum.qbk had an error, which can be fixed by putting [quickbook 1.5] >> at the top of the file, so that quickbook will treat it as a 1.5 file (1.6 >> is a bit stricter). > > > That worked, thanks. Except that now enable_if complains: > > Error: no ID for constraint linkend: > core.enable_if.using_enable_if.enable_if_lazy. > Error: no ID for constraint linkend: > core.enable_if.using_enable_if.enable_if_0x. > > and I'm not sure what it doesn't like. Sorry, it's the 'include:core' tags. What they do is set the id for included file, 1.6 detects id collisions and renames them, in this case it's creating a new id for every included file. If I'd forseen that, I could have had a special case. I imagine they're there to override the id generator, because older versions of quickbook had a bug for included files (which I had to remain compatible with in order to avoid breaking existing documentation). You can either change them to plain include tags (i.e. remote the ':core' part), or add '[compatibility-mode 1.5]' after the [quickbook 1.6] tag. --===============1075851402552991027==-- From lists@pdimov.com Tue Jun 10 12:14:36 2014 From: Peter Dimov To: boost@lists.preview.boost.org Subject: Re: [boost] quickbook equivalent of ? Date: Tue, 10 Jun 2014 19:14:28 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3865049786042198968==" --===============3865049786042198968== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel James wrote: > Sorry, it's the 'include:core' tags. Thanks, I switched them to plain [include] and everything seems fine now. --===============3865049786042198968==--