Re: Simple modifications?

Subject: Re: Simple modifications?
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Tue, 31 Oct 2000 13:19:52 -0600
Quoting Shawn O. McKenzie <shawnm@xxxxxxxxxxxxx>:
> I would like to be able to format Docbook files for print (and possibly
> html) such that it includes a specific graphic on the title page, a
> different graphic on each chapter heading, a special graphic on a note
> section,
> etc.
   This is a pretty big question.  Rather than a direct answer to
everything, I'll outline the search for a solution to one, which
should give you a general idea of how to approach the rest.
   I assume, when you say "chapter heading", you mean the header that
appears on each page, generally containing the page number.  Print
stylesheets in Jade must use the simple-page-sequence flow object,
which does not allow for "dynamic" headers, other than page numbers.
So, in order to have a different graphic in the header of each
chapter, each chapter would have to be a separate simple-page-sequence
object.  It so happens that this is the way the stylesheets work.
   We can find this out by searching the stylesheets, such as:
	grep -in "element *chapter" print/*.dsl
Running this in the main Modular Stylesheets directory should locate
the element construction rule for chapters.  You should find that the
rule consists strictly of a call to the ($component$) procedure.
Examining this procedure (which, conveniently, is in the same file as
the chapter construction rule) will show that the contents of the left
header is created by the ($left-header$) procedure, and so on.  So,
you would simply need to override this function via the customization
mechanism.  You'd probably want to find a place in your document where
you could store the name of the graphic.  Not being very familiar with
Docbook markup details, I couldn't say where, but I'm sure there's a
good place for it. :)
   So, for the rest of your questions, your best bet is to search out
the construction rule for the appropriate element, then chase down the
functions that produce the relevant parts of it, figure out which one
you need to override (customize), and go from there.
   Hope this helps. :)

-Brandon :)

 DSSSList info and archive:

Current Thread