
Cuando se usa htlatex
con "html,fn-in", el html generado tiene
<tspan font-family="cmti" font-size="10">should be italics </tspan>
pero esto no se representa en HTML (al menos no en Chrome y Safari).
Un simple
<span class "cmti-10x-x-109">finally italics </span>
Funcionaría perfectamente.
El problema no es realmente html, sino el hecho de que el epub que genero tampoco se procesa... usando ebook-convert
(Estoy usando el memoir
paquete).
¿Cómo debería solucionar esto?
Editar Aquí un ejemplo mínimo:
\documentclass[a5paper,11pt]{memoir}
\usepackage{tikz}
%% Below just a command to show colors
\newcommand*{\titleTH}{\begingroup
\raggedleft
\vspace*{\baselineskip}
{\large Welcome to}\\[0.167\textheight]
{\Large \bfseries Something}\\[\baselineskip]
{\textcolor{red}{\Huge Red}}\\[\baselineskip]
{\small No reason to be scared\\}\par
\vfill
{QED}\par
\vspace*{3\baselineskip}
\begin{tikzpicture}[overlay, remember picture]
%% Here there was the loading of a picture
\end{tikzpicture}
\endgroup}
\begin{document}
\pagestyle{empty}
% Commenting out this line would make the following text render right
\titleTH
\newpage
Here I write \textit{the part that should be} italics, \textbf{D'OH!}
\end{documento}
El problema parece ser el paquete tikz, ya quemichal.h21sugirió.
Respuesta1
tikz
Configura muchas cosas en cada imagen cuando se ejecuta con tex4ht
. desafortunadamente, una de estas configuraciones es global y persiste incluso después del final de la imagen y es la configuración utilizada para detectar cambios de fuente.
Puede intentar utilizar este .cfg
archivo para restablecer esta configuración al valor normal después del final de cada imagen tikz:
\Preamble{xhtml}
\begin{document}
\makeatletter
\let\old@endpicture\pgfsys@endpicture
\def\pgfsys@endpicture{%
\Configure{htf}{0}{+}{<span\Hnewline%
class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}%
\old@endpicture%
}
\makeatother
\EndPreamble
ejecutarlo con
htlatex filename cfgname
o
make4ht -c cfgname.cfg filename
el resultado: