如何将 Latex 文档转换为 Microsoft Word 2003?

发布于 2024-07-16 09:21:16 字数 1459 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

凉城已无爱 2024-07-23 09:21:16

所有据称将文档从 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 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.

江挽川 2024-07-23 09:21:16

您在 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.

凶凌 2024-07-23 09:21:16

我没有使用过它,所以我无法评论它,但这看起来有点像您正在寻找的内容: tex2wordLaTeX-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).

旧时模样 2024-07-23 09:21:16

我正在使用 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.

许一世地老天荒 2024-07-23 09:21:16

我尝试了很多免费的解决方案,但我的 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.

岛徒 2024-07-23 09:21:16

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.

手心的温暖 2024-07-23 09:21:16

我刚刚安装了 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:(

辞旧 2024-07-23 09:21:16

如果您想在一个唯一的调用行中使用此命令,可以为此编写一个 bash 脚本:

  • 创建一个名为 tex2odt.sh 的新文件
  • 将此行写入:

    <前><代码>#!/bin/bash
    乳胶 $1.tex
    tex4ht $1.tex
    mk4ht 乌乳胶 $1.tex

  • 使文件可执行:chmod +x tex2odt.sh

  • 使用 tex 文件名调用脚本,不带扩展名: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:

  • Create a new file named tex2odt.sh
  • Write this lines in:

    #!/bin/bash
    latex $1.tex
    tex4ht $1.tex
    mk4ht oolatex $1.tex
    
  • Make the file executable: chmod +x tex2odt.sh

  • call the script with the name of tex file without the extension: tex2odt.sh FiletoConvert

Hope this still helps

Namastê

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文