Added table of contents#82
Conversation
|
Your code looks good. However, there's one thing, I'd ask you to change: Though your idea to introduce a stylesheet parameter to toggle the toc on/off is consistent, we should leave it to the processed content, if there's a toc or not. TEI has specified a PI-like element named So, please remove the stylesheet parameter and its evaluation. Instead, add a template in mode You may ask yourself, which divisions to process from a I'm sure, you find a consistent solution. I've just pushed commit 0650626 for an example is usage of |
I have implemented a Table of Contents (TOC) for the documentation generated by
libodd.xsl. Below is a summary of the changes:
XSLT Enhancements in libodd.xsl
New Parameter: Added odd:toc (boolean, defaults to true) to toggle the TOC.
TOC Logic: Created a dedicated odd:toc template and mode that recursively scans for tei:div elements containing a tei:head.
Anchor Integration: Links in the TOC use the same anchor logic as the main content (targeting the section's xml:id or a generated ID), ensuring seamless navigation.
Unified Layout: Integrated the TOC into the html:content template so it automatically appears at the top of the generated documentation.
Modern Styling in documentation.css
Layout: Added a stylized .toc container with a light background and subtle borders to differentiate it from the main content.
Hierarchy: Styled nested lists to clearly represent the document structure.
Interactivity: Added hover effects to TOC links for better user experience.
Closes issue #77