I have created a custom class for a personal curriculum. It can be found at


It compiles nicely with pdlatex, XeTeX and LuaLaTeX, but trying to build with htlatex it fails with error:

Error LaTeX Error: File 'email' not found

I don't know enough to debug or build a MWE that raises the same error (have tried). Removing all references to my custom class, removes the error but that isn't a real MWE for the issue itself.

What I'm asking is:

  1. How to correctly debug to be able to understand the error and be able to correctly point to the problem (and maybe fix by myself);

  2. How to build a pristine well written, custom document class that allows me to run also with htlatex and do not raise warnings or errors.

  3. How to solve this issue and be able to build a html version of my latex class.

To reproduce the issue just (assuming Unix)

git clone https://github.com/igormorgado/elegantcv
cd elegantcv
make html

PS: I know that create external references isn't the best way to handle SO question, but it would be better paste the whole class here? If so. I can do it.


I've got another error with the sample file in your repo, it was caused by the table. The issue is that Memoir, which you use as the base class, defines \cmidrule and other commands from the Booktabs package directly, instead of requiring the the package. Because of that, tex4ht cannot load patched versions of these commands and compilation error happens. I've fixed that in the tex4ht sources, so it shouldn't happen in the future. The problem is that TeX Live is currently frozen, so the fix will be included only in TL 2019.

In the meantime you can use the following configuration file, elegantcv.4ht:

\input booktabs.4ht

The line \input booktabs.4ht needs to be removed once TL2019 is released, because it would clash with the code in memoir.4ht.

It is possible to put other stuff in the elegantcv.4ht file, for example redefine macros from your class to insert HTML code. You can put the tags directly here, or, better in a configuration file. See my tutorial for details. I would surely add some CSS styling.

This is how it looks out of the box:

enter image description here

  • Nice! I had noticed that issue, but I thought it was completely unrelated. It has worked. Thanks for pointing out your tutorials. I will read them. Also It would be nice to learn about to set some CSS stylish based on my custom commands. – Lin Mar 16 at 1:16
  • Just to add, I noticed that 2 hlines where created before and after the table, also, the hbar (created by cmidrule) do not looklike their memoir counterpart. Should I: a. moveout from memoir and use standard article; b. create custom CSS configuration ?; or c. wait for a fix somewhere else? – Lin Mar 16 at 1:20
  • @Lin it is best to create HTML markup for your commands and then use the \Css commands for styling them. You can also include external CSS for overall design (colors, margins, fonts, etc.) using \Configure{AddCss}{filename.css}. – michal.h21 Mar 16 at 14:28
  • @Lin you may need several compilation steps to get the hlines correctly. but you are right that especially the cline doesn't look right. It may be best to fix that using CSS. each element in the table has unique id attribute, so it is possible to fix style them directly. – michal.h21 Mar 16 at 14:32

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.