michal-h21/tex4ebook

Problem with size of figure

Closed this issue · 2 comments

Hi

It looks like when a figure is included with the option [width=\textwidth], tex4ebook converts it while setting the width and height to the same value even if the original figure was not square.

Here is the MWE. Replace the pdf with your picture of choice:

\documentclass{article}
\usepackage{tex4ebook}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=\textwidth]{MWE.pdf}
\end{document}

In the output (with epub3), one can see: src='MWE-.png' width='345' height='345' (of course, I noticed it because on a viewer the resulting image was distorted).

Best,
Frédéric

Hi Frédéric, you can find some tips for using of images here. In this case, it will be best to generate bounding box information for images using ebb -x *.pdf. LaTeX will be then able to correctly calculate image height.

Best,
Michal

Hi Michal

Sorry I had missed the info. It indeed solved the problem.

Thanks,
Frédéric