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

learn more… | top users | synonyms

26
votes
1answer
4k 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 ...
19
votes
1answer
2k 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) ...
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 ...
3
votes
2answers
304 views

Using htlatex with tikz-dependency

I am trying to generate an html file from a tex file using htlatex. The htlatex works well with simple tikz pictures, but it has problem with the pictures (trees) drawn with tikz-dependency package. ...
5
votes
1answer
653 views

tex4ht leaving equations unchanged

I'm trying to convert a LaTeX document to a webpage that'll be hosted on a server that's capable of processing and rendering simple TeX equations, but not doing section-level formatting. So I'm ...
36
votes
3answers
1k views

LaTeX to Braille

I would like to make my LaTeX documents as accessible as possible to those that are blind or visually impaired. The posts that I have linked to below ask questions about alt-tags or tooltips, both ...
22
votes
4answers
573 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 ...
6
votes
1answer
263 views

Converting LaTeX to HTML but keeping equations as LaTeX

I'm using tex4ht for conversion of heavily maths loaded LaTeX files into HTML to be able to serve them in a web app. Can successfully convert all equations to MathML and jsMath. But as equations are ...
5
votes
2answers
11k 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 ...
6
votes
1answer
690 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 ...
1
vote
1answer
381 views

TeX4ht (htlatex) on MiKTeX 2.9 to convert LaTeX into MathML, and then into Office MathML with Word 2010

I managed to use TeX4ht via the htlatex command on MiKTeX 2.9 to successfully convert a LaTeX document into an HTML document. The TeX file is a fairly simple test document with an integral in display ...
12
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 ...
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 ...
5
votes
1answer
410 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" ...
4
votes
1answer
123 views

Customizing tex4ht to generate html to convert to epub with Calibre

I'm trying to prepare html for conversion to an epub and have encountered a couple of problems that I would appreciate help with. Hope mixing a couple of related questions in a single post is OK. The ...
3
votes
1answer
822 views

Problems building article with oolatex and hyperref [duplicate]

I'm getting into a bit of trouble, trying to convert a Latex article to OpenOffice. First of all, I'm using Ubuntu 11.04, with a texlive 2011 installation (installed via tlmgr). EDIT1: There is now ...
38
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 ...
43
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 ...
12
votes
1answer
2k 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} ...
4
votes
2answers
877 views

Avoid eps to png conversion using mk4ht oolatex

I have a big set of eps images and I need to place them into an OpenOffice (odt) document. I wrote a simple script that creates a tex file containing these eps images and now I'm trying to convert it ...
8
votes
1answer
369 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} ...
6
votes
2answers
746 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 ...
4
votes
1answer
711 views

what is the correct way to check for latex, pdflatex and html in the same latex document?

What is the correct way to check for if one is running in pdflatex vs latex vs. an html processor such as tex4ht? Suppose I have some latex code that I only want to show up in html, and not show up ...
3
votes
1answer
647 views

Setting image size in html output of tex4ht

I have a complex document which I'm trying to convert to html with tex4ht and TeXLive under Ubuntu, but I'm not able to coherently control the image size of jpg and eps images. In html output, jpg ...
3
votes
1answer
561 views

Cross references and citations do not show in LibreOffice after htlatex conversion

When trying to convert a simple LaTeX document to LibreOffice/OpenOffice, cross references and citations do not show in the final document. They do when converting to (X)HTML, but this has other ...
3
votes
2answers
401 views

tex4ht: limit toc

When I run the following file through htlatex main html,4, the first (main) page has a table of contents that is too deeply nested. I only need part,chapter and section in my toc. The section page ...
9
votes
1answer
244 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
984 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?
7
votes
1answer
69 views

Can I get TeX4ebook to include the html table of contents in an epub

For the Kindle book I'm producing, I would like to have the .ncx ebook table of contents and an html table of contents as part of the book. However, TeX4ebook doesn't include the html TOC (in this ...
7
votes
2answers
872 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 ...
6
votes
1answer
841 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 ...
5
votes
1answer
94 views

Redefine output for a specific TS1 code point (=glyph?)

By now I know how to make \textminus in tex4ht work, but this does not seem to be enough to display a proper minus with the \num macro of siunitx. Joseph Wright provided a workaround, but I'd like to ...
5
votes
2answers
947 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: ...
4
votes
1answer
245 views

How to send output of htlatex to different folder without fixing all image links afterwords

The setup is simple. I have a file report.tex which includes an image from a folder. I send the output of htlatex to a separate directory. htlatex copies all images and HTML to that directory. The ...
4
votes
1answer
245 views

Inconsistent footnote size in converting LaTeX to OpenOffice.org

When a LaTeX document containing 2 footnotes — footnote #1 is plain ASCII, but footnote #2 has diacritics or other extended characters — is converted to odt (OpenDocument Format), the number in ...
3
votes
1answer
638 views

htlatex - need help converting latex to html

I am trying to convert a set of tex file to html. The attached code generates perfect pdf. While it gives the following error with htlatex. I have not much knowledge of tex so please help by being ...
1
vote
1answer
168 views

TeX4HT Equation unchanged with newcommand or def command

I would like to convert all the inline-math and display-math should be LaTeX format only and not for image. I had referred tex4ht leaving equations unchanged and tex4ht leaving equations unchanged - ...
1
vote
3answers
718 views

MiKTeX 2.9's tex4ht not working

According to this document and my own experience. MiKTeX 2.9's version of tex4ht is not working. Using MiKTeX 2.8's tex4ht does work, but is obviously not prefered. Does anybody know how to fix MiKTeX ...
8
votes
1answer
506 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 ...
8
votes
2answers
521 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 ...
7
votes
1answer
88 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 ...
5
votes
0answers
128 views

syntax error when using tex4ht on Latex file that uses the standalone package [closed]

When I try to use htlatex to convert a latex file to html, where the latex file uses the standalone package, a syntax error is thrown from the file keyval.tex. The Latex file works fine with ...
5
votes
1answer
180 views

How do I preserve hyperreferences in the index when converting text from LaTex to HTML

I have written a book with three indexes in LaTex. I can produce a perfect hyperreferenced pdf file using the dvipdf filename command, but I cannot convert Latex into HTML using htlatex or TEX4ht ...
4
votes
1answer
155 views

TeX capacity exceeded and parsing errors using decoration on chapter name with tex4ht

My first htlatex issue of 2014 and on the first day also :) I added this line \chapter*{\centering \begin{normalsize}my chapter title\end{normalsize}} which works fine with pdflatex, but htlatex ...
4
votes
1answer
390 views

Error using htlatex with tikz forest package, invalid SVG generated

htlatex is supposed to support tikz with \def\pgfsysdriver{pgfsys-tex4ht.def} and it does on some tikz examples, but for some other examples, it gives bad svg images. UPDATE I was able to reduce the ...
3
votes
1answer
64 views

Multipage chapter heading seems to be incompatible with htlatex

I want each chapter to start with an image and I want the text on the subsequent page. So, I defined my replacement for \chapter as follows: \newcommand{\MyChapter}[3]{% % #1 = image % #2 = ...
3
votes
1answer
38 views

How can I override tex4ht's CSS in a single .css file?

I am trying to style tex4ht output using CSS in order to make a Kindle book. For example, I want to change the verse environment using .verse { margin-left:2.5em; white-space:normal; } The Kindle ...
3
votes
1answer
82 views

Avoid already converted equation in htlatex

I have converted big LaTeX file to html format successfully (include all the equations are converted to png format). After that I have changed some LaTeX text part. How do avoid again no need equation ...
3
votes
1answer
87 views

Changing a tex4ht css class

I am using htxelatex to convert a tex file + config file of my own. I want to change the generated css objects but I can't seem to be able to. What I am doing In my config file I use the following ...
3
votes
1answer
119 views

Convert PGFplot to html?

I'd like to convert a simple piece of LaTeX code which is basically some text with some centered graphs in between. This is a dummy version of the code I'd like to convert to HTML: ...