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.

closed as too localized by yo', Thorsten, Joseph Wright Apr 15 '12 at 6:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Is your .tex file in the same folder mk4ht resides? – Sony Dec 5 '11 at 18:08
  • no - mk4ht is where TexShop installed it; I'm not sure where that location is. – celenius Dec 5 '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 5 '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 5 '11 at 19:39
  • try mk4ht oolatex ~/Docs/Article/myfile.tex assuming that /username is your own directory. – Sony Dec 5 '11 at 20:16