Skip to main content
8 votes
Accepted

Pre-compiled mathjax output using mathjax node in make4ht or htlatex

Edit: The current version of make4ht now contains an extension for mjcli. It can be requested using make4ht -f html5+mjcli filename.tex Here is a sample document. There is a command line application ...
michal.h21's user avatar
  • 51.2k
8 votes
Accepted

\mathds from dsfont package works with latex and not with htlatex

This issue is not caused by tex4ht, the math is rendered by MathJax. It seems that it doesn't support the \mathds command, so you need to provide some definition for MathJax. Moreover, it seems that ...
michal.h21's user avatar
  • 51.2k
8 votes
Accepted

htlatex, garamond fonts, and nulled "ff" and "fi" strings

The issue is that there are no support font files for EB Garamond or other fonts you tested. tex4ht needs supporting htf files for 8-bit fonts. They contain mappings from the font characters to ...
michal.h21's user avatar
  • 51.2k
7 votes

LaTeX doesn't recognize \columncolor from the colortbl package when when it's in a command

As the error message correctly shows, \columncolor is not defined by the colortbl package. It is just used as a placeholder in a modified array preamble parser so that the colour specification can be ...
David Carlisle's user avatar
7 votes
Accepted

Use utf-8 encoding instead of iso-8859-1

You need to tell tex4ht to use utf-8 encoding. It is a little bit complicated using htlatex: htlatex filename.tex "xhtml,charset=utf-8" " -cmozhtf -utf8" It is easier to require it using make4ht ...
michal.h21's user avatar
  • 51.2k
7 votes
Accepted

Graphics scaling in tex4ht

Edit: The code bellow is now built-in to TeX4ht sources, you can require it using the Gin-percent option. It may take some time to be included in TeX Live though. That linked answer is really old and ...
michal.h21's user avatar
  • 51.2k
6 votes

Xelatex conversion to .doc/.odt/.rtf/.html after running biblatex?

Your main issue is that you can't include the TeX file in the compilation. I can't reproduce this issue, I guess that it is some issue with spaces in your file path. Anyway, once you manage to ...
michal.h21's user avatar
  • 51.2k
6 votes

Ideal directory structure for make4ht, clean build

You can copy the generated files to different directory using make4ht with --output-dir (or -d) option, so you can try that: make4ht -d html tex/main.tex It will left your temporary files in ...
michal.h21's user avatar
  • 51.2k
6 votes
Accepted

Svg output for Mathematics using htlatex or tex4ht

Miktex packages for tex4ht have been updated last week, they should be fully synchronized with the current state of tex4ht development. If you have the updated system, it is possible to to request the ...
michal.h21's user avatar
  • 51.2k
5 votes

htlatex with minted

You can use --shell-escape (or -s shortdd) option provided by make4ht: make4ht -s document.tex If you want to use htlatex, it is a little bit more involved, as parameters for LaTeX are passed as ...
michal.h21's user avatar
  • 51.2k
5 votes

No images in htlatex (tex4ht)

I think that it is best to convert math to MathML and use MathJax to render it. Native LaTeX labels work with no problems this way. All we need to do is to use simple config file, which will provide ...
michal.h21's user avatar
  • 51.2k
5 votes

Generation of simple, CSS-less HTML with htlatex

You can use htlatex myfile.tex "html,css-in" This will embed css into the html file. Note that, you may need to execute the command two times because the "css-in" option uses the .css file ...
Kartal Tabak's user avatar
5 votes

Problem with the arrow of vectors using TIKZ and Tex4ht

Edit: I've sutup repository with fixed tex4ht drivers for Pgf here Incidentally, this is the same issue as in another recent question: TikZ tex4ht export creates SVG files that have <?xml version="...
michal.h21's user avatar
  • 51.2k
5 votes
Accepted

htlatex: customising the build process

Image conversion is executed by the t4ht command. It has -p option, which can suppress the image generation when the target file exists. You can options to t4ht using slightly complicated htlatex call:...
michal.h21's user avatar
  • 51.2k
