从 gedit 复制到 open office 时如何保持格式?
我正在 gedit 中编辑八度音程文件,它可以很好地突出显示它们。但是,当我尝试将代码复制并粘贴到 Open Office 中时,它会丢失所有格式。即使当我尝试粘贴>时特别的,还是不行。
有没有什么方法可以做到这一点,而不必手动检查我所有的代码突出显示关键字?
I am editing octave files in gedit, and it does a nice job highlighting them. However, when I try to copy and paste the code into Open Office, it loses all formatting. Even when I try paste > special, it still doesn't work.
Is there any way to do this without having to manually go through all my code highlighting keywords?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
免费开源编辑器KATE实际上可以以HTML格式导出Octave的代码,并保持正确的语法突出显示。
The free and open source editor KATE can actually export in HTML Octave's code keeping the correct syntax highlighting.
我遇到了同样的问题,我发现这个非常有用的页面: http://tohtml.com/
因此,您不需要安装任何其他编辑器或东西,只需复制粘贴到页面并让它完成即可。
PS:看来楼主喜欢卖域名,所以希望项目能一直在线,不然你会找到其他解决方案google:“cpp online syntaxhighlighter”
I had the same problem and I found this very usefull page: http://tohtml.com/
So you don't need to install any other editor or stuff, just copy paste to the page and let it do it.
PS: It seems like the owner likes to sell the domain, so hopefully the project will stay online, otherwise you will find other solutions google: "cpp online syntaxhighlighter"
我不知道这是否有什么好处,但如果您使用 Matlab® 编辑器打开脚本,则可以进行复制和粘贴(粘贴 > 特殊),保持 Octave 语法突出显示。
I don't know if this can be any good, but if you open the script with the Matlab® editor, then you can make copy and paste (paste > special), keeping the Octave syntax highlighting.
如果您不想安装 KDE 依赖项来运行 Kate,我找到了一个解决方案,该解决方案可以在 GNU/Linux 中的 Scite 实现(?)没有收到“复制为 RTF”命令之前工作,请查看 此处
那么让我们开始吧:
wine:Windows 模拟器 ;)
synapse:快速应用程序启动器
下载 notepad++ 安装程序版本
转到下载,
chmod +x
可执行文件(执行权限,可以在权限中以图形方式处理文件属性)安装它! (默认值有效)
现在您可以使用 synapse 轻松运行它:
如果启动:Ctrl+Space(或Super(windows 键)+Space)并输入“notepad” (如果没有出现,请按向下箭头并搜索它!)
写入文本,例如:
现在选择它,用鼠标右键“插件命令>复制带有语法突出显示的文本”
粘贴它!
在 LibreOffice Writer 中:请小心,在 Abiword 中使用 Ctrl+Shift+V 或编辑>粘贴特殊>格式化文本 [RTF]
与 < kbd>Ctrl+V
If you don't want to install KDE dependencies for run Kate I found a solution that could work until Scite implementation in GNU/Linux (?) haven't got the command "Copy as RTF", take a look here
So let's go:
wine: Windows Emulator ;)
synapse: fast application launcher
download notepad++ installer version
go to Downloads,
chmod +x
executable file (permissions to execute, could do graphically with properties of file, in permissions)install it! (with default values works)
now you can run it easily with synapse:
if is launched: Ctrl+Space (or Super (windows key)+Space) and type "notepad" (if no appear, press Arrow Down and search it!)
write a text in, for example:
and now select it, with right button of mouse "plugin commands > copy text with syntax highlighting"
paste it!
in LibreOffice Writer: be carefull, use Ctrl+Shift+V or Edit>Paste Especial>Formated Text [RTF]
in Abiword works with Ctrl+V