
De acuerdo con las pautas de publicación Kindle de Amazon, necesito agregar xmlns:mbp="http://www.kreutzfeldt.de/mmc/mbp"
etiquetas <html>
en mi archivo html.
He probado muchas variantes de lo siguiente:
\documentclass{article}
\input{tex4ht.sty}
\Preamble{xhtml}
\begin{document}
\Configure{PROLOG}{HTML+,HTML,@HTML}
% \Configure{HTML+}{\HCode{plus-html test}}
% \Configure{@HTML}{\HCode{at-html test}}
% \Configure{HTML}{\HCode{naked-html test}}
\Configure{*XML-STYLESHEET}{\HCode{xmlss test}}
\Configure{@HEAD}{\HCode{head test} }
\HCode{<meta name="parameter" content="content">}
\Configure{TITLE+}{This is my title}
\EndPreamble
Content
\end{document}
La mayoría de ellos logran insertar algo en la <head>
sección, pero no entra nada en la <html>
etiqueta. \Configure{PROLOG}
No parece hacer mucha o ninguna diferencia. Cuando no comento la \Configure{HTML}
línea, aparece un error:
! Argument of \Configure has an extra }.
<inserted text>
\par
l.16 \end{document}
Obviamente, puedo insertar esto a mano, pero parece que tex4ht está configurado para hacerlo. <rant>
De todas las características mal documentadas de tex4ht, las que tienen que ver \Configure{PROLOG}
parecen ser las peores con las que me he topado hasta ahora.</rant>
Respuesta1
\Configure{HTML}
tiene dos parámetros, usted solo tiene uno en su ejemplo, por lo que esta puede ser la fuente del error. Tenga en cuenta que existe \Configure{@HTML}
para insertar código en <html ...>
. xml:lang
con el código de idioma correcto se inserta de forma predeterminada, por lo que deberá proporcionarlo usted mismo. Y por último, no es necesario utilizar \Configure{PROLOG}
.
.cfg
Archivo sencillo :
\Preamble{xhtml}
\Configure{@HTML}{xml:lang="en" xmlns:mbp="http://www.kreutzfeldt.de/mmc/mbp" \Hnewline}
\begin{document}
\EndPreamble
da como resultado:
<html xml:lang="cs" xml:lang="en" xmlns:mbp="http://www.kreutzfeldt.de/mmc/mbp"
xmlns="http://www.w3.org/1999/xhtml"
>
Respuesta2
Las \Configure
declaraciones deben colocarse antes \begin{document}
para poder tex4ht
procesarlas correctamente, por ejemplo, algo como esto:
\documentclass{article}
\input{tex4ht.sty}
\Preamble{xhtml}
\Configure{HTML}
{\HCode{<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mbp="http://www.kreutzfeldt.de/mmc/mbp">}}
{\HCode{</html>}}
\Configure{@HEAD}{\HCode{<meta name="parameter" content="content">}}
\Configure{TITLE+}{This is my title}
\begin{document}
\EndPreamble
Content
\end{document}