3

Based on advice from this question I'm trying to use tex4ht to convert a latex document into something readable by MS Word. I was planning to use tex4ht to convert .tex to odt format.

I'm running into problems though. I'm using a mac, and have TeXShop installed. I ran the line:

mk4ht oolatex myfile.tex 

but I then got the message:

! LaTeX Error: File `preamble.tex' not found.

The file preamble.tex does exist in my main document; I linked the file by using the line \input{preamble} in myfile.tex. As myfile.tex is very large I want to use a lot of input{} commands.

Is there a different command (or approach) that I can take to convert this file?

Just to clarify, I also ran the command in the form htlatex myfile.tex which resulted in the same error message.

celenius
  • 5,274
  • 1
    Is your .tex file in the same folder mk4ht resides? – Sony Dec 05 '11 at 18:08
  • no - mk4ht is where TexShop installed it; I'm not sure where that location is. – celenius Dec 05 '11 at 18:38
  • just to clarify, I simplified my file path for the question. myfile.tex is actually /username/Docs/Article/myfile.tex – celenius Dec 05 '11 at 19:12
  • You could run a script before running latex like this to find and replace all \input lines with the contents of the file. – Scribblemacher Dec 05 '11 at 19:39
  • try mk4ht oolatex ~/Docs/Article/myfile.tex assuming that /username is your own directory. – Sony Dec 05 '11 at 20:16
  • Just to confirm - are myfile.tex and preamble.tex in the same folder? Because htlatex myfile and mk4ht oolatex myfile work for me just fine (Macbook Pro running TeXLive 2011). – imnothere Dec 06 '11 at 04:00
  • Yes - myfile.tex and preamble.tex are in the same folder. I'll try testing this out with a complete file to check if I have the same problem. – celenius Dec 07 '11 at 14:22

0 Answers0