
Ao usar htlatex
com "html,fn-in", o html gerado tem
<tspan font-family="cmti" font-size="10">should be italics </tspan>
mas isso não é renderizado no html (pelo menos não no Chrome e no Safari).
Um simples
<span class "cmti-10x-x-109">finally italics </span>
funcionaria perfeitamente.
O problema não é realmente o HTML, mas o fato do epub que eu gero a partir dele também não renderizar... usando ebook-convert
(Estou usando o memoir
pacote.)
Como devo consertar isso?
Editar Aqui um exemplo 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}
O problema parece ser o pacote tikz, comomichal.h21sugerido.
Responder1
tikz
configura muitas coisas em cada imagem quando é executada com tex4ht
. infelizmente, uma dessas configurações é global e persiste mesmo após o término da imagem e é a configuração usada para capturar alterações de fonte.
Você pode tentar usar este .cfg
arquivo para redefinir esta configuração para o valor normal após o final de cada imagem 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
execute-o com
htlatex filename cfgname
ou
make4ht -c cfgname.cfg filename
o resultado: