For graphical admonitions (see Section 1.7), you will need to copy the admonitions graphics. These are expected in /usr/share/sgml/docbkdsl/images by pdfjadetex, as
the following error shows:
Error: pdfjadetex (file /usr/share/sgml/docbkdsl/images/important.pdf): cannot open image file
|
This is because the lyxtox-print.dsl file (see Section 4.2) contains the lines
(define %admon-graphics-path%
"/usr/share/sgml/docbkdsl/images/")
|
The images themselves are installed in /usr/share/sgml/docbook/docbook-dsssl-stylesheets-1.72/images by the package docbook-dsssl-stylesheets-1.72-34 on my SuSE
7.3 system. Instead of changing the location in lyxtox-print.dsl, I have decided to copy them:
cp /usr/share/sgml/docbook/docbook-dsssl-stylesheets-1.72/images/* /usr/share/sgml/docbkdsl/images/
|
 |
Warning: |
| |
DO NOT use a relative path, as in the commented line below! You will get errors of the form
LaTeX Warning: File `./images/important.pdf' not found on input line 5223.
|
although the files will be there. Most curiously, the images may nevertheless be included, but thumbpdf will fail! |
The above is valid only for the print formats (like PDF, PS, RTF etc.). For the HTML output we use the lyxtox-html.dsl and lyxtox-onehtml.dsl, for many HTML files and one HTML file respectively. There, the directory of the admonition graphics is specified with the following code:
(define %admon-graphics-path%
;; REFENTRY admon-graphics-path
;; PURP Path to admonition graphics
;; DESC
;; Sets the path, probably relative to the directory where the HTML
;; files are created, to the admonition graphics.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
"./images/")
|
Create a directory with the same name as the . lyx file in your working directory, but without the . lyx ending:
Change to that directory and extract the admonitions archive:
tar -xzvf admonitions.tar.gz
|
This will create a subdirectory “images”, with all admonition graphics in it, in all the formats needed. Alternatively, you could copy the admonition images in the various formats into
the images directory. The images contained are:
images/caution.bmp
images/caution.eps
images/caution.pdf
images/caution.png
images/important.bmp
images/important.eps
images/important.pdf
images/important.png
images/tip.bmp
images/tip.eps
images/tip.pdf
images/tip.png
images/note.bmp
images/note.eps
images/note.pdf
images/note.png
images/warning.bmp
images/warning.eps
images/warning.pdf
images/warning.png
|
If you have only the GIF versions of the admonitions, you can use the adddscr script as follows:
Instead of “gif”, you can use whatever version you happen to have (like “png”, “bmp” etc). The adddscr script will convert the format you designated into PNG
first, then use the addd script to add density (seeSection 4.9 and Section 7.2.2) and finally will
create all the other formats with ImageMagik (see Section 3.6).See Section 7.2.2 for the background.