TeX4ht is a highly configurable TeX-based authoring system dedicated mainly to produce hypertext.

learn more… | top users | synonyms

42
votes
5answers
3k views

Why haven't any TeX->HTML converters been updated to use current web standards/style?

I think that updating these converters would help TeX stay relevant as a document processing language. In these last few years, web development has really skyrocketed. CSS3 has brought along a lot of ...
36
votes
5answers
7k views

Recommended workflow? LaTeX -> ePub with math viewable on iPad

This started as a comment in an older thread, but I thought I repost it here as a question to the forum... I'm looking for a workflow that will take me efficiently and reliably from existing LaTeX ...
35
votes
3answers
1k views

LaTeX to Braille

Accessibility for the visually impaired is becoming a big issue. The posts that I have linked to below ask questions about alt-tags or tooltips, both of which would be great options. I would like to ...
25
votes
1answer
3k views

Convert Latex to MathJax-HTML

Is there any tool that can convert Latex documents to HTML documents, so that all math is presented with MathJax? (Obviously, it is fairly easy to hack together a quick Perl script that is able to do ...
22
votes
4answers
554 views

Is there an \iftex4ht command, and if not, how should it be defined?

Background: I'm using TikZ to generate a load of pictures that I want to put on the web as SVGs. So I'm using the pgfsys-tex4ht.def driver and it's working very well. My gut feeling is that the SVG ...
19
votes
1answer
1k views

Maintaining layout of Tikz diagrams with TeX4ht (converting as single pictures)

A Tikz diagram such as \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path (0,0) node[draw] (A) {A}; \path (2,0) node[draw] (B) {B}; \draw (A) -- (B) ...
12
votes
1answer
1k views

Generation of simple, CSS-less HTML with htlatex

When htlatex converts a document, emphasis and bold-face are converted to spans of a certain style which is defined in the accompanying CSS file. Input: \documentclass{scrartcl} \begin{document} ...
11
votes
2answers
2k views

PDF image files and `htlatex`

When eps files are provided, htlatex from tex4ht automatically converts to png files so that graphic files can be shown in the final html output. However, I use most of the time the pdf graphic file ...
11
votes
2answers
858 views

How do I tweak the output of tex4ht's latex-to-openoffice conversion?

Every now and then I am required to circulate a document in Word format; I write in LaTeX, of course. I use xelatex because I frequently need Unicode; I do bibliographies with biblatex; and I ...
10
votes
1answer
302 views

extra “]” displayed when using htlatex in TL 2013 with \usepackage{hyperref}

I noticed I am getting a new char displayed on the HTML page which did not exist when I was using TL 2012 with htlatex. I narrowed it down to including \usepackage{hyperref} This extra "]" shows only ...
10
votes
2answers
343 views

PDF page references in TeX4ht generated html?

I'm using TeX4ht to make html and epub versions of documents that are also processed to pdf. I'm unclear on how to include some kind of visual page references in the html and epub that correlate to ...
9
votes
2answers
600 views

TeX4ht: \includegraphics[page=10]{foo.pdf}

I have a long LaTeX document with lots of figures that were included using commands of the form \includegraphics[page=10]{foo.pdf} Everything compiles fine with pdfLaTeX. I planned to convert the ...
9
votes
1answer
230 views

how to redefine \begin{align*} … \end{align*} to \begin{eqnarray*} … \end{eqnarray*}

Scientific word insists in generating displayed math using \begin{align*} ... \end{align*} and htlatex has a bug in that it does not generate bit mapped images in this case. The fix that I found ...
9
votes
1answer
122 views

Why does tex4ht search for tfm files?

Can somebody explain me why tex4ht searches tfm files? What does it do with that tfm file? At first I thought that it needs a tfm name, that it could find the .enc file from psfonts.map. From .enc it ...
9
votes
2answers
777 views

Incompatibility of biblatex and tex4ht when using defernumbers

There seems to be a known incompatibility between biblatex and tex4ht when using defernumbers=true. I have one large .bib file. In the document I want to group the references into different ...
9
votes
1answer
950 views

text4ht and LuaTeX

There is a specific command to run tex4ht with XeTeX: htxelatex (which doesn't really work actually as far as I'm concerned). What is the command to run text4ht with LuaTeX instead?
9
votes
1answer
257 views

Producing unformatted html with tex4ht?

