This is the mail archive of the docbook-tools-discuss@sourceware.cygnus.com mailing list for the docbook-tools project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: images in Docbook with Red Hat 6.2


Sam Roberts wrote:
> 
> > I'm currently using the following approach:
> >
> > <graphic fileref="foo.&gif-eps;">
> >
> > stands for:
> > "use foo.gif when making HTML files, foo.eps when printing
> > to TeX."
> >
> > You can do create on the same model other entities like
> > &jpg-eps;. It's not perfect, but it's simple and works.
> 
> I assume we're talking the same thing here,

Yes

> and that you
> use this technique only because you use BOTH gifs and
> jpegs in the same document when it's formatted as html?

Not necessarily in the same document. I'm using both gifs
and jpegs, but usually in different documents. Anyway, it
remains a problem if you hack the stylesheets.

What is really a problem is that the file extension depends
on the processing you apply to the document, while the
docbook file should remain a simple source. And since you
don't want to hack the document each time you use it
differently, the solution needs to simply work from the
command line. So I managed in a way that the only thing I
need is the following definition in some external file:

<!ENTITY % html "IGNORE">
<![%html; [
        <!ENTITY % print "IGNORE">
        <!ENTITY gif-eps "gif">
        <!ENTITY jpg-eps "jpg">
        <!ENTITY jpeg-eps "jpeg">
]]>
<!ENTITY % print "INCLUDE">
<![%print; [
        <!ENTITY gif-eps "eps">
        <!ENTITY jpg-eps "eps">
        <!ENTITY jpeg-eps "eps">
]]>

The stylesheets solution could perfectly work if there was a
way to easily detect which extension(s) do exist for this
file from DSSSL.

-- 
 Éric Bischoff   -   mailto:ebisch@cybercable.tm.fr
 __________________________________________________
                                           \^o~_.
     .~.                           ______  /( __ )
     /V\         Toys story         \__  \/  (  V
   //   \\                            \__| (__=v
  /(     )\                        |\___/     )
    ^^-^^                           \_____(  )
     Tux                        Konqui     \__=v
 __________________________________________________

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]