Re: [docbook-apps] TOC placement in pdf
Actually, there's a param for that. If you insert an empty element in your content, and set this param: process.empty.toc.element=1 and set generate.toc to blank (to turn off the default toc), then the stylesheet will generate a toc where that element is located. Apparently this param came after the last edition of my book so it isn't covered there, but it is included in the fo parameter reference doc online. Unfortunately, the content model of article does not allow a toc element after normal content, even though the stylesheet doesn't care. So you either have to tolerate a validation error, or insert the empty toc element just before processing. Perhaps a cleaner customization would be to insert a processing instruction instead of an empty toc element so it validates, and write some XSL to process that PI using the XSL code borrowed and customized from the template that starts with from fo/toc.xsl. Basically you want to call the template named 'component.toc' but with the right context. I haven't tried this, but it should work. Bob On 2/22/2023 9:15 PM, rohith R wrote: Hmmm, I'll check. I'd prefer to control it via xsl if that's possible as it provides max flexibility. Not sure if it's possible 樂 On Tue, 21 Feb 2023, 6:17 pm Dave Pawson, wrote: Can you use the element to place it where you want? HTH On Tue, 21 Feb 2023 at 06:28, Richard Hamilton wrote: > > Hello, > > The element I’ve used to put things before the toc is , which allows a lot more elements than you might expect, including paragraphs and tables. > > It is an abuse of the tag, (I’ve used it only for a dedication in our books), but in a pinch, it might do what you need. > > I’m sure others on this list may have some good (probably better:) ideas, but I’m not sure you can do what you want to do with any other element, unless you modify the stylesheets. > > I hope that helps. > Dick Hamilton > --- > XML Press > XML for Technical Communicators > http://xmlpress.net > hamil...@xmlpress.net > > > > > On Feb 20, 2023, at 23:04, rohith R wrote: > > > > Hi, > > > > > > I'm using an article style docbook and convert it into pdf. > > > > The TOC is getting generated after the title page. I want it before the section but after the front matter. How can I accomplish this? > > > > My article structure (docbook5): > > - title page > > - other stuff (text and couple of tables) > > - multiple sections > > > > I want the TOC placed after "other stuff" and before sections. > > > > How can I accomplish it? > > At the moment they get generated after title page when generating pdf. > > > > Regards, > > R > > > - > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] TOC placement in pdf
> I'd prefer to control it via xsl if that's possible as it provides max > flexibility. > Not sure if it's possible 樂 It’s always possible. but sometimes it’s more work. Find the template for, let’s say “db:book”, that’s putting the ToC in the “wrong” place. Override that template in your customization layer so that it doesn’t produce a ToC. Find the template that produces the markup that you want the ToC to proceed or follow, let’s say “db:preface”. Override that template in your customization layer so that it calls the ToC-template to produce the ToC in the right place. Be seeing you, norm -- Norman Tovey-Walsh https://nwalsh.com/ > Man is made so that he can only find relaxation from one kind of labour > by taking up another.--Anatole France signature.asc Description: PGP signature
Re: [docbook-apps] TOC placement in pdf
Hmmm, I'll check. I'd prefer to control it via xsl if that's possible as it provides max flexibility. Not sure if it's possible 樂 On Tue, 21 Feb 2023, 6:17 pm Dave Pawson, wrote: > Can you use the element to place it where you want? > > > HTH > > On Tue, 21 Feb 2023 at 06:28, Richard Hamilton > wrote: > > > > Hello, > > > > The element I’ve used to put things before the toc is , > which allows a lot more elements than you might expect, including > paragraphs and tables. > > > > It is an abuse of the tag, (I’ve used it only for a dedication in our > books), but in a pinch, it might do what you need. > > > > I’m sure others on this list may have some good (probably better:) > ideas, but I’m not sure you can do what you want to do with any other > element, unless you modify the stylesheets. > > > > I hope that helps. > > Dick Hamilton > > --- > > XML Press > > XML for Technical Communicators > > http://xmlpress.net > > hamil...@xmlpress.net > > > > > > > > > On Feb 20, 2023, at 23:04, rohith R wrote: > > > > > > Hi, > > > > > > > > > I'm using an article style docbook and convert it into pdf. > > > > > > The TOC is getting generated after the title page. I want it before > the section but after the front matter. How can I accomplish this? > > > > > > My article structure (docbook5): > > > - title page > > > - other stuff (text and couple of tables) > > > - multiple sections > > > > > > I want the TOC placed after "other stuff" and before sections. > > > > > > How can I accomplish it? > > > At the moment they get generated after title page when generating pdf. > > > > > > Regards, > > > R > > > > > > - > > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > > > > > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ. > > - > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > >
Re: [docbook-apps] TOC placement in pdf
Can you use the element to place it where you want? HTH On Tue, 21 Feb 2023 at 06:28, Richard Hamilton wrote: > > Hello, > > The element I’ve used to put things before the toc is , which > allows a lot more elements than you might expect, including paragraphs and > tables. > > It is an abuse of the tag, (I’ve used it only for a dedication in our books), > but in a pinch, it might do what you need. > > I’m sure others on this list may have some good (probably better:) ideas, but > I’m not sure you can do what you want to do with any other element, unless > you modify the stylesheets. > > I hope that helps. > Dick Hamilton > --- > XML Press > XML for Technical Communicators > http://xmlpress.net > hamil...@xmlpress.net > > > > > On Feb 20, 2023, at 23:04, rohith R wrote: > > > > Hi, > > > > > > I'm using an article style docbook and convert it into pdf. > > > > The TOC is getting generated after the title page. I want it before the > > section but after the front matter. How can I accomplish this? > > > > My article structure (docbook5): > > - title page > > - other stuff (text and couple of tables) > > - multiple sections > > > > I want the TOC placed after "other stuff" and before sections. > > > > How can I accomplish it? > > At the moment they get generated after title page when generating pdf. > > > > Regards, > > R > > > - > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] TOC placement in pdf
Thank you, I'm using article as my document type and can't use the tag unfortunately. I'm happy to change the style sheet but need someone's help here in figuring out that part. Regards, R On Tue, 21 Feb 2023, 4:58 pm Richard Hamilton, wrote: > Hello, > > The element I’ve used to put things before the toc is , which > allows a lot more elements than you might expect, including paragraphs and > tables. > > It is an abuse of the tag, (I’ve used it only for a dedication in our > books), but in a pinch, it might do what you need. > > I’m sure others on this list may have some good (probably better:) ideas, > but I’m not sure you can do what you want to do with any other element, > unless you modify the stylesheets. > > I hope that helps. > Dick Hamilton > --- > XML Press > XML for Technical Communicators > http://xmlpress.net > hamil...@xmlpress.net > > > > > On Feb 20, 2023, at 23:04, rohith R wrote: > > > > Hi, > > > > > > I'm using an article style docbook and convert it into pdf. > > > > The TOC is getting generated after the title page. I want it before the > section but after the front matter. How can I accomplish this? > > > > My article structure (docbook5): > > - title page > > - other stuff (text and couple of tables) > > - multiple sections > > > > I want the TOC placed after "other stuff" and before sections. > > > > How can I accomplish it? > > At the moment they get generated after title page when generating pdf. > > > > Regards, > > R > > > - > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > >
Re: [docbook-apps] TOC placement in pdf
Hello, The element I’ve used to put things before the toc is , which allows a lot more elements than you might expect, including paragraphs and tables. It is an abuse of the tag, (I’ve used it only for a dedication in our books), but in a pinch, it might do what you need. I’m sure others on this list may have some good (probably better:) ideas, but I’m not sure you can do what you want to do with any other element, unless you modify the stylesheets. I hope that helps. Dick Hamilton --- XML Press XML for Technical Communicators http://xmlpress.net hamil...@xmlpress.net > On Feb 20, 2023, at 23:04, rohith R wrote: > > Hi, > > > I'm using an article style docbook and convert it into pdf. > > The TOC is getting generated after the title page. I want it before the > section but after the front matter. How can I accomplish this? > > My article structure (docbook5): > - title page > - other stuff (text and couple of tables) > - multiple sections > > I want the TOC placed after "other stuff" and before sections. > > How can I accomplish it? > At the moment they get generated after title page when generating pdf. > > Regards, > R - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] TOC placement in pdf
Hi, I'm using an article style docbook and convert it into pdf. The TOC is getting generated after the title page. I want it before the section but after the front matter. How can I accomplish this? My article structure (docbook5): - title page - other stuff (text and couple of tables) - multiple sections I want the TOC placed after "other stuff" and before sections. How can I accomplish it? At the moment they get generated after title page when generating pdf. Regards, R