另一个技巧是将 TeX 的输出转换为页面图像,并将它们逐一嵌入到 Word 文档中 - 这保留了 TeX 的精确布局,并且显然对于打印以外的任何其他操作都没有用(并且打印质量可能会更差)但从技术上讲,它是一个 Word 文档。
All programs that allegedly convert a document from LaTeX to some word-processing format will lose some information that was there in the original, but apparently you're willing to live with that.
Here's one trick that may or may not be suitable for your purposes: if latex2rtf does a good enough conversion (I have no idea how it compares to the converter you are using), just rename its output from whatever.rtf to whatever.doc, and Word will open it just fine. Now if the recipient of the document wants to edit it, she may notice that it is actually not in the usual Word format, but, hey, Word behaves strangely all the time anyway.
Another trick is to convert the output of TeX into images of pages and embed them in a Word document one by one - this preserves the exact layout from TeX and will obviously be useless for anything other than printing (and the print quality will likely be worse than you get by just printing the original), but technically it is a Word document.
I haven't used it, so I cannot comment on it, but this looks somewhat like what you're looking for: tex2word and LaTeX-to-Word (the latter one looks better).
I tried many free solutions, but my LaTeX document was too complicated. In the end, commercially available GrindEQ did the best job by far. If you only need to do this once, you can use the demo version.
Lyx bundles away some of the command-line stuff so that you can export straight to the ODT file (assuming you have tex4ht installed on the path), so that might save you a few keystrokes. I'd be surprised if Kile doesn't have similar output helpers.
I've just installed GrindEQ. And it didn't convert any of my figures. I suspect that it ignores \graphicspath . latex2rtf doesn't like \autoref .
oolatex (tex4ht) failed to convert jpg images for me, though they work fine with both latex and pdflatex under MikTeX 2.9. Other images are not centered as requested by \centering.
oolatex and GrindEQ flatten \marginpar by embeding it in the main text with slightly different font. latex2rtf simply ignores \marginpar.
I guess there is no perfect tool for somewhat complex document:(
发布评论
评论(8)
所有据称将文档从 LaTeX 转换为某种文字处理格式的程序都会丢失原始文件中的一些信息,但显然您愿意接受这一点。
这里有一个技巧,可能适合也可能不适合您的目的:如果 latex2rtf 进行了足够好的转换(我不知道它与您正在使用的转换器相比如何),只需将其输出从
whatever.rtf
重命名为whatever.doc
,Word 就会很好地打开它。 现在,如果文档的收件人想要编辑它,她可能会注意到它实际上不是通常的 Word 格式,但是,嘿,无论如何,Word 的行为总是很奇怪。另一个技巧是将 TeX 的输出转换为页面图像,并将它们逐一嵌入到 Word 文档中 - 这保留了 TeX 的精确布局,并且显然对于打印以外的任何其他操作都没有用(并且打印质量可能会更差)但从技术上讲,它是一个 Word 文档。
All programs that allegedly convert a document from LaTeX to some word-processing format will lose some information that was there in the original, but apparently you're willing to live with that.
Here's one trick that may or may not be suitable for your purposes: if latex2rtf does a good enough conversion (I have no idea how it compares to the converter you are using), just rename its output from
whatever.rtf
towhatever.doc
, and Word will open it just fine. Now if the recipient of the document wants to edit it, she may notice that it is actually not in the usual Word format, but, hey, Word behaves strangely all the time anyway.Another trick is to convert the output of TeX into images of pages and embed them in a Word document one by one - this preserves the exact layout from TeX and will obviously be useless for anything other than printing (and the print quality will likely be worse than you get by just printing the original), but technically it is a Word document.
您在 OpenOffice 中打开它(使用 OOoLaTex)并另存为 .doc 是什么?
正如 Tormod 所说,一步到位就很好了:可以从命令行使用 OOo,例如 这里。
What is you open it in OpenOffice (with OOoLaTex) and saves as .doc?
As Tormod said, it would be nice with one step: may using OOo from command line like here.
我没有使用过它,所以我无法评论它,但这看起来有点像您正在寻找的内容: tex2word 和 LaTeX-to-Word (后者看起来更好)。
I haven't used it, so I cannot comment on it, but this looks somewhat like what you're looking for: tex2word and LaTeX-to-Word (the latter one looks better).
我正在使用 tex4ht 生成 HTML 文件。 我在 Word 中打开生成的
.html
。 之后,我将其保存为.docx
。 给出了良好的结果。基于此,就有了 latex2docx 项目。
I'm using tex4ht to produce an HTML file. I open the resulting
.html
in Word. Afterwords, I save it as.docx
. Gives good results.Based on that, there is the latex2docx project.
我尝试了很多免费的解决方案,但我的 LaTeX 文档太复杂了。 最后,商业上可用的 GrindEQ 做得最好。 如果您只需执行一次此操作,则可以使用演示版本。
I tried many free solutions, but my LaTeX document was too complicated. In the end, commercially available GrindEQ did the best job by far. If you only need to do this once, you can use the demo version.
Lyx 捆绑了一些命令行内容,以便您可以直接导出到 ODT 文件(假设您在路径上安装了 tex4ht),这样可能会为您节省一些击键次数。 如果 Kile 没有类似的输出助手,我会感到惊讶。
Lyx bundles away some of the command-line stuff so that you can export straight to the ODT file (assuming you have tex4ht installed on the path), so that might save you a few keystrokes. I'd be surprised if Kile doesn't have similar output helpers.
我刚刚安装了 GrindEQ。 它没有转换我的任何数字。 我怀疑它忽略了 \graphicspath 。 Latex2rtf 不喜欢 \autoref 。
oolatex (tex4ht) 未能为我转换 jpg 图像,尽管它们在 MikTeX 2.9 下与 Latex 和 pdflatex 一起工作得很好。 其他图像未按照 \centering 的要求居中。
oolatex 和 GrindEQ 通过将 \marginpar 嵌入到正文中并使用稍微不同的字体来压平它。 Latex2rtf 简单地忽略 \marginpar。
我想对于有些复杂的文档来说没有完美的工具:(
I've just installed GrindEQ. And it didn't convert any of my figures. I suspect that it ignores \graphicspath . latex2rtf doesn't like \autoref .
oolatex (tex4ht) failed to convert jpg images for me, though they work fine with both latex and pdflatex under MikTeX 2.9. Other images are not centered as requested by \centering.
oolatex and GrindEQ flatten \marginpar by embeding it in the main text with slightly different font. latex2rtf simply ignores \marginpar.
I guess there is no perfect tool for somewhat complex document:(
如果您想在一个唯一的调用行中使用此命令,可以为此编写一个 bash 脚本:
将此行写入:
<前><代码>#!/bin/bash
乳胶 $1.tex
tex4ht $1.tex
mk4ht 乌乳胶 $1.tex
使文件可执行:
chmod +x tex2odt.sh
tex2odt.sh FiletoConvert
希望这仍然对
Namastê有帮助
If you want to use this commands in one unique line of call, could write a single bash script for that:
Write this lines in:
Make the file executable:
chmod +x tex2odt.sh
tex2odt.sh FiletoConvert
Hope this still helps
Namastê