Re: Image selection based on type using dbtoepub

Bob Stayton <[email protected]> Tue, 17 Aug 2021 09:09:54 -0700
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
Hi Esteban,

We would need to sort out if the problem is in the XSLT process or the 
ruby script that handles epub package assembly.

Can you examine the output to see if there is a reference to the image 
file in an <img> element in the epub html output files? If not, then the 
problem is with the XSLT process.

If there is such a reference, then then XSLT is working and the problem 
is that the ruby process is not copying the image file to the output 
directory for inclusion in the package.

I should mention that the epub3 stylesheet will generate output that 
conforms better to the current EPUB standard.

Bob Stayton
[email protected]

On 8/17/2021 6:10 AM, Esteban Zimanyi wrote:
> I am using docbook, xsltproc, dblatex, and dbtoepub (epub not epub3) 
> with a standard Ubuntu distribution
> https://packages.ubuntu.com/bionic/all/docbook/filelist 
> <https://packages.ubuntu.com/bionic/all/docbook/filelist>
> https://packages.ubuntu.com/bionic/all/docbook-xsl/filelist 
> <https://packages.ubuntu.com/bionic/all/docbook-xsl/filelist>
> https://packages.ubuntu.com/bionic/all/dblatex/filelist 
> <https://packages.ubuntu.com/bionic/all/dblatex/filelist>
> https://packages.ubuntu.com/bionic/all/dbtoepub/filelist 
> <https://packages.ubuntu.com/bionic/all/dbtoepub/filelist>
> and I am trying to produce manuals in HTML, PDF, and EPUB format.
>
> I want to select the image to use depending on the output format as 
> follows
> <figure id="tiling" float="start">
>   <title>Multidimensional tiling for temporal floats.</title>
>   <mediaobject>
>     <imageobject><imagedata format="PDF" scale="75" 
> fileref="images/tiling.pdf"/></imageobject>
>     <imageobject><imagedata format="SVG" scale="75" 
> fileref="images/tiling.svg"/></imageobject>
>     <imageobject><imagedata format="PNG" scale="75" 
> fileref="images/tiling.png"/></imageobject>
>   </mediaobject>
> </figure>
>
> This works well for producing HTML and PDF format but dbtoepub does 
> not understand this and does not include any image. I have also tried 
> with roles (e.g. role="html" or role="dblatex") but also does not work 
> with dbtoepub.
>
> Any way to solve this ?
>
> ------------------------------------------------------------
> Prof. Esteban Zimanyi
> Department of Computer & Decision Engineering  (CoDE) CP 165/15
> Universite Libre de Bruxelles
> Avenue F. D. Roosevelt 50
> B-1050 Brussels, Belgium
> fax: + 32.2.650.47.13
> tel: + 32.2.650.31.85
> e-mail: [email protected] <mailto:[email protected]>
> Internet: http://cs.ulb.ac.be/members/esteban/ 
> <http://cs.ulb.ac.be/members/esteban/>
> ------------------------------------------------------------