[tex4ht] Fwd: Getting rid of <span class="cmr-9"> breaks in footnotes

Michal Hoftich michal.h21 at gmail.com
Fri Jul 3 20:46:17 CEST 2020

Oh, I forgot to reply to all. I am experimenting with Neomutt and I am
not comfortable here yet.

My original reply:

Hello Jürgen!

On Fri, Jul 03, 2020 at 08:04:25PM +0200, Jürgen Hubert wrote:
>Hello everyone! I'm currently in the process of finalizing my ebook (the Umlaut index issue I asked about some time ago has been solved based on your suggestion, by the way - thanks!), but I've just discovered one more snag.

Good to hear :)

>I'm using a lot of footnotes in my book. They look fine in the epub files, and they look fine in any preview software I use.
>Note that this issue _only_ shows up in the footnote pop-up - once you click on "Go To Footnotes", the text appears normal.
>Thus, in order to get rid of this problem I'd have to get rid of that '</span><span class="cmr-9">' in the middle of the text (which serves no useful purpose that I can see anyway). Is there a way of doing that?
>A quick reply would be appreciated - I had hoped to launch my book near
>the end of next week (although I can delay for a bit, if necessary).

These <span> elements are inserted by HT Fonts. You can suppress them,
but it is then necessary to provide configurations that insert HTML tags
for \textit, \textbf and similar commands. Fortunately, it is possible
to do that using the "fonts" option, so you don't need to configure them
yourself. So it is necessary just to configure footnotes to ignore HT

Try the following .cfg file:

    {\HPage{}\HCode{<div class="footnote-text">}\par\NoFonts}
    {\ifvmode \IgnorePar\fi \EndP

It is a direct copy from html4.4ht, I've just added the \NoFonts and
\EndNoFonts commands, so no <span> elements will be used in the footnote

Best regards,

More information about the tex4ht mailing list.