Skip to main content
13 votes
Accepted

What is so special about $\ln$ when using TeX4ht in MathJax mode?

amsmath defines math operators in a non-robust way, so they are partially expanded before written into an auxiliary file, e.g. while writing the table of contents. To fix this, tex4ht loads a file .../...
Marcel Krüger's user avatar
11 votes

Convert Latex to MathJax-HTML

I would personally prefer using pandoc for this task, It's a one step solution and the output is much better in my opinion. To convert files from one markup format into another, pandoc is your swiss-...
Doron Behar's user avatar
10 votes
Accepted

comparing tex4ht, lwarp and latexml on same document?

A substantial lwarp example is here: this is a 65 page set of lecture notes for a course I teach. It includes tikz graphics, cleveref references and a lot of maths. I had to supply some js and css ...
Fran Burstall's user avatar
9 votes
Accepted

Choppy equations with tex4ht

It seems that Miktex haven't updated the last fixes regarding default quality of images in tex4ht. It uses dvipng for the conversion now, and the quality got much better. There are also other ...
michal.h21's user avatar
  • 51.8k
9 votes
Accepted

Is animate package compatible with htlatex

Edit: here is the final animation. This won't be easy. I cannot even display your PDF animation on my machine, because animate package uses some JavaScript in PDF trickery which is not supported by ...
michal.h21's user avatar
  • 51.8k
9 votes
Accepted

How to use my own HTML template with make4ht?

The easiest way is to use configurable hooks that TeX4ht provides for basic HTML configuration. Here is the basic info that is put in the .log file when you use the info option for make4ht: \Configure{...
michal.h21's user avatar
  • 51.8k
9 votes
Accepted

Scaling delimiters in MathJax

As David Carlisle said, this is a bug in TeX4ht. <mo> elements around parentheses should have set the stretchy="false" attribute. I will fix that in TeX4ht sources. Until this fix is ...
michal.h21's user avatar
  • 51.8k
8 votes
Accepted

after changing to \usepackage{fontspec} now make4ht do not compile my Latex file in lualatex mode

Edit: Fontspec support have been just added to tex4ht, you can get it after TL update. Both XeLaTeX and LuaLaTeX are supported, although the implementation is different for both engines. If you use ...
michal.h21's user avatar
  • 51.8k
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.8k
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.8k
8 votes
Accepted

tex4ht \Css code works using standard book class but has no effect using koma-script scrbook class

If you compare the generate HTML files, you will find, that tex4ht adds a table to the caption in case of scrbook: <div class="caption"> <table class="caption"> <tr style="...
Schweinebacke's user avatar
8 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.8k
8 votes
Accepted

Error using \ifdefined\HCode with TeX4ht, but it works in LuaTeX

Edit: You can also use make4ht filters to edit the math content in the HTML file to get something that MathJax supports. For example, the following build file converts dgroup* environment to align*, ...
michal.h21's user avatar
  • 51.8k
7 votes

Is animate package compatible with htlatex

Package animate is now compatible with htlatex (tex4ht). As of version [2018/11/20] package animate can produce self-contained, standalone animated SVG files that can be embedded into HTML using the &...
AlexG's user avatar
  • 55.5k
7 votes
Accepted

why does tex4ht not rotate images?

tex4ht indeed doesn't support the image rotation, but the support can be added using some hacks. Try the following config file: \Preamble{xhtml} \makeatletter \Configure{GraphicsAlt}{ALT\ifdefined\...
michal.h21's user avatar
  • 51.8k
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.8k
7 votes

Latex to HTML conversion (basic explanation)

Regarding tex4ht: it is a system which use TeX itself for the conversion. It redefines TeX commands to insert special instructions, which can be configured to insert HTML or XML codes. Positive ...
michal.h21's user avatar
  • 51.8k
7 votes
Accepted

Use ODT Template for make4ht

Edit: the development version of make4ht has the following code integrated as odttemplate filter and extension. It can be used in the following way: make4ht -f odt+odttemplate filename.tex "...
michal.h21's user avatar
  • 51.8k
7 votes
Accepted

why \textcolor works but not \color in tex4ht?

Edit: I've added the color option to TeX4ht sources. After the TeX Live update, it should be possible to get colors using: $ make4ht filename.tex "color" The warnings that are included in ...
michal.h21's user avatar
  • 51.8k
7 votes
Accepted

A new problem with tex4ht and tikz

Try the following configuration file: \Preamble{xhtml} \tikzset{every node/.style={/pgf/tex4ht node/escape=true}} \begin{document} \EndPreamble From the TikZ manual: Selects the rendering method ...
michal.h21's user avatar
  • 51.8k
7 votes

why does make4ht generate an extra : in this math expression?

I find that that the issue you've encountered goes away if I get rid of the specious pairs of curly braces in your code. Here's a screenshot of the displayed html file obtained by running make4ht main....
Mico's user avatar
  • 519k
7 votes
Accepted

tex4ht place maintext and footnote in the same file

Sure, you can achieve what you want using the fn-in option: make4ht -x httest "fn-in" I would use make4ht instead of htxelatex, as it has much more features and fixes some issues. This is ...
michal.h21's user avatar
  • 51.8k
7 votes
Accepted

How can I convert a TeX file to Microsoft Word or LibreOffice format?

Converting to ODT with make4ht Today make4ht is the best tool for this purpose. Write your LaTeX file as usual, with the proviso that you avoid exotic syntax and remove all packages that are not ...
musarithmia's user avatar
  • 12.6k
7 votes
Accepted

13 figures OK, 14 figures gives ! LaTeX Error: Counter too large. only with tex4ht and subfigure

It seems that the subfigure counter doesn't reset at the beginning of each figure. Each subfigure environment updates it and prints as an alphabetic label. Once you run out of the letters in alphabet, ...
michal.h21's user avatar
  • 51.8k
6 votes
Accepted

tex4ht corrupts "--" inside CDATA in the HTML file

Hyphen character is made active by \ScriptEnv command, which means that it calls a command when it is encountered in the environment defined with it. The ScriptEnv definition is little bit cryptic: \...
michal.h21's user avatar
  • 51.8k
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.8k
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.8k
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.8k
6 votes
Accepted

Different SVG Output for mathematics symbols with dvisvgm used with htlatex or make4ht

Edit: As Martin mentioned in the comments, some glyphs may exceed it's bounding box, which may result in a cropping of theirs parts. It is possible to tell dvisvgm to trace the actual glyph shape ...
michal.h21's user avatar
  • 51.8k
6 votes
Accepted

Latex to HTML conversion (basic explanation)

Try pandoc long version: pandoc -f filename.tex -t html -o output.html short version: pandoc filename.tex -o output.html
Agile Bean's user avatar

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