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.


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 '17 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 '17 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.