Re: [Boost-docs] [auto-index] Generating an index in PDF output

Subject: Re: [Boost-docs] [auto-index] Generating an index in PDF output
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-01-26 09:53:20

> In my doc jamfile I have:
> <auto-index>on
> <auto-index-type>appendix
> <auto-index-script>index.idx
> <auto-index-prefix>../../../
> <auto-index-verbose>on
> <format>html:<auto-index-internal>on
> <format>html:<xsl:param>generate.index=0
> <format>pdf:<auto-index-internal>off
> <format>pdf:<xsl:param>index.on.type=1
> <quickbook-define>enable_index ;
> I am getting an index in my HTML output but I was not getting one in my
> PDF output. So I changed to:

PDF output with <format>pdf:<auto-index-internal>off works just fine for me
here (latest sandbox source).

> <format>pdf:<auto-index-internal>on
> but now the output says:
> fop.render.pdf
> ..\..\..\bin.v2\libs\tti\doc\msvc-10.0\debug\auto-index-internal-on\auto-index-verbose-on\auto-index-on\threading-multi\TypeTraitsIntrospection.auto_index.pdf
> (document [system-id
> file:/C:/Programming/VersionControl/sandbox/tti/libs/tti/doc/../../../bin.v2/libs/tti/doc/msvc-10.0/debug/auto-index-internal-on/auto-index-verbose-on/auto-index-on/threading-multi/]
> (validate
> [error] Element 'fo:page-sequence' cannot be a child of 'fo:flow'.
> Only block-level elements are permitted in this context.
> [validation total: 1 error]
> Parse error: Invalid XSL FO source
> 'file:/C:/Programming/VersionControl/sandbox/tti/libs/tti/doc/../../../bin.v2/libs/tti/doc/msvc-10.0/debug/auto-index-internal-on/auto-index-verbose-on/auto-index-on/threading-multi/':
> 1 error found during validation

Grrrr, I think this is because of your quickbook document type - the
outermost XML element in your doc is "chapter", but then you set
<auto-index-type>appendix which tries to place an appendix *inside a
chapter* which is not valid Docbook XML. Depending which stylesheets get
invoked this may end up working OK by mistake as it were, but some
combinations produce invalid FO XML which XEP then flags up.

So to conclude, it appears you can't mix:

[library The Type Traits Introspection Library

with an appendix, because "library" creates one chapter of a book, which
can't contain an appendix.

So either change the document type, or don't try and use an appendix.

Hope this makes sense... and yes suggestions for catching this earlier would
be welcome... but it's not easy :(


This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC