Hi David, The section on "Adding elements to a TOC" is about adding new entries, but this change is more along the lines of customizing the existing entries. The latter is easier.
You want to customize the template named 'toc.line'. That template is used by all the elements to generate the title and link for one entry in the TOC. So copy that template to your customization layer, and add the author link at the end of it. BTW, the examples in that section are for the fo stylesheet, so they differ from the html templates. Bob Stayton Sagehill Enterprises [email protected] ----- Original Message ----- From: David J. Rubin To: [email protected] Sent: Sunday, February 12, 2012 10:14 AM Subject: [docbook-apps] Author in Generated Table of Contents? I have a <book> that contains several <article>s, each written by a different <author>. I would like to include the author information along with the title in the XHTML-1_1 generated table of contents. Something like The Snows of Kilimanjaro . . . Ernest Hemingway It seems <author> is not one of the elements subject to ordinary inclusion in the generated TOC? Tried working through Chapter 10 of the Docbook XSL-Complete Guide, with emphasis on the section "Adding elements to a TOC," but the snippet code there no longer appears to closely resembles the current code, and my own humble efforts to modify autotoc.xsl were futile. My existing doc structure is basic: book / article / title (book / article / subtitle)? book / article / info / author / personname / firstname, surname book / article / para... ... Am using epub and XHTML-1_1. Can use CSS to generate the separator between title and author (leader dots in above example), just need the author to appear with an identifying ID= in the XHTML. Thanks in advance for any assistance! David J. Rubin [email protected]
