在MS Word文档语法高亮 [英] Syntax highlighting in MS Word document
问题描述
我要插入一些C / C ++源$ C $ C到Microsoft Word文档。我有抄袭的源文件中的code和粘贴到Word中没有问题。我可以做固定宽度。但是,在Word中,我看到了黑色和白色的格式code;我松散的语法高亮,因为我在源$ C $ C编辑器(对我来说,gvim的)获得。所以,我的问题是,有没有办法做到在MS Word C / C ++源代码code的语法高亮?
I want to insert some C/C++ source code into a Microsoft Word document. I have no problem in copying the code from source file and pasting into Word. I can do fixed-width. But, in Word, I see the code in black-and-white format; I loose the syntax highlighting as I get in the source code editor (for me, gvim). So, my question is, is there any way to do syntax highlighting of C/C++ source code in MS Word?
推荐答案
我发现记事本+ + 还可以复制code作为.rtf文件。
的插件/ NppExport / RTF复制到剪贴板的
然后你可以将其粘贴到与亮点和布局字。
I found Notepad++ also can copy the code as .rtf file. Plugin/NppExport/Copy RTF to Clipboard, Then you can paste them into word with highlight and layout.
这篇关于在MS Word文档语法高亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!