OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: which image type for output to html and pdf?


On Wed, Aug 29, 2001 at 12:30:36PM -0400, Bob McIlvride wrote:
> Matthew Kennedy wrote:
> 
> > Therefore, what is the correct way to have a docbook document which
> > includes images output to both print and html?
> 
> If, for example, you are using .png images for HTML, try this:
> 
>        <figure>
>          <title>System Example</title>
>          <mediaobject>
>            <imageobject>
>              <imagedata fileref="images/figure02.eps"/>
>            </imageobject>
>            <imageobject>
>              <imagedata fileref="images/figure02.png"/>
>            </imageobject>
>          </mediaobject>
>        </figure>

And for pdf, you must convert to pdf using epstopdf, and add a small
customization layer for formatting.  Here is the relevant excerpt from
my custom stylesheet (built from a previous thread on this list):

====
;;
;; Allow PDF graphics inclusion <!-- adapted from Ian Castle <bb@looksystems.co.uk> -->
;;

;; set this to #t using 'jade -V use-eps' to allow building a .ps document
;; instead of a .pdf one
(define use-eps #f)

;; these just add pdf to the 1.71 lists, unless we want to use eps instead
;; this allows to specify both eps and pdf in the mediaobject
(define %graphic-extensions% 
  (if use-eps
      '("eps" "epsf" "gif" "tif" "tiff" "jpg" "jpeg" "png")
      '("pdf" "eps" "epsf" "gif" "tif" "tiff" "jpg" "jpeg" "png")))
(define preferred-mediaobject-notations
  (if use-eps
      '("EPS" "PS" "JPG" "JPEG" "PNG" "linespecific")
      '("PDF" "EPS" "PS" "JPG" "JPEG" "PNG" "linespecific")))
(define preferred-mediaobject-extensions
  (if use-eps
      '("eps" "ps" "jpg" "jpeg" "png")
      '("pdf" "eps" "ps" "jpg" "jpeg" "png")))
====

In case you care about admonitions graphics:

====
(define %admon-graphics% #t)
(define %admon-graphics-path% "/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/images/")
(define admon-graphic-default-extension
	(if use-eps ".eps" ".pdf"))
====

Till now i've generated the admonitions epd/pdf graphics by converting
from the gif files, but that looks awfull, and someone at Alcove has
drawn new ones for most admonitions - they will be published within a
week, when all of them are drawn.

see http://bugs.debian.org/110278 for translation from gif


The whole stylesheet may be ready to be published within a couple of
weeks, but there are still some rough edges.

Regards,
-- 
Yann Dirson <Yann.Dirson@fr.alcove.com>                 http://www.alcove.com/
Free-Software Engineer				      Ingénieur Logiciel-Libre
Free-Software time manager    	       Responsable du temps Informatique-Libre


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC