2

My MWE renders a PDF with two paragraphs with indents and no spacing between paragraphs, which is what I want

\documentclass{memoir}
\usepackage{blindtext}

\begin{document} \blindtext

\blindtext \end{document}

However, when I generate an epub with tex4ebook main.tex, I'm getting no indents and spaces between paragraphs on some readers, like this:

enter image description here

I'm using the memoir class, so tried \setlength{\parindent}{2em} but none of my attempts have retained indenting after the tex4ebook conversion to epub.

Looking at the epub file, the html class for the first para is noindent and the second is indent which is what I want, but the css files has the line p.indent{text-indent:0;}. When I change this to p.indent{text-indent:1.5em;} I get the indent that I'm looking for. Also, if I delete the line p + p{margin-top:1em;} from the css, I get rid of the space between paragraphs.

Is there a way to get these css changes by changing my LaTeX code? Or maybe changing my tex4ebook cfg file?

1 Answers1

2

This one is quite easy, use the p-indent option:

$ make4ht filename.tex "p-indent"

You can read about most of TeX4ht options here, they are the easiest way to change some default values.

This is the result:

enter image description here

michal.h21
  • 50,697