When using tex4ht, a formatted html file is obtained. It uses a css file and multiple classes such as <span class="ec-lmbx-10x-x-109">toto</span> However, when using a Content ...
8
votes
1answer
460 views

Using tikz with both tex4ht and pdflatex

I found that in order to use tikz with tex4ht to produce HTML, I need to do the following: \def\pgfsysdriver{pgfsys-tex4ht.def} \usepackage{tikz} I also need to produce PDF from the same tex file ...
8
votes
2answers
497 views

Removing ligatures for small caps in TeX4HT

The Amazon Kindle has a default font which features small caps and ligatures, but not ligatures for small caps. For this reason, when it sees ligatures (even common ones, such as "ff"), it renders them ...
8
votes
2answers
793 views

conversion issues using htlatex and MathJax/mathML method

I am using the method shown in this answer below to convert my LaTeX file to HTML so that the resulting LaTeX file is processed by MathJax via MATHML: Convert Latex to MathJax-HTML "... mathml ...
8
votes
3answers
2k views

LaTeX to HTML: PolyTeXnic and PlasTeX

I was stunned by the elegant appearance of the Tau manifesto page, for which the source is in LaTeX. The author used a home-made tool that he calls PolyTeXnic, but which he is not willing to release. ...
8
votes
1answer
557 views

tex4ht: alt text for images of equations

I'm using tex4ht to translate LaTeX to (X)HTML. Tex4ht automatically generates images of equations it could not translate directly into text. Problem: the filename of the image generated, as well as ...
8
votes
1answer
601 views

tex4ht gives 'illegal storage address' error when trying to convert to odt

I am trying to convert a LaTeX document to opendocument with TeX4ht (on Windows/MiKTeX 2.9 32-bit). I am using the following command (as suggested on the TeX4ht website): D:\latex>htlatex mwe.tex ...
8
votes
1answer
330 views

tex4ht problems with footnotes

I have a problem with footnotes and tex4ht. The following document has a wrong next pointer in subsection 1 and a bad previous pointer in subsection 3: \documentclass{book} \begin{document} ...
7
votes
1answer
2k views

LaTeX --> (X)HTML with tex4ht: bad quality images of equations

I'm using tex4ht to produce XHTML files from a LaTeX file. The XHTML file I obtain uses images for some equations which tex4ht could not convert directly to XHTML. Problem: images of equations have ...
7
votes
1answer
244 views

why “ff” displays strange using unicode encoding vs. iso-8859-1 in HTML output from tex4ht?

I understand that one should (?) be using UNICODE for html. But using this with tex4ht, always makes "ff" look strange. Why does this happen for "ff"? and based on this test below, should one instead ...
7
votes
1answer
68 views

\textminus in tex4ht

Is there a way to make tex4ht aware of the \textminus command? \documentclass{scrartcl} \usepackage{textcomp} \pagestyle{empty} \begin{document} \textminus 5 \end{document} works as expected ...
7
votes
2answers
820 views

biblatex & TeX4HT: citations in footnotes = missing \begin{document}

the following code, which I'm trying to run through TeX4HT and biber in order to create an .odt file, results in a »missing \begin{document}« error, pointing to the aux file. Something about the ...
7
votes
1answer
417 views

tex4ht, html output: increase eps image resolution without affecting math images size

