Next in thread → Next in month →

Re: [docbook-apps] Author in Generated Table of Contents?

From
Bob Stayton <>
Date
2012-02-12T19:52:13+00:00
ID
10f201cce9bf$c9c8d7f0$6600a8c0@pazu
Thread
Re: [docbook-apps] Author in Generated Table of Contents?
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


 

 

  
----- Original Message ----- 

  
From: 
  David J. Rubin 

  
To:  
  

  
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

  
Next in thread → Next in month →