I need to convert a novel (NO math, but lots of citations and direct speech) from current PDF/printed paper to high-quality epub/azw4 to publish as eBook.
Current layout is based on memoir
and quotmark
.
I know I can use htlatex
to produce a reasonable output, but that is not really satisfactory because it produces a single .html
file with little control over chapters that do not behave "as expected" (i.e.: start a chapter at top of page and not like a "continuous ribbon").
I would like to have a behavior similar to standard Kindle Create
output (I tried going the latex->docx->KindleCreate way, but it messes badly with direct speech and "maiuscoletto" I use heavily (using Italian language might add noise to process as MSWord has "localized" Style names possibly unknown to other tools).
Can someone suggest a viable alternative?
I did not find a suitable answer perusing similar questions.
Best Answer
tex4ebook can produce
ePub
,ePub3
andmobi
formats from LaTeX sources. It usestex4ht
(the same system ashtlatex
uses) for the LaTeX to HTML conversion. The HTML files are then processed and packed to produce the requested output. It needs thekindlegen
command installed for themobi
output.Basic usage:
You may want to add some custom metadata, cover image or a nice CSS. It can be added using a configuration file:
Save the file as
myconfig.cfg
and require it intex4ebook
using the following command:The config file adds a cover image named
conver.png
(it must exist in the current directory) and the CSS file provided by The Blitz Framework. You may add how many CSS files you want using the\Configure{AddCss}
BTW, even
htlatex
can produce separate HTML files for each chapter:The number in the last parameter specifies at which sectioning levels should be the files partitioned, there are four possible levels (up to
\subsection
I think). It produces some navigation in each file, which is not that useful in ebooks.tex4ebook
removes the navigation, so it is still preferable to use it instead ofhtlatex
.