Difference between revisions of "Generating a Lithium TOC"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
'''Prerequisite''': Download this Perl script: http://duramecho.com/ComputerPrograms/HtmlHeadingsToTableOfContents/index.html | '''Prerequisite''': Download this Perl script: http://duramecho.com/ComputerPrograms/HtmlHeadingsToTableOfContents/index.html | ||
'''If you don't have Perl installed on your computer (i.e. "if you're on Windows"):''' You can get ActivePerl [http://www.activestate.com/activeperl/downloads here]. You can install with the default options | '''If you don't have Perl installed on your computer (i.e. "if you're on Windows"):''' You can get ActivePerl [http://www.activestate.com/activeperl/downloads here]. You can install with the default options. Make sure you restart your computer afterward. | ||
'''Procedure''' | '''Procedure''' |
Revision as of 10:17, 12 May 2011
Prerequisite: Download this Perl script: http://duramecho.com/ComputerPrograms/HtmlHeadingsToTableOfContents/index.html
If you don't have Perl installed on your computer (i.e. "if you're on Windows"): You can get ActivePerl here. You can install with the default options. Make sure you restart your computer afterward.
Procedure
- Copy / paste the HTML into a local file.
- Add <html><body> ....</body></html>
- Run script
perl HtmlHeadingsToTableOfContents.pl <YourHtmlFile.html>
- 4. Copy paste results back into Lithium.
- 5. Add TOC table wrapper code
TOC wrapper code
<table id="toc" class="toc" summary="Contents"> <tbody> <tr> <td> <!-- Generated TOC here --> </td> </tr> </tbody> </table>