When using the package lettrine and tex4ebook with the following MWE, it leads to an error message:

Package xkeyval Error: `slope' undefined in families `L'.
[ERROR]   htlatex: ./Testdocument_lettrine-ebook.tex    1496  
 Package xkeyval Error: `nindent' undefined in families `L'.

This is the MWE:


\lettrine[lines=2,slope=-1.0em,findent=0.2em,nindent=-5pt]{V}{on} allen Artefakten, die Archäologen


Is there a fix to this?

1 Answer 1


Try this version of lettrine.4ht. It should define all keys recognized by lettrine:

% lettrine.4ht (2018-11-05-14:51), generated from tex4ht-4ht.tex
% Copyright 2012-2018 TeX Users Group
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
% This work has the LPPL maintenance status "maintained".
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2018-11-05-14:51}


      \HCode{<span class="lettrine-}#2\HCode{">}#2\HCode{</span>}
% a: before lettrine
% b: after lettrine
% c: before letter
% d: between letter and string
% e: after string
% f: before ante
% g: after ante
   {\HCode{<span class="lettrine">}}
   {\HCode{<span class="lettrine-letter">}}
   {\HCode{</span><span class="lettrine-line">}}
   {\HCode{<span class="lettrine-ante">}}
% Define default Css
\Css{.lettrine{float: left;
    line-height: 0.7; 
    margin-left: -0.1em;
    margin-bottom: -.5em; margin-right: 0.2em;
\Css{.lettrine-ante{vertical-align: top;}}
\Css{.lettrine-letter{font-style: normal;
    font-size: 4em; color: gray;}}
\Css{.lettrine-A{margin-right: 0.3em;}}
\Css{.lettrine-A + .lettrine-line{margin-left: -0.4em;}}
\Css{.lettrine-J{line-height: 1; margin-right: 0;}}
\Css{.lettrine-H, .lettrine-I, .lettrine-N, .lettrine-U{margin-right: 0;}}
\Css{.lettrine-V + .lettrine-line{margin-left: 0.3em;}}
\Css{.lettrine-Q{padding-bottom: 1em;margin-top: -0.6em;}}
\Css{.lettrine-line{font-variant: small-caps;}}
\Css{p.indent{text-indent: 0em;}}


This is the result:

enter image description here

  • Great, Michal, in the MWE it works, no errors. Probably in my bigger book project it works too. Thank you so much.
    – Thomkrates
    Commented May 13 at 18:34
  • @Thomkrates that's good to hear! I will update TeX4ht sources, so the fix is available in TeX Live soon.
    – michal.h21
    Commented May 13 at 18:51

You must log in to answer this question.

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