OpenOffice 语法突出显示

发布于 2024-07-29 17:25:30 字数 338 浏览 3 评论 0原文

我有一些大型文档要做,其中将包含我想提供传统“编码语言”语法突出显示的代码片段。 我已经搜索了样式功能来做这样的事情,但没有办法做到这一点(事实上我只能找到一个论坛,人们在其中争论是否添加此功能,但这不是重点)。

OpenOffice 有一个废弃的扩展,但使用它会冻结我的 OpenOffice 安装。

做到这一点最简单的方法是什么? 我应该尝试重新编译扩展并调试它(尽管我已经很难编译另一个 Java 项目了),还是应该使用宏? 如何实施?

I have some big documentation to do that will contain pieces of code I'd like to give the conventional "coding language" syntax highlighting. I've searched the styles feature to do such a thing, but there is no way to do that (in fact I could only found a forum where people were fighting about adding this feature or not, but this is not the point).

There is an abandoned extension for OpenOffice, but using it freezes my installation of OpenOffice.

What's the easiest way to do this? Should I try to recompile the extension and debug it (although I'm already having a hard time compiling another Java project), or maybe I should use a macro? How to implement this?

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

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

发布评论

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

评论(1

生生不灭 2024-08-05 17:25:30

一种可能是使用众多代码转 html 工具之一,然后将 html 包含在 OpenOffice 文档中(使用“插入”菜单上的“文件...”)。

一种可能性是突出显示Vim 有一个 :TOhtml 命令,可以使用以下命令将当前文件转换为语法突出显示的 html当前的配色方案。 我还没有尝试过,但看起来很有希望。 网上也有一些,比如这个。 我确信还有很多其他选择。

One possibility is to use one of the many code to html tools out there and then include the html in your OpenOffice document (using "File..." on the Insert menu).

One possibility is highlight. Vim has a :TOhtml command that will convert the current file to syntax highlighted html using the current colour scheme. I've not tried it, but this looks promising. There are also a few online ones, such as this. I'm sure there are a great many other options.

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