- In the directory given by
novelang.stylesheet.dirsystem property, if defined.
- In a
styledirectory under the directory from which Novelang was launched (corresponding to
pdf.xslfor a PDF document,
html.xslfor a HTML document. That was not flexible enough because the same document of the same MIME type may deserve multiple renderings, like "miser printing", "visually impaired" and "tree-killer". That's where selectable stylesheets come to the rescue. With selectable stylesheets, you give the name of the stylesheet to use. This can be done at query level, or at book level. Let's say this is your project layout, with two stylesheets under the
/ book.nlb chapter-1.nlp chapter-2.nlp style/ html-quick.xsl html-beautiful.xsl pdf-beautiful.xslAfter launching Novelang HTTP daemon, you can use the
stylesheetquery parameter to override any other stylesheet name:
http://localhost:8080/chapter-1.html?stylesheet=html-beautiful.xslPlease note the
html-beautiful.xslpath is still relative to the directory containing custom stylesheets! Another place to set stylesheet names is the Book file. Since a Book doesn't know how it will be rendered, you can define a stylesheet for multiple document MIME types. The
book.nlbwould look like this:
mapstylesheets $html=html-beautiful.xsl $pdf=pdf-beautiful.xsl insert file:chapter-1.nlp insert file:chapter-2.nlpI've not tested subdirectories yet but they are supposed to work. Keep in mind: they will be relative to the directory containing your stylesheets. Supporting multiple stylesheets is a necessary step before provinding nice built-in stylesheets to be tried with documents of your own.