I have the following MWE: \documentclass{book} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} Lorem ipsum dolor sit amet, \(k_\delta=\frac{3 ...
6
votes
4answers
2k views

Verbatim environment with background color (PDFLaTeX and tex4ht)

I need to make a verbatim environment with gray background color, such as: That needs to work with PDFTeX and tex4ht on an older TeX installation (from 2009 I believe). My approach so far is ...
6
votes
3answers
1k views

Htlatex and Tikz creates sometimes incorrect svgs

I have a document with a large number of Tikz pictures and I need to generate a html page from it. I have declared a driver to have TikZ pictures as SVGs (after this question) and run htlatex ...
6
votes
1answer
1k views

How to convert to odt using xparse and mk4ht oolatex

Both tex4ht and htlatex compile documents with package xparse. But mk4ht oolatex doesn't. Running it on a document as simple as: \documentclass{article} \usepackage{xparse} \begin{document} a ...
6
votes
1answer
793 views

LaTeX to HTML preserving code coloring from listings

I'm trying to convert some LaTeX into HTML but my code listings don't preserve their code coloring. Why is that and how do I fix it? This is what it looks like: Side note: I'm also wondering why ...
6
votes
1answer
166 views

Hyperlinks in zref

I use the great package zref to create my own referencing system. Can I make hyperlinks for pdftex (and tex4ht)? See the following code. I'd like to make the \showref command clickable, so that I ...
6
votes
1answer
506 views

Converting all math to graphics with TeX4ht

TeX4ht converts all \(...\), \[...\], $$...$$ and other math environments to png format. However, it does not convert $...$ to png. It first tries to use html codes for $...$ math, and if it is not ...
6
votes
2answers
722 views

tex4ht: reuse png images instead of creating new ones

I have a lot of PNG images in my document, which (the document) I'd like to convert to HTML using tex4ht (htlatex). Now the images need to be in EPS format, as htlatex uses DVI mode. So I run convert ...
6
votes
1answer
317 views

htlatex with article vs memoir

Why does the following document (with article document class): \documentclass{article} \begin{document} \begin{tabular}{c|c} \hline 1 & 2 \\ \hline \hline 5 & 6 \\ \hline \end{tabular} ...
6
votes
1answer
537 views

How export LaTeX to OpenDocument format with Biblatex references

I am trying to export a LaTeX document to OpenDocument (.odt) format. This operation is requested by some publishers which do not know how to handle LaTeX files. I can't find a way of exporting ...
6
votes
1answer
225 views

TeX4HT, first paragraph and indentation

In a book, I set up indentation to be 1em for every paragraph, including the first paragraph in sections: \setlength{\parindent}{1em} However, TeX4HT doesn't honor this setting and sets the first ...
6
votes
1answer
497 views

Apparent conflict between hyperref and tex4ht packages

I am trying to use both the hyperref and tex4ht packages to format a textbook into a web textbook. Everything works except if I comment out chapter one, but if I include chapter one in the document, ...
6
votes
1answer
668 views

tex4ht leaving equations unchanged - including \[…\] and \(…\)

I want to let tex4ht leave the equations unchanged. Using the tip given at tex4ht leaving equations unchanged, it works for $ and $$ equations. In the case of \[...\] and \(...\) equations it does not ...
6
votes
0answers
44 views

tex4ht removes spaces in array column when including a package even if the package is not used

In the following cases, Tex4ht generates an HTML file with no spaces between the columns of the matrix if some package is included, even if the package is not used. Removing the package, the space ...
6
votes
0answers
175 views

error using pgfsysdriver with tex4ht, only shows up with texlive 2014, ok with texlive 2013

Update: Thanks to the comments below. Using the link by Michal below, it appears this is a known bug but the fix was not in 2014. Doing the change as pointed out in the link below, seems to have fixed ...
6
votes
0answers
218 views

Undefined control sequence \Hy@MakeCurrentHrefAuto when using tex4ht

I'm producing a small encyclopedia with the memoir class which relies fairly heavily on \nameref. If it's relevant, I have my project directory set up so that I have a folder called articles/ which ...
6
votes
0answers
104 views

Can you run mk4ht on iPad or Android?

I need to create html files from tex using mk4ht on an iPad or an Android tablet... Is there any way to run mk4ht on iOS or Android? Preferably without requiring Internet connection, but if that's not ...
5
votes
3answers
514 views

LaTeX to HTML - Square roots

I used SimpleTeX4ht to convert a LaTeX file to HTML. The file is fine except that square roots are rendering badly in juxtaposition with the rest of the text, e.g. like: Any suggestions on how to ...
5
votes
1answer
388 views

Control the <p> tags added by Tex4HT

TeX4HT allows to reset LaTeX macros to insert HTML code in order to produce clean HTML documents. This is great, but it often gets in a mess of <p> tags, such as: <p class="noindent" ...
5
votes
2answers
227 views

How to write tex4ht source files

How can I learn how to edit 4ht files? What should I read? I want to fix a number of issues in ooffice.4ht (inconsistent footnote size, style names which mismatch names used by LibreOffice, dangling ...
5
votes
2answers
891 views

When generating html, how do you specify image size?

I am using htlatex (or as many people call it tex4ht) to generate html and I have included some graphics. Htlatex seems to ignore all the size arguments I give the image size. I've tried specifying: ...
5
votes
2answers
10k views

Using htlatex to convert LaTeX to HTML

I appear to have htlatex and htxelatex already installed on my computer. However when I try to run them, it comes up with the message, 'I can't write on file 'texput.log'' I am trying to convert a ...