I am using tex4ebook to convert a memoir class document into epub. The document has several images included thru \includegraphics{}. The images are saved as .eps in the same folder as the .tex file. I also have the graphics.4ht file in the same folder. The epub is generated with following issues:
- The file name of image appears before the image itself (see screenshot)
- Though I have given the option [width=\textwidth], the image appears shrunk
Couple of additional issues:
A1) Though I have set title{} and author{} in the preamble, both are missing from the epub
A2) I want to include endnotes that appear as a chapter at the end of the book, preferably split into chapters, and also hyperlinked to be displayed as a popup in the reader by clicking the endnotemark in the main body. In the PDF version, I am able to get all this (including the PDF version of hyperlinked notes and notemarks) using \postnote. In the epub with tex4ebook, I am able to get the second part (popup of endnote in the ereader - see second screenshot) by using \footnote. Is there a way to get the first part also - get all the notes printed as a end of book chapter as part of backmatter?
Very much appreciate guidance on:
How to prevent the filename from appearing in the epub
How to ensure that image in epub is scaled to width of text in the reader
I am using MacTex (Tex Live Utility 1.54 and have checked that packages are up to date as of this writing). So far, checking of epub output has been on iBooks in Mac. Yet to check on an ereader.
Here is the MWE based on the original book.
Thanks so much in advance for any help in resolving these issues.
\documentclass[demyvopaper, openany, 10pt]{memoir}
\usepackage{tex4ebook} % FOR EPUB CONVERSION
\linespread{1.15}
\settocdepth{chapter}
\usepackage{anyfontsize}
\usepackage{charter}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[british]{babel}
\usepackage[setpagesize=false, hidelinks]{hyperref}
\usepackage{xurl} % WORP WRAP LONG URLS
\usepackage{graphicx} % TO EMBED IMAGES
\usepackage[format=hang,]{caption}
\captionsetup{justification = raggedright,
singlelinecheck = false}
\captionsetup{labelfont={sc}}
\captionsetup{font={bf}}
\newcommand{\source}[1]{\caption*{\raggedright{\fontsize{7}{8}\selectfont{\normalfont{Source: {#1}}}}} } % TO ADD "Source" TO FIGURES LEFT-ALIGNED, FONT SIZE 7
\usepackage{longtable} %
\usepackage{afterpage} % START LONGTABLE AT TOP OF NEXT PAGE
\usepackage{enumitem, amssymb} % LISTS INSIDE TABLE
\newlength\mylength % CENTERED COLUMN {C {WIDTH}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newlist{myitemize}{itemize}{1}
\setlist[myitemize]{label={--},nosep,leftmargin=*} % CUSTOM LIST INSIDE TABLE
\newlist{todolist}{itemize}{2} % CUSTOM LIST FOR CHECKBOX
\setlist[todolist]{label=$\square$}
\usepackage[skins]{tcolorbox} % RESPONSE BOX FOR BR-TOOL
\usepackage{etoolbox} % TO USE AtBeginEnvironment
\AtBeginEnvironment{longtable}{\fontsize{8}{8}\selectfont\fontfamily{phv}\selectfont} % ADJUST FONT SIZE & FAMILY IN LONG TABLES
\usepackage{lscape} % FOR LANDSCAPE ENVIRONMENT
\usepackage{rotating}
\setlength{\textfloatsep}{0.15in} % SPECIFY SPACE BETWEEN TEXT AND FLOATS
\usepackage{ragged2e} %TO ALIGN TEXT IN BOXES
\usepackage{setspace} % TO CHANGE LINE SPACING
\usepackage{framed} % FOR TEXT IN BOXES
\def\hyph{-\penalty0\hskip0pt\relax} % FORCED HYPHENATION OF WORDS
\usepackage{lipsum}
\title{MWE}
\author{Author name}
\date{}
% MAIN CONTENT
\begin{document}
\chapter*{Chapter Title 01}
\lipsum{1-2}
% INSERT FIGURE 1.1 HERE
\afterpage{
\begin{figure}[thp]
\begin{center}
\includegraphics[width=\textwidth]{fig0101}
\end{center}
\source{This figure was sourced from the internet\footnote{\url{https://people.sc.fsu.edu/~jburkardt/data/eps/eps.html}}}
\caption{Petersen graph}
\label{labfig0101}
\end{figure}
}
\lipsum{3-4}
%\backmatter
%\printpagenotes
\end{document}