5 votes
Accepted

How do I convert LaTeX containing arbitrary Unicode to XHTML?

If you want to use arbitrary Unicode characters, you need to use TeX engine with Unicode support. This means either LuaTeX or XeTeX. htlatex uses pdfTeX as the compilation engine. pdfTeX has only ...
michal.h21's user avatar
  • 51.2k
5 votes
Accepted

Filenames of images in tex4ht

The original image files should be used by default. The behavior you describe is an issue which was caused by a recent update to the Graphics package. I've updated the TeX4ht sources with a fix, so it ...
michal.h21's user avatar
  • 51.2k
4 votes

Trouble building a site with frames using Tex4ht

I think this might be helpful. The \tableofcontents used in the TeX file is now commented as this cause the duplication of the Contents title in the frame. The modified TeX file is given below: \...
Jagath's user avatar
  • 4,297
4 votes
Accepted

Convert a document using ebproof to HTML?

You can configure the prooftree environment to produce image with tex4ht. It would be better to produce clean HTML or MathML code, of course, so I will try to look at this issue later. Try the ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

tex4ht: custom list of .... (part 1 of 3)

If you want to use custom TOC like list, you need to make a configuration for it. In your case, I would create sty file with your custom commands: % cmhloc.sty \ProvidesPackage{cmhloc} \newcommand{\...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

htlatex: tweaking the MathML output for numbers with more than one digit

Edit 2: The updated LuaXML library is on CTAN and in TL, so it is no longer necessary to update it manually. I also added mechanism for filters that modify the DOM to make4ht. Basic DOM filters can ...
michal.h21's user avatar
  • 51.2k
4 votes

Latex: create html for opening in word

tex4ht is a system for conversion from TeX to many different output formats, such as HTML, ODT or Epub. The system consists from several different programs, which are executed by a compilation script. ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

Configuring htlatex for section names in html

Try this configuration file: \Preamble{xhtml} \newcounter{sectid} \def\myendp{\ifvmode\IgnorePar\fi\EndP} \Configure{section}{\stepcounter{sectid}\myendp\HCode{<div class="content" id="content-\...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

Use tabu with htlatex

The issue with tabu is that it redefines lot of LaTeX macros, which is the same thing as tex4ht does. And they clash with each other. It was quite hard to create patch file for tex4ht, tabu.4ht, that ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

htlatex: img with alt tag and custom class

I would use a following configuration file: \Preamble{xhtml} \makeatletter \DeclareGraphicsExtensions{.png,.jpg,.svg} \define@key{Gin}{alt}{\Configure{GraphicsAlt}{#1}} \def\mygraphics{{\Configure{...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

tex4ebook (or htlatex) doesn't treat (mathematical) accents properly?

Since you are targeting eBooks with poor MathML and even CSS support, I guess the only universal fix is to use images for math. Try the pic-m option for converting all inline math to images: ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

Htlatex and beamer, strange output with \emph

Beamer patches common font commands in order to support overlays. For most of them, it uses the original command definition, so tex4ht configurations still work. But it redefines \emph completely, so ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

Problems with graphicx and htlatex

tex4ht compiles document in the DVI mode, where the only graphics format supported out of the box is eps. If you want to use jpg, png, or svg, you need to declare list of extensions that should be ...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

split environment with tex4ht

You can try the following configuration file: \Preamble{xhtml} \makeatletter \DeclareRobustCommand\[{% \bgroup% \mathdisplay@push% \st@rredtrue \global\@eqnswfalse% \mathdisplay{equation*}% \...
michal.h21's user avatar
  • 51.2k
4 votes
Accepted

htlatex-Biber-htlatex compilation error (not present in Latex-Biber-Latex)

This example works for me, but I suppose you actually wanted to use the example you posted on TeX4ht mailing list. This example actually fails with TeX4ht, it is caused by custom bibliography macros. ...
michal.h21's user avatar
  • 51.2k

Only top scored, non community-wiki answers of a minimum length are eligible