New answers tagged

3

You can use \Configure{IMG}: \Preamble{xhtml} \begin{document} \Configure{IMG}{\HCode{<img class="my-class" src="}}{\HCode{" alt="}}{}{\HCode{"}}{\HCode{ />}} \EndPreamble This produces <p class="noindent" ><img class="my-class" src="./src/images/screenshot--superman.png" alt="PIC" /> </p> if you want to preserve the image ...


2

The fontenc package shouldn't cause problems with tex4ht, although it is best to use it together with inputenc (or luainputenc in the case of LuaLaTeX). It would be nice if you could find any example where it fails and report it. This code compiles fine: \documentclass[12pt]{article}% \usepackage[T1]{fontenc} \usepackage[utf8]{luainputenc} ...


2

Your example doesn't work even with pdflatex, so it isn't really surprise that it doesn't work with tex4ht as well. Easiest solution to get non-european scripts working with tex4ht is to use helpers4ht bundle, in particular emulation of fonstspec package. helpers4ht aren't on CTAN yet, you need to install it yourself. Now back to your example, it is little ...


0

I found it. Instead of \usepackage[utf8]{inputenc} I need to use \usepackage[utf8x]{inputenc} UPDATE! Too hasty. That handles the one-half character and the degree symbol, it does not handle Japanese Katakana.


2

It seems that Mathjax interprets these dollar signs as math delimiters. Solution is to configure tex4ht to save inline math in rounded bracket form and to disable dollar processing in mathjax: \Preamble{xhtml,mathml} \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}} ...


1

Ok, so it seems that there is an issue between hyperref and varioref with tex4ht: \documentclass{article} \usepackage{hyperref} \usepackage{varioref} % \let\vref\ref \begin{document} \section{first}\label{section} See~\vref{section} And \vpageref{section}. And a range: \vrefrange{section}{second} \section{second}\label{second} \end{document} This ...


1

edit: I've posted a patch at tex4ht bug tracker, it should be fixed in TeX Live soon. There is missing support for \nameref* command in tex4ht configuration file hyperref.4ht, it seems. Missing \@namerefstar command is reported during compilation. This is strange, as tex4ht does normally support commands defined in packages out of the box, it needs to ...


2

This is a bug in make4ht, it constructs wrong -jobname for LaTeX when a full path to document is specified. The command call to LaTeX is following: latex -jobname=$input "tex4ht.sty loading,\input $tex_file" in your sample, it is latex -jobname=A:/test_tex_sources/test_article "tex4ht.sty loading,\input A:/test_tex_sources/test_article.tex" correct ...


1

In your case switching make4ht "A:\test_tex_sources\test_article.tex" onto make4ht "A:/test_tex_sources/test_article.tex" should solve the problem. Even if in an operating systems there are backslashes in a path, we change them into slashes for TeX tools.


1

Your example doesn't work even in pdf mode, standard article class doesn't support 16pt option. You can use scrartcl but it will probably change appearance of your document. Anyway, here is a modified example: \documentclass[fontsize=16pt, paper=letter]{scrartcl} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{amsmath} \begin{document} \title{A ...


1

1) the Make:htlatex runs LaTeX once, it isn't the same as calling htlatex script which runs LaTeX three times. It is called three times because of crossreferences and links. You can speed the compilation using mode variable, which can be passed as command line parameter. I usually define draft mode where Make:htlatex is called only once and then compile ...



Top 50 recent answers are included