Welcome, JavaScript

Prince 8 adds support for JavaScript which can — using the DOM — manipulate the content of the document. One example is the table of contents, which can be generated dynamically by a small script that (a) scans the documents for chapter headings, (b) generates a list with elements pointing to the chapter headings, and (c) inserts the list at the start of the document. To show of this new feature, we have Oliver Twist — a classic literary work with lots of chapters — and added a small JavaScript along with a CSS snippet. Here’s the HTML source file and the resulting PDF file.

Posted by howcome November 27, 2013 — Filed under UncategorizedComments (0)

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment