Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Developer Blog » Elchin's Blog » tex4ht installation

tex4ht installation tex4ht installation

Document Actions
Submitted by easgarov. on 2007-07-03 11:24. Development
tex4ht is a collection of utilities to convert latex to various xml formats. One of the utilities is oolatex, which converts from latex format to openoffice document.

Website of tex4ht utility is http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn.html
I have installed on Windows system, I haven't tried with linux yet.

So, there are essentially two ways to install tex4ht: as a MiKTeX package, and standalone. I prefered to install it as miktex package, but it appeared to be later that miktex default installation pathway has a spaces in it, and tex4ht cannot work like this.

Here were my steps:
I first installed tex4ht package through miktex package manager. My miktex instllation was at 'C:\MiKTeX 2.6' . Note that there was a space in the path.
After installing it, I added "C:\MiKTeX 2.6\miktex\bin" to system path. It can be done by doing right-click on 'My Computer', clicking properties, then going to tab "Advanced" and clicking button environment variables.
I also installed ImageMagic program, for 'convert' utility that it has, and which is needed by tex4ht. Path to it should automatically be added to system path by install program.
After that I had to do editions in tex4ht.env file, which was located at C:\MiKTeX 2.6\tex4ht\base\win32.
The editiond what I made were following:
I first had to update <ooxtpipes> tag to following:
<ooxtpipes>
.4oo move %%0.4oo %%0.tmp
.4oo java -classpath "C:\tex4ht\bin" xtpipes -i "C:\tex4ht\xttl" -o %%0.4oo %%0.tmp
.4om move %%1.4om %%1.tmp
.4om java -classpath "C:\tex4ht\bin" xtpipes -i "C:\tex4ht\xttl" -o %%1.4om %%1.tmp
</ooxtpipes>

After that, I changed names of tags <oo> and <oo-msys>. This is to make different script run for oolatex command, which works better than default one. Also, inside new <oo> tag, I had to change mv to move and cp to copy.

Another thing was that I had to copy contents of "C:\MiKTeX 2.6\tex\generic\tex4ht\bin" and "C:\MiKTeX 2.6\tex\generic\tex4ht\xttl\" to c:\tex4ht\bin and c:\tex4ht\xttl respectively, in order to make paths not contain spaces. I also had to update paths in <ooxtpipes> tag accordingly.

After this steps performed, you can go from console to folder where latex file is located and do:
oolatex [name of file].tex

I have tested with simple file containing text, and it worked. I am going to test with math and image containing documents.

Here is the google-groups (usenet) thread where I discussed my problems:
http://groups.google.com/group/comp.text.tex/browse_thread/thread/50194e8a4a37ecf1

Re: tex4ht installation

Posted by bnwest at 2007-07-09 10:52
Here is a link describing installing tex4ht along side MikTeX:

TeX4ht under MiKTeX
http://facweb.arch.ohio-state.edu/pviton/support/tex4ht.html
Developer Blog
« August 2008 »
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
2008-08-14
15:42-15:42 Signing on to Jabber from multiple locations
Categories:
Content (55)
Copyright (0)
Deep Code (3)
Development (200)
Markup (22)
Metadata (1)
Printing (7)
Style (9)
Testing (2)
Usability (6)