Tex4ebook seems to ignore the \setsecheadstyle command with the memoir class.









\tableofcontents \newpage






Running normal Latex gives an italic section heading:

Latex output

Running tex4ebook gives the default bold section heading:

Tex4ebook output

Is there any way to fix this?

Thank you.

1 Answer 1


You need to specify the section format using custom CSS rule. First of all, you need to find the element which needs to configure in the HTML file:

<h3 class="sectionHead"><span class="titlemark">1.1   </span> <a 

In this case, we need to configure h3 element with sectionHead class. We can then use the following CSS in the .cfg file:



The result:

enter image description here

  • Thanks for the solution. I am still confused about when you have to add custom css code to the config file. Are there any guidelines for this or is it trial and error? Thanks again.
    – user41974
    Feb 11, 2017 at 3:38
  • @user41974 tex4ht tries to preserve the document structure mainly. The styling is done by some default CSS styles, so if you want to change appearance of something, you usually need to figure out how it is encoded in the HTML file and provide your custom CSS.
    – michal.h21
    Feb 11, 2017 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .