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


"Diego Sevilla Ruiz (dsevilla@um.es)" wrote:
> 
> Hi, Eric:
> 
>     Sorry for my ignorance, but I am new to docbook ;-)
> 
>     What you use (&gif-eps;) is standard? I mean, can I use directly? Or
> does it depend on some "macro" defined before? Sorry again, but I don't
> know how to define "macros" in SGML :-( .

It's a kind of "macro" that is called an "entity". You can
define it
in an external file and then "include" it. Here is an
example:

In "document.docbook":

<!DOCTYPE book PUBLIC  "-//OASIS//DTD DocBook V3.1//EN" [
  <!ENTITY % magic-entities SYSTEM "magic.ent">
  %magic-entities;  <!-- This is where we include it -->
]>
<book lang="en">
...
  <graphic fileref="flower.&jpeg-eps;"></graphic>
  <!-- and here is where we use it -->
...
  <graphic fileref="cactus.&gif-eps;"></graphic>
...
</book>

and in "magic.ent":

<!-- here we define it -->
<!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">
]]>

You need to pass "-i html" or "-i print" to jade so the
right extension is chosen at processing time. The
docbook-tools wrapper scripts do this.

It is quite rough, but it works.

-- 
 É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]