# Tag Info

8

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 Unicode, which is necessary especially for stuff like ligatures or accented letters. Creation of the htf files is not easy, the majority of htf files has been ...

8

Update: It is possible to use the direct colors now. Try this version of colortbl.4ht: % colortbl.4ht (2019-11-21-17:51), generated from tex4ht-4ht.tex % Copyright 1997-2009 Eitan M. Gurari % Copyright 2009-2019 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1....

7

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 non-latin scripts, you need to use a correct Script option in your font declaration, because all Unicode characters used in the document must be declared first....

7

Edit: The current version of make4ht now contains an extension for mathjax-node-page. It can be requested using make4ht -f html5+mathjaxnode filename.tex Here is a sample document. There is a command line application provided by mathjax-node-page, mjpage, which can process the HTML page and replace the LaTeX or MathML code with plain HTML or SVG code, ...

7

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 "odttemplate=template.odt" Original answer: The following build file extracts the styles.xml from a template ODT file. It acts as a filter on the styles file produced ...

7

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 for a text node with the tex4ht driver. When this key is set to false, text is translated P R into svg text, which is somewhat limited: simple characters (...

6

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: \bgroup \catcode\-=13 \catcode$$=1 \catcode$$=2 \catcode\/=0 \catcode\{=12 \catcode\}=12 \catcode\\=12 /gdef/ScriptEnv#1(% /expandafter/...

5

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 using --exact option. I will update tex4ht to use it. In the meantime, you may use a following .mk4 build file: Make:image("svg$", "dvisvgm -n -p${page} --exact ...

4

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 the current dir however. You can remove them using a build file: local function move_file(filename, args) local outdir = args.outdir -- copy files only ...

4

Michal's solution answers my question perfectly. For my use-case I need to repackage it slightly as I want to automatically apply this from within a document class file for a package, so editing pgfsys-tex4ht.def is not an option for me. As this is too long for a comment I give the details here but this is really only a small variation on Michal's ideas. ...

4

The problem is that pgfsys-tex4ht.def sets the encoding of the SVG file to iso-8859-1: \pgfsys@invoke{<?xml version="1.0" encoding="iso-8859-1" standalone="no"?> This definition is hardwired in this file, so it cannot be really changed from the outside, we need to edit pgfsys-tex4ht.def directly. We can use the following macros to get value of ...

4

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-\arabic{sectid}" data-id="\arabic{sectid}">}}{\myendp\HCode{</div>}} {\myendp\IgnorePar \HCode{<h3 class="sectionHead">}\TitleMark\space\...

4

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 enabled to compile your sample document without errors: % we must suppress \everyrow redefintion by tabu, so some macro patching is necessary \def\tabu@...

4

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 should be fixed in TL soon. Meanwhile, you can use the following graphics.4ht file: % graphics.4ht (2019-10-13-23:30), generated from tex4ht-4ht.tex % ...

4

This is a common issue regarding sub- and superscripts in TeX4ht. The _ and ^ characters are not active in the preamble, so commands defined here don't work correctly. It is best to use the \sp and \sb commands instead: \newcommand \coeffX [4][X]{\mathbf{#1}\sb{#2,#3}(#4)} This is the result:

4

It is not so straightforward to get TeX4ht working with Plain TeX. Ulrike already pointed to my older answer. We can use that as a starting point. Save the following code as plain-4ht.tex: % file plain-4ht.tex % the following macro needs to be executed in order to include all .4ht files \csname tex4ht\endcsname I've simplified the code to the bare minimum. ...

3

The problem is clearly this definition from latex.4ht: \NewConfigure{textundescore}[1]{\expandafter \def\csname ?\string\textunderscore\endcsname{\leavevmode#1}} \Configure{textundescore}{\HChar{95}} \HChar includes special instruction for tex4ht DVI processor to replace next character (which is x) with character with value 95. As math is converted to ...

3

You can use make4ht build file for this task. It is possible to load the TeX file, modify it using Lua regular expressions, save it to an temporary file and compile the temporary file. Save the following file as mybuild.mk4: local tempfile Make:add("patchdocumentclass", function(arg) -- open the TeX file and load it as string local filename = arg....

3

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} \usepackage{...

3

It seems like an error in how tex4ht detects font sizes and converts them to css declarations. It is done by tex4ht command, so I don't really know and don't understand how it works, but the following test seems interesting: {\ttfamily\tiny IllustratingTheUseOfDiscreteDistributions \itshape ojoj} {\ttfamily\footnotesize ...

3

This error probably doesn't have anything in common with tex4ht. Try to compile following file with dvilualatex: \documentclass{article} \usepackage[]{graphicx} \begin{document} \includegraphics{someimage.png} \end{document} The error message is the same. The problem is that \includegraphics tries to determine the image bounding box and it reads the file ...

3

I just added installation instructions to make4ht readme, I will copy Windows instructions here: See a guide by Volker Gottwald on how to install make4ht and tex4ebook. Create a batch file for make4ht somewhere in the path: texlua "C:\full\path\to\make4ht" %* you can find directories in the ...

3

This issue is not easy to fix. The well known issue is that tex4ht doesn't support OpenType fonts, they cause the compilation to fail. To overcome this issue, we use hacked versions of fontspec package with LuaLaTeX and XeLaTeX, whic blocks loading of fonts, the ordinary tfm fonts are used instead. To get Unicode character support we use different tricks ...

3

This issue is not related to hyperref, it is really the \titleformat what causes the issue, namely the runin option. It seems to redefine the \section in a way where tex4ht isn't able to insert the HTML tags for headers and they are not saved to the TOC. Also the third section is missing from the document completely. I've found that the hang format works ...

3

The issue in this case is that the nested table is inserted inside a paragraph, which results in a non-valid ODT file. The inserted paragraph is hardwired in the configuration for table borders, so the usual paragraph blocking commands (\IgnorePar, \EndP) that are used in the tabular configuration don't work. Fortunately, we can use a make4ht build file to ...

3

It seems you can put your macro definitions at the beginning of the HTML page and the macros will be available in all subsequent math environments for MathJax. So what we can try to do is to include a file with custom macros verbatim in the HTML file using TeX4ht. Try the following file, myconfig.cfg: \Preamble{xhtml,mathjax} \Configure{@BODY}{\IgnorePar \...

2

1) yes, it is, but you must enter it as hex value: \def\mythinspace{\HCode{<span class="fine">&\#x2009;</span>}} # character must be escaped using \#. Note that this numerical entity is later replaced with actual unicode character in the HTML. You can revert it with custom unicode.4hf file 2) ~ is already active character, you can redefine ...

2

From your error log: System call: dvips -E -q -Ppdf -f test_article.idv -pp 2 > zztest_article.ps dvips: Font xccmi10 not found; characters will be left blank. dvips: Font ccr10 not found; characters will be left blank. System return: 0 it seems that your build file isn't used, as dvips instead of dvipng is called. dvips has obviously problem with ...

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 ...

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