michal-h21 / tex4ebook

Converter from LaTeX to ebook formats (epub, mobi). Using tex4ht and texlua scripts.
311 stars 32 forks source link

Problem with --build-dir and images #126

Open cedounet opened 5 months ago

cedounet commented 5 months ago

if image is in a subdirectory it does not get found

with a document including a picture from a subdir:

❯ cat mwe.tex
\documentclass{article}
\begin{document}
    \includegraphics{cover/cover-page.jpg}
\end{document}

this breaks:

❯ tex4ebook --lua --build-dir ebook_bld -d epub -f epub mwe.tex
[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: mwe.tex
[ERROR]   mkutils: File ebook_bld/cover/cover-page.jpg doesn't exist
cp: ebook_bld/cover/cover-page.jpg: No such file or directory
HTML Tidy for Mac OS X released on 31 October 2006 - Apple Inc. build 8018
[STATUS]  tex4ebook: Conversion finished

but this is ok

❯ tex4ebook --lua -d epub -f epub mwe.tex
[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: mwe.tex
HTML Tidy for Mac OS X released on 31 October 2006 - Apple Inc. build 8018
[STATUS]  tex4ebook: Conversion finished

I am on that version

❯ tex4ebook --version
tex4ebook v0.4
michal-h21 commented 5 months ago

Thanks for the report, it indeed doesn't work. I hopefully fixed it in the latest commit in make4ht.