我想将 tex 文件“test.tex”转换为 OpenOffice 可以读取的格式(.rtf、.doc、.docx……)。(我想用 Latex/Knitr 写我的博士论文,但我的导师不想读 Latex 或 PDF。他们只想要 OoO 或 Word……)
我对“tex4ht”有些不明白。
这是我在“test.tex”中的代码:
\documentclass{article}
%\usepackage["xhtml,ooffice" "-cmozhtf" "-coo"]{tex4ht}
%\usepackage[htlatex test.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"]{tex4ht}
\usepackage["xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"]{tex4ht}
%\usepackage[ "html,word" "symbol/!" "-cvalidate"]{tex4ht}
\oolatex
%\input tex4ht.sty
%\Preamble{"xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"}
\begin{document}
Minimal example \LaTeX\
%\EndPreamble
\end{document}
我的‘xhtml.cfg’中包含以下代码:
\begin{document}
\Preamble{"xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"}
\EndPreamble
还有一些错误信息:
Line 1 LaTex Error: Missing \begin{document}.
Line 7 Undefined control sequence.
Line 2 File ended while scanning definition of \loadr:e
Line 2 Missing { inserted.
Line 3 Undefined control sequence.
Line 3 Undefined control sequence.
Line 3 Undefined control sequence.
Line 3 Undefined control sequence.
Line 3 Undefined control sequence.
Line 3 Undefined control sequence.
但是不可能将'\begin{document}'放在第 1 行(序言之前),并且我没有看到第 2 行插入任何'{'。
在我的工作目录中,我有这些文件:test.tex;tex4ht.sty;textht.4ht;test.tmp;test.xref;xhtml.cfg;test.pdf;test.log;test.synctex.gz;test.synctex.gz
有人有想法或可以毫无问题地使用它吗?
提前感谢您,抱歉我的英语不好!