Re: SGML and admonition graphics
Ben Burton <bburton@mail.math.okstate.edu> writes:
> Hi. Pardon me, I'm relatively new to docbook; I've hunted through
> lists for a while and still can't work this out.
Sorry I didn't reply before, don't follow this list as much as I should.
You should be reading the contents of the docbook-dsssl-doc package.
> Consider the following SGML file:
>
> <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
> <book>
> <chapter>
> <title>Test File</title>
> <tip><para>Here's a little tip.</para></tip>
> </chapter>
> </book>
>
> Run it through jw with no options ("/usr/bin/jw test.sgml"). Examine
> the HTML file produced; it offers a graphic to go with the tip. The
> graphic being referenced in the generated HTML file is:
>
> SRC="/docbook-dsssl/tip.gif"
>
> Clearly this is no good; I want to have it reference a graphic in the
> local directory (such as "./images/tip.gif"). I keep finding references
> to a field "admon-graphics-path" that is set in stylesheets, but I don't
> want to have to cart around my own separate stylesheet just to have images
> show up in a sane location.
You don't need to. Just customize what you need.
> Is there some way of changing this path either in my SGML file or at the
> command line for /usr/bin/jw?
Yes, you can change the setting in a local stylesheet in the same
directory of the document. For this example, you have admon.sgml and
admon.dsl, in the contents of admon.dsl are:
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"
[
<!ENTITY docbook.dsl PUBLIC
"-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
]>
<style-sheet>
<style-specification id="html" use="docbook">
<style-specification-body>
(define %admon-graphics% #t)
(define %admon-graphics-path% "/var/www/docbook-dsssl/")
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
Set the path any way you want.
The command line to use is:
jade -t sgml -d admon.dsl admon.sgml
Just tested this and it works fine.
--
...Adam Di Carlo..<adam@onshore-devel.com>...<URL:http://www.onshored.com/>
Reply to: