bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

images subdirectories in epub


From: Patrice Dumas
Subject: images subdirectories in epub
Date: Wed, 3 Aug 2022 14:22:04 +0200

Hello,

When the images are in subdirectories, like
@image{subdir/toto}
the resulting HTML references is like "subdir/toto.png".

In EPUB, the images are copied to a directory, such as
my_manual_epub_package/EPUB/images/
The manual files are in
my_manual_epub_package/EPUB/xhtml/*.xhtml
and the paths to images in the XHTML files have ../images/ prepended.

There are two possibilities:

1) copy file only

when generating EPUB, in the XHTML files remove the leading
directories and keep only the image files.  Copy the image files
directly in the images directory.  In the example above, the href in the
HTML file becomes
  ../images/toto.png
and subdir/toto.png is copied to
my_manual_epub_package/EPUB/images/

2) keep subdirectory

In that case, subdirectories specified in @image are created in
my_manual_epub_package/EPUB/images/ and the images copied to the
subdirectories.  No need to change the href.  In the example above, the
href in the HTML file is:
  ../images/subdir/toto.png
and subdir/toto.png is copied to
my_manual_epub_package/EPUB/images/subdir


I like 1) better, but there is a risk of files having the same name but
in two different directories.

Ideas, comments?

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]