Bug 600437 - No TOC in HTML versions of articles, but there is a TOC in the PDF
Summary: No TOC in HTML versions of articles, but there is a TOC in the PDF
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ruediger Landmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-04 17:33 UTC by Deon Ballard
Modified: 2010-11-24 04:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-22 03:46:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Deon Ballard 2010-06-04 17:33:54 UTC
There used to be a TOC for an article, but that is now disabled in the xhtml.xsl file. However, the TOC is still generated in the PDF.

I would like either a) for TOCs to be turned on again for articles or b) to have a flag in the publican.cfg file for turning TOCs off and on.

I think b) would be cool, but it's probably easier to do a).

Comment 1 Ruediger Landmann 2010-06-05 06:56:56 UTC
In which brands are you seeing this? And which versions of those brand packages?

Comment 2 Deon Ballard 2010-06-07 14:52:09 UTC
The brand I'm using is...

publican-redhat-1.8-0.el5

And the publican version is ...

publican-1.6.3-0.el5

The setting is in /usr/share/publican/xsl/xhtml-common.xsl, so it should be applied to every publican build, regardless of version. The snippet I'm referring to begins around line 60...

<xsl:param name="generate.toc">
set toc
book toc
article nop
chapter toc
qandadiv toc
qandaset toc
...

It is set not to generate a TOC for the article. However, this is the setting for the pdf (in pdf.xsl, beginning at line 252):

<xsl:param name="generate.toc">
set toc
book toc,qandadiv
article toc
chapter nop
qandadiv nop
qandaset nop
....

See, article TOC is enabled there.

Comment 3 Ruediger Landmann 2010-06-08 01:25:06 UTC
> The setting is in /usr/share/publican/xsl/xhtml-common.xsl, so it should be
> applied to every publican build, regardless of version. The snippet I'm
> referring to begins around line 60...

Yes, we turned off Tables of Contents by default for articles in HTML some time ago (but obviously forgot to do that for PDF output as well).

However, this behaviour is overridden by the the Red Hat brand, which since version 1.5 has explicitly turned on tables of contents for HTML articles. You should see this in your /usr/share/publican/Common_Content/RedHat/xsl/html.xsl:

<xsl:param name="generate.toc">
set toc
book toc
article toc
chapter toc
qandadiv toc
...

When I build HTML articles with Publican 1.6.3 and publican-redhat 1.8, I get tables of contents as expected.


Note You need to log in before you can comment on or make changes to this bug.